<!--
jQuery.preloadImages = function() {
	var preloads = arguments[0];
	var pathPrefix = arguments[1];
	for ( var imgCnt = preloads.length - 1; imgCnt > 0; imgCnt-- )  {
		jQuery('<img>').attr('src', pathPrefix + preloads[imgCnt]);
	}
}
// Preload required images
var preloads = [''];
$.preloadImages(preloads, '/images/');

$(document).ready(function(){
	// Handle drop down navigation
	$('#primaryNavigation li').hover(
		function() { $('ul', this).css('display', 'block'); },
		function() { $('ul', this).css('display', 'none'); }
	);
	// Display news items
	$('#newsItems').cycle({
		fx: 'scrollUp',
		speed:    1000,
		timeout:  3000,
		pause:  1
	});
	// Display partner logos
	$('div.partners img').mouseover(function(e){
		var imageSrc = $(this).attr('src');
		if ( imageSrc.indexOf('-on') == -1 ) {
			imageSrc = imageSrc.replace('.jpg', '-on.jpg', 'gi');
			$(this).attr('src', imageSrc);
		}
	});
	$('div.partners img').mouseout(function(){
		var imageSrc = $(this).attr('src');
		if ( imageSrc.indexOf('-on') > 0 ) {
			imageSrc = imageSrc.replace('-on.jpg', '.jpg', 'gi');
			$(this).attr('src', imageSrc);
		}
	});
	$('.showContent').click(function(e){
		var id = '#' + e.target.id + '-hidden';
		var display = $(id).css('display');
		if ( display == 'none' ) {
			$(id).css('display', 'block');
		}
		else {
			$(id).css('display', 'none');
		}
	});
});

-->
