function DropDown(){function i(){s(),o(),u()}function s(){e=!1,r=!1}function o(){f()}function u(){$("#dropDown").on(vdown,".dbut",function(e){if(touchDevice||e.which==1)$($(this)).addClass("dbut_sel"),funcObj.UIMain.setCurBut(this)}).on(vup,".dbut",function(e){$($(funcObj.UIMain.getCurBut())).removeClass("dbut_sel");if(this==funcObj["UIMain"].getCurBut()&&!outside){var t=$(this).parent().index();n[t].action(t),funcObj.browse.cleanList(),f()}})}function a(i,s,o,u){if(!e){t=o.currentTarget,e=!0,n=s;var a="";r=u;for(var l=0;l<s.length;l++){var c;r?c=s[l].name:c="##TRANS_DropDown_SortBy"+s[l].name+"##",a+=funcObj.contentCon.getContent("dButton",{repl:{BUTNAME:s[l].name,BUTTITLE:c,CUSTOM_CLASS:"dbut_dropDown"}})}var h=funcObj.contentCon.getContent("dropDown",{repl:{BUTS:a}}),p=$("#viewport").offset().top||0;$("#dropDown").html(h),$("#dropDown").css("left",i[0]+"px").css("top",i[1]-p+"px"),$("#dropDown").removeClass("disp_off").addClass("disp_on"),$(".but_sortMenu").addClass("open")}else f(null)}function f(n){e&&(n==null||$($(t).find(n.originalEvent.srcElement)).length==0)&&(n==null||$($("#dropDown").find(n.originalEvent.srcElement)).length==0)&&(e=!1,r=!1,$("#dropDown").html(""),$("#dropDown").removeClass("disp_on").addClass("disp_off").removeAttr("style"),$(".but_sortMenu").removeClass("open"))}var e,t,n,r;this.updateUI=o,this.createUI=a,this.removeUI=f,i()};