$j(function(){var a="onorientationchange" in window,b=a?"orientationchange":"resize";window.addEventListener(b,function(){checkLand(window.orientation);$j(document).trigger("checkorientationchange")},true)});$j(document).ready(function(){checkLand(window.orientation);$j(document).trigger("checkorientationchange")});var checkLand=function(a){switch(a){case -90:case 90:$j("body").addClass("wide");break;case 0:$j("body").removeClass("wide");break}};var setLeft=function(a,b){if(a&&a.attr("id")){$(a.attr("id")).style.left=b+"px"}};var getScreenWidth=function(){var a=320;if($j(window).width()){return $j(window).width()}return a};var isTouchDevice=function(){try{document.createEvent("TouchEvent");return true}catch(a){return false}};var uagent=navigator.userAgent.toLowerCase();$j.support.WebKitCSSMatrix=(typeof WebKitCSSMatrix=="object");$j.support.touch=(typeof Touch=="object");$j.support.WebKitAnimationEvent=(typeof WebKitTransitionEvent=="object");$j.support.isAndroid=(uagent.search("android")>-1);$j.support.isBlackBerry=(uagent.search("blackberry")>-1);$j.support.isMobile=($j.support.touch||$j.support.isAndroid||$j.support.isBlackBerry);var registerLabels=function(){$$("label").each(function(a){if(a.readAttribute("for")){var b=$(a.readAttribute("for"));if(b instanceof Object){a.onclick=function(c){return function(d){if(["radio","checkbox"].indexOf(c.getAttribute("type"))!=-1){c.setAttribute("selected",!c.getAttribute("selected"))}else{c.focus()}}}(b)}}})};document.observe("dom:loaded",function(){registerLabels()});;
