$(document).ready(function(){
	var pageType = $("body");
	//PHZ Homepage initiate
	if (pageType.is ("#phzHomepage"))
	{
		$('#secondaryContent div:nth-child(2)').remove().clone().insertBefore('.sideBox:first');
		$('.lrgFeature').corner('round 24px tl').corner('round 24px br');
		$('.medFeature h2, .smlFeature h2, .sideBox').corner('round 12px tl').corner('round 12px br');
		$('.portrait img, .landscape img').wrap('<span></span>');
	}
	//PHZ Article
	if (pageType.is ('.phzArticle, .poisonHomepage'))
	{
		$('#secondaryNav.treeview').treeview({
			animated:600,
			unique: true
		});
		$('blockquote').addClass('curled');
		$('blockquote p').wrap('<div><div><div></div></div></div>');
		$('.highlight').addClass('highlightCurl');
		$('.highlight p').wrap('<div></div>');
		// INIT Fancybox Items
		if ($('a').hasClass('image240'))
		{ 
			$('a.image240').fancybox({
				'hideOnContentClick': true, 
				'speedOut': 350,
				'type':'image'
			});		
		};
		if ($('a').hasClass('image120'))
		{
			$('a.image120').fancybox({ 
				'hideOnContentClick': true, 
				'speedOut': 350,
				'type':'image' 
			});
		};
		if ($('a').hasClass('image180'))
		{
			$('a.image180').fancybox({ 
				'hideOnContentClick': true, 
				'speedOut': 350,
				'type':'image' 
			});
		};
		if ($('a').hasClass('image80'))
		{
			$('a.image80').fancybox({ 
				'hideOnContentClick': true, 
				'speedOut': 350,
				'type':'image' 
			});
		};
		// Table Zebra Striping
		if ($('table').hasClass('mint'))
		{
			$('table.mint tr:even').addClass('even')
		};			
	}
	//PHZ Catergory
	if (pageType.is ('#phzLibrary'))
	{
		$('#secondaryNav.treeview').treeview({
			animated:600,
			unique: true
		});
	}
	//PHZ Education
	if (pageType.is ('.petEducation'))
	{
		$('.featuredPHZSection').corner('round 18px tr').corner('round 18px bl');
	}
});
