--------------------------------------------
--
-- SMART UNIT FRAME NUDE SKIN
--
--------------------------------------------
SMART_SKIN_ENABLE = true;
SMART_SKIN_NAME = "Raputa";
SMART_SKIN_Config = {statusStyle="otravi"};
SMART_SKIN_statusStyle = {"bantobar","otravi","smooth","charcoal","sponge","water","scratch"};

SUF.PartyTarget.xPos = 90

CreateFrame("Frame", "SmartUnitFrameNude", UIParent)
SmartUnitFrameNude:RegisterEvent("PLAYER_ENTERING_WORLD");
SmartUnitFrameNude:SetScript("OnEvent", function() SmartUnitFrameNude_StartUp() end)

local initialized = false

function SmartUnitFrameNude_StartUp()
	if initialized then
		return
	end

	initialized = true

	PetFrameTexture:SetAlpha(0)
	PetFrameHealthBar:ClearAllPoints()
	PetFrameHealthBar:SetFrameLevel(PetFrame:GetFrameLevel()+1)
	PetFrameHealthBar:SetPoint("TOPLEFT",PetFrame,"TOPLEFT",44,-20)
	PetFrameHealthBar:SetWidth(76)
	PetFrameHealthBar:SetHeight(14)
	PetFrameManaBar:SetFrameLevel(PetFrame:GetFrameLevel()+1)
	PetFrameManaBar:ClearAllPoints()
	PetFrameManaBar:SetPoint("TOPLEFT",PetFrameHealthBar,"BOTTOMLEFT",0,0)
	PetFrameManaBar:SetWidth(76)
	PetFrameManaBar:SetHeight(6)

	if SMART_BUFFDEBUFF_ENABLE then
		SmartPetFrameBuff1:ClearAllPoints()
		SmartPetFrameBuff1:SetPoint("TOPLEFT",PetFrameManaBar,"BOTTOMLEFT",0,-3)
	end

	SmartPetFrameHealthBarText:ClearAllPoints()
	SmartPetFrameHealthBarText:SetPoint("CENTER",PetFrameHealthBar,"CENTER",0,1)
	SmartPetFrameManaBarText:ClearAllPoints()
	SmartPetFrameManaBarText:SetPoint("CENTER",PetFrameManaBar,"CENTER",0,0)
	
	PetPortrait:ClearAllPoints()
	PetPortrait:SetPoint("TOPLEFT",PetFrame,"TOPLEFT",6,-10)
	PetPortrait:SetWidth(33)
	PetPortrait:SetHeight(33)

	PetAttackModeTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
	PetAttackModeTexture:SetWidth(PetPortrait:GetWidth())
	PetAttackModeTexture:SetHeight(PetPortrait:GetHeight())
	PetAttackModeTexture:SetTexCoordModifiesRect(false)
	PetAttackModeTexture:SetTexCoord(0,1,0,1)
	PetAttackModeTexture:ClearAllPoints()
	PetAttackModeTexture:SetPoint("CENTER",PetPortrait,"CENTER",0,0)
	PetAttackModeTexture:SetVertexColor(1,0.5,0)

	CreateFrame("Frame", "SmartPetNudePortrait", PetFrame)

	SmartPetNudePortrait:SetFrameLevel(PetFrame:GetFrameLevel()-1)
	SmartPetNudePortrait:SetPoint("TOPLEFT",PetPortrait,"TOPLEFT",-5,5)
	SmartPetNudePortrait:SetPoint("BOTTOMRIGHT",PetPortrait,"BOTTOMRIGHT",5,-5)
	SmartPetNudePortrait:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})

	SmartPetNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
	CreateFrame("Frame", "SmartPetNudeFrame", PetFrame)
	SmartPetNudeFrame:SetFrameLevel(PetFrame:GetFrameLevel())
	SmartPetNudeFrame:SetPoint("TOPLEFT",PetFrameHealthBar,"TOPLEFT",-5,5)
	SmartPetNudeFrame:SetPoint("BOTTOMRIGHT",PetFrameManaBar,"BOTTOMRIGHT",5,-5)
	SmartPetNudeFrame:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})

	SmartPetNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)

	CreateFrame("StatusBar", "SmartPetNudeFrameHealthBarBack", PetFrame)
	SmartPetNudeFrameHealthBarBack:SetFrameLevel(PetFrame:GetFrameLevel())
	SmartPetNudeFrameHealthBarBack:SetPoint("TOPLEFT",PetFrameHealthBar,"TOPLEFT",0,0)
	SmartPetNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",PetFrameHealthBar,"BOTTOMRIGHT",0,0)
	SmartPetNudeFrameHealthBarBack:SetAlpha(0.5)

	CreateFrame("StatusBar", "SmartPetNudeFrameManaBarBack", PetFrame)
	SmartPetNudeFrameManaBarBack:SetFrameLevel(PetFrame:GetFrameLevel())
	SmartPetNudeFrameManaBarBack:SetPoint("TOPLEFT",PetFrameManaBar,"TOPLEFT",0,0)
	SmartPetNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",PetFrameManaBar,"BOTTOMRIGHT",0,0)
	SmartPetNudeFrameManaBarBack:SetAlpha(0.5)

	if SMART_BUFFDEBUFF_ENABLE then
		SmartPartyDebuff_Position = SmartSkinRaputa_SmartPartyDebuff_Position
	end

	local prefix, frame, smartPrefix, smartFrame, nudePrefix, nudeFrame, portraitPrefix, portraitFrame
	local healthBar, manaBar

	for id=1, MAX_PARTY_MEMBERS do
		prefix = "PartyMemberFrame"..id
		smartPrefix = "SmartPartyFrame"..id
		portraitPrefix = "SmartPartyNudePortrait"..id
		nudePrefix = "SmartPartyNudeFrame"..id

		frame = getglobal(prefix)

		frame:SetWidth(200)

		getglobal(prefix.."Texture"):SetAlpha(0)
		getglobal(prefix.."Texture"):Hide(0)
	
		healthBar = getglobal(prefix.."HealthBar")
		healthBar:SetFrameLevel(frame:GetFrameLevel()+1)
		healthBar:SetPoint("TOPLEFT", frame, "TOPLEFT", 45, -13)
		healthBar:SetWidth(122)
		healthBar:SetHeight(16)
		healthBar:SetHitRectInsets(0, healthBar:GetWidth(), 0, healthBar:GetHeight())

		manaBar = getglobal(prefix.."ManaBar")
		manaBar:ClearAllPoints()
		manaBar:SetFrameLevel(healthBar:GetFrameLevel())
		manaBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1)
		manaBar:SetWidth(122)
		manaBar:SetHeight(12)
		manaBar:SetHitRectInsets(0, manaBar:GetWidth(), 0, manaBar:GetHeight())

		getglobal(smartPrefix.."HealthBarText"):ClearAllPoints()
		getglobal(smartPrefix.."HealthBarText"):SetPoint("RIGHT",getglobal(prefix.."HealthBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."HealthBarText"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."HealthPercent"):ClearAllPoints()
		getglobal(smartPrefix.."HealthPercent"):SetPoint("RIGHT",getglobal(prefix.."HealthBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."HealthPercent"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."HealthLoss"):ClearAllPoints()
		getglobal(smartPrefix.."HealthLoss"):SetPoint("LEFT",getglobal(prefix.."HealthBar"),"LEFT",3,1)
		getglobal(smartPrefix.."HealthLoss"):SetJustifyH("LEFT")
		getglobal(smartPrefix.."StatusText"):ClearAllPoints()
		getglobal(smartPrefix.."StatusText"):SetPoint("LEFT",getglobal(prefix.."HealthBar"),"LEFT",3,1)
		getglobal(smartPrefix.."StatusText"):SetJustifyH("LEFT")
		getglobal(smartPrefix.."ManaBarText"):ClearAllPoints()
		getglobal(smartPrefix.."ManaBarText"):SetPoint("RIGHT",getglobal(prefix.."ManaBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."ManaBarText"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."ManaPercent"):ClearAllPoints()
		getglobal(smartPrefix.."ManaPercent"):SetPoint("RIGHT",getglobal(prefix.."ManaBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."ManaPercent"):SetJustifyH("RIGHT")

		-- Portrait
		getglobal(prefix.."Portrait"):SetPoint("TOPLEFT", frame, "TOPLEFT", 4, -6)

		-- Portrait Frame
		portraitFrame = CreateFrame("Frame", portraitPrefix, frame)
		portraitFrame:SetFrameStrata("BACKGROUND")
		--portraitFrame:SetFrameLevel(frame:GetFrameLevel()-1)
		portraitFrame:SetPoint("TOPLEFT",getglobal(prefix.."Portrait"),"TOPLEFT",-5,5)
		portraitFrame:SetPoint("BOTTOMRIGHT",getglobal(prefix.."Portrait"),"BOTTOMRIGHT",5,-5)
		portraitFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		portraitFrame:SetBackdropBorderColor(0.4,0.4,0.4)

		getglobal(prefix.."MasterIcon"):SetPoint("TOPLEFT", getglobal(prefix.."MasterIcon"):GetParent(), "TOPLEFT", 28, -28)
		getglobal(prefix.."PVPIcon"):ClearAllPoints()
		getglobal(prefix.."PVPIcon"):SetPoint("TOPLEFT", portraitFrame, "TOPLEFT", -12, -8)

		if SMART_PVPICON_ENABLE then
			getglobal(prefix.."PVPRankIcon"):ClearAllPoints()
			getglobal(prefix.."PVPRankIcon"):SetPoint("BOTTOMRIGHT", portraitFrame, "BOTTOMLEFT", 4, 0)
		end

		-- Nude Frame
		nudeFrame = CreateFrame("Frame", nudePrefix, frame)
		nudeFrame:SetFrameStrata("BACKGROUND")
		--nudeFrame:SetFrameLevel(frame:GetFrameLevel())
		nudeFrame:SetPoint("TOPLEFT",getglobal(prefix.."HealthBar"),"TOPLEFT",-5,5)
		nudeFrame:SetPoint("BOTTOMRIGHT",getglobal(prefix.."ManaBar"),"BOTTOMRIGHT",5,-5)
		nudeFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		nudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)

		healthBar = CreateFrame("StatusBar", nudePrefix.."HealthBarBack", frame)
		healthBar:SetFrameLevel(frame:GetFrameLevel())
		healthBar:SetPoint("TOPLEFT",getglobal(prefix.."HealthBar"),"TOPLEFT",0,0)
		healthBar:SetPoint("BOTTOMRIGHT",getglobal(prefix.."HealthBar"),"BOTTOMRIGHT",0,0)
		healthBar:SetAlpha(0.5)

		manaBar = CreateFrame("StatusBar", nudePrefix.."ManaBarBack", frame)
		manaBar:SetFrameLevel(frame:GetFrameLevel())
		manaBar:SetPoint("TOPLEFT",getglobal(prefix.."ManaBar"),"TOPLEFT",0,0)
		manaBar:SetPoint("BOTTOMRIGHT",getglobal(prefix.."ManaBar"),"BOTTOMRIGHT",0,0)
		manaBar:SetAlpha(0.5)
		--
		
		-- Smart Frames : class icon and level text
		if (SMART_CLASSICON_ENABLE and SMART_CLASSICON_PARTY) or (IsAddOnLoaded("Icons")) then
			getglobal(smartPrefix.."LevelText"):ClearAllPoints()
			getglobal(smartPrefix.."LevelText"):SetPoint("BOTTOMLEFT", portraitFrame, "BOTTOMLEFT",5,5)
			getglobal(smartPrefix.."LevelText"):SetJustifyH("LEFT")
		else
			getglobal(smartPrefix.."LevelText"):ClearAllPoints()
			getglobal(smartPrefix.."LevelText"):SetPoint("BOTTOMRIGHT", getglobal(prefix.."Name"),"BOTTOMLEFT",-1,0)
			getglobal(smartPrefix.."LevelText"):SetJustifyH("RIGHT")
		end
		getglobal(smartPrefix.."LevelText"):SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",15,"OUTLINE")
		-- Smart Frames : buff/debuff
		if SMART_BUFFDEBUFF_ENABLE then
			getglobal(smartPrefix.."Buff1"):ClearAllPoints()
			getglobal(smartPrefix.."Buff1"):SetPoint("TOPLEFT",getglobal(prefix.."ManaBar"),"BOTTOMLEFT",0,-4)
			getglobal(smartPrefix.."Debuff1"):ClearAllPoints()
			getglobal(smartPrefix.."Debuff1"):SetPoint("LEFT",getglobal(prefix.."HealthBar"),"RIGHT",8,0)
		end

		--
		getglobal(prefix.."StatusTexture"):SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")

		-- Pet
		healthBar = getglobal(prefix.."PetFrameHealthBar")
		healthBar:ClearAllPoints()
		healthBar:SetPoint("LEFT",getglobal(prefix.."PetFramePortrait"),"RIGHT",4,-1)
		healthBar:SetWidth(100)
		healthBar:SetHeight(12)
		healthBar:SetHitRectInsets(0, healthBar:GetWidth(), 0, healthBar:GetHeight())
		getglobal(prefix.."PetFrameTexture"):SetAlpha(0)
		getglobal(prefix.."PetFrameTexture"):Hide()

		healthBar = CreateFrame("Frame", prefix.."PetFrameHealthBarFrame", getglobal(prefix.."PetFrameHealthBar"))

		healthBar:SetFrameStrata("BACKGROUND")
		healthBar:SetPoint("TOPLEFT", getglobal(prefix.."PetFrameHealthBar"), "TOPLEFT", -5, 5)
		healthBar:SetPoint("BOTTOMRIGHT", getglobal(prefix.."PetFrameHealthBar"), "BOTTOMRIGHT", 5, -5)
		healthBar:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		healthBar:SetBackdropBorderColor(0.4,0.4,0.4)

		-- Smart Frames : Pet buff, health bar text
		if SMART_BUFFDEBUFF_ENABLE then
			getglobal(smartPrefix.."PetFrameBuff1"):ClearAllPoints()
			getglobal(smartPrefix.."PetFrameBuff1"):SetPoint("TOPLEFT",getglobal(prefix.."PetFrameHealthBar"),"BOTTOMLEFT",0,-4)
		end
		getglobal(smartPrefix.."PetFrameHealthBarText"):ClearAllPoints()
		getglobal(smartPrefix.."PetFrameHealthBarText"):SetPoint("CENTER",getglobal(prefix.."PetFrameHealthBar"),"CENTER",0,1)
		getglobal(smartPrefix.."PetFrameHealthBarText"):SetJustifyH("CENTER")

		PartyMemberFrame_UpdatePet(frame, id)
	end

	-- Party Target Frame
	for id=1, MAX_PARTY_MEMBERS do
		prefix = "PartyTargetFrame"..id
		smartPrefix = "SmartPartyTargetFrame"..id
		portraitPrefix = "SmartPartyTargetNudePortrait"..id
		nudePrefix = "SmartPartyTargetNudeFrame"..id

		frame = getglobal(prefix)

		frame:SetWidth(200)

		getglobal(prefix.."Texture"):SetAlpha(0)
		getglobal(prefix.."Texture"):Hide(0)
	
		healthBar = getglobal(prefix.."HealthBar")
		healthBar:SetFrameLevel(frame:GetFrameLevel()+1)
		healthBar:SetPoint("TOPLEFT",frame,"TOPLEFT",45,-13)
		healthBar:SetWidth(122)
		healthBar:SetHeight(16)
		healthBar:SetHitRectInsets(0, healthBar:GetWidth(), 0, healthBar:GetHeight())

		manaBar = getglobal(prefix.."ManaBar")
		manaBar:ClearAllPoints()
		manaBar:SetFrameLevel(healthBar:GetFrameLevel())
		manaBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1)
		manaBar:SetWidth(122)
		manaBar:SetHeight(12)
		manaBar:SetHitRectInsets(0, manaBar:GetWidth(), 0, manaBar:GetHeight())
		
		getglobal(smartPrefix.."HealthBarText"):ClearAllPoints()
		getglobal(smartPrefix.."HealthBarText"):SetPoint("RIGHT",getglobal(prefix.."HealthBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."HealthBarText"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."HealthPercent"):ClearAllPoints()
		getglobal(smartPrefix.."HealthPercent"):SetPoint("RIGHT",getglobal(prefix.."HealthBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."HealthPercent"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."HealthLoss"):ClearAllPoints()
		getglobal(smartPrefix.."HealthLoss"):SetPoint("LEFT",getglobal(prefix.."HealthBar"),"LEFT",3,1)
		getglobal(smartPrefix.."HealthLoss"):SetJustifyH("LEFT")
		getglobal(smartPrefix.."StatusText"):ClearAllPoints()
		getglobal(smartPrefix.."StatusText"):SetPoint("LEFT",getglobal(prefix.."HealthBar"),"LEFT",3,1)
		getglobal(smartPrefix.."StatusText"):SetJustifyH("LEFT")
		getglobal(smartPrefix.."ManaBarText"):ClearAllPoints()
		getglobal(smartPrefix.."ManaBarText"):SetPoint("RIGHT",getglobal(prefix.."ManaBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."ManaBarText"):SetJustifyH("RIGHT")
		getglobal(smartPrefix.."ManaPercent"):ClearAllPoints()
		getglobal(smartPrefix.."ManaPercent"):SetPoint("RIGHT",getglobal(prefix.."ManaBar"),"RIGHT",-1,1)
		getglobal(smartPrefix.."ManaPercent"):SetJustifyH("RIGHT")

		-- Portrait
		getglobal(prefix.."Portrait"):SetPoint("TOPLEFT",frame,"TOPLEFT",4,-6)

		-- Portrait Frame
		portraitFrame = CreateFrame("Frame", portraitPrefix, frame)
		portraitFrame:SetFrameStrata("BACKGROUND")
		--portraitFrame:SetFrameLevel(frame:GetFrameLevel()-1)
		portraitFrame:SetPoint("TOPLEFT",getglobal(prefix.."Portrait"),"TOPLEFT",-5,5)
		portraitFrame:SetPoint("BOTTOMRIGHT",getglobal(prefix.."Portrait"),"BOTTOMRIGHT",5,-5)
		portraitFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		portraitFrame:SetBackdropBorderColor(0.4,0.4,0.4)

		getglobal(prefix.."PVPIcon"):ClearAllPoints()
		getglobal(prefix.."PVPIcon"):SetPoint("TOPLEFT", portraitFrame, "TOPLEFT", -12, -8)

		if SMART_PVPICON_ENABLE then
			getglobal(prefix.."PVPRankIcon"):ClearAllPoints()
			getglobal(prefix.."PVPRankIcon"):SetPoint("BOTTOMRIGHT", portraitFrame, "BOTTOMLEFT", 4, 0)
		end

		nudeFrame = CreateFrame("Frame", nudePrefix, frame)
		nudeFrame:SetFrameStrata("BACKGROUND")
		nudeFrame:SetPoint("TOPLEFT",getglobal(prefix.."HealthBar"),"TOPLEFT",-5,5)
		nudeFrame:SetPoint("BOTTOMRIGHT",getglobal(prefix.."ManaBar"),"BOTTOMRIGHT",5,-5)
		nudeFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		nudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)

		healthBar = CreateFrame("StatusBar", nudePrefix.."HealthBarBack", frame)
		healthBar:SetFrameLevel(frame:GetFrameLevel())
		healthBar:SetPoint("TOPLEFT", getglobal(prefix.."HealthBar"), "TOPLEFT", 0, 0)
		healthBar:SetPoint("BOTTOMRIGHT", getglobal(prefix.."HealthBar"), "BOTTOMRIGHT", 0, 0)
		healthBar:SetAlpha(0.5)

		manaBar = CreateFrame("StatusBar", nudePrefix.."ManaBarBack", frame)
		manaBar:SetFrameLevel(frame:GetFrameLevel())
		manaBar:SetPoint("TOPLEFT", getglobal(prefix.."ManaBar"), "TOPLEFT", 0, 0)
		manaBar:SetPoint("BOTTOMRIGHT", getglobal(prefix.."ManaBar"),"BOTTOMRIGHT", 0, 0)
		manaBar:SetAlpha(0.5)
	end

	PlayerStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
	PlayerFrame:SetFrameLevel(UIParent:GetFrameLevel()+1)
	PlayerFrameTexture:SetAlpha(0)
	PlayerFrameBackground:SetAlpha(0)
	PlayerPortrait:SetPoint("TOPLEFT",PlayerFrame,"TOPLEFT",39,-12)
	PlayerPortrait:SetWidth(60)
	PlayerPortrait:SetHeight(60)
	PlayerFrameHealthBar:SetFrameLevel(PlayerFrame:GetFrameLevel()+1)
	PlayerFrameHealthBar:ClearAllPoints()
	PlayerFrameHealthBar:SetHeight(16)
	PlayerFrameHealthBar:SetWidth(120)
	PlayerFrameHealthBar:SetPoint("TOPLEFT", PlayerFrame, "TOPLEFT", 106, -39)
	PlayerFrameManaBar:ClearAllPoints()
	PlayerFrameManaBar:SetFrameLevel(PlayerFrame:GetFrameLevel()+1)
	PlayerFrameManaBar:SetHeight(12)
	PlayerFrameManaBar:SetWidth(120)
	PlayerFrameManaBar:SetPoint("TOPLEFT", PlayerFrameHealthBar, "BOTTOMLEFT", 0, -1)

	hooksecurefunc("PlayerFrame_ToVehicleArt", function(self, vehicleType)
		PlayerFrameHealthBar:SetWidth(120)
		PlayerFrameHealthBar:SetPoint("TOPLEFT", PlayerFrame, "TOPLEFT", 106, -39)
		PlayerFrameManaBar:SetWidth(120)
		PlayerFrameManaBar:SetPoint("TOPLEFT", PlayerFrameHealthBar, "BOTTOMLEFT", 0, -1)
	end)

	hooksecurefunc("PlayerFrame_ToPlayerArt", function(self)
		PlayerFrameHealthBar:SetWidth(120)
		PlayerFrameHealthBar:SetPoint("TOPLEFT", PlayerFrame, "TOPLEFT", 106, -39)
		PlayerFrameManaBar:SetWidth(120)
		PlayerFrameManaBar:SetPoint("TOPLEFT", PlayerFrameHealthBar, "BOTTOMLEFT", 0, -1)
	end)

	PlayerName:ClearAllPoints()
	PlayerName:SetPoint("CENTER",PlayerFrameHealthBar,"TOP",0,9)

	SmartPlayerHealthBarText:ClearAllPoints()
	SmartPlayerHealthBarText:SetPoint("CENTER",PlayerFrameHealthBar,"CENTER",0,1)
	SmartPlayerManaBarText:ClearAllPoints()
	SmartPlayerManaBarText:SetPoint("CENTER",PlayerFrameManaBar,"CENTER",0,1)
	SmartPlayerHealthPercent:ClearAllPoints()
	SmartPlayerHealthPercent:SetPoint("CENTER",PlayerFrameHealthBar,"RIGHT",20,1)
	SmartPlayerManaPercent:ClearAllPoints()
	SmartPlayerManaPercent:SetPoint("CENTER",PlayerFrameManaBar,"RIGHT",20,1)

	CreateFrame("Frame", "SmartPlayerNudePortrait", PlayerFrame)
	SmartPlayerNudePortrait:SetFrameLevel(PlayerFrame:GetFrameLevel()-1)
	SmartPlayerNudePortrait:SetPoint("TOPLEFT",PlayerPortrait,"TOPLEFT",-6,6)
	SmartPlayerNudePortrait:SetPoint("BOTTOMRIGHT",PlayerPortrait,"BOTTOMRIGHT",6,-6)
--	SmartPlayerNudePortrait:SetWidth(72)
--	SmartPlayerNudePortrait:SetHeight(72)
	SmartPlayerNudePortrait:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	if SMART_GROUPICON_ENABLE then
		PlayerPVPIcon:ClearAllPoints()
		PlayerPVPIcon:SetPoint("TOPLEFT",SmartPlayerNudePortrait,"TOPRIGHT",-26,0)
	end
	if SMART_PVPICON_ENABLE then
		PlayerFramePVPRankIcon:ClearAllPoints()
		PlayerFramePVPRankIcon:SetPoint("BOTTOMRIGHT",SmartPlayerNudePortrait,"BOTTOMLEFT",4,0)
	end
	CreateFrame("Frame", "SmartPlayerNudeFrame", PlayerFrame)
	SmartPlayerNudeFrame:SetFrameLevel(PlayerFrame:GetFrameLevel())
	SmartPlayerNudeFrame:SetPoint("TOPLEFT",PlayerFrame,"TOPLEFT",101,-17)
	SmartPlayerNudeFrame:SetPoint("BOTTOMRIGHT",PlayerFrameManaBar,"BOTTOMRIGHT",5,-5)
--	SmartPlayerNudeFrame:SetWidth(130)
--	SmartPlayerNudeFrame:SetHeight(52)
	SmartPlayerNudeFrame:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	CreateFrame("StatusBar", "SmartPlayerNudeFrameHealthBarBack", PlayerFrame)
	SmartPlayerNudeFrameHealthBarBack:SetFrameLevel(PlayerFrame:GetFrameLevel())
	SmartPlayerNudeFrameHealthBarBack:SetPoint("TOPLEFT",PlayerFrameHealthBar,"TOPLEFT",0,0)
	SmartPlayerNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",PlayerFrameHealthBar,"BOTTOMRIGHT",0,0)
	SmartPlayerNudeFrameHealthBarBack:SetAlpha(0.5)
	CreateFrame("StatusBar", "SmartPlayerNudeFrameManaBarBack", PlayerFrame)
	SmartPlayerNudeFrameManaBarBack:SetFrameLevel(PlayerFrame:GetFrameLevel())
	SmartPlayerNudeFrameManaBarBack:SetPoint("TOPLEFT",PlayerFrameManaBar,"TOPLEFT",0,0)
	SmartPlayerNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",PlayerFrameManaBar,"BOTTOMRIGHT",0,0)
	SmartPlayerNudeFrameManaBarBack:SetAlpha(0.5)

--	PlayerFrameGroupIndicator:ClearAllPoints()
	PlayerFrameGroupIndicator:SetPoint("BOTTOMLEFT",PlayerFrameGroupIndicator:GetParent(),"TOPLEFT",97,-19)
	if SMART_GROUPICON_ENABLE then
		PlayerFrameGroupIcon:SetPoint("BOTTOMRIGHT",PlayerFrameGroupIcon:GetParent(),"BOTTOMLEFT",38,22)
		TargetFrameGroupIcon:SetPoint("BOTTOMLEFT",TargetFrameGroupIcon:GetParent(),"BOTTOMRIGHT",-38,22)
	end

	SMART_BUFFDEBUFF_POSITION.y = 28

	PlayerLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",18,"OUTLINE")
	PlayerLevelText:SetJustifyH("LEFT")
	PlayerLevelText:ClearAllPoints()
	PlayerLevelText:SetPoint("BOTTOMLEFT",SmartPlayerNudePortrait,"BOTTOMLEFT",5,5)

	PlayerRestIcon:ClearAllPoints()
	PlayerRestIcon:SetPoint("BOTTOMRIGHT",SmartPlayerNudePortrait,"BOTTOMRIGHT",-2,-3)

	TargetFrameAggroIndicator:SetPoint("BOTTOMLEFT",TargetFrameAggroIndicator:GetParent(),"TOPLEFT",4,-19)
	TargetFrameGroupIndicator:SetPoint("BOTTOMLEFT",TargetFrameGroupIndicator:GetParent(),"TOPLEFT",4,-19)
	TargetFrameClassIndicator:SetPoint("BOTTOMRIGHT",TargetFrameGroupIndicator:GetParent(),"TOPRIGHT",-97,-19)

	TargetFrame:SetFrameLevel(UIParent:GetFrameLevel()+1)
	TargetStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
	TargetFrameFlash:SetAlpha(0)
	TargetFrameTextureFrame:CreateFontString("TargetEliteText","BACKGROUND")

	TargetFrameTextureFrame:CreateTexture("TargetFocusIcon", "ARTWORK")
	TargetFocusIcon:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\UI-SmallIcon-Star.tga")
	TargetFocusIcon:SetPoint("CENTER", TargetPortrait, "TOPRIGHT",0,0)
	TargetFocusIcon:SetWidth(16)
	TargetFocusIcon:SetHeight(16)
	TargetFocusIcon:Hide()

	TargetFrameTexture:SetAlpha(0)
	TargetPortrait:SetPoint("TOPRIGHT",TargetFrame,"TOPRIGHT",-39,-12)
	TargetPortrait:SetWidth(60)
	TargetPortrait:SetHeight(60)
	TargetFrameBackground:SetAlpha(0)
	TargetFrameNameBackground:SetWidth(120)
	TargetFrameNameBackground:SetHeight(17)
	TargetName:SetWidth(TargetFrameNameBackground:GetWidth())

	TargetFrameHealthBar:SetFrameLevel(TargetFrame:GetFrameLevel()+1)
	TargetFrameHealthBar:ClearAllPoints()
	TargetFrameHealthBar:SetPoint("TOPRIGHT",TargetFrame,"TOPRIGHT",-106,-39)
	TargetFrameHealthBar:SetHeight(16)
	TargetFrameHealthBar:SetWidth(120)
	TargetFrameManaBar:SetFrameLevel(TargetFrame:GetFrameLevel()+1)
	TargetFrameManaBar:ClearAllPoints()
	TargetFrameManaBar:SetPoint("TOPLEFT", TargetFrameHealthBar, "BOTTOMLEFT", 0, -1)
	TargetFrameManaBar:SetHeight(12)
	TargetFrameManaBar:SetWidth(120)

	TargetName:ClearAllPoints()
	TargetName:SetPoint("CENTER",TargetFrameHealthBar,"TOP",0,9)

	SmartTargetHealthBarText:ClearAllPoints()
	SmartTargetHealthBarText:SetPoint("CENTER",TargetFrameHealthBar,"CENTER",0,1)
	SmartTargetManaBarText:ClearAllPoints()
	SmartTargetManaBarText:SetPoint("CENTER",TargetFrameManaBar,"CENTER",0,1)
	SmartTargetHealthPercent:ClearAllPoints()
	SmartTargetHealthPercent:SetPoint("CENTER",TargetFrameHealthBar,"LEFT",-20,1)
	SmartTargetManaPercent:ClearAllPoints()
	SmartTargetManaPercent:SetPoint("CENTER",TargetFrameManaBar,"LEFT",-20,1)

	CreateFrame("Frame", "SmartTargetNudePortrait", TargetFrame)
	SmartTargetNudePortrait:SetFrameLevel(TargetFrame:GetFrameLevel())
	SmartTargetNudePortrait:SetPoint("TOPLEFT",TargetPortrait,"TOPLEFT",-6,6)
	SmartTargetNudePortrait:SetPoint("BOTTOMRIGHT",TargetPortrait,"BOTTOMRIGHT",6,-6)
	SmartTargetNudePortrait:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	if SMART_GROUPICON_ENABLE then
		TargetPVPIcon:ClearAllPoints()
		TargetPVPIcon:SetPoint("TOPLEFT",SmartTargetNudePortrait,"TOPLEFT",-16,0)
	end
	if SMART_PVPICON_ENABLE then
		TargetFramePVPRankIcon:ClearAllPoints()
		TargetFramePVPRankIcon:SetPoint("BOTTOMLEFT",SmartTargetNudePortrait,"BOTTOMRIGHT",-4,0)
	end
	CreateFrame("Frame", "SmartTargetNudeFrame", TargetFrame)
	SmartTargetNudeFrame:SetFrameLevel(TargetFrame:GetFrameLevel())
	SmartTargetNudeFrame:SetPoint("TOPRIGHT",TargetFrame,"TOPRIGHT",-101,-17)
	SmartTargetNudeFrame:SetPoint("BOTTOMLEFT",TargetFrameManaBar,"BOTTOMLEFT",-5,-5)
	SmartTargetNudeFrame:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	CreateFrame("StatusBar", "SmartTargetNudeFrameHealthBarBack", TargetFrame)
	SmartTargetNudeFrameHealthBarBack:SetFrameLevel(TargetFrame:GetFrameLevel())
	SmartTargetNudeFrameHealthBarBack:SetPoint("TOPLEFT",TargetFrameHealthBar,"TOPLEFT",0,0)
	SmartTargetNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",TargetFrameHealthBar,"BOTTOMRIGHT",0,0)
	SmartTargetNudeFrameHealthBarBack:SetAlpha(0.5)
	CreateFrame("StatusBar", "SmartTargetNudeFrameManaBarBack", TargetFrame)
	SmartTargetNudeFrameManaBarBack:SetFrameLevel(TargetFrame:GetFrameLevel())
	SmartTargetNudeFrameManaBarBack:SetPoint("TOPLEFT",TargetFrameManaBar,"TOPLEFT",0,0)
	SmartTargetNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",TargetFrameManaBar,"BOTTOMRIGHT",0,0)
	SmartTargetNudeFrameManaBarBack:SetAlpha(0.5)

	TargetLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",18,"OUTLINE")
	TargetLevelText:SetJustifyH("RIGHT")
	TargetLevelText:ClearAllPoints()
	TargetLevelText:SetPoint("BOTTOMRIGHT",SmartTargetNudePortrait,"BOTTOMRIGHT",-5,5)

	TargetEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
	TargetEliteText:SetJustifyH("LEFT")
	TargetEliteText:ClearAllPoints()
	TargetEliteText:SetPoint("RIGHT",TargetLevelText,"LEFT",0,0)
	TargetEliteText:SetTextColor(1,0.82,0)
	TargetEliteText:Hide()

	TargetFrameHealthBar:SetHitRectInsets(0,TargetFrameHealthBar:GetWidth(),0,TargetFrameHealthBar:GetHeight())
	TargetFrameManaBar:SetHitRectInsets(0,TargetFrameManaBar:GetWidth(),0,TargetFrameManaBar:GetHeight())

	for i=1, 5 do
		getglobal("ComboPoint"..i):SetWidth(12)
		getglobal("ComboPoint"..i):SetHeight(12)
		getglobal("ComboPoint"..i):ClearAllPoints()
	end

	ComboPoint3:SetPoint("RIGHT",SmartTargetNudePortrait,"RIGHT",4,0)
	ComboPoint2:SetPoint("TOP",ComboPoint3,"BOTTOM",0,0)
	ComboPoint1:SetPoint("TOP",ComboPoint2,"BOTTOM",0,0)
	ComboPoint4:SetPoint("BOTTOM",ComboPoint3,"TOP",0,0)
	ComboPoint5:SetPoint("BOTTOM",ComboPoint4,"TOP",0,0)

	SmartToTName:SetPoint("BOTTOMLEFT",SmartToTName:GetParent(),"BOTTOMLEFT",44,-2)
	SmartToTStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
	SmartToTBackground:SetAlpha(0)
	SmartToTTexture:SetAlpha(0)
	SmartToTHealthBar:SetFrameLevel(SmartToTFrame:GetFrameLevel()+1)
	SmartToTHealthBar:ClearAllPoints()
	SmartToTHealthBar:SetPoint("TOPRIGHT",SmartToTFrame,"TOPRIGHT",-2,-14)
	SmartToTHealthBar:SetHeight(14)
	SmartToTManaBar:SetFrameLevel(SmartToTFrame:GetFrameLevel()+1)
	SmartToTManaBar:ClearAllPoints()
	SmartToTManaBar:SetPoint("TOP",SmartToTHealthBar,"BOTTOM",0,0)
	SmartToTManaBar:SetHeight(6)

	SmartToTHealthBarText:ClearAllPoints()
	SmartToTHealthBarText:SetPoint("CENTER",SmartToTHealthBar,"RIGHT",36,2)
	SmartToTManaBarText:ClearAllPoints()
	SmartToTManaBarText:SetPoint("CENTER",SmartToTHealthBarText,"CENTER",0,-11)
	SmartToTHealthPercent:ClearAllPoints()
	SmartToTHealthPercent:SetPoint("BOTTOM",SmartToTHealthBar,"BOTTOMRIGHT",20,0)
	SmartToTManaPercent:ClearAllPoints()
	SmartToTManaPercent:SetPoint("CENTER",SmartToTHealthPercent,"CENTER",30,0)

	SmartToTStatusText:ClearAllPoints()
	SmartToTStatusText:SetPoint("BOTTOM",SmartToTHealthBar,"BOTTOM",1,0)
	SmartToTHealthLoss:ClearAllPoints()
	SmartToTHealthLoss:SetPoint("BOTTOM",SmartToTHealthBar,"BOTTOM",1,0)

	SmartToTPortrait:SetPoint("TOPLEFT",SmartToTFrame,"TOPLEFT",2,-8)
	CreateFrame("Frame", "SmartToTNudePortrait", SmartToTFrame)
	SmartToTNudePortrait:SetFrameLevel(SmartToTFrame:GetFrameLevel()-1)
	SmartToTNudePortrait:SetPoint("TOPLEFT",SmartToTPortrait,"TOPLEFT",-5,5)
	SmartToTNudePortrait:SetPoint("BOTTOMRIGHT",SmartToTPortrait,"BOTTOMRIGHT",5,-5)
	SmartToTNudePortrait:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	SmartToTNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
	CreateFrame("Frame", "SmartToTNudeFrame", SmartToTFrame)
	SmartToTNudeFrame:SetFrameLevel(SmartToTFrame:GetFrameLevel()-1)
	SmartToTNudeFrame:SetPoint("TOPLEFT",SmartToTHealthBar,"TOPLEFT",-5,5)
	SmartToTNudeFrame:SetPoint("BOTTOMRIGHT",SmartToTManaBar,"BOTTOMRIGHT",5,-5)
	SmartToTNudeFrame:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	SmartToTNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
	CreateFrame("StatusBar", "SmartToTNudeFrameHealthBarBack", SmartToTFrame)
	SmartToTNudeFrameHealthBarBack:SetFrameLevel(SmartToTFrame:GetFrameLevel())
	SmartToTNudeFrameHealthBarBack:SetPoint("TOPLEFT",SmartToTHealthBar,"TOPLEFT",0,0)
	SmartToTNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",SmartToTHealthBar,"BOTTOMRIGHT",0,0)
	SmartToTNudeFrameHealthBarBack:SetAlpha(0.5)
	CreateFrame("StatusBar", "SmartToTNudeFrameManaBarBack", SmartToTFrame)
	SmartToTNudeFrameManaBarBack:SetFrameLevel(SmartToTFrame:GetFrameLevel())
	SmartToTNudeFrameManaBarBack:SetPoint("TOPLEFT",SmartToTManaBar,"TOPLEFT",0,0)
	SmartToTNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",SmartToTManaBar,"BOTTOMRIGHT",0,0)
	SmartToTNudeFrameManaBarBack:SetAlpha(0.5)

	SmartToTLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
	SmartToTEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",11,"OUTLINE")

	SmartToTTName:SetPoint("BOTTOMLEFT",SmartToTTName:GetParent(),"BOTTOMLEFT",45,-2)
	SmartToTTStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
	SmartToTTBackground:SetAlpha(0)
	SmartToTTTexture:SetAlpha(0)
	SmartToTTHealthBar:SetFrameLevel(SmartToTTFrame:GetFrameLevel()+1)
	SmartToTTHealthBar:ClearAllPoints()
	SmartToTTHealthBar:SetPoint("TOPRIGHT",SmartToTTFrame,"TOPRIGHT",-2,-14)
	SmartToTTHealthBar:SetHeight(14)
	SmartToTTManaBar:SetFrameLevel(SmartToTTFrame:GetFrameLevel()+1)
	SmartToTTManaBar:ClearAllPoints()
	SmartToTTManaBar:SetPoint("TOP",SmartToTTHealthBar,"BOTTOM",0,0)
	SmartToTTManaBar:SetHeight(6)

	SmartToTTHealthBarText:ClearAllPoints()
	SmartToTTHealthBarText:SetPoint("CENTER",SmartToTTHealthBar,"RIGHT",36,2)
	SmartToTTManaBarText:ClearAllPoints()
	SmartToTTManaBarText:SetPoint("CENTER",SmartToTTHealthBarText,"CENTER",0,-11)
	SmartToTTHealthPercent:ClearAllPoints()
	SmartToTTHealthPercent:SetPoint("CENTER",SmartToTTHealthBar,"BOTTOMRIGHT",20,3)
	SmartToTTManaPercent:ClearAllPoints()
	SmartToTTManaPercent:SetPoint("CENTER",SmartToTTHealthPercent,"CENTER",30,0)

	SmartToTTStatusText:ClearAllPoints()
	SmartToTTStatusText:SetPoint("BOTTOM",SmartToTTHealthBar,"BOTTOM",1,0)
	SmartToTTHealthLoss:ClearAllPoints()
	SmartToTTHealthLoss:SetPoint("BOTTOM",SmartToTTHealthBar,"BOTTOM",1,0)

	SmartToTTPortrait:SetPoint("TOPLEFT",SmartToTTFrame,"TOPLEFT",2,-8)
	CreateFrame("Frame", "SmartToTTNudePortrait", SmartToTTFrame)
	SmartToTTNudePortrait:SetFrameLevel(SmartToTTFrame:GetFrameLevel()-1)
	SmartToTTNudePortrait:SetPoint("TOPLEFT",SmartToTTPortrait,"TOPLEFT",-5,5)
	SmartToTTNudePortrait:SetPoint("BOTTOMRIGHT",SmartToTTPortrait,"BOTTOMRIGHT",5,-5)
	SmartToTTNudePortrait:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	SmartToTTNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
	CreateFrame("Frame", "SmartToTTNudeFrame", SmartToTTFrame)
	SmartToTTNudeFrame:SetFrameLevel(SmartToTTFrame:GetFrameLevel()-1)
	SmartToTTNudeFrame:SetPoint("TOPLEFT",SmartToTTHealthBar,"TOPLEFT",-5,5)
	SmartToTTNudeFrame:SetPoint("BOTTOMRIGHT",SmartToTTManaBar,"BOTTOMRIGHT",5,-5)
	SmartToTTNudeFrame:SetBackdrop({
		bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
		tile = true, tileSize = 16, edgeSize = 16, 
		insets = { left = 5, right = 5, top = 5, bottom = 5 }
	})
	SmartToTTNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
	CreateFrame("StatusBar", "SmartToTTNudeFrameHealthBarBack", SmartToTTFrame)
	SmartToTTNudeFrameHealthBarBack:SetFrameLevel(SmartToTTFrame:GetFrameLevel())
	SmartToTTNudeFrameHealthBarBack:SetPoint("TOPLEFT",SmartToTTHealthBar,"TOPLEFT",0,0)
	SmartToTTNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",SmartToTTHealthBar,"BOTTOMRIGHT",0,0)
	SmartToTTNudeFrameHealthBarBack:SetAlpha(0.5)
	CreateFrame("StatusBar", "SmartToTTNudeFrameManaBarBack", SmartToTTFrame)
	SmartToTTNudeFrameManaBarBack:SetFrameLevel(SmartToTTFrame:GetFrameLevel())
	SmartToTTNudeFrameManaBarBack:SetPoint("TOPLEFT",SmartToTTManaBar,"TOPLEFT",0,0)
	SmartToTTNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",SmartToTTManaBar,"BOTTOMRIGHT",0,0)
	SmartToTTNudeFrameManaBarBack:SetAlpha(0.5)

	SmartToTTLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
	SmartToTTEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",11,"OUTLINE")

	SmartEliteText = {boss="BOSS",rareelite="ELITE+",elite="ELITE",rare="RARE"}

	SmartPlayer_OnEvent = SmartPlayerNude_OnEvent
	if SMART_PLAYER_Config.elite then
		if SMART_PLAYER_Config.rare then
			SmartPlayerNudePortrait:SetBackdropBorderColor(0.5,0.82,1)
			SmartPlayerNudeFrame:SetBackdropBorderColor(0.5,0.82,1)
		else
			SmartPlayerNudePortrait:SetBackdropBorderColor(1,0.82,0)
			SmartPlayerNudeFrame:SetBackdropBorderColor(1,0.82,0)
		end
	else
		SmartPlayerNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
		SmartPlayerNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
	end
	TargetFrame_CheckClassification = SmartTargetNude_CheckClassification

	if SMART_FOCUS_ENABLE then
		SmartFocusFrameGroupIndicator:SetPoint("BOTTOMLEFT",SmartFocusFrameGroupIndicator:GetParent(),"TOPLEFT",4,-19)
		SmartFocusFrameClassIndicator:SetPoint("BOTTOMRIGHT",SmartFocusFrameGroupIndicator:GetParent(),"TOPRIGHT",-97,-19)
		SmartFocusStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
		SmartFocusFrameTextureFrame:CreateFontString("SmartFocusEliteText","BACKGROUND")
		SmartFocusFrameTexture:SetAlpha(0)
		SmartFocusPortrait:SetPoint("TOPRIGHT",SmartFocusFrame,"TOPRIGHT",-39,-12)
		SmartFocusPortrait:SetWidth(60)
		SmartFocusPortrait:SetHeight(60)

		SmartFocusFrameBackground:SetAlpha(0)
		SmartFocusFrameNameBackground:SetWidth(120)
		SmartFocusFrameStatusBarText:SetFrameLevel(SmartFocusFrame:GetFrameLevel()+1)

		SmartFocusFrameHealthBar:SetFrameLevel(SmartFocusFrame:GetFrameLevel()+1)
		SmartFocusFrameHealthBar:ClearAllPoints()
		SmartFocusFrameHealthBar:SetPoint("TOPRIGHT",SmartFocusFrame,"TOPRIGHT",-106,-39)
		SmartFocusFrameHealthBar:SetHeight(16)
		SmartFocusFrameHealthBar:SetWidth(120)
		SmartFocusFrameManaBar:SetFrameLevel(SmartFocusFrame:GetFrameLevel()+1)
		SmartFocusFrameManaBar:ClearAllPoints()
		SmartFocusFrameManaBar:SetPoint("TOPLEFT",SmartFocusFrameHealthBar,"BOTTOMLEFT",0,-1)
		SmartFocusFrameManaBar:SetHeight(12)
		SmartFocusFrameManaBar:SetWidth(120)

		SmartFocusName:ClearAllPoints()
		SmartFocusName:SetPoint("CENTER",SmartFocusFrameHealthBar,"TOP",0,9)
	
		SmartFocusHealthBarText:ClearAllPoints()
		SmartFocusHealthBarText:SetPoint("CENTER",SmartFocusFrameHealthBar,"CENTER",0,1)
		SmartFocusManaBarText:ClearAllPoints()
		SmartFocusManaBarText:SetPoint("CENTER",SmartFocusFrameManaBar,"CENTER",0,1)
		SmartFocusHealthPercent:ClearAllPoints()
		SmartFocusHealthPercent:SetPoint("CENTER",SmartFocusFrameHealthBar,"LEFT",-20,1)
		SmartFocusManaPercent:ClearAllPoints()
		SmartFocusManaPercent:SetPoint("CENTER",SmartFocusFrameManaBar,"LEFT",-20,1)

		CreateFrame("Frame", "SmartFocusNudePortrait", SmartFocusFrame)
		SmartFocusNudePortrait:SetFrameLevel(SmartFocusFrame:GetFrameLevel())
		SmartFocusNudePortrait:SetPoint("TOPLEFT",SmartFocusPortrait,"TOPLEFT",-6,6)
		SmartFocusNudePortrait:SetPoint("BOTTOMRIGHT",SmartFocusPortrait,"BOTTOMRIGHT",6,-6)
		SmartFocusNudePortrait:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		if SMART_GROUPICON_ENABLE then
			SmartFocusPVPIcon:ClearAllPoints()
			SmartFocusPVPIcon:SetPoint("TOPLEFT",SmartFocusNudePortrait,"TOPLEFT",-16,0)
		end
		CreateFrame("Frame", "SmartFocusNudeFrame", SmartFocusFrame)
		SmartFocusNudeFrame:SetFrameLevel(SmartFocusFrame:GetFrameLevel())
		SmartFocusNudeFrame:SetPoint("TOPRIGHT",SmartFocusFrame,"TOPRIGHT",-101,-17)
		SmartFocusNudeFrame:SetPoint("BOTTOMLEFT",SmartFocusFrameManaBar,"BOTTOMLEFT",-5,-5)
		SmartFocusNudeFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		CreateFrame("StatusBar", "SmartFocusNudeFrameHealthBarBack", SmartFocusFrame)
		SmartFocusNudeFrameHealthBarBack:SetFrameLevel(SmartFocusFrame:GetFrameLevel())
		SmartFocusNudeFrameHealthBarBack:SetPoint("TOPLEFT",SmartFocusFrameHealthBar,"TOPLEFT",0,0)
		SmartFocusNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",SmartFocusFrameHealthBar,"BOTTOMRIGHT",0,0)
		SmartFocusNudeFrameHealthBarBack:SetAlpha(0.5)
		CreateFrame("StatusBar", "SmartFocusNudeFrameManaBarBack", SmartFocusFrame)
		SmartFocusNudeFrameManaBarBack:SetFrameLevel(SmartFocusFrame:GetFrameLevel())
		SmartFocusNudeFrameManaBarBack:SetPoint("TOPLEFT",SmartFocusFrameManaBar,"TOPLEFT",0,0)
		SmartFocusNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",SmartFocusFrameManaBar,"BOTTOMRIGHT",0,0)
		SmartFocusNudeFrameManaBarBack:SetAlpha(0.5)
		SmartFocusFrame_CheckClassification = SmartFocusNude_CheckClassification

		SmartFocusLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",18,"OUTLINE")
		SmartFocusLevelText:SetJustifyH("RIGHT")
		SmartFocusLevelText:ClearAllPoints()
		SmartFocusLevelText:SetPoint("BOTTOMRIGHT",SmartFocusNudePortrait,"BOTTOMRIGHT",-5,5)
	
		SmartFocusEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
		SmartFocusEliteText:SetJustifyH("LEFT")
		SmartFocusEliteText:ClearAllPoints()
		SmartFocusEliteText:SetPoint("RIGHT",SmartFocusLevelText,"LEFT",0,0)
		SmartFocusEliteText:SetTextColor(1,0.82,0)
		SmartFocusEliteText:Hide()

		SmartFocusFrameHealthBar:SetHitRectInsets(0,SmartFocusFrameHealthBar:GetWidth(),0,SmartFocusFrameHealthBar:GetHeight())
		SmartFocusFrameManaBar:SetHitRectInsets(0,SmartFocusFrameManaBar:GetWidth(),0,SmartFocusFrameManaBar:GetHeight())

		if UnitExists("focus") then
			SmartFocusFrame_CheckClassification()
		end
	
		SmartFocusToTName:SetPoint("BOTTOMLEFT",SmartFocusToTName:GetParent(),"BOTTOMLEFT",44,-2)
		SmartFocusToTStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
		SmartFocusToTBackground:SetAlpha(0)
		SmartFocusToTTexture:SetAlpha(0)
		SmartFocusToTHealthBar:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel()+1)
		SmartFocusToTHealthBar:ClearAllPoints()
		SmartFocusToTHealthBar:SetPoint("TOPRIGHT",SmartFocusToTFrame,"TOPRIGHT",-2,-14)
		SmartFocusToTHealthBar:SetHeight(14)
		SmartFocusToTManaBar:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel()+1)
		SmartFocusToTManaBar:ClearAllPoints()
		SmartFocusToTManaBar:SetPoint("TOP",SmartFocusToTHealthBar,"BOTTOM",0,0)
		SmartFocusToTManaBar:SetHeight(6)
	
		SmartFocusToTHealthBarText:ClearAllPoints()
		SmartFocusToTHealthBarText:SetPoint("CENTER",SmartFocusToTHealthBar,"RIGHT",36,2)
		SmartFocusToTManaBarText:ClearAllPoints()
		SmartFocusToTManaBarText:SetPoint("CENTER",SmartFocusToTHealthBarText,"CENTER",0,-11)
		SmartFocusToTHealthPercent:ClearAllPoints()
		SmartFocusToTHealthPercent:SetPoint("BOTTOM",SmartFocusToTHealthBar,"BOTTOMRIGHT",20,0)
		SmartFocusToTManaPercent:ClearAllPoints()
		SmartFocusToTManaPercent:SetPoint("CENTER",SmartFocusToTHealthPercent,"CENTER",30,0)
	
		SmartFocusToTStatusText:ClearAllPoints()
		SmartFocusToTStatusText:SetPoint("BOTTOM",SmartFocusToTHealthBar,"BOTTOM",1,0)
		SmartFocusToTHealthLoss:ClearAllPoints()
		SmartFocusToTHealthLoss:SetPoint("BOTTOM",SmartFocusToTHealthBar,"BOTTOM",1,0)
	
		SmartFocusToTPortrait:SetPoint("TOPLEFT",SmartFocusToTFrame,"TOPLEFT",2,-8)
		CreateFrame("Frame", "SmartFocusToTNudePortrait", SmartFocusToTFrame)
		SmartFocusToTNudePortrait:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel()-1)
		SmartFocusToTNudePortrait:SetPoint("TOPLEFT",SmartFocusToTPortrait,"TOPLEFT",-5,5)
		SmartFocusToTNudePortrait:SetPoint("BOTTOMRIGHT",SmartFocusToTPortrait,"BOTTOMRIGHT",5,-5)
		SmartFocusToTNudePortrait:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		SmartFocusToTNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
		CreateFrame("Frame", "SmartFocusToTNudeFrame", SmartFocusToTFrame)
		SmartFocusToTNudeFrame:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel()-1)
		SmartFocusToTNudeFrame:SetPoint("TOPLEFT",SmartFocusToTHealthBar,"TOPLEFT",-5,5)
		SmartFocusToTNudeFrame:SetPoint("BOTTOMRIGHT",SmartFocusToTManaBar,"BOTTOMRIGHT",5,-5)
		SmartFocusToTNudeFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		SmartFocusToTNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
		CreateFrame("StatusBar", "SmartFocusToTNudeFrameHealthBarBack", SmartFocusToTFrame)
		SmartFocusToTNudeFrameHealthBarBack:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel())
		SmartFocusToTNudeFrameHealthBarBack:SetPoint("TOPLEFT",SmartFocusToTHealthBar,"TOPLEFT",0,0)
		SmartFocusToTNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",SmartFocusToTHealthBar,"BOTTOMRIGHT",0,0)
		SmartFocusToTNudeFrameHealthBarBack:SetAlpha(0.5)
		CreateFrame("StatusBar", "SmartFocusToTNudeFrameManaBarBack", SmartFocusToTFrame)
		SmartFocusToTNudeFrameManaBarBack:SetFrameLevel(SmartFocusToTFrame:GetFrameLevel())
		SmartFocusToTNudeFrameManaBarBack:SetPoint("TOPLEFT",SmartFocusToTManaBar,"TOPLEFT",0,0)
		SmartFocusToTNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",SmartFocusToTManaBar,"BOTTOMRIGHT",0,0)
		SmartFocusToTNudeFrameManaBarBack:SetAlpha(0.5)
	
		SmartFocusToTLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
		SmartFocusToTEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",11,"OUTLINE")
	
		SmartFocusToTTName:SetPoint("BOTTOMLEFT",SmartFocusToTTName:GetParent(),"BOTTOMLEFT",45,-2)
		SmartFocusToTTStatusTexture:SetTexture("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\SquareFlash.tga")
		SmartFocusToTTBackground:SetAlpha(0)
		SmartFocusToTTTexture:SetAlpha(0)
		SmartFocusToTTHealthBar:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel()+1)
		SmartFocusToTTHealthBar:ClearAllPoints()
		SmartFocusToTTHealthBar:SetPoint("TOPRIGHT",SmartFocusToTTFrame,"TOPRIGHT",-2,-14)
		SmartFocusToTTHealthBar:SetHeight(14)
		SmartFocusToTTManaBar:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel()+1)
		SmartFocusToTTManaBar:ClearAllPoints()
		SmartFocusToTTManaBar:SetPoint("TOP",SmartFocusToTTHealthBar,"BOTTOM",0,0)
		SmartFocusToTTManaBar:SetHeight(6)
	
		SmartFocusToTTHealthBarText:ClearAllPoints()
		SmartFocusToTTHealthBarText:SetPoint("CENTER",SmartFocusToTTHealthBar,"RIGHT",36,2)
		SmartFocusToTTManaBarText:ClearAllPoints()
		SmartFocusToTTManaBarText:SetPoint("CENTER",SmartFocusToTTHealthBarText,"CENTER",0,-11)
		SmartFocusToTTHealthPercent:ClearAllPoints()
		SmartFocusToTTHealthPercent:SetPoint("CENTER",SmartFocusToTTHealthBar,"BOTTOMRIGHT",20,3)
		SmartFocusToTTManaPercent:ClearAllPoints()
		SmartFocusToTTManaPercent:SetPoint("CENTER",SmartFocusToTTHealthPercent,"CENTER",30,0)
	
		SmartFocusToTTStatusText:ClearAllPoints()
		SmartFocusToTTStatusText:SetPoint("BOTTOM",SmartFocusToTTHealthBar,"BOTTOM",1,0)
		SmartFocusToTTHealthLoss:ClearAllPoints()
		SmartFocusToTTHealthLoss:SetPoint("BOTTOM",SmartFocusToTTHealthBar,"BOTTOM",1,0)
	
		SmartFocusToTTPortrait:SetPoint("TOPLEFT",SmartFocusToTTFrame,"TOPLEFT",2,-8)
		CreateFrame("Frame", "SmartFocusToTTNudePortrait", SmartFocusToTTFrame)
		SmartFocusToTTNudePortrait:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel()-1)
		SmartFocusToTTNudePortrait:SetPoint("TOPLEFT",SmartFocusToTTPortrait,"TOPLEFT",-5,5)
		SmartFocusToTTNudePortrait:SetPoint("BOTTOMRIGHT",SmartFocusToTTPortrait,"BOTTOMRIGHT",5,-5)
		SmartFocusToTTNudePortrait:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		SmartFocusToTTNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
		CreateFrame("Frame", "SmartFocusToTTNudeFrame", SmartFocusToTTFrame)
		SmartFocusToTTNudeFrame:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel()-1)
		SmartFocusToTTNudeFrame:SetPoint("TOPLEFT",SmartFocusToTTHealthBar,"TOPLEFT",-5,5)
		SmartFocusToTTNudeFrame:SetPoint("BOTTOMRIGHT",SmartFocusToTTManaBar,"BOTTOMRIGHT",5,-5)
		SmartFocusToTTNudeFrame:SetBackdrop({
			bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
			tile = true, tileSize = 16, edgeSize = 16, 
			insets = { left = 5, right = 5, top = 5, bottom = 5 }
		})
		SmartFocusToTTNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
		CreateFrame("StatusBar", "SmartFocusToTTNudeFrameHealthBarBack", SmartFocusToTTFrame)
		SmartFocusToTTNudeFrameHealthBarBack:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel())
		SmartFocusToTTNudeFrameHealthBarBack:SetPoint("TOPLEFT",SmartFocusToTTHealthBar,"TOPLEFT",0,0)
		SmartFocusToTTNudeFrameHealthBarBack:SetPoint("BOTTOMRIGHT",SmartFocusToTTHealthBar,"BOTTOMRIGHT",0,0)
		SmartFocusToTTNudeFrameHealthBarBack:SetAlpha(0.5)
		CreateFrame("StatusBar", "SmartFocusToTTNudeFrameManaBarBack", SmartFocusToTTFrame)
		SmartFocusToTTNudeFrameManaBarBack:SetFrameLevel(SmartFocusToTTFrame:GetFrameLevel())
		SmartFocusToTTNudeFrameManaBarBack:SetPoint("TOPLEFT",SmartFocusToTTManaBar,"TOPLEFT",0,0)
		SmartFocusToTTNudeFrameManaBarBack:SetPoint("BOTTOMRIGHT",SmartFocusToTTManaBar,"BOTTOMRIGHT",0,0)
		SmartFocusToTTNudeFrameManaBarBack:SetAlpha(0.5)
	
		SmartFocusToTTLevelText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",13,"OUTLINE")
		SmartFocusToTTEliteText:SetFont("Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\Fonts\\AGENCYB.TTF",11,"OUTLINE")
	end

	SmartUnitFrameNude_StatusBarChange()

	if SMART_CLASSICON_ENABLE then
		PlayerFrameClassTypeIcon:ClearAllPoints()
		PlayerFrameClassTypeIcon:SetPoint("TOP",SmartPlayerNudePortrait,"TOPRIGHT",-4,0)
		TargetFrameClassTypeIcon:ClearAllPoints()
		TargetFrameClassTypeIcon:SetPoint("TOP",SmartTargetNudePortrait,"TOPLEFT",4,0)
		if SMART_FOCUS_ENABLE then
			SmartFocusFrameClassTypeIcon:ClearAllPoints()
			SmartFocusFrameClassTypeIcon:SetPoint("TOP",SmartFocusFrame,"TOP",15,-6)
		end
	end
end

function SmartUnitFrameNude_StatusBarChange()
	local statusBarTexture = "Interface\\AddOns\\SmartUnitSkin_"..SMART_SKIN_NAME.."\\StatusBar\\"..SMART_SKIN_Config.statusStyle..".tga"

	PetFrameHealthBar:SetStatusBarTexture(statusBarTexture)
	PetFrameManaBar:SetStatusBarTexture(statusBarTexture)
	SmartPetNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
	SmartPetNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)

	for id=1, MAX_PARTY_MEMBERS do
		getglobal("PartyMemberFrame"..id.."ManaBar"):SetStatusBarTexture(statusBarTexture)
		getglobal("PartyMemberFrame"..id.."HealthBar"):SetStatusBarTexture(statusBarTexture)
		getglobal("SmartPartyNudeFrame"..id.."HealthBarBack"):SetStatusBarTexture(statusBarTexture)
		getglobal("SmartPartyNudeFrame"..id.."ManaBarBack"):SetStatusBarTexture(statusBarTexture)
		getglobal("PartyMemberFrame"..id.."PetFrameHealthBar"):SetStatusBarTexture(statusBarTexture)
	end

	for id=1, MAX_PARTY_MEMBERS do
		getglobal("PartyTargetFrame"..id.."ManaBar"):SetStatusBarTexture(statusBarTexture)
		getglobal("PartyTargetFrame"..id.."HealthBar"):SetStatusBarTexture(statusBarTexture)
		getglobal("SmartPartyTargetNudeFrame"..id.."HealthBarBack"):SetStatusBarTexture(statusBarTexture)
		getglobal("SmartPartyTargetNudeFrame"..id.."ManaBarBack"):SetStatusBarTexture(statusBarTexture)
	end

	PlayerFrameHealthBar:SetStatusBarTexture(statusBarTexture)
	PlayerFrameManaBar:SetStatusBarTexture(statusBarTexture)
	SmartPlayerNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
	SmartPlayerNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)

	TargetFrameHealthBar:SetStatusBarTexture(statusBarTexture)
	TargetFrameManaBar:SetStatusBarTexture(statusBarTexture)
	SmartTargetNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
	SmartTargetNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)

	SmartToTHealthBar:SetStatusBarTexture(statusBarTexture)
	SmartToTManaBar:SetStatusBarTexture(statusBarTexture)
	SmartToTNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
	SmartToTNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)
	
	SmartToTTHealthBar:SetStatusBarTexture(statusBarTexture)
	SmartToTTManaBar:SetStatusBarTexture(statusBarTexture)
	SmartToTTNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
	SmartToTTNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)

	if SMART_FOCUS_ENABLE then
		SmartFocusFrameHealthBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusFrameManaBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
		SmartFocusNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)

		SmartFocusToTHealthBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTManaBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)
		
		SmartFocusToTTHealthBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTTManaBar:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTTNudeFrameHealthBarBack:SetStatusBarTexture(statusBarTexture)
		SmartFocusToTTNudeFrameManaBarBack:SetStatusBarTexture(statusBarTexture)
	end
