/**
 * Endesia
 *
 * JS enhancements for cuomolimo.it
 * Dev by domenico maresca - domenicomaresca@endesia.it
 */
$(function(){
	$('a.new').click(function(){
		window.open($(this).attr('href'));
		return false;
	});

	$('a.fancybox').fancybox({
		zoomSpeedIn: 500,
		zoomSpeedOut: 500,
		frameWidth: 640,
		frameHeight: 480,
		overlayOpacity: 0.35,
		overlayColor: '#567A29',
		transitionIn: 'elastic',
		transitionOut: 'elastic'
	});
	
	$('#nav a').not('.active').css( {backgroundPosition: "0 0", backgroundImage: "url(/images/layout/bg-menu.png)"} )
	.mouseover(function(){
		$(this).stop().animate({backgroundPosition:"(0 -200px)"}, {duration:700})
	})
	.mouseout(function(){
		$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:700})
	});
	
	$(".datepicker").datepicker({
		showOn: 'both',
		buttonImage: '/images/layout/calendar.png',
		buttonImageOnly: true
	});
	
});
