$(document).ready(function(){ //Select text inside field (for copying urls) $("#select_field").focus(function(){ if(this.value == this.defaultValue){ this.select(); } } ); //Menu rollover $("#menu_overlay img").hover( function(){ this.src = this.src.replace("_off","_on"); },function(){ this.src = this.src.replace("_on","_off"); } ); //Check all $('#checkall').click(function () { $(this).parents().find(':checkbox').attr('checked', this.checked); }); //Close vars $(".close").click( function () { $(this).parent().fadeTo('fast', 0, function () { $(this).slideUp(600); }); return false; } ); //Image gallery $("div.scrollable").scrollable({ size: 3 }); $(".items img").click(function() { // calclulate large image's URL based on the thumbnail URL (flickr specific) var url = $(this).attr("src").replace("_thumb", "_med"); // get handle to element that wraps the image and make it semitransparent var wrap = $("#image_wrap").fadeTo("medium", 0.5); // the large image from flickr var img = new Image(); // call this function after it's loaded img.onload = function() { // make wrapper fully visible wrap.fadeTo("fast", 1); // change the image wrap.find("img").attr("src", url); }; // begin loading the image from flickr img.src = url; // when page loads simulate a "click" on the first image }).filter(":first").click(); //Anuncios recientes cycle para portada $('#anuncios_recientes').cycle({ timeout:7000, fx: 'scrollDown' }); //Los mas vistos cycle para portada $('.mas_vistos_0').cycle({ timeout:10000, delay:0, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_2').cycle({ timeout:10000, delay:50, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_4').cycle({ timeout:10000, delay:100, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_6').cycle({ timeout:10000, delay:150, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_8').cycle({ timeout:10000, delay:200, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_10').cycle({ timeout:10000, delay:250, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_12').cycle({ timeout:10000, delay:300, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_14').cycle({ timeout:10000, delay:350, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_16').cycle({ timeout:10000, delay:400, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_18').cycle({ timeout:10000, delay:450, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_20').cycle({ timeout:10000, delay:500, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_22').cycle({ timeout:10000, delay:550, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_24').cycle({ timeout:10000, delay:600, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_26').cycle({ timeout:10000, delay:650, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_28').cycle({ timeout:10000, delay:700, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_30').cycle({ timeout:10000, delay:750, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_32').cycle({ timeout:10000, delay:800, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_34').cycle({ timeout:10000, delay:850, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_36').cycle({ timeout:10000, delay:900, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_38').cycle({ timeout:10000, delay:950, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_40').cycle({ timeout:10000, delay:1000, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_42').cycle({ timeout:10000, delay:1050, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_44').cycle({ timeout:10000, delay:1100, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_46').cycle({ timeout:10000, delay:1150, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); $('.mas_vistos_48').cycle({ timeout:10000, delay:1200, fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc... }); });