$(document).ready(function(){
	$("#toggle img").hide();

	jQuery.fn.fadeToggle = function(speed, easing, callback) {
	return this.animate({opacity: 'toggle'}, speed, easing, callback);
	}; 	
	
	$postHeight = $(".p1").height();
	$(".i1").css({'height' : $postHeight});
	
	
	$postHeight = $(".p2").height();
	$(".i2").css({'height' : $postHeight});
	
	
	$postHeight = $(".p3").height();
	$(".i3").css({'height' : $postHeight});
	
	
	$postHeight = $(".p4").height();
	$(".i4").css({'height' : $postHeight});
	
	
	$postHeight = $(".p5").height();
	$(".i5").css({'height' : $postHeight});
	
	
	$postHeight = $(".p6").height();
	$(".i6").css({'height' : $postHeight});
	
	$postHeight = $(".p7").height();
	$(".i7").css({'height' : $postHeight});
	
	
	$(".p1, .i1").hover(function(){
		$(".i1").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i1").stop().animate({right:"-50px"}, "normal");
        });
	
	$(".p2, .i2").hover(function(){
		$(".i2").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i2").stop().animate({right:"-50px"}, "normal");
        });
	
	$(".p3, .i3").hover(function(){
		$(".i3").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i3").stop().animate({right:"-50px"}, "normal");
        });
	
	$(".p4, .i4").hover(function(){
		$(".i4").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i4").stop().animate({right:"-50px"}, "normal");
        });
	
	$(".p5, .i5").hover(function(){
		$(".i5").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i5").stop().animate({right:"-50px"}, "normal");
        });
	
	$(".p6, .i6").hover(function(){
		$(".i6").stop().animate({right:"0px"}, "normal");
		}, function(){
                $(".i6").stop().animate({right:"-50px"}, "normal");
        });
	
	$("#sidebar_top").toggle(function(){
		$("#content_sidebar").stop().animate({left:"-260px"}, "normal");
		$("#sidebar_top").addClass("active");
		}, function(){
                $("#content_sidebar").stop().animate({left:"0px"}, "normal");
		$("#sidebar_top").removeClass("active");
        });
	
	$(".more").toggle(function(){
		$(".more").addClass("active");
		$('#toggle img').fadeIn();
		}, function(){
		$('#toggle img').fadeOut();
		$(".more").removeClass("active");
	});
	
	$(".top").click(function(){
		$.scrollTo(0,2000,{queue:true});
	
	});
	
});