end

function TargetFrame_CheckFocus()
	if (UnitIsUnit("target", "focus")) then
		TargetFocusIcon:Show()
	else
		TargetFocusIcon:Hide()
	end
end

function SmartTargetNude_CheckClassification()
	local classification = UnitClassification("target")
	if ( classification == "worldboss" ) then
		SmartTargetNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartTargetNudeFrame:SetBackdropBorderColor(1,0.82,0)
		TargetEliteText:SetText("BOSS")
		TargetEliteText:Show()
	elseif ( classification == "rareelite"  ) then
		SmartTargetNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartTargetNudeFrame:SetBackdropBorderColor(1,0.82,0)
		TargetEliteText:SetText("ELITE+")
		TargetEliteText:Show()
	elseif ( classification == "elite"  ) then
		SmartTargetNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartTargetNudeFrame:SetBackdropBorderColor(1,0.82,0)
		TargetEliteText:SetText("ELITE")
		TargetEliteText:Show()
	elseif ( classification == "rare"  ) then
		SmartTargetNudePortrait:SetBackdropBorderColor(1,1,1)
		SmartTargetNudeFrame:SetBackdropBorderColor(1,1,1)
		TargetEliteText:SetText("RARE")
		TargetEliteText:Show()
	else
		SmartTargetNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
		SmartTargetNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
		TargetEliteText:Hide()
	end
