﻿var velocidad = 15000; $(document).ready(function() { $("#main-menu li").hover(function() { $(this).find('.submenu').stop().css({ 'height': '', 'padding-top': '', 'padding-bottom': '' }).slideDown(200); }, function() { jQuery(this).find('.submenu').stop().slideUp(200); }); }); var timer
var arreglo_datos
$(document).ready(function() { slideshow_home(); }); function slideshow_home() {
    clearTimeout(timer); $(".derecha").hide(); arreglo_datos = new Array(); var i = 0; $(".abs ul li").each(function() { arreglo_datos[i] = $(this).find("a").attr('class'); i++; }); if (arreglo_datos.length != 0) {
        $("#info_div").html(arreglo_datos[$("#hidden_servicio_selecc").html()]); var arreglo_datos_separados = new Array(); arreglo_datos_separados = $("#info_div").html().split("{-}"); $(".slideshow_titulo").text(htmlDecode(arreglo_datos_separados[2])); var decodif = htmlDecode(arreglo_datos_separados[3]); $(".slideshow_contenido").text(decodif); $("#img_slideshow").removeAttr("src"); $("#img_slideshow").removeAttr("alt"); $("#img_slideshow").attr("src", arreglo_datos_separados[1]); $("#img_slideshow").attr("alt", arreglo_datos_separados[2]); $(".slideshow_readmore a").removeAttr("href"); $(".slideshow_readmore a").removeAttr("title")
        $(".slideshow_readmore a").attr("href", arreglo_datos_separados[0]); if ($("#hidden_servicio_selecc").html() < (arreglo_datos.length - 1))
            $("#hidden_servicio_selecc").html(parseInt($("#hidden_servicio_selecc").html()) + 1); else
            $("#hidden_servicio_selecc").html("0"); $(".derecha").fadeToggle(800); timer = setTimeout("continua()", velocidad);
    }
    else { $(".slideshow_titulo").text("No Posts Found :("); $(".derecha").fadeToggle(800); } 
}
function continua() { var p = $("#home_a_" + $("#hidden_servicio_selecc").html()); var position = p.position(); $(".seleccionador_slideshow_home").stop().animate({ 'top': (position.top + 16) + 'px' }, 'slow'); slideshow_home(); }
function btn_click(btn) { clearTimeout(timer); $("#hidden_servicio_selecc").html(btn); continua() }
function htmlEncode(value) { return $('<div/>').text(value).html(); }
function htmlDecode(value) { return $('<div/>').html(value).text(); }
$(document).ready(function() { $(".submenu").css({ 'display': 'block' }); setHeight('.submenu ul li'); $(".submenu").css({ 'display': 'none' }); setHeight('.customers'); }); function setHeight(column) {
    var currentTallest = 0, currentRowStart = 0, rowDivs = new Array(), $el, topPosition = 0; $(column).each(function() {
        $el = $(this); topPostion = $el.position().top; if (currentRowStart != topPostion) {
            for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { rowDivs[currentDiv].height(currentTallest); }
            rowDivs.length = 0; currentRowStart = topPostion; currentTallest = $el.height(); rowDivs.push($el);
        } else { rowDivs.push($el); currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); }
        for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { rowDivs[currentDiv].height(currentTallest); } 
    });
}
