$.fn.customFileInput=function(){var b=false;var a=32;var e=$(this).addClass("customfile-input").mouseover(function(){d.addClass("customfile-hover")}).mouseout(function(){d.removeClass("customfile-hover")}).focus(function(){d.addClass("customfile-focus");e.data("val",e.val())}).blur(function(){d.removeClass("customfile-focus");$(this).trigger("checkChange")}).bind("disable",function(){e.attr("disabled",true);d.addClass("customfile-disabled")}).bind("enable",function(){e.removeAttr("disabled");d.removeClass("customfile-disabled")}).bind("checkChange",function(){if(e.val()&&e.val()!=e.data("val")){e.trigger("change")}}).bind("change",function(){b=true;var m=$(this).val().split(/\\/).pop();var h="icon-"+getFileType(m);var g="";var k=0;for(var j=0;j<m.length&&k<a;j++){var l=m.charAt(j);if(getEncodeType(l).encodeType=="UNICODE"){k+=3}else{k+=1}g+=l}if(m!=g){g=g+"..."}else{g=m}f.html(HTMLEncode(g)).removeClass(f.data("fileExt")||"").addClass(h).data("fileExt",h).addClass("customfile-feedback-populated");d.attr("title",m);c.html("<span id='uploadBtn' data-trans='change_btn'>"+$.i18n.prop("change_btn")+"</span>")}).click(function(){e.data("val",e.val());setTimeout(function(){e.trigger("checkChange")},100)});var d=$('<div class="customfile"></div>');var c=$('<span class="customfile-button" aria-hidden="true"><span  id="uploadBtn" data-trans="browse_btn">'+$.i18n.prop("browse_btn")+"</span></span>").appendTo(d);var f=$('<span class="customfile-feedback" aria-hidden="true"><span data-trans="no_file_selected">'+$.i18n.prop("no_file_selected")+"</span></span>").appendTo(d);if(e.is("[disabled]")){e.trigger("disable")}d.mousemove(function(g){e.css({left:g.pageX-d.offset().left-e.outerWidth()+20,top:g.pageY-d.offset().top-14})}).insertAfter(e);e.appendTo(d);return $(this)};