end

function SmartFocusNude_CheckClassification()
	local classification = UnitClassification("focus")
	if (classification == "worldboss") then
		SmartFocusNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartFocusNudeFrame:SetBackdropBorderColor(1,0.82,0)
		SmartFocusEliteText:SetText("BOSS")
		SmartFocusEliteText:Show()
	elseif (classification == "rareelite") then
		SmartFocusNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartFocusNudeFrame:SetBackdropBorderColor(1,0.82,0)
		SmartFocusEliteText:SetText("ELITE+")
		SmartFocusEliteText:Show()
	elseif (classification == "elite") then
		SmartFocusNudePortrait:SetBackdropBorderColor(1,0.82,0)
		SmartFocusNudeFrame:SetBackdropBorderColor(1,0.82,0)
		SmartFocusEliteText:SetText("ELITE")
		SmartFocusEliteText:Show()
	elseif (classification == "rare") then
		SmartFocusNudePortrait:SetBackdropBorderColor(1,1,1)
		SmartFocusNudeFrame:SetBackdropBorderColor(1,1,1)
		SmartFocusEliteText:SetText("RARE")
		SmartFocusEliteText:Show()
	else
		SmartFocusNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
		SmartFocusNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
		SmartFocusEliteText:Hide()
	end
end

function SmartPlayerNude_OnEvent(event)
	if (event == "PLAYER_ENTERING_WORLD") then
		if SMART_PLAYER_Config.elite then
			if SMART_PLAYER_Config.rare then
				SmartPlayerNudePortrait:SetBackdropBorderColor(0,1,1)
				SmartPlayerNudeFrame:SetBackdropBorderColor(0,1,1)
			else
				SmartPlayerNudePortrait:SetBackdropBorderColor(1,0.82,0)
				SmartPlayerNudeFrame:SetBackdropBorderColor(1,0.82,0)
			end
		else
			SmartPlayerNudePortrait:SetBackdropBorderColor(0.4,0.4,0.4)
			SmartPlayerNudeFrame:SetBackdropBorderColor(0.4,0.4,0.4)
		end

		SmartPlayer_HealthUpdate()
		SmartPlayer_ManaUpdate()

		if UnitExists("pet") then
			SmartPlayerPet_HealthUpdate()
			SmartPlayerPet_ManaUpdate()
		end

		if not PartyMemberFrame1:IsUserPlaced() then
			SmartParty_ResetPosition()
		end
		SmartPartyTarget_ResetPosition()
	elseif (event == "VARIABLES_LOADED") then
		if not PlayerFrame:IsUserPlaced() then
			SmartPlayer_ResetPosition()
		end

		SmartPlayer_PetFramePosition()
	elseif (event == "UNIT_PET") then
		if (arg1 == "player") then
			if UnitExists("pet") then
				SmartPlayerPet_HealthUpdate()
				SmartPlayerPet_ManaUpdate()
			end
			--[[
			if not PartyMemberFrame1:IsUserPlaced() then
				SmartParty_ResetPosition()
			end
			SmartPartyTarget_ResetPosition()
			]]
		end
	elseif (event == "UNIT_COMBAT") then
		if (arg1 == "player") then
			SmartPlayer_HealthUpdate()
			SmartPlayer_ManaUpdate()
		end
		if (arg1 == "pet") then
			SmartPlayerPet_HealthUpdate()
			SmartPlayerPet_ManaUpdate()
		end
	elseif (event == "UNIT_HEALTH") or (event == "UNIT_MAXHEALTH") then
		if (arg1 == "player") then
			SmartPlayer_HealthUpdate()
		end

		if (arg1 == "pet") then
			SmartPlayerPet_HealthUpdate()
		end
	elseif (event == "UNIT_DISPLAYPOWER") or (event == "UNIT_FOCUS") or (event == "UNIT_MANA") or (event == "UNIT_RAGE") or (event == "UNIT_ENERGY")  or (event == "UNIT_MAXFOCUS") or (event == "UNIT_MAXMANA") or (event == "UNIT_MAXRAGE") or (event == "UNIT_MAXENERGY")then
		if (arg1 == "player") then
			SmartPlayer_ManaUpdate()
		end

		if (arg1 == "pet") then
			SmartPlayerPet_ManaUpdate()
		end
	end
end

function SmartSkinRaputa_SmartPartyDebuff_Position()
	-- blank
end
