$(function() {
	//alert("antes:"+$('.news ul').width());
	$('.news ul').jScrollPane({scrollbarWidth: 9,dragMinHeight: 94,dragMaxHeight:94});

	/* SQUARE */
	$(".recentProjects ul li").each(function() {
		$(this).hover(
			function() {
				$(".data",this).stop();
				$(".data",this).animate({'top': '0px'},500)
			},
			function() {
				$(".data",this).stop();
				$(".data",this).animate({'top': '91px'},500)
			}						
		)					
	});	
	
	/* RECENT PROJECTS */
	$(".recentProjects li").each(function() {
		$(this).attr("href",$("a",this).attr("href"));
		$(this).click(function() {
			window.location.href=$(this).attr("href");
		})
	})
	
	/* PRELOADER */
	$(".recentProjects ul").preload({loaderImage: "i/ajax-loaderBlack.gif",marginTop: 25});
	
	/* NEWSLETTER */
	$(".newsletter form li input").focus(function() {
		$(this).val("");
		$(this).unbind("focus");
	})

	/* RSS BUTTONS */
	$.preloadImages("i/rssOver.png");
	$("#home .rss").hover(
		function() {
			$("img",this).attr("src","i/rssOver.png");
		},
		function() {
			$("img",this).attr("src","i/rss.png");
		}
	)
	
	/* PARTNERS */
	$.preloadImages("i/partners/behance_on.png","i/partners/selectG_on.png","i/partners/domestika_on.png","i/partners/ameets_on.png","i/partners/tv_on.png","i/partners/facebook_on.png","i/partners/promsite_on.png");
	$(".partners li a ").hover(
		function() {
			$("img",this).attr("src", $("img",this).attr("src").replace("_off","_on"));			
		},
		function() {
			$("img",this).attr("src", $("img",this).attr("src").replace("_on","_off"));	
		}
	)
	
})
