/* Author: 
Dustin Thornborrow
*/

//add aditional parent class to any menu item with a sub to show arrow.
jQuery(function($){
   $('nav li:has(".sub-menu")').addClass('hassub');
});

jQuery(document).ready(function($) {
	//initial the menus
	$("ul.menu li").hover(function() {
		$(this).children("ul.sub-menu").css("display", "none").filter(':not(:animated)').animate({"height": "show", "opacity": "show"}, 250, "swing");
 
		$(this).hover(function() {}, function(){
			$(this).children("ul.sub-menu").hide().animate({"height": "hide", "opacity": "hide"}, "slow");
		});
	});
});


//initialize the fun facts slider in the footer
 $(document).ready(function() { 
		
        $('#funfacts').oneByOne({
			className: 'oneByOne1',	             
			easeType: 'fadeInRight',
			slideShow: true,
			width: 500,
			height: 300,
					
			showArrow: false,  // display the previous/next arrow or not
			showButton: true,  // display the circle buttons or not

			slideShowDelay: 5000 // the delay millisecond of the slidershow
		});  
		
		
	 });

$(document).ready(function(){	
$("#content").css("display", "none");
	$('#content').fadeIn(300);
});

//fix ie7 z-index problems
$(function() {
       var zIndexNumber = 1000;
       // Put your target element(s) in the selector below!
       $("div").each(function() {
               $(this).css('zIndex', zIndexNumber);
               zIndexNumber -= 10;
       });
});
