local _G = getfenv(0)

function Skinner:EQL3()
	if not self.db.profile.QuestLog or self.initialized.QuestLog then return end
	self.initialized.QuestLog = true
	
	self:Hook("QuestLog_UpdateQuestDetails", function(doNotScroll)
--		self:Debug("QuestLog_UpdateQuestDetails")
		self.hooks.QuestLog_UpdateQuestDetails(doNotScroll)
		for i = 1, 10 do
		    local r, g, b, a = _G["EQL3_QuestLogObjective"..i]:GetTextColor()
		    _G["EQL3_QuestLogObjective"..i]:SetTextColor(BTr - r, BTg - g, BTb)
		end
		local r, g, b, a = EQL3_QuestLogRequiredMoneyText:GetTextColor()
		EQL3_QuestLogRequiredMoneyText:SetTextColor(BTr - r, BTg - g, BTb)
		EQL3_QuestLogRewardTitleText:SetTextColor(HTr, HTg, HTb)
		EQL3_QuestLogItemChooseText:SetTextColor(BTr, BTg, BTb)
		EQL3_QuestLogItemReceiveText:SetTextColor(BTr, BTg, BTb)
		end)
	
	self:removeRegions(EQL3_QuestLogFrame)
	self:removeRegions(EQL3_QuestLogFrame_Description)
	self:keepRegions(EQL3_QuestLogFrame_Details, {1,2,6})
	self:removeRegions(EQL3_QuestFrameOptionsButton,{2,4})
	self:removeRegions(EQL3_QuestFramePushQuestButton,{2,4})
	self:removeRegions(EQL3_QuestLogFrameAbandonButton,{2,4})
	self:removeRegions(EQL3_QuestLogDetailScrollFrame)
	
	self:moveObject(EQL3_QuestLogFrameCloseButton, "+", 25, nil, nil)
	self:moveObject(EQL3_QuestLogFrameAbandonButtonText, nil, nil, "+", 2)
	self:moveObject(EQL3_QuestFramePushQuestButtonText, nil, nil, "+", 2)
	self:moveObject(EQL3_QuestFrameOptionsButtonText, nil, nil, "+", 2)
	self:moveObject(EQL3_QuestLogDetailScrollFrame, "+", 40, nil, nil)
	
	EQL3_QuestLogFrame_Description:SetWidth(EQL3_QuestLogFrame_Description:GetWidth() + 40)
	EQL3_QuestLogFrame:SetWidth(EQL3_QuestLogFrame:GetWidth() - 20)
	
	EQL3_QuestLogTitleText:ClearAllPoints()
	EQL3_QuestLogTitleText:SetPoint("TOPLEFT", EQL3_QuestLogFrame, "TOPLEFT", 15, -10)
	
	EQL3_QuestLogVersionText:ClearAllPoints()
	EQL3_QuestLogVersionText:SetPoint("TOPLEFT", EQL3_QuestLogTitleText, "TOPRIGHT", -100, 0)
	
	EQL3_QuestLogQuestCount:ClearAllPoints()
	EQL3_QuestLogQuestCount:SetPoint("TOPLEFT", EQL3_QuestLogTrackTitle, "TOPRIGHT", 40, 0)
	
	
	EQL3_QuestLogQuestTitle:SetTextColor(HTr, HTg, HTb)
	EQL3_QuestLogObjectivesText:SetTextColor(BTr, BTg, BTb)
	EQL3_QuestLogDescriptionTitle:SetTextColor(HTr, HTg, HTb)
	EQL3_QuestLogQuestDescription:SetTextColor(BTr, BTg, BTb)
	
	self:skinScrollBar(EQL3_QuestLogListScrollFrame)
	self:skinScrollBar(EQL3_QuestLogDetailScrollFrame)
	
	self:applySkin(EQL3_QuestLogFrame)
	self:applySkin(EQL3_QuestFrameOptionsButton)
	self:applySkin(EQL3_QuestFramePushQuestButton)
	self:applySkin(EQL3_QuestLogFrameAbandonButton)
	self:applySkin(EQL3_QuestLogFrame_Description)
	
--    self:removeRegions(EQL3_OptionsFrame, {1}) --  region 2 is the title
    self:removeRegions(EQL3_OptionsFrame_Button_RestoreColors,{2,4})
    self:removeRegions(EQL3_OptionsFrame_Button_RestoreTracker,{2,4})
    self:removeRegions(EQL3_OptionsFrame_Button_QuestLog,{2,4})
    
    self:applySkin(EQL3_OptionsFrame, true)
    self:applySkin(EQL3_OptionsFrame_Button_RestoreColors)
    self:applySkin(EQL3_OptionsFrame_Button_RestoreTracker)
    self:applySkin(EQL3_OptionsFrame_Button_QuestLog)

end
