KYUI().use("node","event",function(c){var b=function(h,k,j){if(k!="hover"){h.currentTarget.removeClass("hover")}if(k!="pressed"){h.currentTarget.removeClass("pressed")}h.currentTarget.addClass(k);var f=h.currentTarget.query("img");var i=f.get("src");var g=i.indexOf("/bt-");if(g!=-1){if(i.substr(g+4,1)!=j){f.set("src",i.substring(0,g+4)+j+i.substr(g+5))}}};var d=function(o,h){var n="submit-";var m="submitElement";var i=o.currentTarget;var j=null;while(i!=null&&i.get("tagName").toLowerCase()!="form"){var g=i.get("id");if(j==null&&g!=null&&g.length>0&&g.indexOf(n)>-1){var k=g.split("-");j=k[k.length-1]}i=i.get("parentNode")}if(i!=null){if(j!=null){var l=h.Node.getDOMNode(i).elements;var p=l[m];if(p==undefined){p=h.Node.create('<input type="hidden" name="'+m+'" />');i.appendChild(p)}try{p.setAttribute("value",j)}catch(o){p.value=j}}var f=h.Global.getEvent("form:submit",true);if(f){f.stopped=0}h.Global.fire("form:submit",o,i)}};var a=function(){try{c.on("mouseover",b,".bbutton",null,"hover","h");c.on("mousedown",b,".bbutton",null,"pressed","c");c.on("mouseup",b,".bbutton",null,"hover","h");c.on("mouseout",b,".bbutton",null,"","n");c.on("click",d,".bbutton.submit .btm input",null,c)}catch(f){c.log(f)}};c.on("domready",a,null,c)});