// Aggancia pulsante animato Avanti
function enableNavShadowNext(imagePath) {
		
    // Append shadow image to each LI
    $("#aprilo-subito").append('<img class="shadow" src="' + imagePath + '/shadow-btn-aprilo-subito.jpg" width="391" height="96" alt="" />');

    // Animate buttons, shrink and fade shadow
    $("#aprilo-subito").hover(function() {
        var e = this;
        $(e).find("a").stop().animate({ marginTop: "0" }, 250, function() {
            $(e).find("a").animate({ marginTop: "4px" }, 250);
        });
        $(e).find("img.shadow").stop().animate({ width: "343px", height: "67px", marginLeft: "20px", opacity: 0.25 }, 250);
    }, function() {
        var e = this;
        $(e).find("a").stop().animate({ marginTop: "20px" }, 250, function() {
            $(e).find("a").animate({ marginTop: "16px" }, 250);
        });
        $(e).find("img.shadow").stop().animate({ width: "391px", height: "96px", marginLeft: "0", opacity: 1 }, 250);
    });
    
 
}

function getCookie(name, defaultValue) {
    var value = $.cookie(name);
    return (value == null) ? defaultValue : value;
}

function setCookie(name, value, cookieSettings) {
    if (cookieSettings == null) {
        cookieSettings = getDefaultCookieSettings();
    }
    $.cookie(name, value, cookieSettings);
}

function getDefaultCookieSettings() {
    return {
        expires: 0,
        path: '/'
    };
}

$(document).ready(function() {
    $('#pages-privati ul li a[title]').tooltip({
        effect: 'slide',
        position: 'center center',
        offset: [15, 0]
    });
});

/*
$(document).ready(function() {
     if (!getCookie('ad')) {
        $.fancybox(
            '<div class="ad"><p>E\' nato rendimax Like, la nuova soluzione di risparmio nata dai social network.' +
                '<br /><br />Visita il sito web dedicato: <a href="http://like.rendimax.it">rendimax Like</a>.</p></div>',
            {
                'autoDimensions': false,
                'width': 480,
                'height': 'auto',
                'transitionIn': 'none',
                'transitionOut': 'none',
                onComplete: function(){
                    setCookie('ad', '1');
                    //setTimeout ('$.fancybox.close ()', 10000);
                }
            }
        );
     }
});
*/
