﻿$(document).ready(function() {
    $('.boxSottoGalleryInterna').append('<div class="clear"><!-- --></div>');

    $('#rotatorGallery')
    .cycle({
        fx: 'scrollHorz',
        sync: 1,
        speed: 2000,
        timeout: 0,
        //pager: '#navGallery',
        next: '#nextImg',
        prev: '#prevImg'
    });

    $('#rotatorGallery .imgGallery').mouseover(function() {
        $('#rotatorGallery').cycle('pause');
    }).mouseout(function() {
        $('#rotatorGallery').cycle('resume');
    });


    $('#rotatorOfferte')
    .cycle({
        fx: 'fade',
        timeout: 4500,
        pause: 1,
        sync: 1,
        pager: '#navOfferte'
    });

    console.log($('#Content_BoxInEvidenza').size());

    $('#Content_BoxInEvidenza')
    .cycle({
        fx: 'fade',
        timeout: 4500,
        sync: 1
    });
    
    console.log($('#Content_BoxInEvidenza').size());

    if ($('#rotatorGallery .imgGallery').size() > 1) $('.freccetteGallery').show();
});


$(function() {
    $("a[rel]").overlay({
        expose: 'black',
        effect: 'apple',
        onBeforeLoad: function() {
            var wrap = this.getContent().find(".contentWrap");
            wrap.load("/popup/VideoPop.aspx?a=" + this.getTrigger().attr("href"));
        },
        onBeforeClose: function() {
            document.getElementById("contentWrapID").innerHTML = '';
        }

    });
});

function load() {
}

function GUnload() {
}


