/*-----  	
	Primecast Javascript
	William Doyle (william.doyle@cnxntech.com)
	Sarah Kahn (sarah.kahn@cnxntech.com)

	Primecast. Life. Enhanced
	http://www.goprimecast.com/
-----*/


$(document).ready(function () {


/* Fixing weird IE/Safari overflow issue */

if ((screen.width>=1024) && (screen.height>=768)) {
$("body").addClass('hideOverflow')};

/* animate anchor tags */
    $.localScroll();

/* cufon */
    
    Cufon.replace('h1, h2, .button');

/* Superfish dropdown */
    jQuery('ul.sf-menu').superfish(); 


/* Selected tabs */

$(function(){
   var path = location.pathname.substring(1);
   if ( path )
     $('#promo_nav li a[href$="' + path + '"]').attr('class', 'selected');
 });

});

/* footer date */

function footDate() {
	var curr_date = new Date(), curr_year = curr_date.getFullYear(), c_y = (" "+curr_year+" ");
	var date_span = document.getElementById('footer_year');
	if (date_span) {
		var date_text = document.createTextNode(c_y);
		date_span.appendChild(date_text);
	}
}

function altRows(e) {
	var table_rows = document.getElementById(e).getElementsByTagName('tr'), num_rows = table_rows.length;
	for (var i = 0; i < num_rows; i++) {
		if (i % 2 == 0) {
			table_rows[i].style.background = "#ddd";
		}
	}
}

window.onload = function() {
	footDate();
}

