$(document).ready(function(){
 Cufon.replace('#nav li a.toplink, h1, #globe p', { fontFamily: 'Molengo', hover: true });
 
 Shadowbox.init({
    handleOversize:     "resize",
    continuous:         true,
    handleUnsupported:  "remove",
    autoplayMovies:     false
});

$('#footer_links_ul li .divider:last').css('display','none');

$('.arrow').fadeTo(1,0.25);

/*-------------------------------------- */
/* Navigation
/*-------------------------------------- */

	//$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

	$("ul#nav 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.subnav").slideDown('fast').show(); //Drop down the subnav on click
      
		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

	});
	
	
	$("ul#nav li ul.subnav 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.subnav").slideDown('fast').show();
		$(this).parent().find("ul.subsubnav").slideDown('fast').show(); //Drop down the subnav on click
      
		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul.subsubnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
	  });

  });

});

