$(document).ready(function(){

	// $("div#contact").hover(
	// 		function() {
	// 			$(this).animate({color: "#555"}, "fast");
	// 		},
	// 		function(){
	// 			$(this).animate({color: "#777"}, "fast");
	// 	});
	// 
	$("#recent-posts ul li a, .widget_recent_posts ul li a, .widget_portfolio_categories ul li a, .widget_blog_categories ul li a, .widget_pages ul li a, .widget_links ul li a").hover(
			function() {
				$(this).stop().animate({paddingLeft: "13px"}, 200);
			},
			function(){
				$(this).stop().animate({paddingLeft: "8px"}, 200);
		});
		
	$(".page-navi ul").superfish({
		animation: {opacity:'show',height:'show'},
		speed: 250
		});
	$('#top').click( function() {
		$.scrollTo(0, 500);
	});
	
	$('.portfolio-item').hover(
		function(){
			item_height = 215 - $(".portfolio-item-info", this).height();
			$(".portfolio-item-info", this).stop().animate({top:item_height},{queue:false,duration:200});
		}, function() {
			$(".portfolio-item-info", this).stop().animate({top:'225'},{queue:false,duration:200});
		});
	
});

function slider(effect) { // header slider
	if ($.browser.msie) { // IE
		$('#header-slider-items').cycle({ 
			prev: 'a#prev',
			next: 'a#next',
			fx: effect,
			timeout: 5000,
			speed: 500,
			pause:	1,
			cleartype: 1,
			cleartypeNoBg: true
		});
	} else { // good browsers
		$('#header-slider-items').cycle({ 
			prev: 'a#prev',
			next: 'a#next',
			fx: effect,
			timeout: 5000,
			pause:	1,
			easing: 'easeInOutBack'
		});
	};
}

function femsi() {
	$(".content-item a[href$='jpg'], .content-item a[href$='jpeg'], .content-item a[href$='png'], .content-item a[href$='gif'], .content-item a[href$='bmp']").fancybox({
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300, 
		'overlayShow': true,
		'transitionIn': 'elastic',
		'transitionOut': 'none'
	});
}