  $kuj(document).ready(function(){


	var myURL = location.pathname;
	var activeVar = 0;
	
	if (myURL.match('/current/') )
	{
		activeVar = 3;
	}
	else if (myURL.match('/peoplepages/') )
	{
		activeVar = 1;
	}
	else if (myURL.match('/admissions/') )
	{
		activeVar = 2;
	}
	else if (myURL.match('/Fieldcamp/') )
	{
		activeVar = 4;
	}
	else if (myURL.match('/career/') )
	{
		activeVar = 7;
	}
	else if (myURL.match('/AdvBoard/') )
	{
		activeVar = 8;
	}
	else if (myURL.match('/underorg/') )
	{
		activeVar = 9001;
	}
	else {
		activeVar = -1;	
	}

	if (activeVar < 0) {
		$kuj("#headlink").kuaccordion({header: '.topnav', animated: 'none', type: 'unstyled'});
	}
	else if (activeVar > 9000) {
		$kuj("#headlink").kuaccordion({active: -1, header: '.topnav',	animated: 'none', type: 'unstyled'});
	}
	else {
		$kuj("#headlink").kuaccordion({active: activeVar, header: '.topnav',	animated: 'none', type: 'unstyled'});
	}
	
	$kuj(".singlenav").each(
		function () {
			tempRef = $kuj(this).attr('href');
			if (myURL == tempRef)
			{
				$kuj(this).addClass('ku_selectedlink');	
			}
			else if (myURL.match('/underorg/') && tempRef == 'http://www2.ku.edu/~geography/underorg/')
			{
				$kuj(this).addClass('ku_selectedlink');	
			}
		 });

$kuj("a.topnav").click(
		function(){
			location.href = $kuj(this).attr('href');									
		}
	);

$kuj("a.singlenav").click(
		function(){
			location.href = $kuj(this).attr('href');
		}
	);

	$kuj('.slideshow').cycle({
		fx: 'fade',
		speed: 1000,
		timeout: 7500
	});

});


