// Base gestiona scrollable per portfolio
$(document).ready(function() {
$("#main_gallery").scrollable({
	interval: 10,
	size: 1,
    speed: 1500, // optional
	vertical: true,
	circular: true, 
	easing: "swing" ,
	keyboard: 'static',
	next: ".nextPage",
	prev: ".prevPage", 
 	onSeek: function(event, i) {
		horizontal.eq(i).data("scrollable").focus();
		info_popRESET();
	}
	
		    	
}).navigator("#main_navi");
var horizontal = $(".scrollable").scrollable({ circular: true }).navigator(".navi");
horizontal.eq(0).data("scrollable").focus();
	$(".prevPage").hover(
		function()
		    {
      	//	$("#Pprev").stop(true).animate({left: "50px"}, 150);
      		},
		function()
		    {
      	//	$("#Pprev").stop(true).animate({left: "45px"}, 150);
      		}
       );
	
	$(".nextPage").hover(
		function()
		    {
      	//	$("#Pnext").stop(true).animate({right: "50px"}, 150);
      		},
		function()
		    {
      	//	$("#Pnext").stop(true).animate({right: "45px"}, 150);
      		}
       );
});

function info_popON(nDiv)
{
    info_popRESET();
    var bottone =  $("#info_I_" + nDiv).offset();
    $("#info_wind_" + nDiv).css({top: '50', left: bottone.left - 6}); 
    $("#info_wind_" + nDiv).show('100');
}
function info_popRESET()
{
    var NumInfo=8; //attenzione numero gallery
    for(var i=1; i<NumInfo+1;i++){
        $("#info_wind_" + i).hide("500");
    }
}

$(document).ready(function () {
    var NumInfo=7; //attenzione numero gallery
    for(var i=1; i<NumInfo+1;i++){
         $("#info_wind_" + i).click(function () {
              info_popRESET();
         });

    }
});
