var LANGUAGE_CODE="en";var LANGUAGE_BIDI=false;var catalog=new Array();function pluralidx(a){return(a==1)?0:1}function gettext(a){var b=catalog[a];if(typeof(b)=="undefined"){return a}else{return(typeof(b)=="string")?b:b[0]}}function ngettext(b,a,c){value=catalog[b];if(typeof(value)=="undefined"){return(c==1)?b:a}else{return value[pluralidx(c)]}}function gettext_noop(a){return a}function interpolate(b,c,a){if(a){return b.replace(/%\(\w+\)s/g,function(d){return String(c[d.slice(2,-2)])})}else{return b.replace(/%s/g,function(d){return String(c.shift())})}}window.hgettext=function(a){return gettext(a)};window.hngettext=function(b,a,c){return ngettext(b,a,c)};jQuery.fn.content_save=function(c,b){var a=jQuery(this);jQuery.extend(a,{content_id:c,is_saved:b,saved_event_name:"content_saved_"+c,unsaved_event_name:"content_unsaved_"+c,saved_text:"unsave",unsaved_text:"save"});var d=(a.is_saved)?a.saved_text:a.unsaved_text;a.html(d);$(document).bind(a.saved_event_name,function(f){a.is_saved=true;a.html(a.saved_text)});$(document).bind(a.unsaved_event_name,function(f){a.is_saved=false;a.html(a.unsaved_text)});a.click(function(g){g.preventDefault();var f=(a.is_saved)?"/saved_content/unsave/"+a.content_id+"/":"/saved_content/save/"+a.content_id+"/";var e=(a.is_saved)?a.unsaved_event_name:a.saved_event_name;$.ajax({type:"GET",url:f,success:function(h){$(document).trigger(e)},error:function(h){if(h.status&&h.status>0){alert("Sorry, we're having some difficulties right now, please try back later")}}});$("#banner-tools-toggle").addClass("emptyElement")});return this};
