﻿// JScript File
$(document).ready(function() 
{
/*
    $(".wrap").hide();
    if ($(window).width() < 1025)
    {
        $(".wrap").width(1000);
        $(".imgfondocab img").width(1000);
        $(".con").width(552);
        $(".izq").width(192);
    }
*/
    $(".wrap").show();

//    $(".con").append($("#pnadd").html());
    $("#pnadd").appendTo(".wTextoGen");    
    $("#pnadd").show();
    
    $("#pnlog").appendTo(".bolet");    
    $("#pnlog").show();
    
    $(".hovlst").toggle(function(){
        $(this).next().hide();
    },function(){
        $(this).next().show();
    });
    
    $(".wmen").hover(function(){
        $(this).addClass("gris");
        var offset = $(this).offset();
        $(this).children(".subEmp").css("left", offset.left + 2);
        $(this).children(".subEmp").css("top", offset.top + 30);
        if ($(this).children(".subEmp").children("div").length > 0) $(this).children(".subEmp").show();
    },function(){
        $(this).removeClass("gris");
        $(this).children(".subEmp").hide();
    });
    
    $(".lblE").bind("mouseenter",function(){
        $(".txtE").fadeOut("slow");
        $(".lblE").fadeIn("slow");
        $(this).hide();
        $("#" + $(this).attr("id") + "T").fadeIn("slow");
    });
    
    $(".txtE").bind("click",function(){
        $(".lblE").show();
        $(this).hide();
    });

    $("#i18n-links a").click(function(){
        var idioma = $(this).attr("idioma");
         $.ajax({
           type: "POST",
           url: "setidioma.aspx",
           data: "id=" + idioma,
           success: function(msg){
             //refrescar la pagina
             window.location.reload();
           }
         });
    
    });

    $(".path a:last").hide();

    itemsPerPage = 6;
    if ($("#pagconsum").children().length > itemsPerPage) $("#pagconsum").pagination();
//    $(".subEmp").bind("mouseleave", function(){
//      $(this).hide();
//    });

//    $('.serv .divMenu').hide();
//    $('.selmen .divMenu').show();
//    $('#10822 .divMenu').show();
    
//    $(".wmen").hover(function(){
//        $(this).children(".divMenu").show(300);
//    },function(){
//        //$(this).children(".divMenu").hide();
//    });

//    $(".path a:last").hover(
//      function () {
//        $(".izq").show();
//      },
//      function () {
//        //$(".izq").hide();
//      }
//    );

//    if ($(".izq").length > 0)
//    {
//        if ($(".izq").html().length > 0) 
//            {$(".izq").height($(".central").height() - 6);}
//        else
//            {$(".InfoCen").width(860);}
//    }

});
