<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
	<Script file="Blizzard_PetJournal.lua"/>

	<Texture name="ExpBar-Divider" atlas="PetJournal-ExpBar-Divider" useAtlasSize="true" virtual="true"/>

<!--Layers>
	<Layer level="BACKGROUND">
		<Texture name="$parentIcon">
			<Color g="1" a="0.5"/>
		</Texture>
	</Layer>
</Layers-->
	<Button name="CompanionListButtonTemplate" motionScriptsWhileDisabled="true" virtual="true">
		<Size x="208" y="46"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture atlas="PetList-ButtonBackground"/>	
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentIcon" parentKey="icon">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="LEFT" x="-42" y="0"/>
					</Anchors>
				</Texture>
				<Texture name="$parentPetTypeIcon" parentKey="petTypeIcon">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" x="-1" y="1"/>
					</Anchors>
					<Size x="90" y="44"/>	
					<TexCoords left="0.00781250" right="0.71093750" top="0.74609375" bottom="0.91796875"/>	
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="-1">
				<Texture name="$parentIconBorder" parentKey="iconBorder" file="Interface\Common\WhiteIconFrame" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.icon"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.icon"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="1">
				<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT" parentKey="name">
					<Size x="147" y="25"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentIcon" x="10" y="-3"/>
					</Anchors>
				</FontString>
				<FontString name="$parentSubName" inherits="GameFontNormalSmall" justifyH="LEFT" parentKey="subName">
					<Size x="147" y="12"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentName" x="0" y="-4"/>
					</Anchors>
					<Color r="1" g="1" b="1" a="1"/>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
				<Texture parentKey="isDead" file="Interface\PetBattles\DeadPetIcon" hidden="true">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentIcon" relativePoint="CENTER" x="0" y="0"/>
					</Anchors>
				</Texture>
				<Texture atlas="PetList-ButtonSelect" parentKey="selectedTexture" hidden="true"/>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="dragButton">
				<Size x="40" y="40"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parentIcon" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture file="Interface\Buttons\CheckButtonHilight" parentKey="ActiveTexture" alphaMode="ADD"/>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture name="$parentLevelBG" atlas="PetJournal-LevelBubble" useAtlasSize="true" parentKey="levelBG">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentIcon" x="3" y="-3"/>
							</Anchors>
						</Texture>
						<FontString name="$parentLevel" inherits="GameFontNormalSmall" justifyH="CENTER" parentKey="level">
							<Size x="0" y="12"/>
							<Anchors>
								<Anchor point="CENTER" relativeTo="$parentLevelBG" x="1" y="-1"/>
							</Anchors>
						</FontString>
						<Texture name="$parentFavorite" atlas="PetJournal-FavoritesIcon" useAtlasSize="true" parentKey="favorite">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
							</Anchors>	
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Cooldown parentKey="Cooldown" drawBling="false" inherits="CooldownFrameTemplate"/>
				</Frames>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
				<Scripts>
					<OnClick function="PetJournalDragButton_OnClick"/>	
					<OnLoad>
						self:RegisterForDrag("LeftButton");
						self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnShow>
						self:RegisterEvent("SPELL_UPDATE_COOLDOWN");
					</OnShow>
					<OnHide>
						self:UnregisterEvent("SPELL_UPDATE_COOLDOWN");
					</OnHide>
					<OnEvent function="PetJournalDragButton_OnEvent"/>
					<OnDragStart function="PetJournalDragButton_OnDragStart"/>
				</Scripts>
			</Button>
		</Frames>
		<HighlightTexture atlas="PetList-ButtonHighlight"/>
		<Scripts>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
				self:RegisterForDrag("LeftButton");
			</OnLoad>
			<OnClick function="PetJournalListItem_OnClick"/>
			<OnDragStart>
				PetJournalDragButton_OnDragStart(self.dragButton);
			</OnDragStart>
		</Scripts>
	</Button>
	
	
	<Button name="MountListButtonTemplate" motionScriptsWhileDisabled="true" virtual="true">
		<Size x="208" y="46"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture atlas="PetList-ButtonBackground" parentKey="background"/>
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentIcon" parentKey="icon">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="LEFT" x="-42" y="0"/>
					</Anchors>
				</Texture>
				<Texture name="$parentFactionIcon" parentKey="factionIcon">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" x="-1" y="1"/>
					</Anchors>
					<Size x="90" y="44"/>	
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="-1">
				<Texture name="$parentIconBorder" parentKey="iconBorder" file="Interface\Common\WhiteIconFrame" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.icon"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.icon"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT" parentKey="name">
					<Size x="147" y="25"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentIcon" x="10" y="-5"/>
					</Anchors>
				</FontString>
				<Texture name="$parentFavorite" atlas="PetJournal-FavoritesIcon" useAtlasSize="true" parentKey="favorite">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
					</Anchors>
				</Texture>
				<Texture name="$parentUnusable" parentKey="unusable" hidden="true">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="LEFT" x="-42" y="0"/>
					</Anchors>
					<Color r="1" g="0" b="0" a="0.2"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<Texture atlas="PetList-ButtonSelect" parentKey="selectedTexture" hidden="true"/>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="DragButton" motionScriptsWhileDisabled="true">
				<Size x="40" y="40"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parentIcon" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture file="Interface\Buttons\CheckButtonHilight" parentKey="ActiveTexture" alphaMode="ADD"/>
					</Layer>
				</Layers>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
				<Scripts>
					<OnClick function="MountListDragButton_OnClick"/>	
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_LEFT");
						local spellID = self:GetParent().spellID;
						if (spellID) then
							MountJournalMountButton_UpdateTooltip(self:GetParent());
							self.showingTooltip = true;
						end
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
						self.showingTooltip = false;
					</OnLeave>
					<OnLoad>
						self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
						self:RegisterForDrag("LeftButton");
					</OnLoad>
					<OnDragStart>
						MountJournal_Pickup(self:GetParent().index);
					</OnDragStart>
				</Scripts>
			</Button>
		</Frames>
		<HighlightTexture atlas="PetList-ButtonHighlight"/>
		<Scripts>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnLoad>
			<OnClick function="MountListItem_OnClick"/>	
		</Scripts>
	</Button>
	

