$(document).ready(function(){
	$("a.fancybox").fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'width': 500,
		'type' : 'iframe',
		'height' : 550
	});
	//to spark the hover cuz IE7 doesnt support li:hover pseudo classes
	$("#main-nav li").hover(
	  function () {
		$(this).addClass("hover");
	  },
	  function () {
		$(this).removeClass("hover");
	  }
	);
	//third level lists
	$("#main-nav li > ul > li > ul").hover(
	  function () {
		$(this).parent().children('a').css("color", '#fff');
	  },
	  function () {
		$(this).parent().children('a').css("color", 'inherit');
	  }
	);	
	//main level anchor
	$("#main-nav li > ul > li").hover(
	  function () {
		$(this).css("color", '#fff');
		$(this).children('a').css("color", '#fff');
	  },
	  function () {
		$(this).css("color", '#525146');
		$(this).children('a').css("color", '#525146');
	  }
	);	
	//top right nav
	$(".navigation ul").hover(
	  function () {
		$(this).addClass("hover");
	  },
	  function () {
		$(this).removeClass("hover");
	  }
	);	
	// For each link containing -off, set up a -on hover
	$("img[src*='-off']").each(function() {
	
		
		// Set up the hover switcher
		$(this).hover(function() {
			$(this).attr("src",$(this).attr("src").replace(/-off/,"-on"));
		}, function() {
			$(this).attr("src",$(this).attr("src").replace(/-on/,"-off"));
		});
	
	});	
});

