$(document).ready(function() {	// test for IE6	if(typeof document.body.style.maxHeight === "undefined") {		 $ie6 = 'true';	} else {		 $ie6 = 'false';	}	$('.social-bar .popupvideo').append('<span class="play"></span>');	// open links with class="newWindow" in a new window	$('a.newWindow').click(function() {		window.open($(this).attr('href'));		return false;	});	// stripe tables and color hovered rows 	$("table.stripeMe tr:odd").addClass("alt");	$("table.stripeMe tr").hover(		function() { $(this).addClass("over"); },		function() { $(this).removeClass("over"); }		);	// make same page links smooth scroll	function filterPath(string) {		return string		.replace(/^\//,'')		.replace(/(index|default).[a-zA-Z]{3,4}$/,'')		.replace(/\/$/,'');	}	var locationPath = filterPath(location.pathname);	$('a[href*=#]').each(function() {		var thisPath = filterPath(this.pathname) || locationPath;				if (locationPath == thisPath			&& (location.hostname == this.hostname || !this.hostname)			&& this.hash.replace(/#/,'') ) {				var $target = $(this.hash), target = this.hash;				if (target) {					var targetOffset = $target.offset().top;					$(this).click(function(event) {						event.preventDefault();						$('html, body').animate({scrollTop: targetOffset}, 400, function() {							location.hash = target;						});					});				}		}	});	// make homepage blocks clickable	$(".gridbox").click(function(){	  window.location=$(this).find("a").attr("href"); return false;	});		// allow click anywhere in featureclick box	$(".featureclick").click(function(){		var links = $(this).find("a");		var linkslength = $(links).length;		if (linkslength > 0) {			window.location=links.attr("href");		}	});	// click image for colorbox video	$(".popupvideo").colorbox({iframe:true, innerWidth:800, innerHeight:450});	$('a.colorbox').colorbox({iframe:true, width:"700px", height: "500px"});			// show/hide admission event details 	$('table.adevents span.details').hide();	$('table.adevents a.toggle').click(function () {		var $clicked = $(this);		$clicked.next('span.details').slideToggle('fast');		return false;	});	// show/hide details blocks 	$('h4.expand+div.details').hide();	$('h4.expand').click(function () {		var $clicked = $(this);		$clicked.next('div.details').slideToggle('fast');		return false;	});	// show/hide requirements details with direct anchor link 	var $anchor = document.location.hash;		var $h4anchor = 'h4'+$anchor;	if ($anchor != '') {$($h4anchor).next('div.details').slideDown('fast');}	// show extra fields on visit request form when checked 	$(".details").css("display","none");	$(".expand").click(function(){		if ($(this).is("input:checked")) {			$(this).parent().next().children(".details").show("fast");		} else {     			$(this).parent().next().children(".details").hide("fast");		}	});		// stripe callout divs in the sidebar	$("#contentB div.callout:odd").addClass("odd");	// show/hide all programs on click	$('div#allProgramsList').css('visibility', 'visible');	$('div#allProgramsList').hide();	if ($ie6 == 'false') {		$('div.allPrograms a.toggle').click(function () {			var $clicked = $(this);			$clicked.next('div#allProgramsList').slideToggle();			$clicked.toggleClass('over');			return false;		});	}			// show sub-primarynav on hover	function showDrop() {		$(this).addClass("over"); 	}			function hideDrop() { 		$(this).removeClass("over"); 	} 			var hoverConfig = {    		interval: 50,		sensitivity: 4,		over: showDrop,		timeout: 100,		out: hideDrop	};			$("#primaryNavigation li").hoverIntent(hoverConfig);			// redefine Cycle's updateActivePagerLink function 	// remove this to have it default to href	$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 		$(pager).find('li').removeClass('activeLI') 			.filter('li:eq('+currSlideIndex+')').addClass('activeLI'); 	}; 			/*     $('.slideshow').cycle({			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...		});	*/	$('#slideshow').cycle({ 		speed:       400, 		timeout:     8000, 		pager:      '#paginator', 		pagerEvent: 'mouseover', /* 'click' */		fx: 'fade',		pause: true,		pauseOnPagerHover: true, 		autostop: true,		autostopCount: '8',				pagerAnchorBuilder: function(idx, slide) { 			// return selector string for existing anchor 			return '#paginator li:eq(' + idx + ') a'; 		}     	});/* 	var $pane = $('#featurebox-box'), //the item being scrolled		$items = $pane.find('div.feature'),//the items		$paginator = $('#paginator');//the container of the links/buttons		$('#featurebox-box').serialScroll({		//...		items: $items,//or just 'img'		//...	});		$items.each(function(index){//index starts counting from 0		// var text = 'item ' + (index + 1); //here generate the text you want		var text = (index + 1); //here generate the text you want		var $page = $('<li class="feature-nav nav' + text + '" />').text( text ).appendTo($paginator);				$page.click(function(e){			//if you put a link inside the <li> then call:			//e.preventDefault();			$pane.trigger('goto',[index]);//scroll to the item number #index.		});	});*/	// pause panels on hover /* 	$('#featurebox #featurebox-box').hover(		function(){			$(this).stop().trigger('stop');		},		function(){			$(this).stop().trigger('start');		}	);*/	});