<CheckButton name="CompanionLoadOutSpellTemplate" motionScriptsWhileDisabled="true" virtual="true">
		<Size x="29" y="29"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" inherits="Spellbook-EmptySlot">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
					<Size x="33" y="33"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentIcon" setAllPoints="true" parentKey="icon"/>
			</Layer>
			<Layer level="OVERLAY">
				<Texture parentKey="BlackCover" setAllPoints="true" hidden="true">
					<Color r="0" g="0" b="0" a="0.6"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<FontString parentKey="LevelRequirement" inherits="GameFontNormalHuge" justifyH="CENTER" justifyV="MIDDLE">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
					<Color r="1.0" g="0.1" b="0.1"/> <!-- RED_FONT_COLOR -->
				</FontString>
				<Texture name="$parentFlyoutArrow" file="Interface\Buttons\ActionBarFlyoutButton" parentKey="FlyoutArrow">
					<Size x="23" y="11"/>	
					<Anchors>
						<Anchor point="BOTTOM" x="0" y="-3"/>
					</Anchors>
					<TexCoords left="0.62500000" right="0.98437500" top="0.82812500" bottom="0.74218750"/>	
				</Texture>
				<Texture name="$parentSelected" file="Interface\Buttons\CheckButtonHilight" parentKey="selected" alphaMode="ADD"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
			</OnLoad>
			<OnEvent>
			</OnEvent>
			<PreClick>
				self:SetChecked(false);
			</PreClick>
			<OnClick>
				if ( IsModifiedClick() ) then
					HandleModifiedItemClick(PetJournal_GetPetAbilityHyperlink(self.abilityID, self.petID));
				elseif ( self.enabled ) then
					PetJournal_ShowPetSelect(self);
				end
			</OnClick>
			<OnEnter>
				if not PetJournal.SpellSelect:IsShown() then
					PetJournal_ShowAbilityTooltip(self, self.abilityID, self.speciesID, self.petID, self.additionalText);
				end
			</OnEnter>
			<OnLeave>
				PetJournal_HideAbilityTooltip(self);
			</OnLeave>
		</Scripts>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD"/>
	</CheckButton>

	
	<Button name="CompanionLoadOutTemplate" virtual="true">
		<Size x="399" y="106"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBG" atlas="PetJournal-BattleSlot-Active" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="-3" y="0"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="2">
				<Texture name="$parentShadows" atlas="PetJournal-BattleSlot-Shadow" useAtlasSize="true" parentKey="shadows">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" x="-125" y="-120"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentIcon" parentKey="icon">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="7" y="-11"/>
					</Anchors>
				</Texture>
				<Texture name="$parentPetTypeIcon" parentKey="petTypeIcon">
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="0" y="0"/>
					</Anchors>
					<Size x="60" y="60"/>	
					<TexCoords left="0.00781250" right="0.47656250" top="0.50390625" bottom="0.73828125"/>	
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="1">
				<Texture name="$parentIconBorder" atlas="PetJournal-BattleSlot-IconBorder" useAtlasSize="true" parentKey="iconBorder">
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentIcon" x="0" y="0"/>
					</Anchors>	
				</Texture>
				<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT" justifyV="BOTTOM" parentKey="name">
					<Size x="210" y="0"/>
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIcon" x="12" y="5"/>
					</Anchors>
				</FontString>
				<FontString name="$parentSubName" inherits="GameFontNormalSmall" justifyH="LEFT" parentKey="subName">
					<Size x="215" y="0"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentName" x="0" y="-2"/>
					</Anchors>
					<Color r="1" g="1" b="1" a="1"/>
				</FontString>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="2">
				<Texture name="$parentQualityBorder" parentKey="qualityBorder" file="Interface\Common\WhiteIconFrame">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.icon"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.icon"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<Texture parentKey="isDead" file="Interface\PetBattles\DeadPetIcon" hidden="true">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentIcon" relativePoint="CENTER" x="0" y="0"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="2">
				<Texture name="$parentLevelBG" atlas="PetJournal-LevelBubble" useAtlasSize="true" parentKey="levelBG">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentIcon" x="5" y="-5"/>
					</Anchors>
				</Texture>
				<FontString name="$parentLevel" inherits="GameFontNormalSmall" justifyH="CENTER" parentKey="level">
					<Size x="0" y="12"/>
					<Anchors>
						<Anchor point="CENTER" relativePoint="CENTER" relativeTo="$parentLevelBG" x="1" y="-1"/>
					</Anchors>
				</FontString>
				<Texture name="$parentFavorite" atlas="PetJournal-FavoritesIcon" useAtlasSize="true" parentKey="favorite">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentHealthFrame" parentKey="healthFrame">
				<Size x="84" y="29"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parentIcon" x="12" y="-8"/>
				</Anchors>
				<Frames>
					<Frame name="$parentTextureFrame">
						<Size x="16" y="16"/>
						<Anchors>
							<Anchor point="TOPLEFT"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="$parentHealthTex" file="Interface\PetBattles\PetBattle-StatIcons">
									<TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/>
								</Texture>
							</Layer>
						</Layers>
					</Frame>
					<StatusBar name="$parenthealthStatusBar" parentKey="healthBar">
						<Size x="84" y="7"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentTextureFrame" x="0" y="-2"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="$parentLeft" atlas="PetJournal-HealthBar-Left" useAtlasSize="true">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
									</Anchors>	
								</Texture>
								<Texture name="$parentRight" atlas="PetJournal-HealthBar-Right" useAtlasSize="true">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
									</Anchors>										
								</Texture>
								<Texture name="$parentMiddle" atlas="PetJournal-HealthBar-Mid">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
									</Anchors>	
								</Texture>
							</Layer>
							<Layer level="BACKGROUND">
								<Texture name="$parentBGMiddle" atlas="PetJournal-HealthBar-Background" useAtlasSize="true">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						<BarTexture name="$parentHealthBar" file="Interface\TargetingFrame\UI-StatusBar"/>
						<BarColor r="0.1" g="1.0" b="0.1" />
					</StatusBar>
				</Frames>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentHealthValue" inherits="GameFontHighlight" parentKey="healthValue" text="99/100">
							<Size x="0" y="0"/>
							<Anchors>
								<Anchor point="TOPLEFT" x="18" y="-2"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -54, 0);
						GameTooltip:SetText(PET_BATTLE_STAT_HEALTH, 1, 1, 1);
						GameTooltip:AddLine(PET_BATTLE_TOOLTIP_HEALTH_MAX, nil, nil, nil, true);
						GameTooltip:Show();
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Frame>
			
			<CheckButton name="$parentSpell1" inherits="CompanionLoadOutSpellTemplate" id="1" parentKey="spell1">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentHealthFrame" x="15" y="0"/>
				</Anchors>
			</CheckButton>
			<CheckButton name="$parentSpell2" inherits="CompanionLoadOutSpellTemplate" id="2" parentKey="spell2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentSpell1" RelativePoint="RIGHT" x="10" y="0"/>
				</Anchors>
			</CheckButton>
			<CheckButton name="$parentSpell3" inherits="CompanionLoadOutSpellTemplate" id="3" parentKey="spell3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentSpell2" RelativePoint="RIGHT" x="10" y="0"/>
				</Anchors>
			</CheckButton>

			<Frame name="$parentHelpFrame" parentKey="helpFrame">
				<Size x="404" y="106"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK" textureSubLevel="1">
						<Texture name="$parentHelpPlate" atlas="PetJournal-BattleSlot-Locked" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="$parentText" inherits="GameFontHighlight" text="BATTLE_PET_UNLOCK_HELP_1" justifyH="CENTER" parentKey="text">
							<Anchors>
								<Anchor point="TOP" x="0" y="-30"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
			
			
			<Frame name="$parentRequirement" parentKey="requirement">
				<Size x="371" y="20"/>
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentHelpFrameText" relativePoint="BOTTOM" x="0" y="-2"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentStr" parentKey="str" inherits="GameFontNormalLarge" setAllPoints="true"/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter function="PetJournalRequirement_ShowRequirementToolTip"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Frame>
			
			
			<StatusBar name="$parentXPBar" parentKey="xpBar">
				<Size x="332" y="11"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentHealthFrame" x="0" y="-5"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentRank" inherits="TextStatusBarText" parentKey ="rankText" text="0/0" hidden="true">
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
						</FontString>
						<Texture name="$parentLeft" atlas="PetJournal-ExpBar-Left" useAtlasSize="true">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
							</Anchors>	
						</Texture>
						<Texture name="$parentRight" atlas="PetJournal-ExpBar-Right" useAtlasSize="true">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
							</Anchors>						
						</Texture>
						<Texture name="$parentMiddle" atlas="PetJournal-ExpBar-Mid">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
							</Anchors>	
						</Texture>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="-125" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="-83" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="-42" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="42" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="83" y="0"/>
							</Anchors>
						</Texture>
						<Texture inherits="ExpBar-Divider">
							<Anchors>
								<Anchor point="CENTER" x="125" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND">
						<Texture name="$parentBGMiddle" atlas="PetJournal-ExpBar-Background">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" />
				<BarColor r="0.2" g="0.6" b="1.0" />
				<Scripts>
					<OnShow>
						self.rankText:SetShown(GetCVarBool("xpBarText"));
					</OnShow>
					<OnEnter>
						self.rankText:Show();
						if ( self.tooltip ) then
							GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -162, 0);
							GameTooltip:SetText(COMBAT_XP_GAIN, 1, 1, 1);
							GameTooltip:AddLine(self.tooltip);
							GameTooltip:Show();
						end
					</OnEnter>
					<OnLeave>
						self.rankText:SetShown(GetCVarBool("xpBarText"));
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</StatusBar>

			<PlayerModel name="$parentModelFrame" useParentLevel="true" parentKey="model">
				<Size x="130" y="96"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="0" y="0"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						Model_OnLoad(self);
						self:SetRotation(-MODELFRAME_DEFAULT_ROTATION);
					</OnLoad>
					<OnEvent function="Model_OnEvent"/>
				</Scripts>
				<Frames>
					<Button name="$parentCardButton" setAllPoints="true">
						<Scripts>
							<OnClick>
								PetJournal_ShowPetCardByID(self:GetParent():GetParent().petID);
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</PlayerModel>

			<Button name="$parentSetButton" parentKey="setButton" setAllPoints="true" hidden="true">
				<Animations>
					<AnimationGroup parentKey="glow" looping="REPEAT">
						<Alpha change="-1.0" duration="0.9" order="1"/>
						<Alpha change="1.0" duration="0.9" order="2"/>
					</AnimationGroup>
				</Animations>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface/BUTTONS/CheckButtonHilight" alphaMode="ADD">
							<Size x="50" y="50"/>
							<Anchors>
								<Anchor point="TOPLEFT" x="3" y="-4"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnShow>
						self.glow:Play();
						self:SetFrameLevel(self:GetParent():GetFrameLevel() + 4)
					</OnShow>
					<OnClick>
						local type, petID = GetCursorInfo();
						if type == "battlepet" then
							local _, dialog = StaticPopup_Visible("BATTLE_PET_RELEASE");
							if ( dialog and dialog.data == petID ) then
								StaticPopup_Hide("BATTLE_PET_RELEASE");
							end
							if ( PetJournal_IsPendingCage(petID) ) then
								UIErrorsFrame:AddMessage(ERR_PET_JOURNAL_PET_PENDING_CAGE, 1.0, 0.1, 0.1, 1.0);
								ClearCursor();
								return;
							end
							C_PetJournal.SetPetLoadOutInfo(self:GetParent():GetID(), petID);
							PetJournal_UpdatePetLoadOut();
							ClearCursor();
						end
					</OnClick>	
					<OnReceiveDrag>
						local type, petID = GetCursorInfo();
						if type == "battlepet" then
							local _, dialog = StaticPopup_Visible("BATTLE_PET_RELEASE");
							if ( dialog and dialog.data == petID ) then
								StaticPopup_Hide("BATTLE_PET_RELEASE");
							end
							if ( PetJournal_IsPendingCage(petID) ) then
								UIErrorsFrame:AddMessage(ERR_PET_JOURNAL_PET_PENDING_CAGE, 1.0, 0.1, 0.1, 1.0);
								ClearCursor();
								return;
							end
							C_PetJournal.SetPetLoadOutInfo(self:GetParent():GetID(), petID);
							PetJournal_UpdatePetLoadOut();
							ClearCursor();
							PlaySound("igAbilityIconDrop");
						end
					</OnReceiveDrag>
				</Scripts>
			</Button>
			<Button parentKey="dragButton">
				<Size x="40" y="40"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parentIcon" x="0" y="0"/>
				</Anchors>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
				<Scripts>
					<OnClick function="PetJournalPetLoadoutDragButton_OnClick"/>	
					<OnLoad>
						self:RegisterForDrag("LeftButton");
						self:RegisterForClicks("RightButtonUp");
					</OnLoad>
					<OnDragStart function="PetJournalDragButton_OnDragStart"/>
				</Scripts>
			</Button>
			<Frame name="$parentEmptySlot" parentKey="emptyslot" setAllPoints="true">
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentSlotInfo" inherits="GameFontNormal" parentKey ="slot" text="BATTLE_PET_SLOT" justifyH="LEFT">
							<Size x="343" y="12"/>
							<Anchors>
								<Anchor point="TOPLEFT" x="57" y="-15"/>
							</Anchors>
						</FontString>
						<FontString name="$parentDragHere" inherits="GameFontHighlight" parentKey ="draghere" text="BATTLE_PET_SLOT_DRAG_HERE" justifyH="LEFT">
							<Size x="343" y="0"/>
							<Anchors>
								<Anchor point="TOP" relativeTo="$parentSlotInfo" relativePoint="BOTTOM" x="0" y="-2" />
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
			<Frame name="$parentReadOnlyFrame" parentKey="ReadOnlyFrame" setAllPoints="true">
				<Layers>
					<Layer level="OVERLAY" textureSubLevel="4">
						<Texture>
							<Color r="0" g="0" b="0" a="0.5"/>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Frame name="$parentLockIcon" parentKey="LockIcon">
						<Anchors>
							<Anchor point="TOPLEFT" x="-5" y="-1"/>
						</Anchors>
						<Size x="32" y="32"/>
						<Layers>
							<Layer level="OVERLAY" textureSubLevel="5">
								<Texture name="$parentLockIcon" file="Interface\PetBattles\PetBattle-LockIcon">
									<Anchors>
										<Anchor point="TOPLEFT" x="1" y="-1"/>
									</Anchors>
									<Size x="32" y="32"/>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 0, 0);
								GameTooltip:SetText(PET_JOURNAL_READONLY, 1, 1, 1, true);
								GameTooltip:AddLine(self.tooltip, nil, nil, nil, true);
								GameTooltip:SetMinimumWidth(150);
								GameTooltip:Show();
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
				</Frames>
				<Scripts>
					<OnShow>
						self:SetFrameLevel(self:GetParent():GetFrameLevel()+5);
					</OnShow>
					<OnEnter>
						-- DO NOTHING: Prevents interaction with the frame below.
					</OnEnter>
				</Scripts>
			</Frame>
			<Button parentKey="MenuRegion">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentIcon" />
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon" x="250" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("RightButtonUp");
					</OnLoad>
					<OnClick>
						loadout = self:GetParent();
						if (button == "RightButton" and loadout.petID) then
							PetJournal_ShowPetDropdown(nil, self, 0, 0, loadout.petID);
						end
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				self.abilities = {};
				self.abilityLevels = {};
				self.model:EnableMouse(false);
				self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
			</OnLoad>
			<OnClick>
				PetJournal_ShowPetCardByID(self.petID);
			</OnClick>
		</Scripts>
	</Button>


	<Button name="PetCardSpellButtonTemplate" virtual="true">
		<Size x="36" y="36"/>
		<Layers>
			<Layer level="BORDER">
				<Texture name="$parentIcon" parentKey="icon" setAllPoints="true" file="Interface\Icons\Ability_ThunderClap"/>
			</Layer>
			<Layer level="OVERLAY">
				<Texture parentKey="BlackCover" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentIcon"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon"/>
					</Anchors>
					<Color r="0" g="0" b="0" a="0.6"/>
				</Texture>
				<FontString parentKey="LevelRequirement" inherits="GameFontNormalHuge" justifyH="CENTER" justifyV="MIDDLE" hidden="true">
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentIcon"/>
					</Anchors>
					<Color r="1.0" g="0.1" b="0.1"/> <!-- RED_FONT_COLOR -->
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter>
				PetJournal_ShowAbilityTooltip(self, self.abilityID, self.speciesID, self.petID, self.additionalText);
			</OnEnter>
			<OnLeave>
				PetJournal_HideAbilityTooltip(self);
			</OnLeave>			
			<OnClick>
				if ( IsModifiedClick() ) then
					HandleModifiedItemClick(PetJournal_GetPetAbilityHyperlink(self.abilityID, self.petID));
				end
			</OnClick>
		</Scripts>
	</Button>


	<Frame name="PetCardInset">
		<Size x="408" y="171"/>	
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBG" atlas="PetJournal-PetCard-BG" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>	
				</Texture>
			</Layer>
		</Layers>
	</Frame>
	
	<CheckButton name="PetSpellSelectButtonTemplate" motionScriptsWhileDisabled="true" virtual="true">
		<Size x="28" y="28"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentIcon" parentKey="icon">
					<TexCoords left="0.0625" right="0.9375" top="0.0625" bottom="0.9375"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture parentKey="BlackCover" setAllPoints="true" hidden="true">
					<Color r="0" g="0" b="0" a="0.6"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString parentKey="LevelRequirement" inherits="GameFontNormalHuge" justifyH="CENTER" justifyV="MIDDLE">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
					<Color r="1.0" g="0.1" b="0.1"/> <!-- RED_FONT_COLOR -->
				</FontString>
			</Layer>
		</Layers>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
		<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
		<Scripts>
			<OnClick>
				if ( IsModifiedClick() ) then
					HandleModifiedItemClick(PetJournal_GetPetAbilityHyperlink(self.abilityID, self.petID));
				else
					C_PetJournal.SetAbility(self.slotIndex, self.abilityIndex, self.abilityID);
					PlaySound("igMainMenuOptionCheckBoxOn");
					PetJournal_UpdatePetLoadOut();
					self:GetParent():Hide();
				end
			</OnClick>
			<OnEnter>
				PetJournal_ShowAbilityTooltip(self, self.abilityID, self.speciesID, self.petID, self.additionalText);
			</OnEnter>
			<OnLeave>
				PetJournal_HideAbilityTooltip(self);
			</OnLeave>
		</Scripts>
	</CheckButton>


	<Frame name="PetJournalParent" inherits="PortraitFrameTemplate" toplevel="true" frameStrata="HIGH" enableMouse="true" parent="UIParent" hidden="true">
		<Size x="703" y="606"/>
		<Frames>
			<Button name="$parentTab1" inherits="CharacterFrameTabButtonTemplate" text="MOUNTS" id="1">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="BOTTOMLEFT" x="11" y="2"/>
				</Anchors>
				<Scripts>
					<OnClick>
						PetJournalParent_SetTab(PetJournalParent, self:GetID());
						PlaySound("UI_Toybox_Tabs");
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentTab2" inherits="CharacterFrameTabButtonTemplate" text="PET_JOURNAL" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentTab1" relativePoint="RIGHT" x="-16" y="0"/>
				</Anchors>
				<Scripts>
					<OnClick>
						PetJournalParent_SetTab(PetJournalParent, self:GetID());
						PlaySound("UI_Toybox_Tabs");
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentTab3" inherits="CharacterFrameTabButtonTemplate" text="TOY_BOX" id="3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentTab2" relativePoint="RIGHT" x="-16" y="0"/>
				</Anchors>
				<Scripts>
					<OnClick>
						PetJournalParent_SetTab(PetJournalParent, self:GetID());
						PlaySound("UI_Toybox_Tabs");
					</OnClick>
				</Scripts>
			</Button>
			</Frames>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Scripts>
			<OnLoad>
				PetJournalParentTitleText:SetText(COLLECTIONS);
				SetPortraitToTexture(PetJournalParentPortrait,"Interface\\Icons\\MountJournalPortrait");
				PanelTemplates_SetNumTabs(self, 3);
				if (GetCVar("petJournalTab") == "3") then
					PanelTemplates_SetTab(self, 3);
				elseif (GetCVar("petJournalTab") == "2") then
					PanelTemplates_SetTab(self, 2);
				else
					PanelTemplates_SetTab(self, 1);
				end
			</OnLoad>
			<OnShow function="PetJournalParent_OnShow"/>
			<OnHide function="PetJournalParent_OnHide"/>
		</Scripts>
	</Frame>

	<Frame name="MountJournal" parent="PetJournalParent" setAllPoints="true">
		<Frames>
			<Button name="$parentSummonRandomFavoriteButton" parentKey="SummonRandomFavoriteButton" inherits="SecureFrameTemplate">
				<Size>
					<AbsDimension x="33" y="33"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativePoint="TOPRIGHT" x="-24" y="-42"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentIconTexture" parentKey="texture" file="Interface/ICONS/ACHIEVEMENT_GUILDPERK_MOUNTUP" setAllPoints="true"/>
					</Layer>
					<Layer level="OVERLAY">
						<Texture parentKey="BlackCover" setAllPoints="true" hidden="true">
							<Color r="0" g="0" b="0" a="0.6"/>
						</Texture>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture name="$parentBorder" inherits="ActionBarFlyoutButton-IconFrame">
							<Size x="35" y="35"/>
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</Texture>
						<Texture name="$parentLockIcon" parentKey="LockIcon" file="Interface\PetBattles\PetBattle-LockIcon" setAllPoints="true" hidden="true"/>
						<FontString name="$parentSpellName" inherits="GameFontNormal" maxLines="2" justifyH="RIGHT" parentKey="spellname" text="Summon Random Favorite Mount">
							<Size x="170" y="0"/>
							<Color r="1" g="1" b="1"/>
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentBorder" x="-2" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad function="MountJournalSummonRandomFavoriteButton_OnLoad"/>
					<OnClick function="MountJournalSummonRandomFavoriteButton_OnClick"/>
					<OnDragStart function="MountJournalSummonRandomFavoriteButton_OnDragStart"/>
					<OnEnter function="MountJournalSummonRandomFavoriteButton_OnEnter"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
			</Button>	
			<Frame parentKey="LeftInset" useParentLevel="true" inherits="InsetFrameTemplate">
				<Size x="260" y="496"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="4" y="-60" />
					<Anchor point="BOTTOMLEFT" x="4" y="26" />
				</Anchors>
			</Frame>
			<Frame parentKey="RightInset" useParentLevel="true" inherits="InsetFrameTemplate">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-6" y="-60" />
					<Anchor point="BOTTOMLEFT" relativeKey="$parent.LeftInset" relativePoint="BOTTOMRIGHT" x="20" y="0"/>
				</Anchors>
			</Frame>
			<EditBox name="$parentSearchBox" inherits="SearchBoxTemplate" parentKey="searchBox" letters="40">
				<Size x="145" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.LeftInset" x="15" y="-9"/>
				</Anchors>
				<Scripts>
					<OnTextChanged function="MountJournal_OnSearchTextChanged"/>
				</Scripts>
			</EditBox>
			<Button name="$parentFilterButton" inherits="UIMenuButtonStretchTemplate" text="FILTER">
				<Size x="93" y="22"/>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeKey="$parent.LeftInset" x="-5" y="-9"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="Icon" file="Interface\ChatFrame\ChatFrameExpandArrow">
							<Size x="10" y="12"/>
							<Anchors>
								<Anchor point="RIGHT" relativeKey="$parent.Right" relativePoint="RIGHT" x="-5"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick> 
						PlaySound("igMainMenuOptionCheckBoxOn");
						ToggleDropDownMenu(1, nil, MountJournalFilterDropDown, "MountJournalFilterButton", 74, 15);
					</OnClick>	
				</Scripts>						
			</Button>
			<Frame name="$parentFilterDropDown" inherits="UIDropDownMenuTemplate">
				<Scripts>
					<OnLoad function="MountJournalFilterDropDown_OnLoad"/>
				</Scripts>
			</Frame>
			<Frame parentKey="MountCount" useParentLevel="true" inherits="InsetFrameTemplate3">
				<Size x="130" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="70" y="-35"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString parentKey="Count" inherits="GameFontHighlightSmall" justifyH="RIGHT">
							<Anchors>
								<Anchor point="RIGHT" x="-10" y="0"/>
							</Anchors>
						</FontString>
						<FontString parentKey="Label" inherits="GameFontNormalSmall" text="TOTAL_MOUNTS" justifyH="LEFT">
							<Anchors>
								<Anchor point="LEFT" x="10" y="0"/>
								<Anchor point="RIGHT" relativeKey="$parent.Count" relativePoint="LEFT" x="-3" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
			<Frame parentKey="MountDisplay">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.RightInset" relativePoint="TOPLEFT" x="3" y="-3"/>
					<Anchor point="BOTTOMRIGHT" relativeKey="$parent.RightInset" relativePoint="BOTTOMRIGHT" x="-3" y="3"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture parentKey="YesMountsTex" file="Interface\PetBattles\MountJournal-BG" setAllPoints="true">
							<TexCoords left="0" right="0.78515625" top="0" bottom="1"/>	
						</Texture>
						<Texture parentKey="NoMountsTex" file="Interface\PetBattles\MountJournal-NoMounts" setAllPoints="true" hidden="true">
							<TexCoords left="0" right="0.78515625" top="0" bottom="1"/>	
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString parentKey="NoMounts" inherits="GameFontHighlightLarge" JustifyH="CENTER" text="ERR_NO_RIDING_SKILL">
							<Size x="280" y="80"/>
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Frame parentKey="ShadowOverlay" inherits="ShadowOverlayTemplate" useParentLevel="true" setAllPoints="true"/>
					<Button parentKey="InfoButton" motionScriptsWhileDisabled="true">
						<Size x="208" y="46"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="6" y="-6"/>
						</Anchors>
						<Layers>
							<Layer level="BORDER">
								<Texture name="$parentIcon" parentKey="Icon">
									<Size x="38" y="38"/>
									<Anchors>
										<Anchor point="LEFT" x="20" y="-20"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="OVERLAY">
								<FontString name="$parentName" inherits="GameFontHighlightLarge" justifyH="LEFT" justifyV="CENTER" parentKey="Name">
									<Size x="300" y="35"/>
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIcon" x="10" y="0"/>
									</Anchors>
								</FontString>
								<FontString name="$parentSource" inherits="GameFontHighlight" justifyH="LEFT" parentKey="Source">
									<Size x="345" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentIcon" x="0" y="-6"/>
									</Anchors>
								</FontString>
								<FontString name="$parentLore" inherits="GameFontNormal" justifyH="LEFT" parentKey="Lore">
									<Size x="345" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.Source"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</Button>
					<PlayerModel parentKey="ModelFrame" useParentLevel="true" inherits="ModelWithZoomTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="0" y="-160"/>
							<Anchor point="BOTTOMRIGHT" relativeKey="$parent" x="0" y="0"/>
						</Anchors>
						<Frames>
							<Button parentKey="RotateLeftButton">
								<Size x="35" y="35"/>
								<Anchors>
									<Anchor point="TOPRIGHT" relativeKey="$parent" relativePoint="BOTTOM" x="-5" y="50"/>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateLeft(self:GetParent());
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationLeft-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationLeft-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
							<Button parentKey="RotateRightButton">
								<Size>
									<AbsDimension x="35" y="35"/>
								</Size>
								<Anchors>
									<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="BOTTOM" x="5" y="50"/>
								</Anchors>
								<Scripts>
									<OnLoad>
										self:RegisterForClicks("LeftButtonDown", "LeftButtonUp");
									</OnLoad>
									<OnClick>
										Model_RotateRight(self:GetParent());
									</OnClick>
								</Scripts>
								<NormalTexture file="Interface\Buttons\UI-RotationRight-Button-Up"/>
								<PushedTexture file="Interface\Buttons\UI-RotationRight-Button-Down"/>
								<HighlightTexture file="Interface\Buttons\ButtonHilight-Round" alphaMode="ADD"/>
							</Button>
						</Frames>
					</PlayerModel>
				</Frames>

			</Frame>
			<!--Name needed for HybridScrollFrameTemplate-->
			<ScrollFrame name="$parentListScrollFrame" parentKey="ListScrollFrame" inherits="HybridScrollFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.LeftInset" x="3" y="-36"/>
					<Anchor point="BOTTOMRIGHT" relativeKey="$parent.LeftInset" x="-2" y="5"/>
				</Anchors>
				<Frames>
					<Slider name="$parentScrollBar" inherits="HybridScrollBarTrimTemplate" parentKey="scrollBar">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="20"/>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="4" y="11"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.trackBG:Show();
								self.trackBG:SetVertexColor(0, 0, 0, 0.75);
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
			</ScrollFrame>
			<Button parentKey="MountButton" name="$parentMountButton" inherits="MagicButtonTemplate" text="MOUNT">
				<Size x="140" y="22"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT"/>
				</Anchors>
				<Scripts>
					<OnClick function="MountJournalMountButton_OnClick"/>
				</Scripts>
			</Button>
			<Frame name="$parentMountOptionsMenu" inherits="UIDropDownMenuTemplate" enableMouse="true" parentKey="mountOptionsMenu"/>
		</Frames>
		<Scripts>
			<OnLoad function="MountJournal_OnLoad"/>
			<OnEvent function="MountJournal_OnEvent"/>
			<OnShow function="MountJournal_OnShow"/>
		</Scripts>
	</Frame>

		<Frame name="PetJournal" parent="PetJournalParent" setAllPoints="true" hidden="true">
		<Frames>
			<Frame parentKey="PetCount" useParentLevel="true" inherits="InsetFrameTemplate3">
				<Size x="130" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="70" y="-35"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString parentKey="Count" inherits="GameFontHighlightSmall" justifyH="RIGHT">
							<Anchors>
								<Anchor point="RIGHT" x="-10" y="0"/>
							</Anchors>
						</FontString>
						<FontString parentKey="Label" inherits="GameFontNormalSmall" text="BATTLE_PETS_TOTAL_PETS" justifyH="LEFT">
							<Anchors>
								<Anchor point="LEFT" x="10" y="0"/>
								<Anchor point="RIGHT" relativeKey="$parent.Count" relativePoint="LEFT" x="-3" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter function="PetJournalPetCount_OnEnter"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Frame>
			<Button name="$parentTutorialButton" parentKey="MainHelpButton" inherits="MainHelpPlateButton">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent" x="39" y="20" />
				</Anchors>
				<Scripts>
					<OnClick>
						PetJournal_ToggleTutorial();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentHealPetButton" parentKey="HealPetButton" inherits="SecureFrameTemplate">
				<Size>
					<AbsDimension x="33" y="33"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativePoint="TOPRIGHT" x="-24" y="-42"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentIconTexture" parentKey="texture" file="Interface\Icons\spell_magic_polymorphrabbit" setAllPoints="true"/>
					</Layer>
					<Layer level="OVERLAY">
						<Texture parentKey="BlackCover" setAllPoints="true" hidden="true">
							<Color r="0" g="0" b="0" a="0.6"/>
						</Texture>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture name="$parentBorder" inherits="ActionBarFlyoutButton-IconFrame">
							<Size x="35" y="35"/>
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</Texture>
						<Texture name="$parentLockIcon" parentKey="LockIcon" file="Interface\PetBattles\PetBattle-LockIcon" setAllPoints="true" hidden="true"/>
						<FontString name="$parentSpellName" inherits="GameFontNormal" maxLines="2" justifyH="RIGHT" parentKey="spellname" text="">
							<Size x="75" y="0"/>
							<Color r="1" g="1" b="1"/>
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentBorder" x="-2" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Cooldown name="$parentCooldown" parentKey="cooldown" inherits="CooldownFrameTemplate"/>
				</Frames>
				<Scripts>
					<OnLoad function="PetJournalHealPetButton_OnLoad"/>
					<OnEvent function="PetJournalHealPetButton_OnEvent"/>
					<OnClick>
						CastSpellByID(self.spellID);
					</OnClick>
					<OnDragStart function="PetJournalHealPetButton_OnDragStart"/>
					<OnShow function="PetJournalHealPetButton_OnShow"/>
					<OnHide function="PetJournalHealPetButton_OnHide"/>
					<OnEnter function="PetJournalHealPetButton_OnEnter"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
				<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
			</Button>			
			<Frame name="$parentLeftInset" useParentLevel="true" inherits="InsetFrameTemplate" parentKey="LeftInset">
				<Size x="260" y="496"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="4" y="-60" />
					<Anchor point="BOTTOMLEFT" x="4" y="26" />
				</Anchors>
			</Frame>
			<Frame name="$parentPetCardInset" useParentLevel="true" inherits="InsetFrameTemplate" parentKey="PetCardInset">
				<Size x="411" y="171"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-6" y="-60" />
				</Anchors>
			</Frame>
			<Frame name="$parentRightInset" useParentLevel="true" inherits="InsetFrameTemplate" parentKey="RightInset">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-6" y="-252"/>
					<Anchor point="BOTTOMLEFT" relativeTo="$parentLeftInset" relativePoint="BOTTOMRIGHT" x="20" y="0"/>
				</Anchors>
			</Frame>
			<EditBox name="$parentSearchBox" inherits="SearchBoxTemplate" parentKey="searchBox" letters="40">
				<Size x="145" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentLeftInset" x="15" y="-9"/>
				</Anchors>
				<Scripts>
					<OnTextChanged function="PetJournal_OnSearchTextChanged"/>
				</Scripts>
			</EditBox>
			<Button name="$parentFilterButton" inherits="UIMenuButtonStretchTemplate" text="FILTER">
				<Size x="93" y="22"/>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentLeftInset" x="-5" y="-9"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="Icon" file="Interface\ChatFrame\ChatFrameExpandArrow">
							<Size x="10" y="12"/>
							<Anchors>
								<Anchor point="RIGHT" relativeKey="$parent.Right" relativePoint="RIGHT" x="-5"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick> 
						PlaySound("igMainMenuOptionCheckBoxOn");
						ToggleDropDownMenu(1, nil, PetJournalFilterDropDown, "PetJournalFilterButton", 74, 15);
					</OnClick>	
				</Scripts>						
			</Button>
			<Frame name="$parentFilterDropDown" inherits="UIDropDownMenuTemplate">
				<Scripts>
					<OnLoad function="PetJournalFilterDropDown_OnLoad"/>
				</Scripts>
			</Frame>
			<ScrollFrame name="$parentListScrollFrame" parentKey="listScroll" inherits="HybridScrollFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentLeftInset" x="3" y="-36"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentLeftInset" x="-2" y="5"/>
				</Anchors>
				<Frames>
					<Slider name="$parentScrollBar" inherits="HybridScrollBarTrimTemplate" parentKey="scrollBar">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="4" y="20"/>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="4" y="11"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.trackBG:Show();
								self.trackBG:SetVertexColor(0, 0, 0, 0.75);
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
			</ScrollFrame>
			<Frame name="$parentLoadoutBorder" parentKey="loadoutBorder" frameStrata="HIGH">
				<Anchors>
					<Anchor point="CENTER" relativeTo="$parentRightInset" relativePoint="CENTER" x="0" y="0"/>
				</Anchors>
				<Size x="410" y="328"/>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentTopLeft" atlas="PetJournal-BattleSlotFrame-Corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" x="-1" y="1"/>
							</Anchors>
						</Texture>
						<Texture name="$parentTopRight" atlas="PetJournal-BattleSlotFrame-Corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" x="1" y="1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>  	
						</Texture>
						<Texture name="$parentBottomLeft" atlas="PetJournal-BattleSlotFrame-Corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-1" y="-1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>	
						</Texture>
						<Texture name="$parentBottomRight" atlas="PetJournal-BattleSlotFrame-Corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="1" y="-1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>	
						</Texture>
						<Texture name="$parentTop" atlas="_BattleSlotFrame-Top" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentTopLeft" x="0" y="0"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" relativeTo="$parentTopRight" x="0" y="1"/>
							</Anchors>	
						</Texture>
						<Texture name="$parentBottom" atlas="_BattleSlotFrame-Top" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentBottomLeft" x="0" y="-1"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" relativeTo="$parentBottomRight" x="0" y="0"/>
							</Anchors>
							<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0" />	
						</Texture>
						<Texture name="$parentLeft" file="Interface\PetBattles\!BattleSlotFrame-Left" vertTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentTopLeft" x="0" y="0"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" relativeTo="$parentBottomLeft" x="-1" y="0"/>
							</Anchors>
						</Texture>
						<Texture name="$parentRight" file="Interface\PetBattles\!BattleSlotFrame-Left" vertTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentTopRight" x="1" y="0"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" relativeTo="$parentBottomRight" x="0" y="0"/>
							</Anchors>
							<TexCoords left="1" right="0" top="0" bottom="1"/>	
						</Texture>
					</Layer>
					<Layer level="ARTWORK" textureSubLevel="1">
						<Texture name="$parentUpperSeparator" atlas="_BattleSlotFrame-Divider" useAtlasSize="true" horizTile="true">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentLeft" x="-11" y="54"/>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentRight" x="12" y="54"/>
							</Anchors>
						</Texture>
						<Texture name="$parentLowerSeparator" atlas="_BattleSlotFrame-Divider" useAtlasSize="true" horizTile="true">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentLeft" x="-11" y="-53"/>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentRight" x="12" y="-53"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="$parentSlotHeaderText" inherits="GameFontNormal" justifyH="CENTER" text="BATTLE_PET_SLOTS">
							<Size x="0" y="40"/>
							<Anchors>
								<Anchor point="CENTER" relativePoint="TOP" relativeTo="$parentTop" x="0" y="-4"/>
							</Anchors>
						</FontString>
						<Texture name="$parentSlotHeaderBG" atlas="_BattleSlotTitle-BG" horizTile="true">
							<Size y="24"/>
							<Anchors>
								<Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentSlotHeaderText" x="-10" y="0"/>
								<Anchor point="RIGHT" relativePoint="RIGHT" relativeTo="$parentSlotHeaderText" x="10" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture name="$parentSlotHeaderF" atlas="_BattleSlotTitle-Mid" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$parentSlotHeaderText" x="0" y="0"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentSlotHeaderText" x="0" y="0"/>
							</Anchors>
						</Texture>
						<!--
						<Texture name="_BattleSlotTitle-BG" atlas="_BattleSlotTitle-BG" useAtlasSize="true" virtual="true" horizTile="true" />
						<Texture name="_BattleSlotTitle-Mid" atlas="_BattleSlotTitle-Mid" useAtlasSize="true" virtual="true" horizTile="true" />
						-->
						<Texture name="$parentSlotHeaderLeft" atlas="PetJournal-BattleSlotTitle-Left" useAtlasSize="true">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentSlotHeaderF" x="0" y="0"/>
							</Anchors>
						</Texture>
						<Texture name="$parentSlotHeaderRight" atlas="PetJournal-BattleSlotTitle-Right" useAtlasSize="true">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentSlotHeaderF" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(self:GetFrameLevel()+7);
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentLoadout" parentKey="Loadout">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRightInset" x="0" y="0"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentRightInset" x="0" y="0"/>
				</Anchors>
				<Frames>
					<Button name="$parentPet1" inherits="CompanionLoadOutTemplate" id="1" parentKey="Pet1">
						<Anchors>
							<Anchor point="TOP" x="0" y="-3"/>
						</Anchors>
					</Button>
					<Button name="$parentPet2" inherits="CompanionLoadOutTemplate" id="2" parentKey="Pet2">
						<Anchors>
							<Anchor point="TOP" x="0" y="-110"/>
						</Anchors>
					</Button>
					<Button name="$parentPet3" inherits="CompanionLoadOutTemplate" id="3" parentKey="Pet3">
						<Anchors>
							<Anchor point="TOP" x="0" y="-217"/>
						</Anchors>
					</Button>
 				</Frames>
			</Frame>
			
			
			<Frame name="$parentPetCard" parentKey="PetCard">
				<Size x="405" y="168"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPetCardInset" x="3" y="-3"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentBG" atlas="PetJournal-PetCard-BG">
							<Size x="405" y="166"/>	
							<Anchors>
								<Anchor point="TOPLEFT" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND" textureSubLevel="2">
						<Texture name="$parentAbilitiesBG1" parentKey="AbilitiesBG1" atlas="PetJournal-PetCard-Abilities">
							<Size x="57" y="104"/>	
							<Anchors>
								<Anchor point="TOPRIGHT" x="-119" y="-45"/>
							</Anchors>
						</Texture>
						<Texture name="$parentAbilitiesBG2" parentKey="AbilitiesBG2" atlas="PetJournal-PetCard-Abilities">
							<Size x="57" y="104"/>	
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentAbilitiesBG1" relativePoint="TOPRIGHT" x="0" y="0"/>
							</Anchors>
						</Texture>
						<Texture name="$parentAbilitiesBG3" parentKey="AbilitiesBG3" atlas="PetJournal-PetCard-Abilities">
							<Size x="57" y="104"/>	
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentAbilitiesBG2" relativePoint="TOPRIGHT" x="0" y="0"/>
							</Anchors>
						</Texture>
						<Texture name="$parentShadows" atlas="PetJournal-BattleSlot-Shadow" parentKey="shadows">
							<Anchors>
								<Anchor point="TOPLEFT" x="25" y="-67"/>
							</Anchors>
							<Size x="207" y="108"/>		
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString parentKey="CannotBattleText" inherits="GameFontNormal" text="BATTLE_PET_CANNOT_BATTLE">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentAbilitiesBG1"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentAbilitiesBG1"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="$parentPetInfo" parentKey="PetInfo">
						<Size x="275" y="42"/>
						<Anchors>
							<Anchor point="TOPLEFT" x="0" y="0"/>
						</Anchors>
						<Layers>
							<Layer level="ARTWORK">
								<Texture name="$parentIcon" parentKey="icon" file="Interface\Common\WhiteIconFrame">
									<Size x="38" y="38"/>
									<Anchors>
										<Anchor point="TOPLEFT" x="4" y="-4"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="ARTWORK" textureSubLevel="2">
								<Texture name="$parentQualityBorder" parentKey="qualityBorder" file="Interface\Common\WhiteIconFrame">
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.icon"/>
										<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeKey="$parent.icon"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="OVERLAY">
								<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT" justifyV="BOTTOM" parentKey="name">
									<Size x="225" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="$parentIcon" x="12" y="3"/>
										<!-- Move it down 8 if there's no SubName -->
									</Anchors>
								</FontString>
								<FontString name="$parentSubName" inherits="GameFontNormalSmall" justifyH="LEFT" parentKey="subName" text="XXXXX">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentName" x="0" y="-2"/>
									</Anchors>
									<Color r="1" g="1" b="1" a="1"/>
								</FontString>
								<Texture parentKey="isDead" file="Interface\PetBattles\DeadPetIcon" hidden="true">
									<Size x="38" y="38"/>
									<Anchors>
										<Anchor point="CENTER" relativeTo="$parentIcon" relativePoint="CENTER" x="0" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="OVERLAY" textureSubLevel="1">
								<Texture name="$parentLevelBubble" parentKey="levelBG" atlas="PetJournal-LevelBubble" useAtlasSize="true">
									<Anchors>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon" x="5" y="-5"/>
									</Anchors>
								</Texture>
								<FontString name="$parentLevel" inherits="GameFontNormalSmall" parentKey="level" justifyH="CENTER" text="XX">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="CENTER" relativeTo="$parentLevelBubble" x="0" y="0"/>
									</Anchors>
								</FontString>
								<Texture name="$parentFavorite" atlas="PetJournal-FavoritesIcon" useAtlasSize="true" parentKey="favorite">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnClick function="PetJournalPetCard_OnClick"/>
							<OnLoad>
								self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
								self:RegisterForDrag("LeftButton");
							</OnLoad>
							<OnEnter>
								if ( self.sourceText and self.sourceText ~= "" ) then
									GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", -160, 0);
									GameTooltip:SetText(self.speciesName, 1, 1, 1);
									GameTooltip:AddLine(self.sourceText, 1, 1, 1, true);
									if ( not self.tradable ) then
										GameTooltip:AddLine(BATTLE_PET_NOT_TRADABLE, 1, 0.1, 0.1, true);
									end
									if ( self.unique ) then
										GameTooltip:AddLine(ITEM_UNIQUE, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
									end
									if ( self.description and self.description ~= "" ) then
										GameTooltip:AddLine(" ");
										GameTooltip:AddLine(self.description, nil, nil, nil, true);
									end
									GameTooltip:Show();
								end
							</OnEnter>
							<OnLeave function="GameTooltip_Hide"/>
							<OnDragStart function="PetJournalDragButton_OnDragStart"/>
						</Scripts>
					</Button>
					<Frame name="$parentTypeInfo" parentKey="TypeInfo">
						<Size x="28" y="28"/>
						<Anchors>
							<Anchor point="TOPRIGHT" x="-12" y="-12"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="$parentTypeIcon" parentKey="typeIcon"  file="Interface\PetBattles\PetIcon-Mechanical">
									<Size x="28" y="28"/>
									<Anchors>
										<Anchor point="TOPRIGHT" x="0" y="0"/>
									</Anchors>
									<TexCoords left="0.79687500" right="0.49218750" top="0.50390625" bottom="0.65625000"/>
								</Texture>
								<FontString name="$parentType" parentKey="type" inherits="GameFontNormal" justifyH="RIGHT" text="XXXXXXXXXXX">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentTypeIcon" x="-4" y="2"/>
									</Anchors> 
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								PetJournal_ShowAbilityTooltip(self, self.abilityID, self.speciesID, self.petID);
							</OnEnter>
							<OnLeave>
								PetJournal_HideAbilityTooltip(self);
							</OnLeave>
						</Scripts>
					</Frame>
					<Frame name="$parentHealthFrame" parentKey="HealthFrame">
						<Size x="50" y="29"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentPetInfo" x="6" y="-14"/>
						</Anchors>
						<Frames>
							<StatusBar name="$parenthealthStatusBar" parentKey="healthBar">
								<Size x="48" y="7"/>
								<Anchors>
									<Anchor point="TOPLEFT" x="1" y="-18"/>
								</Anchors>
								<Layers>
									<Layer level="OVERLAY">
										<Texture name="$parentLeft" atlas="PetJournal-HealthBar-Left" useAtlasSize="true">
											<Anchors>
												<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
											</Anchors>
										</Texture>
										<Texture name="$parentRight" atlas="PetJournal-HealthBar-Right" useAtlasSize="true">
											<Anchors>
												<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
											</Anchors>
										</Texture>
										<Texture name="$parentMiddle" atlas="PetJournal-HealthBar-Mid">
											<Anchors>
												<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
												<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
											</Anchors>	
										</Texture>
									</Layer>
									<Layer level="BACKGROUND">
										<Texture name="$parentBGMiddle" atlas="PetJournal-HealthBar-Background" useAtlasSize="true">
											<Anchors>
												<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
												<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
											</Anchors>
										</Texture>
									</Layer>
								</Layers>
								<BarTexture name="$parentHealthBar" file="Interface\TargetingFrame\UI-StatusBar"/>
								<BarColor r="0.1" g="1.0" b="0.1" />
							</StatusBar>
						</Frames>
						<Layers>
							<Layer level="OVERLAY">
								<Texture name="$parentHealthTex" file="Interface\PetBattles\PetBattle-StatIcons">
									<Anchors>
										<Anchor point="TOPLEFT" x="1" y="-1"/>
									</Anchors>
									<Size x="16" y="16"/>
									<TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/>
								</Texture>
								<FontString name="$parentHealthValue" inherits="GameFontHighlight" justifyH="LEFT" parentKey="health" text="###">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentHealthTex" relativePoint="RIGHT" x="2" y="0"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -54, 0);
								GameTooltip:SetText(PET_BATTLE_STAT_HEALTH, 1, 1, 1);
								GameTooltip:AddLine(PET_BATTLE_TOOLTIP_HEALTH_MAX, nil, nil, nil, true);
								GameTooltip:Show();
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<Frame name="$parentPowerFrame" parentKey="PowerFrame">
						<Size x="50" y="18"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentHealthFrame" x="0" y="-2"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture file="Interface\PetBattles\PetBattle-StatIcons">
									<Anchors>
										<Anchor point="TOPLEFT" x="1" y="-1"/>
									</Anchors>
									<Size x="16" y="16"/>
									<TexCoords left="0.0" right="0.5" top="0.0" bottom="0.5"/>
								</Texture>
								<FontString parentKey="power" inherits="GameFontHighlight" justifyH="LEFT" text="###">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="LEFT" x="19" y="0"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -54, 0);
								GameTooltip:SetText(PET_BATTLE_STAT_POWER, 1, 1, 1);
								GameTooltip:AddLine(PET_BATTLE_TOOLTIP_POWER, nil, nil, nil, true);
								GameTooltip:Show();
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<Frame name="$parentSpeedFrame" parentKey="SpeedFrame">
						<Size x="50" y="18"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentPowerFrame" x="0" y="-4"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture file="Interface\PetBattles\PetBattle-StatIcons">
									<Anchors>
										<Anchor point="TOPLEFT" x="1" y="-1"/>
									</Anchors>
									<Size x="16" y="16"/>
									<TexCoords left="0.0" right="0.5" top="0.5" bottom="1.0"/>
								</Texture>
								<FontString parentKey="speed" inherits="GameFontHighlight" justifyH="LEFT" text="###">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="LEFT" x="19" y="0"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -54, 0);
								GameTooltip:SetText(PET_BATTLE_STAT_SPEED, 1, 1, 1);
								GameTooltip:AddLine(PET_BATTLE_TOOLTIP_SPEED, nil, nil, nil, true);
								GameTooltip:Show();
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<Frame name="$parentQualityFrame" parentKey="QualityFrame">
						<Size x="100" y="18"/>
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parentSpeedFrame" x="0" y="-4"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<Texture file="Interface\PetBattles\PetBattle-StatIcons">
									<Anchors>
										<Anchor point="TOPLEFT" x="1" y="-1"/>
									</Anchors>
									<Size x="16" y="16"/>
									<TexCoords left="0.5" right="1.0" top="0.0" bottom="0.5"/>
								</Texture>
								<FontString parentKey="quality" inherits="GameFontHighlight" justifyH="LEFT" text="XXXXXXXX">
									<Size x="0" y="0"/>
									<Anchors>
										<Anchor point="LEFT" x="19" y="0"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -54, 0);
								GameTooltip:SetText(PET_BATTLE_STAT_QUALITY, 1, 1, 1);
								GameTooltip:AddLine(PET_BATTLE_TOOLTIP_RARITY, nil, nil, nil, true);
								GameTooltip:Show();
							</OnEnter>
							<OnLeave>
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</Frame>
					<Button name="$parentSpell1" inherits="PetCardSpellButtonTemplate" id="1" parentKey="spell1">
						<Anchors>
							<Anchor point="TOPRIGHT" realtivePoint="TOPRIGHT" relativeTo="$parentAbilitiesBG1" x="-11" y="-11"/>
						</Anchors>
					</Button>
					<Button name="$parentSpell2" inherits="PetCardSpellButtonTemplate" id="2" parentKey="spell2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentSpell1" RelativePoint="RIGHT" x="21" y="0"/>
						</Anchors>
					</Button>
					<Button name="$parentSpell3" inherits="PetCardSpellButtonTemplate" id="3" parentKey="spell3">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentSpell2" RelativePoint="RIGHT" x="21" y="0"/>
						</Anchors>
					</Button>
					<Button name="$parentSpell4" inherits="PetCardSpellButtonTemplate" id="4" parentKey="spell4">
						<Anchors>
							<Anchor point="TOP" relativeTo="$parentSpell1" RelativePoint="BOTTOM" x="0" y="-12"/>
						</Anchors>
					</Button>
					<Button name="$parentSpell5" inherits="PetCardSpellButtonTemplate" id="5" parentKey="spell5">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentSpell4" RelativePoint="RIGHT" x="21" y="0"/>
						</Anchors>
					</Button>
					<Button name="$parentSpell6" inherits="PetCardSpellButtonTemplate" id="6" parentKey="spell6">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentSpell5" RelativePoint="RIGHT" x="21" y="0"/>
						</Anchors>
					</Button>
					<StatusBar name="$parentXPBar" parentKey="xpBar">
						<Size x="390" y="11"/>
						<Anchors>
							<Anchor point="BOTTOM" x="0" y="6"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="$parentRank" inherits="TextStatusBarText" parentKey="rankText" text="0/0" hidden="true">
									<Anchors>
										<Anchor point="CENTER" x="0" y="0"/>
									</Anchors>
								</FontString>
								<Texture name="$parentLeft" atlas="PetJournal-ExpBar-Left" useAtlasSize="true">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
									</Anchors>
								</Texture>
								<Texture name="$parentRight" atlas="PetJournal-ExpBar-Right" useAtlasSize="true">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
									</Anchors>	
								</Texture>
								<Texture name="$parentMiddle" atlas="PetJournal-ExpBar-Mid">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
									</Anchors>	
								</Texture>
							</Layer>
							<Layer level="OVERLAY" textureSubLevel="1">
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="-146" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="-98" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="-49" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="0" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="49" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="98" y="0"/>
									</Anchors>
								</Texture>
								<Texture inherits="ExpBar-Divider">
									<Anchors>
										<Anchor point="CENTER" x="146" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
							<Layer level="BACKGROUND">
								<Texture name="$parentBGMiddle" atlas="PetJournal-ExpBar-Background">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
									</Anchors>	
								</Texture>
							</Layer>
						</Layers>
						<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" />
						<BarColor r="0.2" g="0.6" b="1.0" />
						<Scripts>
							<OnLoad>
								self:SetFrameLevel(self:GetFrameLevel()+1);
							</OnLoad>
							<OnShow>
								self.rankText:SetShown(GetCVarBool("xpBarText"));
							</OnShow>
							<OnEnter>
								self.rankText:Show();
								if ( self.tooltip ) then
									GameTooltip:SetOwner(self, "ANCHOR_RIGHT", -162, 0);
									GameTooltip:SetText(COMBAT_XP_GAIN, 1, 1, 1);
									GameTooltip:AddLine(self.tooltip);
									GameTooltip:Show();
								end
							</OnEnter>
							<OnLeave>
								self.rankText:SetShown(GetCVarBool("xpBarText"));
								GameTooltip:Hide();
							</OnLeave>
						</Scripts>
					</StatusBar>
					<PlayerModel name="$parentModelFrame" parentKey="model" inherits="ModelTemplate" creature="12257">
						<Size x="173" y="135"/>
						<Anchors>
							<Anchor point="TOPLEFT" x="45" y="-21"/>
						</Anchors>
					</PlayerModel>
				</Frames>
			</Frame> <!-- PetCard -->



			<Button name="$parentFindBattle" inherits="MagicButtonTemplate" motionScriptsWhileDisabled="true" parentKey="FindBattleButton" text="FIND_BATTLE">
				<Size x="140" y="22"/>
				<Anchors>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						MagicButton_OnLoad(self);
						self:RegisterEvent("PET_BATTLE_QUEUE_STATUS");
						PetJournalFindBattle_Update(self);
					</OnLoad>
					<OnEvent>
						PetJournalFindBattle_Update(self);
					</OnEvent>
					<OnClick>
						local queueState = C_PetBattles.GetPVPMatchmakingInfo();
						if ( queueState == "queued" or queueState == "proposal" or queueState == "suspended" ) then
							C_PetBattles.StopPVPMatchmaking();
						else
							C_PetBattles.StartPVPMatchmaking();
						end
						PlaySound("igMainMenuOptionCheckBoxOn");
					</OnClick>
					<OnEnter function="PetJournalFindBattle_OnEnter"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="$parentSummonButton" inherits="MagicButtonTemplate" parentKey="SummonButton" text="BATTLE_PET_SUMMON" disabled="true">
				<Size x="160" y="22"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:Disable(); --No XML attribute for disabling by default :(
						MagicButton_OnLoad(self);
					</OnLoad>
					<OnClick>
						PlaySound("igMainMenuOptionCheckBoxOn");
						C_PetJournal.SummonPetByGUID(PetJournalPetCard.petID);
					</OnClick>
					<OnEnter function="PetJournalSummonButton_OnEnter"/>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="$parentAchievementStatus" parentKey="AchievementStatus">
				<Size x="60" y="40"/>	
				<Anchors>
					<Anchor point="TOP" x="0" y="-21"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture atlas="PetJournal-PetBattleAchievementBG">
							<Anchors>
								<Anchor point="TOP" x="-56" y="-12"/>
							</Anchors>
							<Size x="46" y="18"/>
							<Color r="1" g="1" b="1" a="1"/>
						</Texture>
						<Texture atlas="PetJournal-PetBattleAchievementBG">
							<Anchors>
								<Anchor point="TOP" x="55" y="-12"/>
							</Anchors>	
							<Color r="1" g="1" b="1" a="1"/>
							<Size x="46" y="18"/>
							<TexCoords left="1.0" right="0" top="0" bottom="1.0"/>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND" textureSubLevel="1">
						<Texture parentKey="highlight" atlas="PetJournal-PetBattleAchievementGlow" hidden="true">
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
							<Size x="210" y="40"/>		
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<Texture name="$parentIcon" file="Interface\AchievementFrame\UI-Achievement-Shields-NoPoints" parentKey="icon">
							<Size x="30" y="30"/>
							<Anchors>
								<Anchor point="RIGHT" x="0" y="-5"/>
							</Anchors>
							<TexCoords left="0" right=".5" top="0" bottom="0.5"/>
						</Texture>
						<Fontstring parentKey="SumText" inherits="GameFontNormalLarge" text="25">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentIcon" x="-4" y="4"/>
							</Anchors>
							<Size x="0" y="0"/>	
							<TexCoords left="0.75683594" right="0.98632813" top="0.00097656" bottom="0.04882813"/>
						</Fontstring>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						ToggleAchievementFrame();
						local i = 1;
						local button = _G["AchievementFrameCategoriesContainerButton"..i];
						while button do
							if button.element.id == PET_ACHIEVEMENT_CATEGORY then
								button:Click();
								return;
							end
							
							i = i + 1;
							button = _G["AchievementFrameCategoriesContainerButton"..i];
						end
					</OnClick>
					<OnEnter function="PetJournalAchievementStatus_OnEnter"/>
					<OnLeave>
						PetJournal.AchievementStatus.highlight:Hide();
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Frame name="$parentSpellSelect" parentKey="SpellSelect" hidden="true">
				<Size x="28" y="69"/>	
				<Layers>
					<Layer level="BACKGROUND">
						<Texture parentKey="BgEnd" file="Interface\Buttons\ActionBarFlyoutButton">
							<Size x="37" y="22"/>	
							<Anchors>
								<Anchor point="BOTTOM"/>
							</Anchors>
							<TexCoords left="0.01562500" right="0.59375000" top="0.91406250" bottom="0.74218750"/>	
						</Texture>
						<Texture parentKey="BgTiled" file="Interface\Buttons\ActionBarFlyoutButton-FlyoutMid" vertTile="true">
							<Size x="37" y="32"/>
							<Anchors>
								<Anchor point="TOP" relativeKey="$parent" relativePoint="TOP" x="0" y="0"/>
								<Anchor point="BOTTOM" relativeKey="$parent.BgEnd" relativePoint="TOP" x="0" y="0"/>
							</Anchors>
							<TexCoords left="0" right="0.578125" top="0" bottom="1"/>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<CheckButton name="$parentSpell1" inherits="PetSpellSelectButtonTemplate" id="1" parentKey="Spell1">
						<Anchors>
							<Anchor point="TOP" relativeKey="$parent" relativePoint="TOP" x="0" y="-5"/>
						</Anchors>
					</CheckButton>
					<CheckButton name="$parentSpell2" inherits="PetSpellSelectButtonTemplate" id="2" parentKey="Spell2">
						<Anchors>
							<Anchor point="TOP" relativeKey="$parent.Spell1" relativePoint="BOTTOM" x="0" y="-4"/>
						</Anchors>
					</CheckButton>
 				</Frames>
				<Scripts>
					<OnShow>
						self:SetFrameLevel(self:GetFrameLevel() + 5);
					</OnShow>
					<OnHide>
						PetJournalPrimaryAbilityTooltip:Hide();
						PetJournalSecondaryAbilityTooltip:Hide();
					</OnHide>
				</Scripts>
			</Frame>
			<Frame name="$parentPetOptionsMenu" inherits="UIDropDownMenuTemplate" enableMouse="true" parentKey="petOptionsMenu"/>
		</Frames>
		<Scripts>
			<OnShow function="PetJournal_OnShow"/>
			<OnHide function="PetJournal_OnHide"/>
			<OnLoad function="PetJournal_OnLoad"/>
			<OnEvent function="PetJournal_OnEvent"/>
		</Scripts>
	</Frame>
	<Frame name="PetJournalPrimaryAbilityTooltip" inherits="SharedPetBattleAbilityTooltipTemplate"/>
	<Frame name="PetJournalSecondaryAbilityTooltip" inherits="SharedPetBattleAbilityTooltipTemplate"/>

	<CheckButton name="ToySpellButtonTemplate" inherits="SecureFrameTemplate" virtual="true">
		<Size>
			<AbsDimension x="50" y="50"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentIconTexture" setAllPoints="true" hidden="true">
					<Size>
						<AbsDimension x="42" y="42"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER" x="0" y="1"/>
					</Anchors>
					<TexCoords left="0.04347826" right="0.95652173" top="0.04347826" bottom="0.95652173"/>
				</Texture>

				<Texture name="$parentIconTextureUncollected" setAllPoints="true" hidden="true" desaturated="TRUE">
					<Size>
						<AbsDimension x="42" y="41"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER" x="0" y="2"/>
					</Anchors>
					<TexCoords left="0.063" right="0.938" top="0.063" bottom="0.917"/>
					<Color r="0" g="0" b="0" a=".18"/>
				</Texture>

				<Texture name="$parentSlotFrameUncollectedInnerGlow" setAllPoints="true" hidden="true" atlas="collections-itemborder-uncollected-innerglow" useAtlasSize="true">
					<Anchors>
						<Anchor point="CENTER" x="0" y="2"/>
					</Anchors>
					<Color r="0" g="0" b="0" a=".18"/>
				</Texture>
				
				<FontString name="$parentToyName" inherits="GameFontNormal" maxLines="3" hidden="true" justifyH="LEFT" parentKey="ToyName">
					<Size>
						<AbsDimension x="135" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT" >
							<Offset>
								<AbsDimension x="9" y="3"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>

			<Layer level="OVERLAY" textureSubLevel="2">
				<FontString name="$parentToyNew" inherits="GameFontHighlight" maxLines="1" justifyH="CENTER" text="NEW_CAPS" hidden="true">
					<Shadow>
						<Color r="0.32" g="0.5" b="1.0"/>
					</Shadow>
					<Anchors>
						<Anchor point="CENTER" x="8" y="0" relativePoint="TOPLEFT"/>
					</Anchors>
				</FontString>

				<Texture name="$parentToyNewGlow" atlas="collections-newglow" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentToyNew" x="-20" y="10"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentToyNew" x="20" y="-10"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				
				<Texture name="$parentSlotFrameCollected" atlas="collections-itemborder-collected" hidden="false" useAtlasSize="true">
					<Size>
						<AbsDimension x="56" y="56"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER" x="0"/>
					</Anchors>
				</Texture>
				<Texture name="$parentSlotFrameUncollected" atlas="collections-itemborder-uncollected" hidden="true" useAtlasSize="true">
					<Anchors>
						<Anchor point="CENTER" x="0"/>
					</Anchors>
				</Texture>
			</Layer>			
		</Layers>
		<Frames>
			<Frame name="$parentCooldownWrapper" parentKey="cooldownWrapper" setAllPoints="true">
				<Layers>
					<Layer level="OVERLAY" textureSubLevel="2">
						<Texture name="$parentSlotFavorite" atlas="collections-icon-favorites" useAtlasSize="true" hidden="false">
							<Anchors>
								<Anchor point="TOPLEFT" x="-12" y="13" relativePoint="TOPLEFT"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnShow>
						self:SetFrameLevel(self:GetParent().cooldown:GetFrameLevel() + 1);
					</OnShow>	
				</Scripts>
			</Frame>
			<Cooldown name="$parentCooldown" parentKey="cooldown" inherits="CooldownFrameTemplate">
					<Anchors>
						<Anchor point="TOPLEFT" x="5" y="-4"/>
						<Anchor point="BOTTOMRIGHT" x="-5" y="7"/>
					</Anchors>
			</Cooldown>
			
		</Frames>
		<Scripts>
			<OnLoad function="ToySpellButton_OnLoad"/>
			<OnEvent function="ToySpellButton_OnEvent"/>
			<PreClick>
				self:SetChecked(false);
			</PreClick>
			<OnClick>
				if ( IsModifiedClick() ) then
					ToySpellButton_OnModifiedClick(self, button);
				else
					if (self.isPassive) then return end;
					ToySpellButton_OnClick(self, button);
				end
			</OnClick>
			<OnShow function="ToySpellButton_OnShow"/>
			<OnHide function="ToySpellButton_OnHide"/>
			<OnDragStart function="ToySpellButton_OnDrag"/>
			<OnReceiveDrag function="ToySpellButton_OnDrag"/>
			<OnEnter function="ToySpellButton_OnEnter"/>
			<OnLeave function="GameTooltip_Hide"/>
		</Scripts>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress">
			<Size x="42" y="42"/>
			<Anchors>
				<Anchor point="CENTER" x="0" y="1"/>
			</Anchors>
		</PushedTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD">
			<Size x="48" y="48"/>
			<Anchors>
				<Anchor point="CENTER" x="0" y="2"/>
			</Anchors>			
		</HighlightTexture>
		<CheckedTexture file="Interface\Buttons\CheckButtonHilight" alphaMode="ADD">
			<Size x="42" y="42"/>
			<Anchors>
				<Anchor point="CENTER" x="0" y="1"/>
			</Anchors>
		</CheckedTexture>
	</CheckButton>

	<Frame name="ToyBox" parent="PetJournalParent" setAllPoints="true">
		<Frames>
			<!-- Progress Bar-->
			<StatusBar name="$parentProgressBar" parentKey="progressBar">
				<Size>
					<AbsDimension x="196" y="13"/>
				</Size>
				<Anchors>
					<Anchor point="TOP" x="0" y="-39"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentText" inherits="TextStatusBarText" justifyH="CENTER" parentKey="text">
							<Size>
								<AbsDimension x="0" y="9"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER" y="1">
									<Offset>
										<AbsDimension x="0" y="1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<Texture name="$parentBorder" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder">
							<Size>
								<AbsDimension x="205" y="29"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" x="-5" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND">
						<Texture name="$parentBackground">
							<Anchors>
								<Anchor point="TOPLEFT" x="0" y="-1"/>
								<Anchor point="BOTTOMRIGHT" x="0" y="1"/>
							</Anchors>
							<Color r="0.0" g="0.0" b="0.0" a="1.0"/>
						</Texture>
					</Layer>
				</Layers>
				<BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar"/>
				<BarColor r="0.03125" g="0.85" b="0.0" />
			</StatusBar>
			
			<!-- Searching -->
			<EditBox name="$parentSearchBox" inherits="SearchBoxTemplate" parentKey="searchBox" letters="40">
				<Size x="115" y="20"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-107" y="-35"/>
				</Anchors>
				<Scripts>
					<OnTextChanged function="ToyBox_OnSearchTextChanged"/>
				</Scripts>
			</EditBox>
			<Button name="$parentFilterButton" inherits="UIMenuButtonStretchTemplate" text="FILTER">
				<Size x="93" y="22"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-12" y="-34"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="Icon" file="Interface\ChatFrame\ChatFrameExpandArrow">
							<Size x="10" y="12"/>
							<Anchors>
								<Anchor point="RIGHT" relativeKey="$parent.Right" relativePoint="RIGHT" x="-5"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						PlaySound("igMainMenuOptionCheckBoxOn");
						ToggleDropDownMenu(1, nil, ToyBoxFilterDropDown, "ToyBoxFilterButton", 74, 15);
					</OnClick>
				</Scripts>
			</Button>
			<Frame name="$parentFilterDropDown" inherits="UIDropDownMenuTemplate">
				<Scripts>
					<OnLoad function="ToyBoxFilterDropDown_OnLoad"/>
				</Scripts>
			</Frame>


			<Frame name="$parentFavoriteHelpBox" parentKey="GlowBox" inherits="GlowBoxTemplate" hidden="false" frameStrata="DIALOG" >
				<Size x="220" y="65"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString parentKey="BigText" inherits="GameFontHighlight" text="TOYBOX_FAVORITE_HELP" justifyH="LEFT">
							<Size x="176" y="0"/>
							<Anchors>
								<Anchor point="TOP" x="-10" y="-12"/>
							</Anchors>
						</FontString>
						<Texture parentKey="ArrowUp" inherits="HelpPlateArrowUP">
							<Size x="53" y="21"/>
							<Anchors>
								<Anchor point="BOTTOM" relativePoint="TOPLEFT" x="37" y="-3"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BORDER">
						<Texture parentKey="ArrowGlowUp" inherits="HelpPlateArrow-GlowUP" alphaMode="ADD" alpha="0.5">
							<Size x="53" y="21"/>
							<Anchors>
								<Anchor point="BOTTOM" relativePoint="TOPLEFT" x="37" y="-3"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Button parentKey="CloseButton" inherits="UIPanelCloseButton">
						<Anchors>
							<Anchor point="TOPRIGHT" x="6" y="6"/>
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():Hide();
								SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_TOYBOX_FAVORITE, true);
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>

			<Frame name="$parentMousewheelPagingHelpBox" parentKey="GlowBox" inherits="GlowBoxTemplate" hidden="true" frameStrata="DIALOG" >
				<Size x="220" y="65"/>
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativeTo="ToyBox" relativePoint="BOTTOMRIGHT" x="-30" y="30"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString parentKey="BigText" inherits="GameFontHighlight" text="TOYBOX_MOUSEWHEEL_PAGING_HELP" justifyH="LEFT">
							<Size x="176" y="0"/>
							<Anchors>
								<Anchor point="TOP" x="-10" y="-12"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button parentKey="CloseButton" inherits="UIPanelCloseButton">
						<Anchors>
							<Anchor point="TOPRIGHT" x="6" y="6"/>
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():Hide();
								SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_TOYBOX_MOUSEWHEEL_PAGING, true);
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>

			<Frame name="ToyBoxIconsFrame" inherits="InsetFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="ToyBox" relativePoint="TOPLEFT" y="-60" x="4"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="ToyBox" relativePoint="BOTTOMRIGHT" x="-6" y="5"/>
				</Anchors>

				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentOverlayShadowTopLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="4" y="-4"/>
							</Anchors>
						</Texture>

						<Texture name="$parentOverlayShadowTop" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="17" y="-4"/>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-17" y="-4"/>
							</Anchors>
							<TexCoords left="0.9999" right="1" top="0" bottom="1"/>
						</Texture>

						<Texture name="$parentOverlayShadowTopRight" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-4" y="-4"/>
							</Anchors>
							<TexCoords left="1" right="0" top="0" bottom="1"/>
						</Texture>

						<Texture name="$parentOverlayShadowLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="4" y="-17"/>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="4" y="17"/>
							</Anchors>
							<TexCoords left="0" right="1" top="0.9999" bottom="1"/>
						</Texture>

						<Texture name="$parentOverlayShadowBottomLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="4" y="4"/>
							</Anchors>
							<TexCoords left="0" right="1" top="1" bottom="0"/>
						</Texture>

						<Texture name="$parentOverlayShadowRight" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-4" y="-17"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-4" y="17"/>
							</Anchors>
							<TexCoords left="1" right="0" top="0.9999" bottom="1"/>
						</Texture>

						<Texture name="$parentOverlayShadowBottomRight" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
							<TexCoords left="1" right="0" top="1" bottom="0"/>
						</Texture>

						<Texture name="$parentOverlayShadowBottom" atlas="collections-background-shadow-small" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="17" y="4"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-17" y="4"/>
							</Anchors>
							<TexCoords left="0.9999" right="1" top="1" bottom="0"/>
						</Texture>
					</Layer>

					<Layer level="ARTWORK" textureSubLevel="1">
						<Texture name="$parentBGCornerFilagreeBottomLeft" atlas="collections-background-filagree" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="4" y="4"/>
							</Anchors>
							<TexCoords left="0.0" right="1.0" top="0.0" bottom="1.0"/>
						</Texture>

						<Texture name="$parentBGCornerFilagreeBottomRight" atlas="collections-background-filagree" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
							<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
						</Texture>
					</Layer>
					
					<Layer level="ARTWORK" textureSubLevel="2">						
						<Texture name="$parentBGCornerTopLeft" atlas="collections-background-corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" x="4" y="-4"/>
							</Anchors>
						</Texture>

						<Texture name="$parentBGCornerTopRight" atlas="collections-background-corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" x="-4" y="-4"/>
							</Anchors>
							<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
						</Texture>

						<Texture name="$parentBGCornerBottomLeft" atlas="collections-background-corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="4" y="4"/>
							</Anchors>
							<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
						</Texture>

						<Texture name="$parentBGCornerBottomRight" atlas="collections-background-corner" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
							<TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
						</Texture>
					</Layer>

					<Layer level="BORDER" textureSubLevel="1">
						<Texture name="$parentShadowLineTop" atlas="_collections-background-line" useAtlasSize="true" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="4" y="-4" />
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-4" y="-26"/>
							</Anchors>
						</Texture>

						<Texture name="$parentShadowLineBottom" atlas="_collections-background-line" useAtlasSize="true" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="4" y="26" />
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
						</Texture>
						
						<Texture name="$parentWatermarkToy" atlas="collections-watermark-toy" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-25" y="17"/>
							</Anchors>
						</Texture>
					</Layer>
					
					<Layer level="BORDER" textureSubLevel="2">
						<Texture name="$parentShadowCornerTopLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" x="4" y="-4"/>
							</Anchors>
						</Texture>

						<Texture name="$parentShadowCornerTopRight" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-4" y="-4" />
							</Anchors>
							<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
						</Texture>
						
						<Texture name="$parentShadowCornerBottomLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="4" y="4"/>
							</Anchors>
							<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
						</Texture>

						<Texture name="$parentShadowCornerBottomRight" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
							<TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
						</Texture>	
						
						<Texture name="$parentShadowCornerTop" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="149" y="-4"/>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-149" y="-4"/>
							</Anchors>
							<TexCoords left="0.9999" right="1" top="0" bottom="1"/>
						</Texture>
						
						<Texture name="$parentShadowCornerLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPLEFT" x="4" y="-151"/>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="4" y="151"/>
							</Anchors>
							<TexCoords left="0" right="1" top="0.9999" bottom="1"/>
						</Texture>

						<Texture name="$parentShadowCornerRight" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="TOPRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="TOPRIGHT" x="-4" y="-151"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-4" y="151"/>
							</Anchors>
							<TexCoords left="1" right="0" top="0.9999" bottom="1"/>
						</Texture>
						
						<Texture name="$parentShadowCornerBottom" atlas="collections-background-shadow-large" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOMLEFT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMLEFT" x="149" y="4"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="ToyBoxIconsFrame" relativePoint="BOTTOMRIGHT" x="-149" y="4"/>
							</Anchors>
							<TexCoords left="0.9999" right="1" top="1" bottom="0"/>
						</Texture>						
					</Layer>
					
					<Layer level="BACKGROUND">
						<Texture name="$parentBackgroundTile" atlas="collections-background-tile" useAtlasSize="true" vertTile="true" horizTile="true">
							<Anchors>
								<Anchor point="TOPLEFT" x="4" y="-4" />
								<Anchor point="BOTTOMRIGHT" x="-4" y="4"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>

				<!-- Toy Buttons -->
				<Frames>
					<CheckButton name="ToySpellButton1" inherits="ToySpellButtonTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="40" y="-46"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton2" inherits="ToySpellButtonTemplate" id="2">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton1">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton3" inherits="ToySpellButtonTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton2">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton4" inherits="ToySpellButtonTemplate" id="4">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton1" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton5" inherits="ToySpellButtonTemplate" id="5">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton4">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton6" inherits="ToySpellButtonTemplate" id="6">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton5">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton7" inherits="ToySpellButtonTemplate" id="7">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton4" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton8" inherits="ToySpellButtonTemplate" id="8">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton7">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton9" inherits="ToySpellButtonTemplate" id="9">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton8">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton10" inherits="ToySpellButtonTemplate" id="10">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton7" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton11" inherits="ToySpellButtonTemplate" id="11">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton10">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton12" inherits="ToySpellButtonTemplate" id="12">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton11">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton13" inherits="ToySpellButtonTemplate" id="13">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton10" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton14" inherits="ToySpellButtonTemplate" id="14">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton13">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton15" inherits="ToySpellButtonTemplate" id="15">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton14">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton16" inherits="ToySpellButtonTemplate" id="16">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton13" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-16"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton17" inherits="ToySpellButtonTemplate" id="17">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton16">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ToySpellButton18" inherits="ToySpellButtonTemplate" id="18">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="ToySpellButton17">
								<Offset>
									<AbsDimension x="208" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
				</Frames>
			</Frame>

			<!-- Paging -->
			<Frame name="ToyBoxPageNavigationFrame" setAllPoints="true">
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="ToyBoxPageText" inherits="GameFontBlack" justifyH="RIGHT">
							<Size>
								<AbsDimension x="102" y="0"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="-57" y="53"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1"/>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="ToyBoxPrevPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMRIGHT" relativeTo="ToyBox">
								<Offset>
									<AbsDimension x="-315" y="43"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick function="ToyBoxPrevPageButton_OnClick"/>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
						<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
					<Button name="ToyBoxNextPageButton">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMRIGHT">
								<Offset>
									<AbsDimension x="-280" y="43"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick function="ToyBoxNextPageButton_OnClick"/>
						</Scripts>
						<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
						<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
						<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
						<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
					</Button>
				</Frames>
			</Frame>
			<Frame name="$parentToyOptionsMenu" inherits="UIDropDownMenuTemplate" enableMouse="true" parentKey="toyOptionsMenu"/>
		</Frames>
		<Scripts>
			<OnLoad function="ToyBox_OnLoad"/>
			<OnHide function="ToyBox_OnHide"/>
			<OnEvent function="ToyBox_OnEvent"/>
			<OnShow function="ToyBox_OnShow"/>
			<OnMouseWheel function="ToyBox_OnMouseWheel"/>
		</Scripts>
	</Frame> <!-- End ToyBox Frame-->
	

</Ui>