//INICIALIZAR VARIABLES
var esIE = false;
var scriptIE6 = "";
if (navigator.appVersion.indexOf("MSIE") != -1) {esIE = true;}
swIE60 = (navigator.appVersion.indexOf("6.0") != -1)?1:0;	//funcionalidades exclusivas para IE6
swIE80 = (navigator.appVersion.indexOf("8.0") != -1);		//Si es explorer 8 esta variable toma valor true, en caso contrario tomara false*
var newStyle = "<style>";var endStyle = "</style>";
    newStyle+=".contentsuperdestacados { background:transparent; height:281px;}";
document.write(newStyle+endStyle);

var nueva = {
    load:function(){
        $("#date > a.nueva").click(function(){
            if (navigator.appName == "Netscape"){
                open('firefox.html', '', 'width=500,height=200,scrollbars=yes,resizable=yes,toolbar=no');
            }else if (navigator.appName.indexOf("Explorer") != -1) {
                document.location.reload();
            }
            return false;
        });
    }
}

var nestor = {
	load:function(){
		$('.acc_container').hide();
		$('.acc_trigger:first')
			.addClass('active')
			.next()
			.show();
			$('.acc_trigger').click(function(){
				//alert("hola");
				if( $(this).next().is(':hidden') ) {
					$('.acc_trigger').removeClass('active').next().slideUp();
					$(this).toggleClass('active').next().slideDown();
				}else{
					$(this).toggleClass('active').next().slideUp();
				}
				return false;
			});
    }
}

var init = {
    funciones:function(){
    	$.ifixpng('/images/blank.gif');
        $("img[src$=.png]").ifixpng();
        $("input[type='image']").ifixpng().css('cursor','pointer');

        $("#mycarousel").jcarousel();
        $("#mycarousel_galeria").jcarousel();
        $("#mycarousel_promociones").jcarousel();
        $(".tab_content").hide();
        $(".tab_content:first").show();
        $(".thumb a:first, .thumb2 a:first").addClass("active");
        $(".thumb a, .thumb2 a").click(function(e) {
            e.preventDefault();
            $(".thumb a, .thumb2 a").removeClass("active");
            $(this).addClass("active");
            $(".tab_content").hide();
            var activeTab = $(this).attr("href");
            $(activeTab).fadeIn();
        });

        if($("#date").size()!=0) {nueva.load(0);}
		if($("#acordeon").size()!=0) {nestor.load(0);}
		
		$('#gallery a').lightBox();
		
		
        /* (navigator.appName == "Netscape"){
            open('firefox.html', '', 'width=500,height=200,scrollbars=yes,resizable=yes,toolbar=no');
        }else if (navigator.appName.indexOf("Explorer") != -1) {
            document.location.reload()
        }*/

        /*TopUp.addPresets({
            "#images a": {
                fixed: 0,
                group: "images",
                modal: 0,
                title: "OBK"
            },
            "#movies": {
                resizable: 0
            }
        });*/
    }
}
$(document).ready(init.funciones);
