$(document).ready(function() {
						   
	$(".galPhoto").fancybox({ 'zoomSpeedIn': 500, 'zoomSpeedOut': 500, 'overlayShow': true });
	
	$(".youTube").fancybox({ 'zoomSpeedIn': 500, 'zoomSpeedOut': 500, 'overlayShow': true, 'frameWidth': 660, 'frameHeight' : 370  });
	
	

	// initialize the nav
	$('ul.sf-menu').superfish({
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
	    speed:       'fast',
		autoArrows	: true
	});
	
   
	// nav overs
	$(".nav-home").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c1_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c1.gif)");
	});
	
	$(".nav-about-us").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c2_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c2.gif)");
	});
	
	$(".nav-request-package").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c3_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c3.gif)");
	});
	
	$(".nav-get-involved").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c4_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c4.gif)");
	});
	
	$(".nav-from-our-troops").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c5_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c5.gif)");
	});

	$(".nav-our-supporters").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c6_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c6.gif)");
	});
	
	$(".nav-donate-now").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c7_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c7.gif)");
	});
	
	$(".nav-contact-us").hover(function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c8_f2.gif)");
	},function(){
	  $(this).css("background-image" , "url(/templates/h2p/images/nav-on_r1_c8.gif)");
	});
	
	
	// root nav item functionality
	$("#btn-home").click(function(){
		 var link = $("#btn-home a").attr("href");
		 self.location.href=link;
	});
	
	$("#btn-from-our-troops").click(function(){
		 var link = $("#btn-from-our-troops a").attr("href");
		 self.location.href=link;
	});
	
	$("#btn-from-our-troops").click(function(){
		 var link = $("#btn-from-our-troops a").attr("href");
		 self.location.href=link;
	});
	
	$("#btn-our-supporters").click(function(){
		 var link = $("#btn-our-supporters a").attr("href");
		 self.location.href=link;
	});

	$("#btn-dontate-now").click(function(){
		 var link = $("#btn-dontate-now a").attr("href");
		 self.location.href=link;
	});
	
	$("#btn-contact-us").click(function(){
		 var link = $("#btn-contact-us a").attr("href");
		 self.location.href=link;
	});
	

  });