text: function mouseZoom(e){if(closeup){if(e>1.4)e=1.4}else{if(e>1)e=1}if(e<zoom){yPos=.9965*yPos;xPos=.9965*xPos;if(e<.15){yPos=.9*yPos;xPos=.9*xPos}}if(e<minZoom)e=minZoom;zoom=e;imgLayers.each(function(){if($(this).attr("src").indexOf("_15")!=-1){var e=.15}else if($(this).attr("src").indexOf("_50")!=-1){var e=1}else if($(this).attr("src").indexOf("_65")!=-1){var e=.65}else if($(this).attr("src").indexOf("_140")!=-1){var e=1.4}else{var e=1}var t=Math.round($(this).data("origWidth")*zoom*(1/e));var n=Math.round($(this).data("origHeight")*zoom*(1/e));var r=Math.round((screenW-t)/2);var i=Math.round((screenH-n)/2);r+=($(this).data("origLeftMarg")-xPos)*zoom;i+=($(this).data("origTopMarg")+yPos)*zoom;$(this).css("width",t);$(this).css("height",n);$(this).css("left",r);$(this).css("top",i)});if(!pointer_drag){updateZoomer()}}function limitZoom(){var e=parseInt(layer100.css("top"));var t=parseInt(sled.css("top"));var n=layer100.height();e+=t;if(e>0){verticalMove(-e)}if(e+n<screenH){var r=screenH-(e+n);verticalMove(r)}}function init(){if($(this).hasClass("init")){$(this).data("origLeftMarg",parseInt($(this).css("margin-left")));$(this).data("origTopMarg",parseInt($(this).css("margin-top")));$(this).css("margin-left","0");$(this).css("margin-top","0");$(this).data("origWidth",$(this).width());$(this).data("origHeight",$(this).height());$(this).removeClass("init");if($(this).hasClass("organ")){$(this).css("display","block");$(this).css("opacity",100)}loaded++;if(sex=="n"&&loaded>19||sex=="m"&&loaded>19){setZoom(.15);fitToScreen();centerImg();$(bodyWide).show();$(bodyHires).show()}}}function animateZoom(e,t,n){var r=2900;if(e<minZoom)e=minZoom;zoom=e;imgLayers.each(function(){if($(this).attr("src").indexOf("_15")!=-1){var e=.15}else if($(this).attr("src").indexOf("_50")!=-1){var e=1}else if($(this).attr("src").indexOf("_65")!=-1){var e=.65}else if($(this).attr("src").indexOf("_140")!=-1){var e=1.4}else{var e=1}var i=Math.round($(this).data("origWidth")*zoom*(1/e));var s=Math.round($(this).data("origHeight")*zoom*(1/e));var o=Math.round((screenW-i)/2);var u=Math.round((screenH-s)/2);o+=($(this).data("origLeftMarg")-n)*zoom;u+=($(this).data("origTopMarg")+t)*zoom;$(this).animate({width:i,height:s,left:o,top:u,marginTop:0},r,"swing",function(){focusing=false;xPos=n;yPos=t})});sled.animate({top:0},r,"swing",function(){if(showOrgan=="clear"){$("div#infoBottom,div#infoTop").delay(300).fadeIn(2050)}else{$("div#infoBottom,div#infoTop").delay(300).fadeIn(2350)}});gHolder.animate({top:0},r,"swing");if(sliderPos){slider.animate({left:sliderPos+"%"},r,"swing");tHolder.animate({top:0,width:sliderPos+"%"},r,"swing")}else{tHolder.animate({top:0},r,"swing")}if(!pointer_drag){updateZoomer(r)}}function stillZoom(e,t,n){var r=2900;if(e<minZoom)e=minZoom;zoom=e;imgLayers.each(function(){if($(this).attr("src").indexOf("_15")!=-1){var e=.15}else if($(this).attr("src").indexOf("_50")!=-1){var e=1}else if($(this).attr("src").indexOf("_65")!=-1){var e=.65}else if($(this).attr("src").indexOf("_140")!=-1){var e=1.4}else{var e=1}var r=Math.round($(this).data("origWidth")*zoom*(1/e));var i=Math.round($(this).data("origHeight")*zoom*(1/e));var s=Math.round((screenW-r)/2);var o=Math.round((screenH-i)/2);s+=($(this).data("origLeftMarg")-n)*zoom;o+=($(this).data("origTopMarg")+t)*zoom;$(this).css("width",r);$(this).css("height",i);$(this).css("left",s);$(this).css("top",o);$(this).css("margin-top",0);focusing=false;xPos=n;yPos=t});sled.css("top",0);sled.animate({top:0},100,"swing",function(){if(showOrgan=="clear"){$("div#infoBottom,div#infoTop").delay(300).fadeIn(2050)}else{$("div#infoBottom,div#infoTop").delay(300).fadeIn(2350)}});gHolder.css("top",0);sled.css("top",0);sled.css("top",0);if(sliderPos){slider.animate({left:sliderPos+"%"},r,"swing");tHolder.animate({top:0,width:sliderPos+"%"},r,"swing")}else{tHolder.animate({top:0},r,"swing")}}function updateZoomer(e){var t=(zoom-minZoom)/(maxZoom-minZoom);var n=Math.floor((1-t)*101);if(!e){zoomPointer.css("top",n+"px")}else{zoomPointer.animate({top:n},e,"swing")}}function verticalMove(e){imgLayers.each(function(){$(this).css("top","+="+e)})}function moveSlider(e){if(e){slider.css("left",sliderPos+"%");tHolder.css("width",sliderPos+"%")}}function focus(e){var t=parseInt(sled.css("top"));var n=parseInt(layer100.css("top"));var r=layer100.height();var i=0;area_focus=false;focusing=true;var s=$("img.focus").length;$("div#infoTop,div#infoBottom,img.focus").fadeOut(250,function(){if(++i==2+s){$("div#infoTop").html($("#"+e+"a").html());$("div#infoBottom").html($("#"+e+"b").html());organs.removeClass("focus");var t=0;organs.fadeOut(150,function(){if(sex=="m"){var n=14}else{var n=16}if(++t==n){showOrgan="clear";var r=.6;xPosFull=0;var i=false;sliderPos=false;maxZoom=1;if(e==1||e==8){yPosFull=1780;r=1}if(e==2){sliderPos=62;showOrgan=118;yPosFull=1410;r=1.4;closeup=true}if(e==3){showOrgan=118;yPosFull=1715;r=1.4;closeup=true}if(e==4){showOrgan=118;yPosFull=2230;r=1.4;closeup=true}if(e==5){yPosFull=1360;r=1}if(e==6){showOrgan=118;yPosFull=1470;r=1.4;closeup=true}if(e==7){showOrgan=118;yPosFull=2080;r=1.4;closeup=true}if(e==8){showOrgan=118;yPosFull=1680;r=1.4;closeup=true}if(e==9){r=.1;yPosFull=0}if(e==10){showOrgan=119;r=1.4;closeup=true;yPosFull=-50;xPosFull=490}if(e==11){showOrgan=119;r=1.4;closeup=true;yPosFull=-550;xPosFull=490}if(e==12){showOrgan=113;yPosFull=1010;r=.8}if(e==13){showOrgan=114;yPosFull=1010;r=.8}if(e==14){r=.6;yPosFull=150}if(e==15){showOrgan=115;r=1;yPosFull=625}if(e==16){showOrgan=112;r=1;yPosFull=1450}if(e==17){showOrgan=117;r=1;yPosFull=161}if(e==18){showOrgan=116;r=1;yPosFull=-240}if(e==19){showOrgan=118;yPosFull=2200;r=1}if(e==20){showOrgan=118;yPosFull=1790;r=1.4;closeup=true}if(e==21){showOrgan=118;yPosFull=2180;r=1.4;closeup=true}if(e==22){showOrgan=118;yPosFull=1998;r=1}if(e==23){showOrgan=118;yPosFull=1880;r=1.4;closeup=true}if(e==24){showOrgan=118;yPosFull=1880;r=1.4;closeup=true}if(e==25){showOrgan=118;yPosFull=2590;r=1.4;closeup=true}if(e==26){r=.1;yPosFull=0}if(e==27){showOrgan=119;r=1;yPosFull=-330;xPosFull=600}if(e==28){showOrgan=114;r=.8;yPosFull=1400}if(e==29){showOrgan=113;r=.8;yPosFull=1400}if(e==30){showOrgan=115;r=1;yPosFull=874}if(e==31){showOrgan=112;r=1;yPosFull=1700}if(e==32){showOrgan=116;r=1;yPosFull=-227}if(e==33){showOrgan=117;r=1;yPosFull=-180}if(closeup){maxZoom=1.4}switchLayer(showOrgan);pointer_drag=false;zMin=Math.round(zoom*10)/10;zMax=r;xMin=xPos;xMax=xPosFull;yMin=yPos;yMax=yPosFull;if(zMin!=zMax||xMin!=xMax||yMin!=yMax){animateZoom(zMax,yMax,xMax)}else{stillZoom(zMax,yMax,xMax)}if(!$("div#naviTop2").hasClass("border")){$("div#naviTop2").addClass("border")}}})}})}function switchLayer(e){if(sex=="m"){showArray=mImg;clearArray=mClear}else{showArray=nImg;clearArray=nClear}if(e=="clear"){for(c=112;c<120;c++){$("#layer"+c+",#layer"+(c+100)).attr("src",clearArray["layer"+c])}return false}organs.each(function(){loadedIDs[this.id]=false});chosenLayers[0]="layer"+e;chosenLayers[1]="layer"+(e+100);for(c=112;c<120;c++){if(e==c){$("#layer"+c).attr("src",showArray["layer"+c]).addClass("focus");$("#layer"+(c+100)).attr("src",showArray["layer"+(c+100)]).addClass("focus")}else{$("#layer"+c+",#layer"+(c+100)).attr("src",clearArray["layer"+c])}}}function setZoom(e){if(!closeup){if(e>1)e=1}else{if(e>1.4)e=1.4}if(e<1){if($("#layer118").is(":visible")){closeUps.filter(":visible").hide()}}else{if($("#layer118").is(":hidden")){closeUps.filter(":hidden").show()}}if(e<minZoom)e=minZoom;zoom=e;imgLayers.each(function(){if($(this).attr("src").indexOf("_15")!=-1){$(this).css("width",Math.round($(this).data("origWidth")*e*(1/.15))+"px");$(this).css("height",Math.round($(this).data("origHeight")*e*(1/.15))+"px")}else if($(this).attr("src").indexOf("_50")!=-1){$(this).css("width",Math.round($(this).data("origWidth")*e*(1/1))+"px");$(this).css("height",Math.round($(this).data("origHeight")*e*(1/1))+"px")}else if($(this).attr("src").indexOf("_65")!=-1){$(this).css("width",Math.round($(this).data("origWidth")*e*(1/.65))+"px");$(this).css("height",Math.round($(this).data("origHeight")*e*(1/.65))+"px")}else if($(this).attr("src").indexOf("_140")!=-1){$(this).css("width",Math.round($(this).data("origWidth")*e*(1/1.4))+"px");$(this).css("height",Math.round($(this).data("origHeight")*e*(1/1.4))+"px")}else{$(this).css("width",Math.round($(this).data("origWidth")*e)+"px");$(this).css("height",Math.round($(this).data("origHeight")*e)+"px")}});if(!pointer_drag){updateZoomer()}}function centerImg(){imgLayers.each(function(){var e=Math.round((screenW-$(this).width())/2);var t=Math.round((screenH-$(this).height())/2);e+=($(this).data("origLeftMarg")-xPos)*zoom;t+=$(this).data("origTopMarg")*zoom;$(this).css("left",e+"px");$(this).css("top",t+"px")})}function fitToScreen(){if(screenW>0&&screenH>0&&layer100.data("origWidth")>0&&layer100.data("origHeight")>0){z=Math.min(screenW/(layer100.data("origWidth")-1200),screenH/layer100.data("origHeight"));setZoom(z*.15);minZoom=z*.15}}function limitDrag(e){if(typeof e=="object")e=false;if(!e)e=false;var t=parseInt(sled.css("top"));var n=parseInt(layer100.css("top"));var r=layer100.height();if(e){if(t+n>0){sled.css({top:-n});$(tLayers).css("margin-top",Math.abs(n)+"px");gHolder.css("margin-top",n+"px");tHolder.css("margin-top",n+"px")}if(t+n+r<screenH){sled.css({top:n});$(tLayers).css("margin-top",n+"px");gHolder.css("margin-top",Math.abs(n)+"px");tHolder.css("margin-top",Math.abs(n)+"px")}}else{var i=290;if(t+n>0){if(n<0){var s=Math.abs(n)}else{var s=-n}tHolder.css("top",n+"px");$(tLayers).css("margin-top",s+"px");sled.stop().clearQueue().animate({top:-n},i);gHolder.animate({top:n},i)}if(t+n+r<screenH){var o=screenH-(t+n+r);sled.stop().clearQueue().animate({top:"+="+o},i);gHolder.animate({top:"-="+o},i);tHolder.animate({top:"-="+o},i);$(tLayers).animate({marginTop:"+="+o},i)}}}function sliderMove(e){var t=e.touches[0];InitX=t.pageX;$(this).css("left",InitX+"px");tHolder.css("width",InitX+"px")}function pointerStart(e){}function pointerMove(e){pointer_drag=false;var t=e.touches[0];point_y=t.pageY-60;zp=1.1-point_y/100;setZoom(zp);centerImg()}function pointerEnd(e){}function switchImage(){$(this).attr("src","img/slider3-50.png");$(this).removeClass("sliderStart")}function allStart(e){if(InGesture)return;if(zoom>.15){InDrag=true;finger=e.touches[0];startY=finger.pageY;startTop=sled.css("top")}}function allMove(e){if(InGesture)return;if(zoom>.15){InDrag=true;finger=e.touches[0];moveY=finger.pageY;if(startTop=="auto"){moveTop=moveY-startY}else{moveTop=parseInt(startTop)+(moveY-startY)}sled.css("top",moveTop+"px");if(moveTop<0){gHolder.css("margin-top",Math.abs(moveTop)+"px");tHolder.css("margin-top",Math.abs(moveTop)+"px");$(tLayers).css("margin-top","-"+Math.abs(moveTop)+"px")}else if(moveTop>0){gHolder.css("margin-top","-"+moveTop+"px");tHolder.css("margin-top","-"+moveTop+"px");$(tLayers).css("margin-top",moveTop+"px")}}}function allEnd(e){InDrag=false;limitDrag()}function blockMove(e){e.preventDefault()}function gestureStart(e){InGesture=true;tmpZoom=zoom}function gestureChange(e){InGesture=true;setZoom(tmpZoom*e.scale);centerImg()}function gestureEnd(e){InGesture=false}function sliderReminder(){if(!inReminder){inReminder=true;var e=370;slider.animate({width:"48px",marginLeft:"-24px",top:"40.1%",opacity:.6},e).animate({width:"50px",marginLeft:"-25px",top:"40%",opacity:1},e).delay(70).animate({width:"48px",marginLeft:"-24px",top:"40.1%",opacity:.6},e).animate({width:"50px",marginLeft:"-25px",top:"40%",opacity:1},e).delay(1e3).animate({width:"48px",marginLeft:"-24px",top:"40.1%",opacity:.6},e).animate({width:"50px",marginLeft:"-25px",top:"40%",opacity:1},e).delay(70).animate({width:"48px",marginLeft:"-24px",top:"40.1%",opacity:.6},e).animate({width:"50px",marginLeft:"-25px",top:"40%",opacity:1},e,function(){inReminder=false;window.clearInterval(intervalID3);intervalID3=window.setInterval(sliderReminder,8e3)})}}var layers=new Array("#layer100","#layer101","#layer112","#layer113","#layer114","#layer115","#layer116","#layer117","#layer118","#layer119","#layer200","#layer201","#layer212","#layer213","#layer214","#layer215","#layer216","#layer217","#layer218","#layer219");var mInit=new Array("img/kaveri_fresh_15.jpg","img/mies_f_hires_100.jpg","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/kaveri_tuhka_15.jpg","img/mies_t_hires_100.jpg","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif","img/clear_100.gif");var nInit=new Array("img/mimmi_fresh_15.jpg","img/nainen_f_hires_100.jpg","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/mimmi_tuhka_15.jpg","img/nainen_t_hires_100.jpg","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif","img/nc_layer112_100.gif");var mImg=new Array;mImg["layer112"]="img/mies2_suoni1_100.png";mImg["layer113"]="img/mies_keuhko_korjaus2_100.png";mImg["layer114"]="img/keuhkot3_100.png";mImg["layer115"]="img/mies2_vatsa1_100.png";mImg["layer116"]="img/sp1_100.png";mImg["layer117"]="img/sperm_c2_100.png";mImg["layer118"]="img/mies_f_closeup3_140.jpg";mImg["layer119"]="img/mc_arm_140.gif";mImg["layer212"]="img/mies2_suoni2_100.png";mImg["layer213"]="img/mies3_keuhkot2_100.png";mImg["layer214"]="img/keuhkot4_100.png";mImg["layer215"]="img/mies2_vatsa2_100.png";mImg["layer216"]="img/sp2_100.png";mImg["layer217"]="img/sperm_c1_100.png";mImg["layer218"]="img/mies_t_closeup3_140.jpg";mImg["layer219"]="img/mc_arm_140.gif";var nImg=new Array;nImg["layer112"]="img/nainen2_suoni2_100.png";nImg["layer113"]="img/nainen2_keuhkot1_100.png";nImg["layer114"]="img/nainen_keuhko_korjaus_100.png";nImg["layer115"]="img/nainen2_vatsa2_100.png";nImg["layer116"]="img/nainen2_sp2_100.png";nImg["layer117"]="img/sikio1e_100.png";nImg["layer118"]="img/nainen_f_closeup_face_140.jpg";nImg["layer119"]="img/nainen_f_closeup_hand_140.jpg";nImg["layer212"]="img/nainen2_suoni1_100.png";nImg["layer213"]="img/nainen2_keuhkot2_100.png";nImg["layer214"]="img/nainen3_keuhkot4_100.png";nImg["layer215"]="img/nainen2_vatsa1_100.png";nImg["layer216"]="img/nainen2_sp1_100.png";nImg["layer217"]="img/sikio2e_100.png";nImg["layer218"]="img/nainen_closeup_face_140.jpg";nImg["layer219"]="img/nainen_closeup_hand_140.jpg";var mClear=new Array;mClear["layer112"]=mClear["layer212"]="img/nc_layer115_50.gif";mClear["layer113"]=mClear["layer213"]="img/nc_layer115_50.gif";mClear["layer114"]=mClear["layer214"]="img/nc_layer115_50.gif";mClear["layer115"]=mClear["layer215"]="img/nc_layer115_50.gif";mClear["layer116"]=mClear["layer216"]="img/nc_layer115_50.gif";mClear["layer117"]=mClear["layer217"]="img/nc_layer115_50.gif";mClear["layer118"]=mClear["layer218"]="img/nc_layer115_50.gif";mClear["layer119"]=mClear["layer219"]="img/nc_layer115_50.gif";var nClear=mClear;var screenW=$(window).width();var screenH=$(window).height();var zoom;var tmpZoom;var tmpY;var startY;var minZoom;var maxZoom=1;var minVisible=50;var show_all=false;var position;var win_width;var pct;var top;var zp=0;var pointer_drag=false;var xPos=0;var xPosFull=0;var point_y;var showArray=new Array;var clearArray=new Array;var loaded=0;var loadedIDs=new Array;var loadedBody=0;var closeup=false;var chosenLayers=new Array;var zMin;var zMax;var zInt;var xMin;var xMax;var xInt;var yMin;var yMax;var yInt;var zoomDelay;var yPos=0;var yPosFull;var sliderPos=false;var focusing=false;var showOrgan;var intervalID3;var lang;var langName;var sexName;var fLayers=$("div#freshHolder img");var tLayers=$("div#tuhkaHolder img");var body=$("img.body");var bodyWide="#layer100,#layer200";var bodyHires="#layer101,#layer201";var logo_fi="img/logo2_fi.png";var logo_se="img/logo2_se.png";var logo_en="img/logo2_en.png";var all=$("div.all");var sled=$("div#sled");var gHolder=$("div#gradientHolder");var tHolder=$("div#tuhkaHolder");var imgLayers=$("img.imgLayer");var organs=$("img.organ");var closeUps=$("img.closeup");var layer100=$("img#layer100");var slider=$("img#slider");var zoomPointer=$("img.zoomPointer");$(document).ready(function(){function r(){if(sex=="n"&&loaded>19||sex=="m"&&loaded>19){$("#loader:visible").fadeOut();window.clearInterval(i);chosenLayers[0]=chosenLayers[1]=false}else{$("#loader:hidden").show()}}lang=$("html").attr("xml:lang");switch(lang){case"en":langName="English";break;case"se":langName="Swedish";break;case"fi":langName="Finnish";break;default:langName="Other"}switch(sex){case"m":sexName="Male";break;case"n":sexName="Female";break;default:langName="Other"}var e=new Array;e[1]="Face";e[2]="Acne";e[3]="Wrinkles";e[4]="-";e[5]="Breath odor";e[6]="Mouth";e[7]="Hair";e[8]="Facial hair";e[9]="Stress";e[10]="Arm hairs";e[11]="Nails";e[12]="Lungs";e[13]="Lung cancer";e[14]="Weight gain";e[15]="Stomach";e[16]="Blood vessels";e[17]="Pregnancy";e[18]="Genitalia";e[19]="Face";e[20]="Acne";e[21]="Wrinkles";e[22]="-";e[23]="Breath odor";e[24]="Mouth";e[25]="Hair";e[26]="Stress";e[27]="Nails";e[28]="Lungs";e[29]="Lung cancer";e[30]="Stomach";e[31]="Blood vessels";e[32]="Genitalia";e[33]="Sperm";var t=new Array;if(sex=="m"){t=mInit}else if(sex=="n"){t=nInit}var n=0;imgLayers.each(function(){$(layers[n]).attr("src",t[n]).imagesLoaded(init);n++});organs.each(function(){loadedIDs[this.id]=false});organs.load(function(){loadedIDs[this.id]=true;if(loadedIDs[chosenLayers[0]]&&loadedIDs[chosenLayers[1]]){$("#"+chosenLayers[0]+",#"+chosenLayers[1]).fadeIn(2e3)}});$("#naviTop ul li a").click(function(e){e.preventDefault();$("#naviTop ul li a").removeClass("sel");$("#"+this.id).addClass("sel");focus(this.id)});sled.draggable({axis:"y",stop:limitDrag});sled.bind("dragstart",function(e,t){sled.css("cursor","url('cursor/closed_hand.cur'),default")});sled.bind("drag",function(e,t){var n=t.position.top;if(n<0){var r=Math.abs(n);gHolder.css("top",r+"px");tHolder.css("top",r+"px");$(tLayers).css("margin-top","-"+r+"px")}else if(n>0){gHolder.css("top","-"+n+"px");tHolder.css("top","-"+n+"px");$(tLayers).css("margin-top",n+"px")}});sled.bind("dragstop",function(e,t){sled.css("cursor","default")});sled.dblclick(function(){setZoom(zoom+.1);centerImg()});$("#zoomPlus").click(function(e){e.preventDefault();pointer_drag=false;mouseZoom(zoom+.1);limitZoom()});$("#zoomMinus").click(function(e){e.preventDefault();pointer_drag=false;mouseZoom(zoom-.1);limitZoom()});slider.get(0).ontouchmove=sliderMove;zoomPointer.get(0).ontouchstart=pointerStart;zoomPointer.get(0).ontouchmove=pointerMove;all.get(0).ontouchstart=allStart;all.get(0).ontouchmove=allMove;all.get(0).ontouchend=allEnd;all.get(0).ongesturestart=gestureStart;all.get(0).ongesturechange=gestureChange;all.get(0).ongestureend=gestureEnd;slider.draggable({axis:"x",containment:"window"});slider.bind("drag",function(e,t){tHolder.css("width",t.position.left+"px")});slider.bind("dragstop",function(e,t){position=slider.position().left;win_width=$(window).width();pct=100*(position/win_width);slider.css("left",pct+"%");tHolder.css("width",pct+"%")});$(document).on("click","div#infoTop h2",function(){slider.animate({left:"71%"},880,"swing");tHolder.animate({width:"71%"},880,"swing")});$(document).on("click","div#infoBottom h2",function(){slider.animate({left:"29%"},880,"swing");tHolder.animate({width:"29%"},880,"swing")});zoomPointer.draggable({axis:"y",containment:"parent"});zoomPointer.bind("dragstart",function(e,t){zoomPointer.css("cursor","url('cursor/closed_hand.cur'),default")});zoomPointer.bind("drag",function(e,t){pointer_drag=true;var n=1-t.position.top/101;zp=minZoom+n*(maxZoom-minZoom);mouseZoom(zp);limitZoom()});zoomPointer.bind("dragstop",function(e,t){zoomPointer.css("cursor","url('cursor/open_hand.cur'),default")});$("#introLeft").click(function(){window.location="data/n_"+lang+".html"});$("#introRight").click(function(){window.location="data/m_"+lang+".html"});$(".flag_front").click(function(){lang=$(this).attr("id");$("html").attr("xml:lang",lang);if($(".logo").attr("id")!="logo_"+lang){document.title=$("#title_"+lang).html();$(".logo").attr("id","logo_"+lang);$("#introHolder p.intro_text").html($("#infotext_"+lang).html());$("#introHolder p.movie_text").html($("#movie_text_"+lang).html());$("#introHolder p.share_text").html($("#share_text_"+lang).html());$(".youtube-player").attr("src","http://www.youtube.com/embed/"+$("#youtube_id_"+lang).html())}});var i=window.setInterval(r,700)});$(window).resize(function(){if($(window).width()>470){yPos=0;screenW=$(window).width();screenH=$(window).height();fitToScreen();centerImg()}});$(document).mousewheel(function(e,t,n,r){pointer_drag=false;mouseZoom(zoom+t*.01);limitZoom()});var zm;var update=0;var xi=0;var InGesture=null;var InDrag=null;var finger=null;var startY=null;var startTop=null;var moveY=null;var moveTop=null;var gesturePos=null;var inReminder=false;$(document).ready(function(){$("html").mousemove(function(e){if(inReminder){slider.stop().clearQueue();slider.css({width:"50px","margin-left":"-25px",top:"40%",opacity:"1.0"});inReminder=false}window.clearInterval(intervalID3);intervalID3=window.setInterval(sliderReminder,8e3)});intervalID3=window.setInterval(sliderReminder,8e3)})