$(function($){
	// image hover (opacity fade)
	$('ul.grid img, .post a img, #about a img, .content a img').css("opacity", "1.0");
	$('ul.grid img, .post a img, #about a img, .content a img').hover(
		// on hover lower opacity
		function(){$(this).stop().animate({opacity: 0.85}, "fast");},	
		// on stop hover reset opacity
		function(){$(this).stop().animate({opacity: 1.0}, "fast");}
	);
	
	// fade menu links
	$('#smoothmenu1 ul li a').hover(
		function(){if (!$(this).hasClass('selected')) {$(this).stop().animate({color: '#565656'}, 100);}},	
		function(){if (!$(this).hasClass('selected')) {$(this).stop().animate({color: '#fff'}, 100);}}
	);
	
	// fade tab links
	$('.tab-wrapper ul li a').hover(
		function(){$(this).stop().animate({color: '#5d8ba6'}, 100);},	
		function(){$(this).stop().animate({color: '#565656'}, 100);}
	);
	
	// fade copyright links
	$('#copyright p a').hover(
		function(){$(this).stop().animate({color: '#565656'}, 100);},	
		function(){$(this).stop().animate({color: '#fff'}, 100);}
	);
	
	// smooth content loading for the home page
	$('#slider').css({opacity:0}).animate({opacity:1}, {duration:500});
	$('.intro').css({opacity:0}).animate({opacity:1}, {duration:800});
	$('#latest1').css({opacity:0}).animate({opacity:1}, {duration:1000});
	$('#latest2').css({opacity:0}).animate({opacity:1}, {duration:1250});
	$('#latest3').css({opacity:0}).animate({opacity:1}, {duration:1500});
	$('#latest4').css({opacity:0}).animate({opacity:1}, {duration:1750});
	$('ul.grid img, ul.grid p').css({opacity:0}).animate({opacity:1}, {duration:1000});
});

ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	shadow: {enable:false}, //enable shadow?
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
