

$(document).ready(function() {
	
	$("#nav").accordion({
		active: false,
		header: 'a.header, div.header',
		selectedClass: "active",
		event: 'mouseover',
		autoHeight: false,
		navigation: true
	});
	
	
	
	// make it so each of the list items is clickable also
	$("#nav li").click(function(e) {
		e.stopPropagation();
		window.location.href = $(this).children("a").eq(0).attr("href");
	});


	// prevent the work and about items from clicking
	$("#work, #about").parent().unbind("click");

	
	// fill in the headers
	$(".pageHeader").each(function() {
		var headerId = $(this).attr("id");
	
		// get the title text
		var flashVars = new Object();
		flashVars.pageTitle = escape($(this).text());
	
		// load up the flash
		swfobject.embedSWF("images/pageHeader.swf", headerId, "600", "22", "9.0.0", "", flashVars, { menu: "false", wmode: "transparent" }, {id: headerId, name: headerId});
	});



	// all slideshow elements
	$(".bannerSlideshow").each(function() {
		
		var id = $(this).attr("id");
		
		// set the xml file to go into the flash
		var flashVars = new Object();
		flashVars.prefs = $(this).text();
	
		// load up the flash
		swfobject.embedSWF("images/bannerSlideshow.swf", id, "610", "174", "9.0.0", "", flashVars, { menu: "false", wmode: "transparent" }, {id: id, name: id});
		
	});



});




function log(s) {
	console.log(s);
}
