$(document).ready(function() { $(".x-img-over").each( function() { var orgurl = ""; $(this).mouseover(function() { orgurl = this.src; var newurl=this.src.replace(/\.([^\.]*)$/,"-ovr.$1"); if (this.id.indexOf('over_')==0) newurl = newurl.replace(/\/\d+_([^\/]*)/,"/"+this.id.split('_')[1]+"_$1"); this.src = newurl; }); $(this).mouseout(function() { this.src = orgurl; }); } ); /* NEWSLETTER SIGNUP */ $(".sidebarform_btn").click(function() { if ( $(this).next().css("display") == "none" ) { $(this).next().slideDown(); } else { $(this).next().slideUp(); }; }); $("#subForm").submit(function() { $("#newslettersignup").slideUp(); return true }); /* $("#newslettersignup input.button").click(function() { $("#newslettersignup").slideUp('normal', function() { }); $("#newslettersignup input.txt_inp").each(function() { $(this).attr("value", ""); }); }); */ /* SHOW ON MY BLOG */ $("#urlForm").submit(function() { var urlVal = $("#url").val(); var actUrl = "../show-on-my-blog?the_blog_url=" + urlVal; $(this).attr("action", actUrl); return true }); });