function skinInit() {
    //jQuery.noConflict();
    setTopCont();
    jQuery("*[id='RibbonBar.ascx_cmdVisibility']").click(function () { setTopCont() });


    jQuery(window).load(function () {
        var hCentr = jQuery("div.centrale").height();
        var hLeft = jQuery("div.colonna_sx").height()
        var hRight = jQuery("div.colonna_dx").height()
        //alert(hCentr+' '+hLeft+' '+hRight);
        hCentr = Math.max(hCentr, hRight, hLeft);
        //alert(hCentr);
        jQuery("div.centrale").height(hCentr);
        jQuery("div.colonna_sx").height(hCentr);
        jQuery("div.colonna_dx").height(hCentr);

        //alert(jQuery.browser.version.substr(0,1));



        if (jQuery.browser.msie && jQuery.browser.version.substr(0, 1) == 7) {
            jQuery("div.piede").css('background-image', 'none');
            jQuery("div.cont_copy").css('margin-top', '-85px');

        }


    });
    }


function setTopCont() {
    if (jQuery(".ControlPanel")) {

        jQuery("#cont").offset({ top: jQuery(".ControlPanel").height(), left: 0 });
        jQuery("#cont").scrollTop(jQuery("#cont").scrollTop() + jQuery(".ControlPanel").height());
    }
}


function scrollToStore(itemIndex) {
    //alert(itemIndex);
    
    var target = jQuery("div.fos_data_list").find("#store" + itemIndex);
    //alert(target.html());
    jQuery("div.fos_data_list")._scrollable();
    jQuery("div.fos_data_list").stop().scrollTo(target, { offset: { top: -70} });
}

function SkinPopUp() {


        //alert('caricata!');
        // select the overlay element - and "make it an overlay"
        jQuery("#facebox").overlay({

            // custom top position
            top: '5%',
            //left: 'center',

            speed: 2000,

            // some mask tweaks suitable for facebox-looking dialogs

            mask: {

                // you might also consider a "transparent" color for the mask
                color: '#000',

                // load mask a little faster
                loadSpeed: 2000,

                // very transparent
                opacity: 0.7
            },

            // disable this for modal dialog-type of overlays
            //closeOnClick: false,

            // load it immediately after the construction
            load: true

        });
  

}
