﻿/**
* --------------------------------------------------------------------
* Menu tipo 1: menu a discesa
* CMS
* versione          1.0.3
* by                Luigi Gaeta
* modificato il 24/1/2012
* --------------------------------------------------------------------
*/

$(document).ready(function() {
    /*
    $("ul.sf-menu").superfish(
    {
    autoArrows: false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
    dropShadows: false,  //ATTENZIONE: è stata remmata nella versione 1.0.2 il 23/1/2012
    delay: 200,
    animation: { opacity: 'show', height: 'show' },
    speed: 'slow'               //'fast'  --- completely disable drop shadows by setting this to false 
    });
    */
    for (var i = 0; i < $("ul.sf-menu").length; i++) {
        var unMenu = $("ul.sf-menu:eq(" + i.toString() + ")");
        var ombra = unMenu.attr("ombra");
        unMenu.superfish({
            autoArrows: false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance
            dropShadows: (ombra == "1" ? true : false),
            delay: 200,
            animation: { opacity: 'show', height: 'show' },
            speed: 'slow'               //'fast'  --- completely disable drop shadows by setting this to false 
        });
    }
    // Bug fix IE7 menu a discesa
    if ($.browser.msie && $.browser.version <= 7) {
        //$("#ctl00_zonHeader_zona_header1_header").addClass("IEbugfixed");
        $("ul.sf-menu").parents(".selettore_zona_header,.selettore_zona_centrale").addClass("IEbugfixed");
    }
    //Infine deve assegnare alla zona contenitore uno z-index maggiore delle altre (per ora sono tutte a zero, quindi è sufficiente impostare 1)
    $("ul.sf-menu").parents(".selettore_zona_header,.selettore_zona_centrale").css("z-index", "1");
});

