<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"/>

	
<!--Layers>
	<Layer level="BACKGROUND">
		<Texture name="$parentIcon">
			<Color g="1" a="0.5"/>
		</Texture>
	</Layer>
</Layers-->
	
<!-- PetJournal
size=512,1024
-->
<Texture name="ExpBar-Divider" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="7" y="7"/>	
	<TexCoords left="0.00195313" right="0.01562500" top="0.00097656" bottom="0.00781250"/>	
</Texture>
<!--
<Texture name="HealthBar-Mid" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="7"/>	
	<TexCoords left="0.01953125" right="0.04101563" top="0.00097656" bottom="0.00781250"/>	
</Texture>
<Texture name="HealthBar-Left" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="7"/>	
	<TexCoords left="0.04492188" right="0.06640625" top="0.00097656" bottom="0.00781250"/>	
</Texture>
<Texture name="HealthBar-Right" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="7"/>	
	<TexCoords left="0.07031250" right="0.09179688" top="0.00097656" bottom="0.00781250"/>	
</Texture>
<Texture name="HealthBar-Background" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="7"/>	
	<TexCoords left="0.09570313" right="0.11718750" top="0.00097656" bottom="0.00781250"/>	
</Texture>
<Texture name="ExpBar-Background" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="11"/>	
	<TexCoords left="0.00195313" right="0.02343750" top="0.00976563" bottom="0.02050781"/>	
</Texture>
<Texture name="ExpBar-Left" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="11"/>	
	<TexCoords left="0.02734375" right="0.04882813" top="0.00976563" bottom="0.02050781"/>	
</Texture>
<Texture name="ExpBar-Mid" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="11"/>	
	<TexCoords left="0.05273438" right="0.07421875" top="0.00976563" bottom="0.02050781"/>	
</Texture>
<Texture name="ExpBar-Right" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="11" y="11"/>	
	<TexCoords left="0.07812500" right="0.09960938" top="0.00976563" bottom="0.02050781"/>	
</Texture>
<Texture name="BattleSlot-ModelCover" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="13" y="106"/>	
	<TexCoords left="0.00195313" right="0.02734375" top="0.02246094" bottom="0.12597656"/>	
</Texture>
<Texture name="BattleSlotFrame-Corner" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="17" y="17"/>	
	<TexCoords left="0.03125000" right="0.06445313" top="0.02246094" bottom="0.03906250"/>	
</Texture>
<Texture name="LevelBubble" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="21" y="21"/>	
	<TexCoords left="0.06835938" right="0.10937500" top="0.02246094" bottom="0.04296875"/>	
</Texture>
<Texture name="FavoritesIcon" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="25" y="25"/>	
	<TexCoords left="0.11328125" right="0.16210938" top="0.02246094" bottom="0.04687500"/>	
</Texture>
<Texture name="BattleSlot-AbilityBorder" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="33" y="33"/>	
	<TexCoords left="0.16601563" right="0.23046875" top="0.02246094" bottom="0.05468750"/>	
</Texture>
<Texture name="BattleSlotTitle-Right" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="40" y="40"/>	
	<TexCoords left="0.23437500" right="0.31250000" top="0.02246094" bottom="0.06152344"/>	
</Texture>
<Texture name="BattleSlotTitle-Left" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="40" y="40"/>	
	<TexCoords left="0.23437500" right="0.31250000" top="0.06347656" bottom="0.10253906"/>	
</Texture>
<Texture name="InfoButton" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="51" y="46"/>	
	<TexCoords left="0.31640625" right="0.41601563" top="0.02246094" bottom="0.06738281"/>	
</Texture>
<Texture name="BattleSlot-IconBorder" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="53" y="54"/>	
	<TexCoords left="0.41992188" right="0.52343750" top="0.02246094" bottom="0.07519531"/>	
</Texture>
<Texture name="BattleSlot-Shadow" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="138" y="72"/>	
	<TexCoords left="0.52734375" right="0.79687500" top="0.02246094" bottom="0.09277344"/>	
</Texture>
<Texture name="PetCard-ModelCover" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="54" y="171"/>	
	<TexCoords left="0.00195313" right="0.10742188" top="0.12792969" bottom="0.29492188"/>	
