// slide packnews function slidePacknews(){ $('#packnews ul').toggle("slow"); } //funciones el secreto function ac_secreto(){ $('.secreto_slide').hover(function(){$(this).children().animate({borderBottomWidth: "10px", borderTopWidth: "10px"}, 200); }, function(){ $(this).children().animate({borderBottomWidth: "0", borderTopWidth: "0"}, 200); }); } function ac_legado(variable1, variable2){ $(".variable1 p, .variable2 p").hide(); $(".variable1 h3").click(function(){ $(".variable2").css('background', 'url(../common/css/img/arrows1.gif) no-repeat 0 15px'); $(".variable1").css('background', 'url(../common/css/img/arrows2.gif) no-repeat 0 15px'); $(".variable2 p").slideUp({ duration: 1000, easing: "easeOutCubic", complete: function(){ $(".variable1 p").slideDown({ duration: 1000, easing: "easeOutCubic" });} }); }); $(".variable2 h3").click(function(){ $(".variable1").css('background', 'url(../common/css/img/arrows1.gif) no-repeat 0 15px'); $(".variable2").css('background', 'url(../common/css/img/arrows2.gif) no-repeat 0 15px'); $(".variable1 p").slideUp({ duration: 1000, easing: "easeOutCubic", complete: function(){ $(".variable2 p").slideDown({ duration: 1000, easing: "easeOutCubic" });} }); }); } // carousel branding & naming function carousel(){ $('.this a').each(function(){ var link = $(this).attr("href"); var linki = link + "_i"; var linka = archivo + ".html"; $(this).attr({ href: "javascript:void(0);"}); $(this).click(function(){ foto = 0; $('.jcar').stop().scrollTo( link, 800 ); $('.i_jcar').stop().scrollTo( linki, 800, {onAfter:function(link){ var dire = $(this).children(linki); if(dire.hasClass("ajax")){ $.ajax({ beforeSend: function(){ dire.html(''); }, url: linka, cache: false, success: function(html){ dire.html('').append(html); // slashs submenu $('#numbers li:not(.pagina) + li').each(function() { $(this).css({'background' : 'url(css/txt_es/slash.gif) no-repeat left center', 'padding-left' : '18px'}); }); } }); } } } ); }) }); } ////// --- cuando carga ---- /////// $(document).ready(function(){ $('#packnews ul').hide(); $('#packnews_b').click(function(){ $('#packnews ul').toggle("slow"); }); // movimiento packnews $('#packnews_b').css( {backgroundPosition: "0 0"} ).mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0 -24px)"}, {duration:500}) }).mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0 -24px)"}, {duration:200, complete:function(){ $(this).css({backgroundPosition: "0 0"}) }}); }); // slashs submenu $('#footer:not(.foot_index) ul li + ').each(function() { $(this).css({'background' : 'url(css/txt_ar/slash2.gif) no-repeat left center', 'padding-left' : '12px'}); }); $('.foot_index ul li + ').each(function() { $(this).css({'background' : 'url(site/css/txt_ar/slash2.gif) no-repeat left center', 'padding-left' : '12px'}); }); // reemplazo titulos $('h2.img').each(function replaceImg() { string = $(this).text(); filename = string.toLowerCase().replace(/ /g, '').replace(/([^0-9a-z-])/g,''); if(!filename) filename = 'contacto'; $(this).html(''); }); // reemplazo submenu $('.submenu a').each(function() { longitud = $(this).width(); mlongitud = longitud * 1.2; titul = $(this).text(); archiv = titul.toLowerCase().replace(/ /g, '').replace(/([^0-9a-z-])/g,''); $(this).css({'width' : mlongitud, 'height' : '15px' , 'background' : 'url(css/txt_es/m/' + archiv + '.gif) no-repeat', 'display' : 'block'}).html(''); if(titul == "crear, extender y revitaliza"){titul = "crear, extender y revitalizar"} $(this).attr({title: titul}); }); // movimiento submenu $('.submenu li:not(.current) a').css( {backgroundPosition: "0 0"} ).mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0 -15px)"}, {duration:300}) }).mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0 -15px)"}, {duration:150, complete:function(){ $(this).css({backgroundPosition: "0 0"}) }}); }); // reemplazo this $('.this_look').each(function() { longitud = $(this).width(); mlongitud = longitud * 1.2; titulo = $(this).text(); archivo = titulo.toLowerCase().replace(/ /g, '').replace(/([^0-9a-z-])/g,''); $(this).css({'width' : mlongitud, 'height' : '15px' , 'background' : 'url(css/txt_es/this/' + archivo + '.gif) no-repeat', 'display' : 'block'}).html(''); $(this).attr({ href: "#car" + archivo }); }); // animación vertical this $('.this_look').hover(function(){ $(this).animate({backgroundPosition:"(5px 0)"}, {duration:200}); },function(){ $(this).animate({backgroundPosition:"(0 0)"}, {duration:200}); }); // slashs submenu $('.submenu li + ').each(function() { $(this).css({'background' : 'url(css/txt_es/slash.gif) no-repeat left center', 'padding-left' : '16px'}); }); // hover submenu $('.submenu li:not(.current) a').mouseover(function(){ $(this).css("background-position", "0 -15px"); }); $('.submenu li:not(.current) a').mouseout(function(){ $(this).css("background-position", "0 0"); }); // current submenu $('.submenu li.current a').css("background-position", "0 -15px"); // slashs numbers $('#numbers li:not(.pagina) + li').each(function() { $(this).css({'background' : 'url(css/txt_es/slash.gif) no-repeat left center', 'padding-left' : '18px'}); }); // movimiento menú mini $('.mini a.open').css( {backgroundPosition: "0 0"} ).mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0 -21px)"}, {duration:500}) }).mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0 -21px)"}, {duration:200, complete:function(){ $(this).css({backgroundPosition: "0 0"}) }}); }); // link contacto $('#footer a.thickbox').attr("href" , "contacto.php?lang=es&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=520&width=790&modal=true" ); // cmabio color destacados chicos $('.destacado_chico a:not(.no)').hover( function(){ $(this).animate({backgroundColor: '#f15922', Color: '#e7ecac'}, {duration:500}); $(this).children('h2').animate({Color: '#e7ecac'}, {duration:500}); $(this).children('p').animate({Color: '#292e32'}, {duration:500}); }, function(){ $(this).animate({backgroundColor: '#292e32', Color: '#657275'}, {duration:500}); $(this).children('h2').animate({Color: '#f15922'}, {duration:500}); $(this).children('h2').animate({Color: '#657275'}, {duration:500}); }); });