jQuery(document).ready(function(){jQuery(".logo-link img").load(function(){jQuery('p.savings-search input[type="text"]').width(jQuery("p.savings-search").width()-jQuery('p.savings-search input[type="image"]').width()-jQuery("a.logo-link").width()-20)});jQuery("#savings-com-page .savings-com-deal-code").one("click",function(){jQuery(this).addClass("revealed");var b=jQuery(this).attr("id");var a=codes[b];if(a!=""){jQuery("img",this).replaceWith('<span class="savings-com-code-revealed">'+a+"</span>")}else{jQuery("img",this).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("div.savings-com-deal-title").one("click",function(){jQuery(this).addClass("revealed");var b=jQuery(this).next().attr("id");var a=codes[b];if(a!=""){jQuery("img",jQuery(this).next()).replaceWith('<span class="savings-com-code-revealed">'+a+"</span>")}else{jQuery("img",jQuery(this).next()).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("li.savings-com-widget-item a.savings-com-deal-merchant").one("click",function(){jQuery(this).next().addClass("revealed");var c=jQuery(this).next().attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",jQuery(this).next()).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",jQuery(this).next()).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("li.savings-com-widget-item a.savings-com-deal-title").one("click",function(){jQuery(this).prev().prev().addClass("revealed");var c=jQuery(this).prev().prev().attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",jQuery(this).prev().prev()).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",jQuery(this).prev().prev()).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("li.savings-com-widget-item a.savings-com-deal-code").one("click",function(){jQuery(this).addClass("revealed");var c=jQuery(this).attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",this).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",this).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}})});function ajaxrefresh(){jQuery("li.savings-com-widget-item a.savings-com-deal-merchant").one("click",function(){jQuery(this).next().addClass("revealed");var c=jQuery(this).next().attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",jQuery(this).next()).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",jQuery(this).next()).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("li.savings-com-widget-item a.savings-com-deal-title").one("click",function(){jQuery(this).prev().prev().addClass("revealed");var c=jQuery(this).prev().prev().attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",jQuery(this).prev().prev()).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",jQuery(this).prev().prev()).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}});jQuery("li.savings-com-widget-item a.savings-com-deal-code").one("click",function(){jQuery(this).addClass("revealed");var c=jQuery(this).attr("id");var a=c.split("widget-");c=a["1"];var b=widget_codes[c];if(b!=""){jQuery("span",this).replaceWith('<span class="savings-com-code-revealed">'+b+"</span>")}else{jQuery("span",this).replaceWith('<span class="savings-com-code-noneed">No code needed!</span>')}})};