</Texture>
<Texture name="PetCard-Abilities" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="196" y="105"/>	
	<TexCoords left="0.11132813" right="0.49414063" top="0.12792969" bottom="0.23046875"/>	
</Texture>
<Texture name="PetList-ButtonBackground" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="209" y="46"/>	
	<TexCoords left="0.49804688" right="0.90625000" top="0.12792969" bottom="0.17285156"/>	
</Texture>
<Texture name="PetList-ButtonHighlight" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="209" y="46"/>	
	<TexCoords left="0.49804688" right="0.90625000" top="0.17480469" bottom="0.21972656"/>	
</Texture>
<Texture name="PetList-ButtonSelect" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="209" y="46"/>	
	<TexCoords left="0.49804688" right="0.90625000" top="0.22167969" bottom="0.26660156"/>	
</Texture>
<Texture name="PetBattleAchievementBG" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="235" y="49"/>	
	<TexCoords left="0.00195313" right="0.46093750" top="0.29687500" bottom="0.34472656"/>	
</Texture>
<Texture name="PetBattleAchievementGlow" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="235" y="49"/>	
	<TexCoords left="0.46484375" right="0.92382813" top="0.29687500" bottom="0.34472656"/>	
</Texture>
<Texture name="FilterBG" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="264" y="34"/>	
	<TexCoords left="0.00195313" right="0.51757813" top="0.34667969" bottom="0.37988281"/>	
</Texture>
<Texture name="BattleSlot-Locked" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="404" y="106"/>	
	<TexCoords left="0.00195313" right="0.79101563" top="0.38183594" bottom="0.48535156"/>	
</Texture>
<Texture name="BattleSlot-Active" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="404" y="106"/>	
	<TexCoords left="0.00195313" right="0.79101563" top="0.48730469" bottom="0.59082031"/>	
</Texture>
<Texture name="PetCard-BG" file="Interface\PetBattles\PetJournal" virtual="true" >
	<Size x="408" y="171"/>	
	<TexCoords left="0.00195313" right="0.79882813" top="0.59277344" bottom="0.75976563"/>	
</Texture>
-->
	
<!-- !PetJournalVertTile
	size=256,32
	<Texture name="!CardBorder-Right" file="\" virtual="true" vertTile="true" >
		<Size x="32" y="32"/>	
		<TexCoords left="0.00390625" right="0.12890625" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
	<Texture name="!CardBorder-Left" file="\" virtual="true" vertTile="true" >
		<Size x="32" y="32"/>	
		<TexCoords left="0.13671875" right="0.26171875" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
	<Texture name="!Flyout-BorderRight" file="\" virtual="true" vertTile="true" >
		<Size x="32" y="32"/>	
		<TexCoords left="0.26953125" right="0.39453125" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
	<Texture name="!Flyout-BorderLeft" file="\" virtual="true" vertTile="true" >
		<Size x="32" y="32"/>	
		<TexCoords left="0.40234375" right="0.52734375" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
	<Texture name="!Card-ShadowLeft" file="\" virtual="true" vertTile="true" >
		<Size x="48" y="32"/>	
		<TexCoords left="0.53515625" right="0.72265625" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
	<Texture name="!Card-ShadowRight" file="\" virtual="true" vertTile="true" >
		<Size x="48" y="32"/>	
		<TexCoords left="0.73046875" right="0.91796875" top="0.00000000" bottom="1.00000000"/>	
	</Texture>
-->

<!-- _PetJournalHorizTile
size=64,128
<Texture name="_BattleSlotFrame-Divider" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
	<Size x="64" y="9"/>	
	<TexCoords left="0.00000000" right="1.00000000" top="0.00781250" bottom="0.07812500"/>	
</Texture>
<Texture name="_BattleSlotFrame-Top" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
	<Size x="64" y="16"/>	
	<TexCoords left="0.00000000" right="1.00000000" top="0.09375000" bottom="0.21875000"/>	
</Texture>
<Texture name="_BattleSlotTitle-BG" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
	<Size x="64" y="24"/>	
	<TexCoords left="0.00000000" right="1.00000000" top="0.23437500" bottom="0.42187500"/>	
