// JavaScript Document
$(document).ready(function(){
		$("#superWrapper").pngfix();
		$("#headerWrapper").pngfix();
		$("#logo").pngfix();
		$("#tagline").pngfix();
		$("#pageWrapper").pngfix();
		$("#navWrapper").pngfix();
		
		
   // Preload all rollovers
		$("#navWrapper img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.png$/ig,"Over.png");
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$("#navWrapper img").mouseover(function(){
			imgsrc = $(this).attr("src");
			matches = imgsrc.match(/Over/);
			
			// don't do the rollover if state is already ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.png$/ig,"Over.png"); // strip off extension
			$(this).attr("src", imgsrcON);
			}
			
		});
		$("#navWrapper img").mouseout(function(){
			$(this).attr("src", imgsrc);
		});


		
		
		
		

//$(function() {
		 $('#rotate').cycle();
		 $('#photo').cycle();
		// $('#youTubeVideo').cycle();
	//});
		
	});