/*
-----------------------------------------------------------------------------
WordPress Baseline Theme – JAVASCRIPT

updated:	17 June 2009
author:		Clayton Farr
url:		http://www.claytonfarr.com
-----------------------------------------------------------------------------*/

/*	=HOME page scripts
-----------------------------------------------------------------------------*/
jQuery(".home").ready(function() {
	
	/* Adding classes to the logo for colors */
	jQuery("h1 a").html("HigherEd<span class='utah'>Utah</span><span class=org>.org</span>");
	
	/* Setting the dimensions of the featured video player */
	jQuery(".home #feature-video object").attr("width","240");
	jQuery(".home #feature-video object").attr("height","150");
	jQuery(".home #feature-video embed").attr("width","240");
	jQuery(".home #feature-video embed").attr("height","150");

});

/*	=PORTAL page scripts
-----------------------------------------------------------------------------*/
jQuery(".page-template-page-portal-php").ready(function() {
	
	/* Setting the dimensions of the featured video player */
	jQuery(".page-template-page-portal-php #feature-video object").attr("width","400");
	jQuery(".page-template-page-portal-php #feature-video object").attr("height","250");
	jQuery(".page-template-page-portal-php #feature-video embed").attr("width","400");
	jQuery(".page-template-page-portal-php #feature-video embed").attr("height","250");
	
	/* hide the first "More Videos" list item - it's a duplicate of larger video to right */
	jQuery(".page-template-page-portal-php #more-videos ul li:first-child").hide();

});

/*	=ABOUT page scripts
-----------------------------------------------------------------------------*/
jQuery(".about").ready(function() {
	
	/* ON state */
	jQuery(".page-id-1074 li.page-item-29").before('<li class="page_item page-item-overview current_page_item"><a title="Bio" href="/about/">Bio</a></li>');
	jQuery(".page-id-1074 li.page-item-1074").removeClass('current_page_item').addClass('current_page_parent');
	/* OFF state */
	jQuery(".parent-pageid-1074 li.page-item-29").before('<li class="page_item page-item-overview"><a title="Overview" href="/about/">Overview</a></li>');

});

/*	=PREPARE & PAY page scripts
-----------------------------------------------------------------------------*/
jQuery(".prepare-pay-for-college").ready(function() {
	
	/* ON state */
	jQuery(".page-id-9 li.page-item-15").before('<li class="page_item page-item-overview current_page_item"><a title="Overview" href="/index.php/prepare-pay-for-college/">Overview</a></li>');
	jQuery(".page-id-9 li.page-item-9").removeClass('current_page_item').addClass('current_page_parent');
	/* OFF state */
	jQuery(".parent-pageid-9 li.page-item-15").before('<li class="page_item page-item-overview"><a title="Overview" href="/index.php/prepare-pay-for-college/">Overview</a></li>');

});

/*	=ACADEMICS page scripts
-----------------------------------------------------------------------------*/
jQuery(".public-policy").ready(function() {
	
	/* ON state */
	jQuery(".page-id-11 li.page-item-1491").before('<li class="page_item page-item-overview current_page_item"><a title="Overview" href="/index.php/public-policy/">Overview</a></li>');
	jQuery(".page-id-11 li.page-item-11").removeClass('current_page_item').addClass('current_page_parent2');
	/* OFF state */
	jQuery(".parent-pageid-11 li.page-item-1491").before('<li class="page_item page-item-overview"><a title="Overview" href="/index.php/public-policy/">Overview</a></li>');

});

/*	=SINGLE page scripts
-----------------------------------------------------------------------------*/
jQuery(".single").ready(function() {
	
	/* Setting the dimensions of the featured video player */
	jQuery(".single #content-primary .hentry object").attr("width","635");
	jQuery(".single #content-primary .hentry object").attr("height","385");
	jQuery(".single #content-primary .hentry embed").attr("width","635");
	jQuery(".single #content-primary .hentry embed").attr("height","385");

});

/*	=OTHER scripts
-----------------------------------------------------------------------------*/
jQuery(document).ready(function() {
	
	/* Remove font-size attribute added by plugin for popular topics list
	   We want the font to remain the same size regardless of popularity   */
	jQuery("#popular-topics .wp-tag-cloud li a").removeAttr("style");

});


