jQuery(document).ready(function(){
	
	/* First decide what page we're on */
	var pathname = window.location.pathname;
	
	/* Home */
	if (stringContains(pathname,"home.aspx") || !stringContains(pathname,".aspx")) {
		
		/* Hide the main page title */
		jQuery('#swPageTitle').hide();
		
		/* Load the animation */
		LoadFV();
		
	}
		
	/* Games */
	if (stringContains(pathname,"games.aspx")) {
		
		/* Make the funky games page effect happen */
		jQuery('#list1b').accordion({ 
			autoheight: false,
			header: "a.header"
		});
		
	}
	
	/* All Pages */
	
		/* Hover over tooltips, makes the title text of a link appear as a nice hover */
		$('a.tooltipMe').tooltip({
			track: true,
			delay: 0,
			showURL: false,
			showBody: " - ",
			fade: 250
		});
		
		/* Fix PNGs for low-brow browsers */
		try {
			pngfix();
		} catch(e) { /* Won't work if not <= IE6 because we don't pull in the JS for those browsers */ }

});

function stringContains(stringa, stringb) {
	
	/* Check for instances of string b in string a */
	if (stringa.indexOf(stringb) != -1) {
		return true;
	} else {
		return false;
	}
	
}
