
$(document).ready(function(){
    
    var $brands = $("#menuBrands"),
    $brandsUl = $brands.find("ul");
    
    $brands.hover(function() {
        $brandsUl.stop(true, true).fadeIn();
    }, function () {
        setTimeout(function() {$brandsUl.stop(true, true).fadeOut();}, 450);
    });
    
    var $products = $("#menuProducts"),
    $productsUl = $products.find("ul");
    
    $products.hover(function() {
        $productsUl.stop(true, true).fadeIn();
    }, function () {
        setTimeout(function() {$productsUl.stop(true, true).fadeOut();}, 450);
    });

    var brandsMargin = ( $('#web').width() - $('#brands-cover').width() ) / 2;
    $('#brands-cover').css('margin-left', brandsMargin+'px');
    
    /*
    $("#mapa-link").hover(function() {
        $("#mapa").stop(true, true).fadeIn();
    }, function () {
        setTimeout(function() {$("#mapa").stop(true, true).fadeOut();}, 450);
    });
    */
  
  	  $('a.lightbox').lightBox({
		overlayBgColor:     "#444",
		overlayOpacity:     0.7,
		fixedNavigation: false,
		imageLoading: '/repository/js/lightbox/images/lightbox-ico-loading2.gif',
		imageBtnClose: '/repository/js/lightbox/images/lightbox-btn-close.gif',
		imageBtnPrev: '/repository/js/lightbox/images/lightbox-btn-prev.gif',
		imageBtnNext: '/repository/js/lightbox/images/lightbox-btn-next.gif'
	  });
    
}); 

function l(s){if(window.console && window.console.log){window.console.log(s);}}

