var jq=jQuery;function iPhoneOrientation(){return jq("#iphone_wrapper").attr("class")}function rotatePhone(){if(jq("#iphone_wrapper").attr("class")=="vert"){jq("#iphone_wrapper").removeClass("vert").addClass("horiz")}else{jq("#iphone_wrapper").removeClass("horiz").addClass("vert")}window.scrollTo(0,jq("#iphone_top").offset().top);document.getElementById("_mobileiframe-iphone").contentWindow.setOrientation()}function setSliderMin(a){scaleMin=Math.round(a/5)*5}function buildSlider(b,c){var a=Math.round(b/5)*5;if(c){jq("#SliderSingle").slider({from:a,to:200,value:b,step:5,round:0,dimension:"%",skin:"round",callback:function(d){if(d<scaleMin){setSliderValue(scaleMin);d=scaleMin}document.getElementById("_mobileiframe-iphone").contentWindow.scaleContent(d)}});setSliderValue(a)}else{jQuery("#SliderSingle").hide();jQuery("#scale_disabled").show();document.getElementById("_mobileiframe-iphone").contentWindow.scaleContent(a)}setPan()}function setPan(){jQuery("#iphone_pan").children().each(function(){var a=jQuery(this).attr("id").substring(4);jQuery(this).mouseover(function(){document.getElementById("_mobileiframe-iphone").contentWindow.startScroll(a)}).mouseout(function(){document.getElementById("_mobileiframe-iphone").contentWindow.stopScroll()})})}function setSliderValue(a){jq("#SliderSingle").slider("value",a)}jQuery.fn.log=function(a){a=a||"log";console.log("%s: %o",a,this);this.each(function(b){id=this.id?"ID: "+this.id:"";console.log("%d: %s.%s %s",b,this.tagName,this.className,id)});return this};
