jQuery(function($) {
var timer;
function hover_lingua(event)
{
    $(".lingua_img").stop().animate({"top":-10,"left":-15,"width":170,"height":108},600, "easeOutBounce", null);
}

function out_lingua(event)
{
    $(".lingua_img").stop().animate({"left":-5,"top":0,"height":92,"width":155},435, "easeOutBounce", null);
}


function hover_azienda(event)
{
    $(".aziend_img").stop().animate({"top":-10,"left":-15,"width":154,"height":108},600, "easeOutBounce", null);
}

function ActionName2(event)
{
    $(".aziend_img").stop().animate({"left":-9,"top":0,"height":92,"width":148},435, "easeOutBounce", null);
}

function hover_territorio(event)
{
    $(".territor_img").stop().animate({"top":-10,"left":-15,"width":112,"height":102},600, "easeOutBounce", null);
}

function out_territorio(event)
{
    $(".territor_img").stop().animate({"left":-5,"top":0,"height":92,"width":102},435, "easeOutBounce", null);
}

function hover_prodotti(event)
{
    $(".prod_img").stop().animate({"top":-10,"left":-15,"width":112,"height":102},600, "easeOutBounce", null);
}

function out_prodotti(event)
{
    $(".prod_img").stop().animate({"left":-5,"top":0,"height":92,"width":102},435, "easeOutBounce", null);
}


function hover_gusta(event)
{
    $(".gust_img").stop().animate({"top":-10,"left":-15,"width":192,"height":102},600, "easeOutBounce", null);
}

function out_gusta(event)
{
    $(".gust_img").stop().animate({"left":-5,"top":0,"height":92,"width":178},435, "easeOutBounce", null);
}


function hover_contatti(event)
{
    $(".cont_img").stop().animate({"top":-10,"left":-15,"width":125,"height":102},600, "easeOutBounce", null);
}

function out_contatti(event)
{
    $(".cont_img").stop().animate({"left":-5,"top":0,"height":92,"width":116},435, "easeOutBounce", null);
}

function hover_amici(event)
{
    $(".amici_img").stop().animate({"left":-15,"top":-10,"height":60,"width":105},600, "easeOutBounce", null);
}

function out_amici(event)
{
    $(".amici_img").stop().animate({"left":-5,"top":0,"height":52,"width":91},435, "easeOutBounce", null);
}

function hover_mais(event)
{
    $(".img_mais").stop().animate({"left":-15,"top":-10,"height":50,"width":158},600, "easeOutBounce", null);
}

function out_mais(event)
{
    $(".img_mais").stop().animate({"left":-5,"top":0,"height":41,"width":146},435, "easeOutBounce", null);
}
function hover_leggi_news(event)
{
    $("#leggi_news_img").stop().animate({"left":-5,"top":-5,"height":41,"width":146},335, "easeOutBounce", null);

}
function out_leggi_news(event)
{
    $("#leggi_news_img").stop().animate({"left":0,"top":0,"height":30,"width":120},300, "easeOutBounce", null);

}
$('#menu1').bind('mouseover', hover_lingua);

$('#menu1').bind('mouseout', out_lingua);



$('#menu2').bind('mouseover', hover_azienda);

$('#menu2').bind('mouseout', ActionName2);


$('#menu3').bind('mouseover', hover_territorio);

$('#menu3').bind('mouseout', out_territorio);


$('#menu4').bind('mouseover', hover_prodotti);

$('#menu4').bind('mouseout', out_prodotti);


$('#menu5').bind('mouseover',hover_gusta);

$('#menu5').bind('mouseout', out_gusta);


$('#menu6').bind('mouseover',hover_contatti);

$('#menu6').bind('mouseout', out_contatti);


$('#amici').bind('mouseover',hover_amici);

$('#amici').bind('mouseout', out_amici);


$('#mais').bind('mouseover',hover_mais);

$('#mais').bind('mouseout', out_mais);

$('#leggi_news_img').bind('mouseover', hover_leggi_news); 
$('#leggi_news_img').bind('mouseout', out_leggi_news); 


});



$(document).ready(function(){
$("#pageflip").hover(function() { //On hover...
	$("#pageflip img , .msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '307px',
			height: '300px'
		}, 500, "easeOutBounce", null);
	} , function() {
	$("#pageflip img").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '100px',
			height: '104px'
		}, 220);
	$(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '98px',
			height: '100px'
		}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
})

						   });
