$(document).ready(function(){
$("a.colorbox").colorbox();
var opened=false;
  $('#footer img').click(function() {
	  opened=!opened;
	  $('#close').fadeIn(2000);
	  $('.inner').fadeSliderToggle()
 				 return false;
  });
 
	  
	  $('#content').click( function() {
		 		restoreBox();
				if(opened){
					opened=!opened;
					$('.inner').fadeSliderToggle()
					return true;
				}

  });
  


  
		
		//Following events are applied to the subnav itself (moving subnav up and down)
		
		//$(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click

	$("ul.topnav li a").parent().hover(function() { $(this).find("ul.subnav").fadeIn('fast'); 
		$('a.awesome.small').css("z-index","3");
		}, function(){	$(this).find("ul.subnav").stop(true , true).slideUp('fast'); 
		//When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() { 
		}, function(){	//On Hover Out
	});