</Texture>
<Texture name="_BattleSlotTitle-Mid" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
	<Size x="64" y="40"/>	
	<TexCoords left="0.00000000" right="1.00000000" top="0.43750000" bottom="0.75000000"/>	
</Texture>

-->

	<Button name="CompanionListButtonTemplate" motionScriptsWhileDisabled="true" virtual="true">
		<Size x="208" y="46"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\PetBattles\PetJournal">
					<TexCoords left="0.49804688" right="0.90625000" top="0.12792969" bottom="0.17285156"/>	
				</Texture>
			</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="-2"/>
					</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 file="Interface\PetBattles\PetJournal" parentKey="selectedTexture" hidden="true">
					<TexCoords left="0.49804688" right="0.90625000" top="0.22167969" bottom="0.26660156"/>	
				</Texture>
			</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" file="Interface\PetBattles\PetJournal" parentKey="levelBG">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentIcon" x="3" y="-3"/>
							</Anchors>
							<Size x="21" y="21"/>	
							<TexCoords left="0.06835938" right="0.10937500" top="0.02246094" bottom="0.04296875"/>	
						</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" file="Interface\PetBattles\PetJournal" parentKey="favorite">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
							</Anchors>
							<Size x="25" y="25"/>	
							<TexCoords left="0.11328125" right="0.16210938" top="0.02246094" bottom="0.04687500"/>	
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Cooldown parentKey="Cooldown" 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 file="Interface\PetBattles\PetJournal">
			<TexCoords left="0.49804688" right="0.90625000" top="0.17480469" bottom="0.21972656"/>	
		</HighlightTexture>
		<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 file="Interface\PetBattles\PetJournal">
					<TexCoords left="0.49804688" right="0.90625000" top="0.12792969" bottom="0.17285156"/>	
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentIcon" parentKey="icon">
					<Size x="38" y="38"/>
					<Anchors>
						<Anchor point="LEFT" x="-42" y="0"/>
					</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="-2"/>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<Texture file="Interface\PetBattles\PetJournal" parentKey="selectedTexture" hidden="true">
					<TexCoords left="0.49804688" right="0.90625000" top="0.22167969" bottom="0.26660156"/>	
				</Texture>
			</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>
						PickupCompanion("MOUNT", self:GetParent().index);
					</OnDragStart>
				</Scripts>
			</Button>
		</Frames>
		<HighlightTexture file="Interface\PetBattles\PetJournal">
			<TexCoords left="0.49804688" right="0.90625000" top="0.17480469" bottom="0.21972656"/>	
		</HighlightTexture>
		<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(0);
			</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" file="Interface\PetBattles\PetJournal">
					<Anchors>
						<Anchor point="TOPLEFT" x="-3" y="0"/>
					</Anchors>
					<Size x="404" y="106"/>	
					<TexCoords left="0.00195313" right="0.79101563" top="0.48730469" bottom="0.59082031"/>	
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="2">
				<Texture name="$parentShadows" file="Interface\PetBattles\PetJournal" parentKey="shadows">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" x="-125" y="-120"/>
					</Anchors>
					<Size x="138" y="72"/>	
					<TexCoords left="0.52734375" right="0.79687500" top="0.02246094" bottom="0.09277344"/>	
				</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" file="Interface\PetBattles\PetJournal" parentKey="iconBorder">
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentIcon" x="0" y="0"/>
					</Anchors>
					<Size x="53" y="54"/>
					<TexCoords left="0.41992188" right="0.52343750" top="0.02246094" bottom="0.07519531"/>	
				</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="150" 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" file="Interface\PetBattles\PetJournal" parentKey="levelBG">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="$parentIcon" x="5" y="-5"/>
					</Anchors>
					<Size x="21" y="21"/>	
					<TexCoords left="0.06835938" right="0.10937500" top="0.02246094" bottom="0.04296875"/>	
				</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" file="Interface\PetBattles\PetJournal" parentKey="favorite">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
					</Anchors>
					<Size x="25" y="25"/>	
					<TexCoords left="0.11328125" right="0.16210938" top="0.02246094" bottom="0.04687500"/>	
				</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" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
									</Anchors>
									<Size x="11" y="7"/>
									<TexCoords left="0.04492188" right="0.06640625" top="0.00097656" bottom="0.00781250"/>	
								</Texture>
								<Texture name="$parentRight" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
									</Anchors>
									<Size x="11" y="7"/>	
									<TexCoords left="0.07031250" right="0.09179688" top="0.00097656" bottom="0.00781250"/>	
								</Texture>
								<Texture name="$parentMiddle" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
									</Anchors>
									<TexCoords left="0.01953125" right="0.04101563" top="0.00097656" bottom="0.00781250"/>	
								</Texture>
							</Layer>
							<Layer level="BACKGROUND">
								<Texture name="$parentBGMiddle" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
									</Anchors>
									<Size x="11" y="7"/>	
									<TexCoords left="0.09570313" right="0.11718750" top="0.00097656" bottom="0.00781250"/>	
								</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, 1);
						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" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOPLEFT" x="0" y="0"/>
							</Anchors>
							<Size x="404" y="106"/>	
							<TexCoords left="0.00195313" right="0.79101563" top="0.38183594" bottom="0.48535156"/>	
						</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" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
							</Anchors>
							<Size x="11" y="11"/>	
							<TexCoords left="0.02734375" right="0.04882813" top="0.00976563" bottom="0.02050781"/>	
						</Texture>
						<Texture name="$parentRight" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
							</Anchors>
							<Size x="11" y="11"/>	
							<TexCoords left="0.07812500" right="0.09960938" top="0.00976563" bottom="0.02050781"/>	
						</Texture>
						<Texture name="$parentMiddle" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
							</Anchors>
							<TexCoords left="0.05273438" right="0.07421875" top="0.00976563" bottom="0.02050781"/>	
						</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" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
							</Anchors>
							<TexCoords left="0.00195313" right="0.02343750" top="0.00976563" bottom="0.02050781"/>	
						</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
							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
							C_PetJournal.SetPetLoadOutInfo(self:GetParent():GetID(), petID);
							PetJournal_UpdatePetLoadOut();
							ClearCursor();
						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" file="Interface\PetBattles\PetJournal">
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
					<Size x="408" y="171"/>	
					<TexCoords left="0.00195313" right="0.79882813" top="0.59277344" bottom="0.75976563"/>	
				</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);
					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());
					</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());
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Scripts>
			<OnLoad>
				PetJournalParentTitleText:SetText(MOUNTS_AND_PETS);
				SetPortraitToTexture(PetJournalParentPortrait,"Interface\\Icons\\MountJournalPortrait");
				PanelTemplates_SetNumTabs(self, 2);
				if (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>
			<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="237" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.LeftInset" x="15" y="-9"/>
				</Anchors>
				<Scripts>
					<OnTextChanged function="MountJournal_OnSearchTextChanged"/>
				</Scripts>
			</EditBox>
			<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="Name" inherits="GameFontHighlightLarge">
							<Size x="280" y="0"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="60"/>
							</Anchors>
						</FontString>
						<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"/>
					<PlayerModel parentKey="ModelFrame" useParentLevel="true" inherits="ModelWithZoomTemplate">
						<Anchors>
							<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="0" y="0"/>
							<Anchor point="BOTTOMRIGHT" relativeKey="$parent" x="0" y="100"/>
						</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>
		</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" 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>
				<Scripts>
					<OnClick> 
						PlaySound("igMainMenuOptionCheckBoxOn");
						ToggleDropDownMenu(1, nil, PetJournalFilterDropDown, "PetJournalFilterButton", 74, 15);
					</OnClick>	
					<OnLoad>
						self.rightArrow:Show();
					</OnLoad>
				</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" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOPLEFT" x="-1" y="1"/>
							</Anchors>
							<Size x="17" y="17"/>
							<TexCoords left="0.03125000" right="0.06445313" top="0.02246094" bottom="0.03906250"/>	
						</Texture>
						<Texture name="$parentTopRight" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOPRIGHT" x="1" y="1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="0.06445313" right="0.03125000" top="0.02246094" bottom="0.03906250"/>	
						</Texture>
						<Texture name="$parentBottomLeft" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-1" y="-1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="0.03125000" right="0.06445313" top="0.03906250" bottom="0.02246094"/>	
						</Texture>
						<Texture name="$parentBottomRight" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="1" y="-1"/>
							</Anchors>
							<Size x="17" y="17"/>	
							<TexCoords left="0.06445313" right="0.03125000" top="0.03906250" bottom="0.02246094"/>	
						</Texture>
						<Texture name="$parentTop" file="Interface\PetBattles\_PetJournalHorizTile" 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>
							<TexCoords left="0.00000000" right="1.00000000" top="0.09375000" bottom="0.21875000"/>	
						</Texture>
						<Texture name="$parentBottom" file="Interface\PetBattles\_PetJournalHorizTile" 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.00000000" right="1.00000000" top="0.21875000" bottom="0.09375000"/>	
						</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" file="Interface\PetBattles\_PetJournalHorizTile" 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>
							<Size x="64" y="9"/>	
							<TexCoords left="0.00000000" right="1.00000000" top="0.00781250" bottom="0.07812500"/>	
						</Texture>
						<Texture name="$parentLowerSeparator" file="Interface\PetBattles\_PetJournalHorizTile" 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>
							<Size x="64" y="9"/>	
							<TexCoords left="0.00000000" right="1.00000000" top="0.00781250" bottom="0.07812500"/>	
						</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" file="Interface\PetBattles\_PetJournalHorizTile" 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>
							<TexCoords left="0.00000000" right="1.00000000" top="0.23437500" bottom="0.42187500"/>	
						</Texture>
					</Layer>
					<Layer level="OVERLAY" textureSubLevel="1">
						<Texture name="$parentSlotHeaderF" file="Interface\PetBattles\_PetJournalHorizTile" 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>
							<TexCoords left="0.00000000" right="1.00000000" top="0.43750000" bottom="0.75000000"/>	
						</Texture>
						<!--
						<Texture name="_BattleSlotTitle-BG" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
							<Size x="64" y="24"/>	
							<TexCoords left="0.00000000" right="1.00000000" top="0.23437500" bottom="0.42187500"/>	
						</Texture>
						<Texture name="_BattleSlotTitle-Mid" file="\Interface\PetBattles\_PetJournalHorizTile" virtual="true" horizTile="true" >
							<Size x="64" y="40"/>	
							<TexCoords left="0.00000000" right="1.00000000" top="0.43750000" bottom="0.75000000"/>	
						</Texture>
						-->
						<Texture name="$parentSlotHeaderLeft" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentSlotHeaderF" x="0" y="0"/>
							</Anchors>
							<Size x="40" y="40"/>	
							<TexCoords left="0.23437500" right="0.31250000" top="0.06347656" bottom="0.10253906"/>	
						</Texture>
						<Texture name="$parentSlotHeaderRight" file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentSlotHeaderF" x="0" y="0"/>
							</Anchors>
							<Size x="40" y="40"/>	
							<TexCoords left="0.23437500" right="0.31250000" top="0.02246094" bottom="0.06152344"/>	
						</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" file="Interface\PetBattles\PetJournal">
							<Size x="405" y="166"/>	
							<Anchors>
								<Anchor point="TOPLEFT" x="0" y="0"/>
							</Anchors>
							<TexCoords left="0.00195313" right="0.79882813" top="0.59277344" bottom="0.75976563"/>	
						</Texture>
					</Layer>
					<Layer level="BACKGROUND" textureSubLevel="2">
						<Texture name="$parentAbilitiesBG" parentKey="AbilitiesBG" file="Interface\PetBattles\PetJournal">
							<Size x="196" y="104"/>	
							<Anchors>
								<Anchor point="TOPRIGHT" x="0" y="-45"/>
							</Anchors>
							<TexCoords left="0.11132813" right="0.49414063" top="0.12792969" bottom="0.23046875"/>	
						</Texture>
						<Texture name="$parentShadows" file="Interface\PetBattles\PetJournal" parentKey="shadows">
							<Anchors>
								<Anchor point="TOPLEFT" x="25" y="-67"/>
							</Anchors>
							<Size x="207" y="108"/>	
							<TexCoords left="0.52734375" right="0.79687500" top="0.02246094" bottom="0.09277344"/>	
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString parentKey="CannotBattleText" inherits="GameFontNormal" text="BATTLE_PET_CANNOT_BATTLE">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentAbilitiesBG"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentAbilitiesBG"/>
							</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" file="Interface\PetBattles\PetJournal">
									<Size x="21" y="21"/>
									<Anchors>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentIcon" x="5" y="-5"/>
									</Anchors>
									<TexCoords left="0.06835938" right="0.10937500" top="0.02246094" bottom="0.04296875"/>	
								</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" file="Interface\PetBattles\PetJournal" parentKey="favorite">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentIcon" x="-8" y="8"/>
									</Anchors>
									<Size x="25" y="25"/>	
									<TexCoords left="0.11328125" right="0.16210938" top="0.02246094" bottom="0.04687500"/>	
								</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" file="Interface\PetBattles\PetJournal">
											<Anchors>
												<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
											</Anchors>
											<Size x="11" y="7"/>
											<TexCoords left="0.04492188" right="0.06640625" top="0.00097656" bottom="0.00781250"/>	
										</Texture>
										<Texture name="$parentRight" file="Interface\PetBattles\PetJournal">
											<Anchors>
												<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
											</Anchors>
											<Size x="11" y="7"/>	
											<TexCoords left="0.07031250" right="0.09179688" top="0.00097656" bottom="0.00781250"/>	
										</Texture>
										<Texture name="$parentMiddle" file="Interface\PetBattles\PetJournal">
											<Anchors>
												<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
												<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
											</Anchors>
											<TexCoords left="0.01953125" right="0.04101563" top="0.00097656" bottom="0.00781250"/>	
										</Texture>
									</Layer>
									<Layer level="BACKGROUND">
										<Texture name="$parentBGMiddle" file="Interface\PetBattles\PetJournal">
											<Anchors>
												<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
												<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
											</Anchors>
											<Size x="11" y="7"/>	
											<TexCoords left="0.09570313" right="0.11718750" top="0.00097656" bottom="0.00781250"/>	
										</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, 1);
								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, 1);
								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, 1);
								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, 1);
								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="$parentAbilitiesBG" x="-131" y="-10"/>
						</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" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="RIGHT" relativePoint="LEFT"  x="9" y="0"/>
									</Anchors>
									<Size x="11" y="11"/>	
									<TexCoords left="0.02734375" right="0.04882813" top="0.00976563" bottom="0.02050781"/>	
								</Texture>
								<Texture name="$parentRight" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="LEFT" relativePoint="RIGHT"  x="-9" y="0"/>
									</Anchors>
									<Size x="11" y="11"/>	
									<TexCoords left="0.07812500" right="0.09960938" top="0.00976563" bottom="0.02050781"/>	
								</Texture>
								<Texture name="$parentMiddle" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
									</Anchors>
									<TexCoords left="0.05273438" right="0.07421875" top="0.00976563" bottom="0.02050781"/>	
								</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" file="Interface\PetBattles\PetJournal">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentLeft" x="2"/>
										<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" x="-2"/>
									</Anchors>
									<TexCoords left="0.00195313" right="0.02343750" top="0.00976563" bottom="0.02050781"/>	
								</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 file="Interface\PetBattles\PetJournal">
							<Anchors>
								<Anchor point="TOP" x="0" y="0"/>
							</Anchors>
							<Size x="210" y="40"/>	
							<TexCoords left="0.00195313" right="0.46093750" top="0.29687500" bottom="0.34472656"/>	
							<Color r="1" g="1" b="1" a="1"/>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND" textureSubLevel="1">
						<Texture parentKey="highlight" file="Interface\PetBattles\PetJournal" hidden="true">
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
							<Size x="210" y="40"/>	
							<TexCoords left="0.46484375" right="0.92382813" top="0.29687500" bottom="0.34472656"/>	
						</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"/>
</Ui>