(function($){$.fn.borderToggler=function(){var $links=$("div#prototype_preview_image a");var bordersOn=function(){return $.cookie('show_borders')=="true";};var updateBorders=function(){$links.css({border:bordersOn()?"2px dotted #67A8B4":"none"});};updateBorders();return this.each(function(){if(bordersOn()&&!this.checked){this.click();}
$(this).change(function(){$.cookie('show_borders',this.checked,{path:'/'});updateBorders();});});};$.fn.feedbackOnToggler=function(){this.livequery('change',function(){var id=$('input:radio:checked[name="comment[commentable_type]"]').attr('data-id');$('input#comment_commentable_id').val(id);});return this;};})(jQuery);