//canvasloader.js !function(t){"use strict";var e,i=function(t,e){"undefined"==typeof e&&(e={}),this.init(t,e)},s=i.prototype,a=["canvas","vml"],n=["oval","spiral","square","rect","roundRect"],h=/^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,r=-1!==navigator.appVersion.indexOf("MSIE")&&8===parseFloat(navigator.appVersion.split("MSIE")[1])?!0:!1,o=!!document.createElement("canvas").getContext,c=40,d=!0,l=function(t,e,i){var s,a=document.createElement(t);for(s in i)a[s]=i[s];return"undefined"!=typeof e&&e.appendChild(a),a},u=function(t,e){for(var i in e)t.style[i]=e[i];return t},f=function(t,e){for(var i in e)t.setAttribute(i,e[i]);return t},p=function(t,e,i,s){t.save(),t.translate(e,i),t.rotate(s),t.translate(-e,-i),t.beginPath()};s.init=function(t,s){"boolean"==typeof s.safeVML&&(d=s.safeVML);try{"undefined"!==t?this.mum=t:this.mum=document.body}catch(n){this.mum=document.body}if(this.cont=l("div",this.mum,{className:this.classCanvasLoader}),o)e=a[0],this.can=l("canvas",this.cont),this.con=this.can.getContext("2d"),this.cCan=u(l("canvas",this.cont),{display:"none"}),this.cCon=this.cCan.getContext("2d");else{if(e=a[1],"undefined"==typeof i.vmlSheet){document.getElementsByTagName("head")[0].appendChild(l("style")),i.vmlSheet=document.styleSheets[document.styleSheets.length-1];for(var h,r=["group","oval","roundrect","fill"],h=0;h360&&(this.density=360),this.activeId=0,this.redraw()},s.getDensity=function(){return this.density},s.range=1.3,s.setRange=function(t){this.range=Math.abs(t),this.redraw()},s.getRange=function(){return this.range},s.speed=2,s.setSpeed=function(t){this.speed=Math.round(Math.abs(t))},s.getSpeed=function(){return this.speed},s.fps=24,s.setFPS=function(t){this.fps=Math.round(Math.abs(t)),this.reset()},s.getFPS=function(){return this.fps},s.getRGB=function(t){return t="#"===t.charAt(0)?t.substring(1,7):t,{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16)}},s.draw=function(){var t,i,s,h,o,c,d,v,m,g,b,y,C,M=0,w=this.density,I=Math.round(w*this.range),R=0,S=1e3,k=0,T=this.cCon,P=this.diameter,B=.47;if(e===a[0])for(T.clearRect(0,0,S,S),f(this.can,{width:P,height:P}),f(this.cCan,{width:P,height:P});w>M;){switch(m=I>=M?1-(1-R)/I*M:m=R,c=270-360/w*M,d=c/180*Math.PI,T.fillStyle="rgba("+this.cRGB.r+","+this.cRGB.g+","+this.cRGB.b+","+m.toString()+")",this.shape){case n[0]:case n[1]:t=.07*P,h=P*B+Math.cos(d)*(P*B-t)-P*B,o=P*B+Math.sin(d)*(P*B-t)-P*B,T.beginPath(),this.shape===n[1]?T.arc(.5*P+h,.5*P+o,t*m,0,2*Math.PI,!1):T.arc(.5*P+h,.5*P+o,t,0,2*Math.PI,!1);break;case n[2]:t=.12*P,h=Math.cos(d)*(P*B-t)+.5*P,o=Math.sin(d)*(P*B-t)+.5*P,p(T,h,o,d),T.fillRect(h,o-.5*t,t,t);break;case n[3]:case n[4]:i=.3*P,s=.27*i,h=Math.cos(d)*(s+.13*(P-s))+.5*P,o=Math.sin(d)*(s+.13*(P-s))+.5*P,p(T,h,o,d),this.shape===n[3]?T.fillRect(h,o-.5*s,i,s):(v=.55*s,T.moveTo(h+v,o-.5*s),T.lineTo(h+i-v,o-.5*s),T.quadraticCurveTo(h+i,o-.5*s,h+i,o-.5*s+v),T.lineTo(h+i,o-.5*s+s-v),T.quadraticCurveTo(h+i,o-.5*s+s,h+i-v,o-.5*s+s),T.lineTo(h+v,o-.5*s+s),T.quadraticCurveTo(h,o-.5*s+s,h,o-.5*s+s-v),T.lineTo(h,o-.5*s+v),T.quadraticCurveTo(h,o-.5*s,h+v,o-.5*s))}T.closePath(),T.fill(),T.restore(),++M}else{switch(u(this.cont,{width:P,height:P}),u(this.vml,{width:P,height:P}),this.shape){case n[0]:case n[1]:y="oval",t=.14*S;break;case n[2]:y="roundrect",t=.12*S;break;case n[3]:case n[4]:y="roundrect",t=.3*S}for(i=s=t,h=.5*S-s,o=.5*-s;w>M;){switch(m=I>=M?1-(1-R)/I*M:m=R,c=270-360/w*M,this.shape){case n[1]:i=s=t*m,h=.5*S-.5*t-t*m*.5,o=.5*(t-t*m);break;case n[0]:case n[2]:r&&(o=0,this.shape===n[2]&&(h=.5*S-.5*s));break;case n[3]:case n[4]:i=.95*t,s=.28*i,r?(h=0,o=.5*S-.5*s):(h=.5*S-i,o=.5*-s),k=this.shape===n[4]?.6:0}b=f(u(l("group",this.vml),{width:S,height:S,rotation:c}),{coordsize:S+","+S,coordorigin:.5*-S+","+.5*-S}),g=u(l(y,b,{stroked:!1,arcSize:k}),{width:i,height:s,top:o,left:h}),C=l("fill",g,{color:this.color,opacity:m}),++M}}this.tick(!0)},s.clean=function(){if(e===a[0])this.con.clearRect(0,0,1e3,1e3);else{var t=this.vml;if(t.hasChildNodes())for(;t.childNodes.length>=1;)t.removeChild(t.firstChild)}},s.redraw=function(){this.clean(),this.draw()},s.reset=function(){"number"==typeof this.timer&&(this.hide(),this.show())},s.tick=function(t){var i=this.con,s=this.diameter;t||(this.activeId+=360/this.density*this.speed),e===a[0]?(i.clearRect(0,0,s,s),p(i,.5*s,.5*s,this.activeId/180*Math.PI),i.drawImage(this.cCan,0,0,s,s),i.restore()):(this.activeId>=360&&(this.activeId-=360),u(this.vml,{rotation:this.activeId}))},s.show=function(){if("number"!=typeof this.timer){var t=this;this.timer=self.setInterval(function(){t.tick()},Math.round(1e3/this.fps)),u(this.cont,{display:"block"})}},s.hide=function(){"number"==typeof this.timer&&(clearInterval(this.timer),delete this.timer,u(this.cont,{display:"none"}))},s.kill=function(){var t=this.cont;"number"==typeof this.timer&&this.hide(),e===a[0]?(t.removeChild(this.can),t.removeChild(this.cCan)):t.removeChild(this.vml);var i;for(i in this)delete this[i]},t.CanvasLoader=i}(window); //jquery.fullscreen-0.3.5.js !function(e){function t(e){return"undefined"!=typeof e}function n(t,n,l){var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t,n.prototype.constructor=n,t._super=n.prototype,l&&e.extend(t.prototype,l)}function l(e,n){var l;"string"==typeof e&&(n=e,e=document);for(var i=0;ir)&&(o=r),d=Math.max(Math.abs(u),Math.abs(a)),(!n||n>d)&&(n=d),l=h>0?"floor":"ceil",h=Math[l](h/o),a=Math[l](a/n),u=Math[l](u/n),s.unshift(t,h,a,u),(e.event.dispatch||e.event.handle).apply(this,s)}var o,n,l=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=l.length;s;)e.event.fixHooks[l[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); //jquery.selection.js jQuery.fn.extend({disableSelection:function(){this.each(function(){this.onselectstart=function(){return!1},this.unselectable="on",jQuery(this).css("-moz-user-select","none")})},enableSelection:function(){this.each(function(){this.onselectstart=function(){},this.unselectable="off",jQuery(this).css("-moz-user-select","auto")})}}); //jquery.metadata.js !function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(t,e){this.defaults.type=t,this.defaults.name=e},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);settings.single.length||(settings.single="metadata");var data=$.data(elem,settings.single);if(data)return data;if(data="{}","class"==settings.type){var m=settings.cre.exec(elem.className);m&&(data=m[1])}else if("elem"==settings.type){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);e.length&&(data=$.trim(e[0].innerHTML))}else if(void 0!=elem.getAttribute){var attr=elem.getAttribute(settings.name);attr&&(data=attr)}return data.indexOf("{")<0&&(data="{"+data+"}"),data=eval("("+data+")"),$.data(elem,settings.single,data),data}}}),$.fn.metadata=function(t){return $.metadata.get(this[0],t)}}(jQuery); //jquery.photo3d.js !function($){var methods={init:function(options){function start(w,h){function newPanel(e,t,s){return s=""!=s&&null!=s&&"undefined"!=typeof s?" "+s:"",$('
').appendTo(e)}function newKey(wrap,type,fun,title){var key=$('&#x'+type+";");key.css({background:set.colorButtons,borderRadius:set.formButtons}).on("touchstart mousedown",function(){set.keyDown=!0,key.css({color:"",border:""})}).on("mouseup mouseout touchend touchcancel",function(){set.keyDown=!1,key.css({color:"",border:""})}).appendTo(wrap),""!=fun&&key.on("click",{key:key},eval(fun))}set.zoomStep<1&&set.maxZoom>100&&(set.zoomStep=Math.round((set.imgWidth/100*set.maxZoom-set.imgWidth)/set.zoom));var smallClass="";(400>=w||300>=h)&&(smallClass=" small"),set.imageJqObj.wrap(''),$("#top-"+set.imageId).css({width:w+"px",height:60+h+"px"}).disableSelection(),set.imageJqObj.wrap('
'),set.wrapObj=$("#wrap-"+set.imageId),set.wrapObj.disableSelection(),set.loaderObj=initCanvasLoader(set.wrapObj),startLoader(),set.imageJqObj.wrap(''),set.canWidth=w,set.canHeight=h,set.canvasObj=document.getElementById("canvas-"+set.imageId),set.canvasContext=set.canvasObj.getContext("2d"),set.canvasContext.drawImage(set.imageObj,0,0,w,h);var canJqObj=$(set.canvasObj);canJqObj.css({left:"50%",marginLeft:set.canvasObj.width*-.5+"px",top:"50%",marginTop:set.canvasObj.height*-.5-30+"px"});for(var wrapPanel=$('
').appendTo(set.wrapObj),p=0;p2&&"undefined"!=typeof set.PANELS[p][2]&&(addClass=set.PANELS[p][2]);for(var panel=newPanel(wrapPanel,set.PANELS[p][0][0],addClass),bKit=set.buttonsKit,k=0;k100&&set.zoomFlag&&0!=t&&zoommer(t),set.maxZoom>100&&set.flagImg2&&t>0&&(set.flagImg2=!1,set.sprite?newImgLoad(2):newImagesLoad(2)),e.stopPropagation(),e.preventDefault()}),$(window).resize(function(){set.windowWidth=$(window).width(),set.windowHeight=$(window).height()}),set.wrapObj.on("touchstart mousedown",mouseDown)}function move3d(e){var t=$("#move3d-"+set.imageId),s=set.buttonsKit,a=set.BUTTONS[s]["3d"],o=set.BUTTONS[s].move;set.FlagMove3d&&set.bigSizeImg?(t.html("&#x"+a[0]+";").attr({title:a[2]}),set.FlagMove3d=!1):(t.html("&#x"+o[0]+";").attr({title:o[2]}),set.FlagMove3d=!0)}function rotationImg(){moment(),clearInterval(set.intervalID),set.autoPlay&&(set.toRotate?++set.frame:--set.frame,set.intervalID=setTimeout(rotationImg,set.intervalRotate)),pos=position(),set.sprite?set.CANVAS?drawImage(pos):(set.imgFlag?(obj1=set.imageJqObj[0],obj2=set.imgDopJqObj[0],set.imgFlag=0):(obj2=set.imageJqObj[0],obj1=set.imgDopJqObj[0],set.imgFlag=1),obj1.style.display="",obj2.style.display="none",obj1.style.left=pos[0],obj1.style.top=pos[1]):drawImage(pos)}function newImagesLoad(e){function t(){1==e?++i==set.frames*set.rows&&(clearTimeout(set.loadErrorTime),set.imageArray=set.tmpArr,setTimeout(function(){set.autoPlay&&rotationImg(),set.zoomFlag=!0,stopLoader()},100),i=0):2==e&&(r=this.getAttribute("data-y"),n=this.getAttribute("data-x"),++i==set.frames*set.rows&&setTimeout(function(){set.imageArray=set.tmpArr2,set.tmpArr=[],clearTimeout(set.loadErrorTime),stopLoader()},100),setTimeout(function(){imageArray(r,n)},0))}if(startLoader(),1==e)var s=set.tmpArr,a=1e4,o=set.imagePath+set.imageName+"100.";else if(2==e)var s=set.tmpArr2,a=3e4,o=set.imagePath+set.imageName+set.maxZoom+".";set.loadErrorTime=setTimeout(function(){newImagesLoad(e)},a);for(var i=0,n=1,r=1,r=1;r<=set.rows;r++){s[r]=[];for(var m=set.frames,g=0,n=1;n<=set.frames;n++)s[r][n]=new Image,s[r][n].setAttribute("data-x",n),s[r][n].setAttribute("data-y",r),1==set.rows&&0==set.trendCorrect?s[r][n].src=o+g++ +"."+set.imagesType:1==set.rows&&1==set.trendCorrect?s[r][n].src=o+--m+"."+set.imagesType:s[r][n].src=o+--m+"."+(r-1)+"."+set.imagesType,(!ie()||ie()>8)&&(("complete"==s[r][n].readyState||"loaded"==s[r][n].readyState)&&t(),s[r][n].onload=t,s[r][n].onreadystatechange=t)}ie()&&ie()<9&&(set.imageArray=s,set.autoPlay&&rotationImg(),set.zoomFlag=!0,stopLoader(),clearTimeout(set.loadErrorTime))}function imageArray(e,t){var s=set.tmpArr2[e][t];"undefined"!=typeof s&&(set.imageArray[e][t]=s)}function newImgLoad(e){function t(){0==set.imageCols&&(set.imageCols=Math.round(s.width/set.imgWidth)),0==set.imageRows&&(set.imageRows=Math.round(s.height/set.imgHeight));var e=set.imageCols,t=set.imageRows;set.imageFrames;set.CANVAS?(set.imageObj=s,set.imgWidth=s.width/e,set.imgHeight=s.height/t):(w=set.imgWidth,h=set.imgHeight,iw=w*e,ih=h*t,set.imgDopJqObj[0].src=lnk,set.imgDopJqObj.css({position:"absolute",width:iw+"px",height:ih+"px"}),set.imageJqObj[0].src=lnk,set.imageJqObj.css({position:"absolute",display:"none",width:iw+"px",height:ih+"px"})),newSize(),set.autoPlay&&rotationImg(),set.zoomFlag=!0,setTimeout(stopLoader,100)}startLoader(),1==e?lnk=set.imageLow:2==e&&(lnk=set.imageHigh);var s=new Image;s.src=lnk,("complete"==s.readyState||"loaded"==s.readyState)&&t(),s.onload=t,s.onreadystatechange=t}function mouseDown(e){if(!set.keyDown)if(set.FlagMove3d){if($(window).mouseup(mouseUp),set.wrapObj.on("touchend touchcancel",mouseUp),$(window).mousemove(mouseMove),set.wrapObj.on("touchmove",mouseMove),stopRotate(),"undefined"!=typeof e.originalEvent.touches||"undefined"!=typeof e.originalEvent.changedTouches)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];set.startTime=new Date,set.startPageX=e.pageX||t.pageX,set.memPageX=e.pageX||t.pageX,set.memPageY=e.pageY||t.pageY,e.stopPropagation(),e.preventDefault()}else $(window).mouseup(mouseUp),set.wrapObj.on("touchend touchcancel",mouseUp),set.wrapObj.on("mousemove",mouseMove2)}function moment(){p=0,set.intervalRotate25&&proc<50?p=.5:proc>50&&proc<75?p=.75:proc>75&&(p=1),set.intervalRotate=set.intervalRotate+p):set.intervalRotate>set.minIntRotate&&(set.intervalRotate=set.minIntRotate)}function mouseUp(){set.wrapObj.unbind("mousemove",mouseMove2),$(window).unbind("mouseup",mouseUp),set.wrapObj.unbind("touchend touchcancel",mouseUp),$(window).unbind("mousemove",mouseMove),set.wrapObj.unbind("touchmove",mouseMove);var e=new Date-set.startTime;step=0,set.memPageX>set.startPageX?step=(set.memPageX-set.startPageX)/10:set.memPageXset.sensitivity&&(set.intervalRotate=e/step,set.autoPlay||(set.autoPlay=!0,rotationImg()))}function mouseMove(e){if("undefined"!=typeof e.originalEvent.touches||"undefined"!=typeof e.originalEvent.changedTouches)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];var s=e.pageX||t.pageX,a=e.pageY||t.pageY,o=1+set.zoomMem*set.maxZoom/1500,i=10*o;s-set.memPageX>i?(++set.frame,set.toRotate=1,rotationImg(),set.memPageX=s):set.memPageX-s>i&&(--set.frame,set.toRotate=0,rotationImg(),set.memPageX=s),a-set.memPageY>i?(rowDown(),set.memPageY=a):set.memPageY-a>i&&(rowUp(),set.memPageY=a),e.stopPropagation(),e.preventDefault()}function mouseMove2(e){var t=$("#canvas-"+set.imageId),s=set.wrapObj,a=t.width(),o=t.height(),i=s.width(),n=s.height(),r=(a-i)/2,m=(o-n)/2;e.pageX-set.memPageX>1?(set.canOffX=set.canOffX-5,set.canOffX<-r&&(set.canOffX=-r)):set.memPageX-e.pageX>1&&(set.canOffX=set.canOffX+5,set.canOffX>r&&(set.canOffX=r)),set.memPageX=e.pageX,e.pageY-set.memPageY>1?(set.canOffY=set.canOffY-5,set.canOffY<-m&&(set.canOffY=-m)):set.memPageY-e.pageY>1&&(set.canOffY=set.canOffY+5,set.canOffY>m&&(set.canOffY=m)),set.memPageY=e.pageY,drawImage(position())}function offSet0(){var e=$("#canvas-"+set.imageId),t=e.width(),s=e.height(),a=set.wrapObj.width(),o=set.wrapObj.height();a>=t||o>=s?(set.canOffX=0,set.canOffY=0,drawImage(position()),$("#move3d-"+set.imageId).attr("class","not--active"),set.bigSizeImg=!1,set.FlagMove3d=!1,move3d()):(t>a||s>o)&&($("#move3d-"+set.imageId).removeAttr("class"),set.bigSizeImg=!0)}function rowUp(){--set.row,set.row>set.rows?set.row=set.rows:set.row<1&&(set.row=1),drawImage(position())}function rowDown(){++set.row,set.row>set.rows?set.row=set.rows:set.row<1&&(set.row=1),drawImage(position())}function startRotate(){set.autoPlay||(set.autoPlay=!0,rotationImg())}function stopRotate(){set.intervalRotate=set.minIntRotate,set.autoPlay&&(clearInterval(set.intervalID),set.intervalID=0,set.autoPlay=!1)}function forwardRotate(e){set.toRotate=1,startRotate()}function backwardRotate(e){set.toRotate=0,startRotate()}function plusSize(){set.zoomFlag&&zoommer(1),set.flagImg2&&(set.flagImg2=!1,set.sprite?newImgLoad(2):newImagesLoad(2))}function minusSize(){set.zoomFlag&&zoommer(-1)}function position(){return set.sprite?(set.frame>set.imageFrames?set.frame=1:set.frame<1&&(set.frame=set.imageFrames),set.imageArray[set.frame-1]):(set.frame>set.frames?set.frame=1:set.frame<1&&(set.frame=set.frames),set.imageArray[set.row][set.frame])}function drawImage(e){var t=set.imgWidth,s=set.imgHeight;set.sprite?set.canvasContext.drawImage(set.imageObj,e[0],e[1],t,s,set.canOffX,set.canOffY,set.canWidth,set.canHeight):set.CANVAS?set.canvasContext.drawImage(e,0,0,e.width,e.height,set.canOffX,set.canOffY,set.canWidth,set.canHeight):void 0!=e&&(set.imageJqObj[0].src=e.src,set.imageJqObj.css({display:"block",position:"absolute",left:0,top:0,width:t+"px",height:s+"px"}))}function zoommer(e){set.CANVAS&&offSet0();var t=set.zoom,s=set.zoomStep,a=(set.zoomMem,set.imgWidth/set.imgHeight);set.CANVAS?(e>0&&set.zoomMeme&&set.zoomMem>0&&(set.zoomMem--,set.canWidth=set.canWidth-s,set.canHeight=Math.round(set.canWidth/a)),set.canvasObj.width=set.canWidth,set.canvasObj.height=set.canHeight,set.canvasObj.style.marginLeft=set.canWidth*-.5+"px",set.canvasObj.style.marginTop=set.canHeight*-.5-30+"px",pos=position(),drawImage(pos)):(e>0&&set.zoomMeme&&set.zoomMem>0&&(set.zoomMem--,set.imgWidth=set.imgWidth-s,set.imgHeight=Math.round(set.imgWidth/a)),newSize())}function zoommerFullScreen(e){$("#move3d-"+set.imageId).attr("class","not--active"),set.bigSizeImg=!1,set.FlagMove3d=!1,move3d(),set.flagImg2&&e>0&&(set.flagImg2=!1,set.sprite?newImgLoad(2):newImagesLoad(2));var t=(set.zoom,set.zoomStep),s=(set.zoomMem,set.imgWidth/set.imgHeight),a=($(window).width()-set.imgWidth)/t,o=($(window).height()-set.imgHeight)/(t/s),i=a>o?o:a;i>10&&(i=10),0>i&&(i=0),set.CANVAS?(e>0&&set.zoomMeme&&set.zoomMem>0&&(set.canWidth=set.canWidth-t*set.zoomMem,set.canHeight=Math.round(set.canWidth/s),set.zoomMem=0),set.canvasObj.width=set.canWidth,set.canvasObj.height=set.canHeight,set.canvasObj.style.marginLeft=set.canWidth*-.5+"px",set.canvasObj.style.marginTop=set.canHeight*-.5-30+"px",pos=position(),drawImage(pos),setTimeout(nifs,100)):(e>0&&set.zoomMeme&&set.zoomMem>0&&(set.imgWidth=set.imgWidth-t*set.zoomMem,set.imgHeight=Math.round(set.imgWidth/s),set.zoomMem=0),newSize(),setTimeout(nifs,100))}function nifs(){set.loader?setTimeout(nifs,100):set.CANVAS?(pos=position(),drawImage(pos)):newSize()}function newSize(){if(w=set.imgWidth,h=set.imgHeight,set.sprite){var e=set.imageCols,t=set.imageRows,s=set.imageFrames;iw=w*e,ih=h*t,tmpArr=[];for(var a=0,o=0;t>o;o++)for(var i=0;e>i&&(set.CANVAS?(pw=i*w,ph=o*h):(pw=i*w*-1+"px",ph=o*h*-1+"px"),tmpArr[a]=[pw,ph],++a!=s);i++);set.imageArray=tmpArr,pos=position(),set.CANVAS?drawImage(pos):(obj=set.imgDopJqObj[0],obj.style.width=iw+"px",obj.style.height=ih+"px",obj.style.left=pos[0],obj.style.top=pos[1],obj=set.imageJqObj[0],obj.style.width=iw+"px",obj.style.height=ih+"px",obj.style.left=pos[0],obj.style.top=pos[1],$("#hidden-"+set.imageId).css({width:w+"px",height:h+"px",left:"50%",marginLeft:w*-.5+"px",top:"50%",marginTop:h*-.5+"px"}))}else set.imageJqObj.css({display:"block",position:"absolute",left:0,top:0,width:w+"px",height:h+"px"}),$("#hidden-"+set.imageId).css({width:w+"px",height:h+"px",left:"50%",marginLeft:w*-.5+"px",top:"50%",marginTop:h*-.5+"px"})}function radiusKey(e){$(".icon--panel a").css({borderRadius:set.radiusArr[set.radiusN]}),++set.radiusN>5&&(set.radiusN=0)}function colorKey(e){$(".icon--panel a").css({background:"#"+set.colorArr[set.colorN]}),++set.colorN>6&&(set.colorN=0)}function fullscreen(e){if(set.zoomFlag){var t=e.data.key;if(set.canOffX=0,set.canOffY=0,ie()>7||!ie()){var s=set.buttonsKit,a=set.BUTTONS[s].expand,o=set.BUTTONS[s].contract,i=set.wrapObj;$.fullscreen.isFullScreen()?(ie()&&t.html("&#x"+a[0]+";").attr({title:a[2]}),$.fullscreen.exit(),zoommerFullScreen(-1),device.ios()&&$(".main-control-panel",$(i)).removeClass("ios-top")):(ie()&&t.html("&#x"+o[0]+";").attr({title:o[2]}),i.fullscreen(),zoommerFullScreen(1),$('.wrapper--3d').addClass('fullscreen'),device.ios()&&$(".main-control-panel",$(i)).addClass("ios-top")),$(document).on("fscreenchange",function(e,s,i){$.fullscreen.isFullScreen()?t.html("&#x"+o[0]+";").attr({title:o[2]}):(t.html("&#x"+a[0]+";").attr({title:a[2]}),zoommerFullScreen(-1))}),ie()&&$(window).keydown(function(e){(e.keyCode=27)&&(t.html("&#x"+a[0]+";").attr({title:a[2]}),zoommerFullScreen(-1))})}else alert("You have deprecated version of Internet Explorer browser. Full screen mode is not supported.")}}function initCanvasLoader(e){var t=$("
",{}).css({position:"absolute",left:"50%",top:"50%"}).appendTo(e),s=new CanvasLoader(t[0]);s.setColor(set.ColorLoader),s.setShape("roundRect"),s.setDiameter(50),s.setDensity(10),s.setRange(1),s.setSpeed(1),s.setFPS(10);var a=s.getDiameter()*-.5+"px";return $(".canvasLoader").css("margin",a+" 0 0 "+a),s}function startLoader(){set.loader=!0,set.loaderObj.show()}function stopLoader(){set.loaderObj.hide(),set.loader=!1}function ie(){var e=navigator.userAgent,t=e.indexOf("MSIE");if(-1==t&&(t=e.indexOf("Trident")),-1!=t){var s=e.substr(t+5,2);return parseInt(s)?res=parseInt(s):res=100,res}return!1}var set=$.extend({trendCorrect:0,formButtons:"20px 5px",colorButtons:"#000",sensitivity:12,FlagMove3d:!0,bigSizeImg:!1,loaderObj:"",ColorLoader:"#1ab09c",loader:!1,CANVAS:!0,imageArray:[],tmpArr:[],tmpArr2:[],img:{},imageJqObj:"",imageObj:"",imageId:"",wrapObj:"",imgDopJqObj:"",imgFlag:1,imgWidth:0,imgHeight:0,flagImg2:!0,windowWidth:$(window).width(),windowHeight:$(window).height(),memPageX:0,memPageY:0,startTime:0,startPageX:0,keyDown:!1,frames:"",rows:"",imagePath:"",imageName:"",maxZoom:"",imageLow:"",imageHigh:"",imagesType:"jpg",sprite:!0,imageCols:0,imageRows:0,imageFrames:0,frame:1,row:1,imgNum:0,toRotate:1,posRotate:1,autoPlay:!1,zoomFlag:!1,minIntRotate:100,intervalRotate:100,intervalID:0,loadErrorTime:0,imgOffsetX1:0,imgOffsetY1:0,imgOffsetX2:0,imgOffsetY2:0,imgX1:0,imgY1:0,imgX2:0,imgY2:0,canvasObj:"",canvasContext:"",canOffX:0,canOffY:0,canWidth:0,canHeight:0,zoom:10,zoomStep:0,zoomMem:0,radiusArr:new Array("5px","10px","20px","30px","5px 20px","20px 5px"),radiusN:0,colorArr:new Array("a00","0a0","00a","aa0","a0a","0aa","000"),colorN:0,PANELS:[[["horizon","bottom","center"],["3d","backward","stop","forward","expand"],"main-control-panel"],[["vertical","top","right"],["plus","minus","scissors","paint-format"]]],buttonsKit:1,BUTTONS:{1:{expand:["e60c","fullscreen","Во весь экран"],contract:["e60d","fullscreen","Выход из полноэкранного режима"],backward:["e615","backwardRotate","Назад"],forward:["e61a","forwardRotate","Вперед"],play:["e60b","","Play"],stop:["e60a","stopRotate","Остановить"],minus:["e603","minusSize","Уменьшить"],plus:["e604","plusSize","Увеличить"],up:["e616","rowUp","Up"],down:["e619","rowDown","Down"],scissors:["e617","radiusKey","Radius"],"paint-format":["e600","colorKey","Color"],"3d":["e613","move3d","<- 360 ->"],move:["e612","move3d","<- move ->"]},2:{expand:["e60e","fullscreen","Во весь экран"],contract:["e60f","fullscreen","Выход из полноэкранного режима"],backward:["e605","backwardRotate","Назад"],forward:["e608","forwardRotate","Вперед"],play:["e601","","Play"],stop:["e602","stopRotate","Остановить"],minus:["e611","minusSize","Уменьшить"],plus:["e610","plusSize","Увеличить"],up:["e606","rowUp","Up"],down:["e607","rowDown","Down"],scissors:["e609","radiusKey","Radius"],"paint-format":["e618","colorKey","Color"],"3d":["e613","move3d","<- 360 ->"],move:["e612","move3d","<- move ->"]}}},options);start(set.imgWidth,set.imgHeight)}};$.fn.Photo3D=function(e){return methods[e]?methods[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Метод с именем "+e+" не существует для jQuery.Photo3D"):methods.init.apply(this,arguments)}}(jQuery); jQuery(document).ready(function(){jQuery(".photo3d-preview-image").each(function(){jQuery(this).prop("complete")?jQuery(this).Photo3Dconfig():jQuery(this).load(function(){jQuery(this).Photo3Dconfig()})})}),function(t){var e={init:function(t){this.each(function(){"undefined"==typeof jQuery(this).metadata().startImmediately||jQuery(this).metadata().startImmediately?e.show3d(this):e.click3d(this)})},show3d:function(t){var e=jQuery(t),a=t.width,o=t.height,i=!0,n=0,d=0,r="",m="",f="",u=0,p=1,s=!0,y=100,c=jQuery(t).attr("src").replace(r,"").replace(".jpg",""),l=c+".3d/",g=c.split("/"),c=g[g.length-1],h=1,v=1,j=10,R=0,w=1,Q="",z="",b=12,x=0,P=0,C=0,B=0,D=0,k=0,F="";""==t.id&&(t.id="id"+(new Date).getTime()),"undefined"!=typeof e.metadata().frames&&(u=e.metadata().frames),"undefined"!=typeof e.metadata().yframes&&(p=e.metadata().yframes),"undefined"!=typeof e.metadata().autoPlay&&(s=e.metadata().autoPlay),"undefined"!=typeof e.metadata().maxZoom&&(y=e.metadata().maxZoom),"undefined"!=typeof e.metadata().useSeparateFrames&&e.metadata().useSeparateFrames&&(i=!1),i&&("undefined"!=typeof e.metadata().spriteCols&&"undefined"!=typeof e.metadata().spriteRows&&(n=e.metadata().spriteCols,d=e.metadata().spriteRows),m=r+l+c+".3d.100.jpg",f=r+l+c+".3d."+y+".jpg"),"undefined"!=typeof e.metadata().buttonsKit&&(h=e.metadata().buttonsKit),"undefined"!=typeof e.metadata().toRotate&&(v=e.metadata().toRotate),"undefined"!=typeof e.metadata().zoom&&(j=e.metadata().zoom),"undefined"!=typeof e.metadata().zoomIncrement&&(R=e.metadata().zoomIncrement),"undefined"!=typeof e.metadata().trendCorrect&&(w=e.metadata().trendCorrect),"undefined"!=typeof e.metadata().formButtons&&(Q=e.metadata().formButtons),"undefined"!=typeof e.metadata().colorButtons&&(z=e.metadata().colorButtons),"undefined"!=typeof e.metadata().sensitivity&&(b=e.metadata().sensitivity),"undefined"!=typeof e.metadata().firstFrameX&&(x=e.metadata().firstFrameX),"undefined"!=typeof e.metadata().firstFrameY&&(P=e.metadata().firstFrameY),"undefined"!=typeof e.metadata().horizontalRangeLeft&&(C=e.metadata().horizontalRangeLeft),"undefined"!=typeof e.metadata().horizontalRangeRight&&(B=e.metadata().horizontalRangeRight),"undefined"!=typeof e.metadata().verticalRangeBottom&&(D=e.metadata().verticalRangeBottom),"undefined"!=typeof e.metadata().verticalRangeTop&&(k=e.metadata().verticalRangeTop),"undefined"!=typeof e.metadata().productCode&&(F=e.metadata().productCode);var I="";y>100&&(I="move");var L=[[["horizon","bottom","center"],["plus","minus","backward","stop","forward","expand",I],"main-control-panel"]];if(!i&&p>1){var S=[[["vertical","top","right"],["up","down"]]];jQuery.merge(L,S)}e.Photo3D({buttonsKit:h,PANELS:L,imageObj:t,imageJqObj:e,imageId:t.id,imgWidth:a,imgHeight:o,sprite:i,frames:u,rows:p,imagePath:r+l,imageName:c+".3d.",maxZoom:y,imageLow:m,imageHigh:f,imageCols:n,imageRows:d,imageFrames:u,toRotate:v,autoPlay:s,zoom:j,zoomStep:R,trendCorrect:w,formButtons:Q,colorButtons:z,sensitivity:b,frame:w?u-x:x+1,row:P+1,horizontalRangeLeft:C,horizontalRangeRight:B,verticalRangeBottom:D,verticalRangeTop:k,productCode:F})},click3d:function(t){var a=jQuery(t),o=t.width+"px",i=t.height+"px";a.wrap(''),a.before(''),a.on("click",function(a){e.load3d(t)}),jQuery("#text"+t.id).on("click",function(a){e.load3d(t)})},load3d:function(t){var a=jQuery(t);jQuery("#text"+t.id).remove(),a.unwrap(),a.unbind(),e.show3d(t),event.stopPropagation(),event.preventDefault()}};t.fn.Photo3Dconfig=function(a){return e[a]?e[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?void t.error("Метод с именем "+a+" не существует для jQuery.Photo3Dconfig"):e.init.apply(this,arguments)}}(jQuery);