$(document).ready(function(){
		
	    $('.nav_standard').hoverIntent(
	      function () {
	        $(this).animate({ 
		        borderColor: "#2480a8",
		        backgroundColor: "#fefefe"
		      }, 200 );
	      }, 
	      function () {
		        $(this).animate({ 
			        borderColor: '#e8e8e8',
			        backgroundColor: '#f9f9f9'
			      }, 200 );
		      	}
	    );
	    
	    $('.unselected').hoverIntent(
	      function () {
	        $(this).animate({ 
		        color: "#5d5d5d",
		        backgroundColor: "#fefefe"
		      }, 200 );
	      }, 
	      function () {
		        $(this).animate({ 
			        color: "#c1c1c1",
			        backgroundColor: "#f9f9f9"
			      }, 200 );
		      	}
	    );

	
		$('.gallery a').addClass("fancy"); 
	
		$('a.fancy').fancybox({ 'zoomSpeedIn': 200, 'zoomSpeedOut': 200, 'overlayShow': true, 'zoomOpacity': true }); 
		

				
		$('.wide_box').hoverIntent(
	      function () {
	        $(this).children('.to_top').show();
	      }, 
	      function () {
	        $(this).children('.to_top').hide();
	      }
	    );
	    
	  if(jQuery.support.cssFloat){
		  $('#secondary_nav').hoverIntent(
		      function () {
		        $(this).animate({ 
			        right: "-140px"
			      }, 200 );
		      }, 
		      function () {
		        $(this).animate({ 
			        right: "-140px"
			      }, 500 );
		        $(this).animate({ 
			        right: "-30px"
			      }, 200 );
		      }
		    );
	}else{
//		$('#secondary_nav').hoverIntent(
//		      function () {
//		        $(this).animate({ 
//			        right: "-190px"
//			      }, 0 );
//		      }, 
//		      function () {
//		        $(this).animate({ 
//			        right: "-70px"
//			      }, 0 );
//		      }
//		    );
	};	
	
	if(jQuery.support.cssFloat){
		$('#secondary_nav').animate({ right: "-140px"}, 1000 );
		$('#secondary_nav').animate({ right: "-30px"}, 1000 );
	}else{
//		$('#secondary_nav').animate({ right: "-190px"}, 0 );
//		$('#secondary_nav').animate({ right: "-70px"}, 0 );
	};
	
	// Check whether links are external:
	// (Only works with elements that have href):
	$.extend($.expr[':'],{
	    external: function(a,i,m) {
	        if(!a.href) {return false;}
	        return a.hostname && a.hostname !== window.location.hostname;
	    }
	});
	 
	// Usage:
	$('a:external').addClass('external_link'); // Selects all anchors which link to external site/page

	$('.social_network a .color').hide();
	
	if(jQuery.support.cssFloat){
		$('.social_network').hoverIntent(
		      function () {
		        $(this).children('a').children('img.color').show();
		        $(this).children('a').children('img.bw').hide();
		      }, 
		      function () {
		        $(this).children('a').children('img.color').hide();
		        $(this).children('a').children('img.bw').show();
		      }
		    );
	};	

			
	$('#fancy_title table:last').hide();
			
	$('#main_content style').empty();
});
