
function loadsucursal (estado, titulosuc, carpeta, de, hasta){       
    
    var div = $("#popup_contenido");
    var icoloading = $("#sucloading");
        
    if(estado  != false) { 
        
        $("#popup_contenido .sucursal").each(function() { $(this).remove(); });
        
        var altotal = $("#interna").height();
        icoloading.show();
                
        $("#popup_contenido").html("<h2>"+titulosuc+"</h2>");
        
        $.ajax({
            url: "thumb_locales.php?carpeta="+carpeta+"&de="+de+"&hasta="+hasta,
            cache: true,
            success: function(cont){
                div.append(cont);
                                   
                $("#popup_locales").fadeIn("slow", function () {
                    icoloading.hide();
                });
                $('.lightbox').lightBox({fixedNavigation:true});
            }
        });
        
    }  else {
            $("#popup_locales").fadeOut("slow", function () {
            $("#popup_contenido .sucursal").each(function() { $(this).remove(); });   
        });
    }
    
}

function prod_izq() {
   
    $("#prod_izq ul li a").each(function () {
        $(this).click(function() {
            $("#prod_izq ul li ul").each(function () {   $(this).slideUp("slow");   });
            var li = $(this).parent();
            li.children("ul").slideDown("slow");
        });
    });

}

$(document).ready(function () {       
               
        $('#banner_slide').after('<div id="nav" class="nav">').cycle({
                fx: 'fade',
                speed:  'slow',
                timeout: 2000,
                pager:  '#nav'
                //before: onBefore
        });
        
        var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", { imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif" });
        
});
