(function(a){a.fn.translate=function(){var d=a(this);d.each(function(){var f=a(this);var e=f.attr("data-trans");if(!!e){c(this,e)}var g=f.attr("data-placeholder");if(!!g){b(this,g)}});d.find("*[data-trans], *[data-placeholder]").each(function(){var f=a(this);if(f.attr("id")=="chosen-search-field-input"){var i=a("#chosenUserSelect").val();if(i&&i.length>0){return}}var g=f.attr("data-trans");var e=f.attr("data-trans-data");if(g!=""){c(this,g,e)}var h=f.attr("data-placeholder");if(!!h){b(this,h)}});a("*[data-transid]",d).each(function(){var f=a(this);var e=f.attr("data-transid");if(f.attr("name")=="channel"){f.find("option").each(function(){var g=a(this);if(g.val()!=0){var h=g.val().split("_");g.html(h[1]+"MHz "+a.i18n.prop(e+"_"+h[0]))}else{g.html(a.i18n.prop(e+"_0"))}})}else{f.find("option").each(function(){a(this).html(a.i18n.prop(e+"_"+a(this).attr("value")))})}});function c(g,f,e){var h;if(e==undefined){h=a.i18n.prop(f)}else{h=a.i18n.prop.apply(null,[f].concat(e.split(",")))}var i=g.nodeName.toUpperCase();if(i=="INPUT"||i=="SELECT"||i=="TEXTAREA"){a(g).val(h)}else{if(i=="BUTTON"){a(g).text(h)}else{a(g).html(h)}}}function b(f,e){var g=a.i18n.prop(e);var h=f.nodeName.toUpperCase();if(h=="INPUT"){a(f).attr("placeholder",g)}}a(".content div.row",d).each(function(){var e=a(this);if(e.has(".required").length>0){a("label:first-child",e).append("<i class='colorRed'>&nbsp;*</i>")}else{a("label:first-child",e).append("<i class='colorRed' style='visibility: hidden;'>&nbsp;*</i>")}});return d}})(jQuery);