$(function(){var c="Oops, something went wrong. Please try again later.",b="show_flag_box";$(".flag_title").click(function(d){d.preventDefault();$(".response_flag").toggleClass(b);$("a",$(this)).blur()});function a(){$(".response_flag").addClass("flag-error").text(c)}$(".flag_button").click(function(d){$.ajax({url:window.location.href+"/flag",type:"POST",data:{flag_id:$("select",$(".flag_options")).val()},success:function(e,f){window.location.href=e},error:function(g,f,h){$(".response_flag").removeClass(b);a()}})});$(".dismiss",$(".flagged")).click(function(d){d.preventDefault();$.ajax({url:window.location.href+"/unflag",type:"DELETE",success:function(e,f){window.location.href=e},error:function(g,f,h){a()}})})});
