var apertoVideo=true;
var apertoPhoto=true;

$(window).load(function(e) {	
    // LINKS FADE NEL FOOTER
    $("#share ul#icone li").hover(function() {
        $(this).stop(true);
        $(this).fadeTo("fast",0.2);		
    }, function() {
        $(this).fadeTo("fast",1);
    });	
// *********************
});


function send() {
    window.open('/photocontest/send.jsp?url=http://www.monster.ducati.com','send','toolbar=0,status=0,width=626,height=536');
}
function fbs_click() {
    u=location.href; 
    t=document.title;
    window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
    return false;
}
function eLog(msg){
    
    $("div#statusbar").html("<p>Log:"+msg+"</p>");
}


function galleryMore(str){
    $("#"+str+"gallery-more").toggle("slow");
    if (apertoPhoto){
        $("#photocontatore").html("44/44");
        // $("#videocontatore").html("7/7");
        apertoPhoto=false;
    }
    else{
        $("#photocontatore").html("10/45");
        // $("#videocontatore").html("5/7");
        apertoPhoto=true;
    }
   

}


function M795galleryMore(str){
    $("#"+str+"gallery-more").toggle("slow");
    if (apertoPhoto){
        $("#photocontatore").html("14/14");
        // $("#videocontatore").html("7/7");
        apertoPhoto=false;
    }
    else{
        $("#photocontatore").html("10/14");
        // $("#videocontatore").html("5/7");
        apertoPhoto=true;
    }
   

}

var extraOpen=true;
$(document).ready(function(){
    // EXTRA BUTTON
    $(".button-more").click(function(){
        if(extraOpen){
            $(".button-more").css("background","url('img/back-top-more-close.png') no-repeat scroll right 0 transparent");
            extraOpen=false;
            $(".button-more").html("CLOSE");
            
        }else{
            $(".button-more").css("background","url('img/back-top-more-close.png') no-repeat scroll -80px 0 transparent");
            extraOpen=true;
            $(".button-more").html("MORE");
        }
    });
});
