/* NAVIGATION MENU DROPDOWN EFFECTS
---------------------------------------------- */
$(document).ready(function(){
	// Nav menu events
	$("#nav ul.pages li a").hover(
	  function() { //When trigger is clicked...

		  //Following events are applied to the subnav itself (moving subnav up and down)
		  $(this).parent().find("ul").fadeIn(50);//.show(); //Drop down the subnav on click
			$(this).parent().addClass('hovered');

		  $(this).parent().hover(
		    function() {
			},
		    function() {
			    $(this).parent().find("ul").fadeOut(50); //When the mouse hovers out of the subnav, move it back up
			    $(this).removeClass('hovered');
		    }
		  );
		}
	);
	
	$('#go').hover(
		function() { $(this).addClass("ui-state-hover"); },
		function() { $(this).removeClass("ui-state-hover"); }
	);
	
	// Image fade ins
	$('.fade-in').each(function() {
		$(this).fadeIn(3500);
	});
	
	// Set Mac styles if OS = MacOS
	if (navigator.appVersion.indexOf("Mac") != -1) {
		$('body').addClass('mac');
	};
});


/* For index.php */
function launchBirds(obj) {
  $('#birds-still').hide();
  $('#birds embed')[0].Play();
  setTimeout(function() { window.location.href = obj; }, 2400);  
}

