//Jquery Functions
jQuery(function( $ ){
	// run the following when the DOM is ready
	$(document).ready(function(){
		$(function(){$(document).pngFix();});
		// Set class on snav
		$("#snav li:last").addClass("last");

		// load CSS stylesheet for jQuery-enhanced elements
		$("head").append('<link href="../css/explore.css" rel="stylesheet" type="text/css" media="screen" />');

		// show the first content item in themeSnav
		$("#themeSelectedContent>div:not(:first)").hide();
		$("#themeSnav a:first").addClass('active');

		// apply themeSnav menu behaviour
		$("#themeSnav a").click(themeSnavClick);
	});

// more jQuery definitions here?
});

/*	click handler for themeSnav links
	Show clicked item in active state, show its linked content
	Assumes link like <a href="#aDivId">...</a> */
function themeSnavClick(event){
//	note: 'this' = element having this function as handler
	var linkId = $(this).attr('href');
//	alert("You clicked link to '" + linkId.toString() + "'");
/*	next line prevents scrolling to the selected content div */
	event.preventDefault();
	$("#themeSnav a").removeClass('active');
	$(this).addClass('active');
	$("#themeSelectedContent>div:not(linkId)").hide();
	$(linkId).show();
}

