Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String.prototype.z=function()
  2.     {
  3.     var v=this;
  4.     return v.split("").reverse().join("");
  5. };
  6. var SlideDeck;
  7. (function($)
  8.     {
  9.     SlideDeck=function(d,f)
  10.         {
  11.         var self=this,d=$(d);
  12.         var j="1.2.1";
  13.         this.options=
  14.             {
  15.             speed:500,transition:'swing',start:1,activeCorner:true,index:true,scroll:true,keys:true,autoPlay:false,autoPlayInterval:5000,hideSpines:false,cycle:false,controlProgress:false
  16.         };
  17.         this.classes=
  18.             {
  19.             slide:'slide',spine:'spine',label:'label',index:'index',active:'active',indicator:'indicator',activeCorner:'activeCorner',disabled:'disabled',vertical:"lacitreVsedils".z(),previous:'previous',next:'next'
  20.         };
  21.         this.current=1;
  22.         this.deck=d;
  23.         this.spines=d.children('dt');
  24.         this.slides=d.children('dd');
  25.         this.controlTo=1;
  26.         this.session=[];
  27.         this.disabledSlides=[];
  28.         this.pauseAutoPlay=false;
  29.         this.isLoaded=false;
  30.         var l=navigator.userAgent.toLowerCase();
  31.         this.browser=
  32.             {
  33.             chrome:l.match(/chrome/)?true:false,firefox:l.match(/firefox/)?true:false,firefox2:l.match(/firefox\/2/)?true:false,firefox30:l.match(/firefox\/3\.0/)?true:false,msie:l.match(/msie/)?true:false,msie6:(l.match(/msie 6/)&&!l.match(/msie 7|8/))?true:false,msie7:l.match(/msie 7/)?true:false,msie8:l.match(/msie 8/)?true:false,chromeFrame:(l.match(/msie/)&&l.match(/chrome/))?true:false,opera:l.match(/opera/)?true:false,safari:(l.match(/safari/)&&!l.match(/chrome/))?true:false
  34.         };
  35.         for(var b in this.browser)
  36.             {
  37.             if(this.browser[b]===true)
  38.                 {
  39.                 this.browser._this=b;
  40.             }
  41.         }
  42.         if(this.browser.chrome===true)
  43.             {
  44.             this.browser.version=l.match(/chrome\/([0-9\.]+)/)[1];
  45.         }
  46.         if(this.browser.firefox===true)
  47.             {
  48.             this.browser.version=l.match(/firefox\/([0-9\.]+)/)[1];
  49.         }
  50.         if(this.browser.msie===true)
  51.             {
  52.             this.browser.version=l.match(/msie ([0-9\.]+)/)[1];
  53.         }
  54.         if(this.browser.opera===true)
  55.             {
  56.             this.browser.version=l.match(/version\/([0-9\.]+)/)[1];
  57.         }
  58.         if(this.browser.safari===true)
  59.             {
  60.             this.browser.version=l.match(/version\/([0-9\.]+)/)[1];
  61.         }
  62.         var m;
  63.         var n;
  64.         var o,p,q,s;
  65.         var u=function(spine)
  66.             {
  67.             if(self.browser.msie&&!self.browser.chromeFrame)
  68.                 {
  69.                 var S=spine.css("roloc-dnuorgkcab".z());
  70.                 var T=S;
  71.                 if(T=="transparent")
  72.                     {
  73.                     S="#ffffff";
  74.                 }
  75.                 else
  76.                     {
  77.                     if(T.match('\x23'))
  78.                         {
  79.                         if(T.length<7)
  80.                             {
  81.                             var t="\x23"+T.substr(1,1)+T.substr(1,1)+T.substr(2,1)+T.substr(2,1)+T.substr(3,1)+T.substr(3,1);
  82.                             S=t;
  83.                         }
  84.                     }
  85.                 }
  86.                 S=S.replace("\x23","");
  87.                 cParts=
  88.                     {
  89.                     r:S.substr(0,2),g:S.substr(2,2),b:S.substr(4,2)
  90.                 };
  91.                 var U="\x23";
  92.                 var V="FEDCBA09876543210".z();
  93.                 for(var k in cParts)
  94.                     {
  95.                     cParts[k]=Math.max(0,(parseInt(cParts[k],16)-1));
  96.                     cParts[k]=V.charAt((cParts[k]-cParts[k]%16)/16)+V.charAt(cParts[k]%16);
  97.                     U+=cParts[k];
  98.                 }
  99.                 spine.find('\x2e'+self.classes.index).css(
  100.                     {
  101.                     'filter':"=roloc(amorhc )1=noitator(egamIcisaB.tfosorciM.mrofsnarTegamIXD:digorp".z()+U+'\x29',backgroundColor:U
  102.                 }
  103.                 );
  104.             }
  105.         };
  106.         var w=function()
  107.             {
  108.             if(typeof(Cufon)!="undefined")
  109.                 {
  110.                 Cufon.DOM.ready(function()
  111.                     {
  112.                     if(typeof(self.options.cufonRefresh)!="undefined")
  113.                         {
  114.                         var S=[];
  115.                         if(typeof(self.options.cufonRefresh)=="string")
  116.                             {
  117.                             S.push(self.options.cufonRefresh);
  118.                         }
  119.                         else
  120.                             {
  121.                             S=self.options.cufonRefresh;
  122.                         }
  123.                         for(var i=0;
  124.                         i<S.length;
  125.                         i++)
  126.                             {
  127.                             Cufon.refresh(S[i]);
  128.                         }
  129.                     }
  130.                     if(self.options.hideSpines===false)
  131.                         {
  132.                         var T=0;
  133.                         if(self.browser.msie8&&!self.browser.chromeFrame)
  134.                             {
  135.                             T=Math.floor(($(self.spines[0]).outerWidth()-$($(self.spines[0]).find('cufon')[0]).height())/2);
  136.                         }
  137.                         if(self.browser.safari||self.browser.chrome||self.browser.chromeFrame)
  138.                             {
  139.                             if(document.doctype.publicId.toLowerCase().match(/transitional/))
  140.                                 {
  141.                                 T=Math.floor(($(self.spines[0]).outerHeight()-$($(self.spines[0]).find('cufon')[0]).height())/2);
  142.                             }
  143.                         }
  144.                         self.spines.find('>cufon').css('margin-top',T);
  145.                     }
  146.                 }
  147.                 );
  148.             }
  149.         };
  150.         var A=false;
  151.         var B=function()
  152.             {
  153.             var S=document.getElementsByTagName('script');
  154.             for(var i=0;
  155.             i<S.length;
  156.             i++)
  157.                 {
  158.                 var T=S[i].src;
  159.                 if(T.match(/slidedeck\.jquery(\.(pro|profree))?(\.pack)?\.js/))
  160.                     {
  161.                     var U=T.split('\x3f');
  162.                     if(U.length>1)
  163.                         {
  164.                         if(U[1].match(/noping/))
  165.                             {
  166.                             A=true;
  167.                         }
  168.                     }
  169.                 }
  170.             }
  171.             if(A===false)
  172.                 {
  173.                 A=true;
  174.                 var V=new Image();
  175.                 V.src=(document.location.protocol=="https:"?"https:":"http:")+"/0dffa540f75499d537c9385e34013f6848585886/moc.kcededils.www//".z()+j+"/pro";
  176.             }
  177.         };
  178.         var C=function()
  179.             {
  180.             if(self.options.controlProgress===true)
  181.                 {
  182.                 for(var i=0;
  183.                 i<self.spines.length;
  184.                 i++)
  185.                     {
  186.                     if(i<self.controlTo)
  187.                         {
  188.                         $(self.spines[i]).removeClass(self.classes.disabled);
  189.                     }
  190.                     else
  191.                         {
  192.                         $(self.spines[i]).addClass(self.classes.disabled);
  193.                     }
  194.                 }
  195.             }
  196.         };
  197.         var D=function(event)
  198.             {
  199.             var S=false;
  200.             if(typeof(self.verticalSlides)!='undefined')
  201.                 {
  202.                 if(typeof(self.vertical().options)!='undefined')
  203.                     {
  204.                     if(self.vertical().options.scroll===true&&$(event.target).parents('\x2e'+self.classes.vertical).length>0)
  205.                         {
  206.                         S=true;
  207.                     }
  208.                 }
  209.             }
  210.             return S;
  211.         };
  212.         var E=
  213.             {
  214.             timestamp:function()
  215.                 {
  216.                 var S=new Date();
  217.                 var T=S.getUTCFullYear()+"\x2d"+S.getUTCMonth()+"\x2d"+S.getUTCDate()+"\x20"+S.getUTCHours()+"\x3a"+S.getUTCMinutes()+"\x3a"+S.getUTCSeconds();
  218.                 var U=(0-S.getTimezoneOffset()/60);
  219.                 var V=Math.floor(U);
  220.                 var W="00";
  221.                 if(V!=U)
  222.                     {
  223.                     W=(U-V)*60;
  224.                 }
  225.                 return T+V+"\x3a"+W;
  226.             }
  227.             ,track:function(S)
  228.                 {
  229.                 if(self.session.length===0||self.session[self.session.length-1].slide!=S)
  230.                     {
  231.                     self.session.push(
  232.                         {
  233.                         slide:S,timestamp:this.timestamp()
  234.                     }
  235.                     );
  236.                 }
  237.             }
  238.         };
  239.         var F=function()
  240.             {
  241.             var S=false,T=false;
  242.             gotoNext=function()
  243.                 {
  244.                 S=false;
  245.                 if(self.pauseAutoPlay===false)
  246.                     {
  247.                     if(typeof(self.vertical())!='undefined')
  248.                         {
  249.                         if(self.vertical().navChildren)
  250.                             {
  251.                             if(self.vertical().current+1!=self.vertical().slides.length)
  252.                                 {
  253.                                 S=true;
  254.                             }
  255.                         }
  256.                     }
  257.                     var U=true;
  258.                     if(self.options.cycle===false&&self.current==self.slides.length)
  259.                         {
  260.                         if(S===true)
  261.                             {
  262.                             if(self.vertical().current+1===self.vertical().slides.length)
  263.                                 {
  264.                                 U=false;
  265.                             }
  266.                         }
  267.                         else
  268.                             {
  269.                             U=false;
  270.                         }
  271.                     }
  272.                     if(U===false)
  273.                         {
  274.                         self.pauseAutoPlay=true;
  275.                     }
  276.                     else
  277.                         {
  278.                         if(S===true)
  279.                             {
  280.                             self.vertical().next(function(V)
  281.                                 {
  282.                                 if(typeof(V.vertical().slides)!='undefined')
  283.                                     {
  284.                                     if(V.vertical().current+1==V.vertical().slides.length)
  285.                                         {
  286.                                         S=false;
  287.                                         T=V.current;
  288.                                     }
  289.                                 }
  290.                             }
  291.                             );
  292.                         }
  293.                         else
  294.                             {
  295.                             self.next(function(V)
  296.                                 {
  297.                                 if(T!==false)
  298.                                     {
  299.                                     V.resetVertical(T);
  300.                                     T=false;
  301.                                 }
  302.                             }
  303.                             );
  304.                         }
  305.                     }
  306.                 }
  307.             };
  308.             setInterval(gotoNext,self.options.autoPlayInterval);
  309.         };
  310.         var G=function()
  311.             {
  312.             if($.inArray(d.css('position'),['position','absolute','fixed']))
  313.                 {
  314.                 d.css('position','relative');
  315.             }
  316.             d.css('overflow','hidden');
  317.             for(var i=0;
  318.             i<self.slides.length;
  319.             i++)
  320.                 {
  321.                 var S=$(self.slides[i]);
  322.                 if(self.spines.length>i)
  323.                     {
  324.                     var spine=$(self.spines[i]);
  325.                 }
  326.                 var T=
  327.                     {
  328.                     top:parseInt(S.css('padding-top'),10),right:parseInt(S.css("thgir-gniddap".z()),10),bottom:parseInt(S.css("mottob-gniddap".z()),10),left:parseInt(S.css("tfel-gniddap".z()),10)
  329.                 };
  330.                 var U=
  331.                     {
  332.                     top:parseInt(S.css("htdiw-pot-redrob".z()),10),right:parseInt(S.css("htdiw-thgir-redrob".z()),10),bottom:parseInt(S.css("htdiw-mottob-redrob".z()),10),left:parseInt(S.css("htdiw-tfel-redrob".z()),10)
  333.                 };
  334.                 for(var k in U)
  335.                     {
  336.                     U[k]=isNaN(U[k])?0:U[k];
  337.                 }
  338.                 if(i<self.current)
  339.                     {
  340.                     if(i==self.current-1)
  341.                         {
  342.                         if(self.options.hideSpines!==true)
  343.                             {
  344.                             spine.addClass(self.classes.active);
  345.                         }
  346.                         S.addClass(self.classes.active);
  347.                     }
  348.                     offset=i*p;
  349.                     if(self.options.hideSpines===true)
  350.                         {
  351.                         if(i==self.current-1)
  352.                             {
  353.                             offset=0;
  354.                         }
  355.                         else
  356.                             {
  357.                             offset=0-(self.options.start-i-1)*d.width();
  358.                         }
  359.                     }
  360.                 }
  361.                 else
  362.                     {
  363.                     offset=i*p+q;
  364.                     if(self.options.hideSpines===true)
  365.                         {
  366.                         offset=(i+1-self.options.start)*d.width();
  367.                     }
  368.                 }
  369.                 self.slide_width=(q-T.left-T.right-U.left-U.right);
  370.                 S.css(
  371.                     {
  372.                     position:'absolute',left:offset,zIndex:1,height:(n-T.top-T.bottom-U.top-U.bottom)+"px",width:self.slide_width+"px",margin:0,paddingLeft:T.left+p+"px"
  373.                 }
  374.                 ).addClass(self.classes.slide).addClass(self.classes.slide+"\x5f"+(i+1));
  375.                 if(self.options.hideSpines!==true)
  376.                     {
  377.                     var V=
  378.                         {
  379.                         top:parseInt(spine.css('padding-top'),10),right:parseInt(spine.css("thgir-gniddap".z()),10),bottom:parseInt(spine.css("mottob-gniddap".z()),10),left:parseInt(spine.css("tfel-gniddap".z()),10)
  380.                     };
  381.                     for(var k in V)
  382.                         {
  383.                         if(V[k]<10&&(k=="left"||k=="right"))
  384.                             {
  385.                             V[k]=10;
  386.                         }
  387.                     }
  388.                     var W=V.top+"px "+V.right+"px "+V.bottom+"px "+V.left+"px";
  389.                     spine.css(
  390.                         {
  391.                         position:'absolute',zIndex:3,display:'block',left:offset,width:(n-V.left-V.right)+"px",height:o+"px",padding:W,rotation:'270deg','-webkit-transform':")ged072(etator".z(),'-webkit-transform-origin':s+'px 0px','-moz-transform':")ged072(etator".z(),'-moz-transform-origin':s+'px 0px','-o-transform':")ged072(etator".z(),'-o-transform-origin':s+'px 0px',textAlign:'right',top:(self.browser.msie&&!self.browser.chromeFrame)?0:(n-s)+"px",marginLeft:((self.browser.msie&&!self.browser.chromeFrame)?0:(0-s))+"px",filter:")3=noitator(egamIcisaB.tfosorciM.mrofsnarTegamIXD:digorp".z()
  392.                     }
  393.                     ).addClass(self.classes.spine).addClass(self.classes.spine+"\x5f"+(i+1));
  394.                 }
  395.                 else
  396.                     {
  397.                     if(typeof(spine)!="undefined")
  398.                         {
  399.                         spine.hide();
  400.                     }
  401.                 }
  402.                 if(i==self.slides.length-1)
  403.                     {
  404.                     S.addClass('last');
  405.                     if(self.options.hideSpines!==true)
  406.                         {
  407.                         spine.addClass('last');
  408.                     }
  409.                 }
  410.                 if(self.options.activeCorner===true&&self.options.hideSpines===false)
  411.                     {
  412.                     var X=document.createElement('DIV');
  413.                     X.className=self.classes.activeCorner+'\x20'+(self.classes.spine+'\x5f'+(i+1));
  414.                     spine.after(X);
  415.                     spine.next('\x2e'+self.classes.activeCorner).css(
  416.                         {
  417.                         position:'absolute',top:'25px',left:offset+p+"px",overflow:"hidden",zIndex:"20000"
  418.                     }
  419.                     ).hide();
  420.                     if(spine.hasClass(self.classes.active))
  421.                         {
  422.                         spine.next('\x2e'+self.classes.activeCorner).show();
  423.                     }
  424.                 }
  425.                 if(self.options.hideSpines!==true)
  426.                     {
  427.                     var Y=document.createElement('DIV');
  428.                     Y.className=self.classes.index;
  429.                     if(self.options.index!==false)
  430.                         {
  431.                         var Z;
  432.                         if(typeof(self.options.index)!='boolean')
  433.                             {
  434.                             Z=self.options.index[i%self.options.index.length];
  435.                         }
  436.                         else
  437.                             {
  438.                             Z=""+(i+1);
  439.                         }
  440.                         Y.appendChild(document.createTextNode(Z));
  441.                     }
  442.                     spine.append(Y);
  443.                     spine.find('\x2e'+self.classes.index).css(
  444.                         {
  445.                         position:'absolute',zIndex:2,display:'block',width:o+"px",height:o+"px",textAlign:'center',bottom:((self.browser.msie&&!self.browser.chromeFrame)?0:(0-s))+"px",left:((self.browser.msie&&!self.browser.chromeFrame)?5:20)+"px",rotation:"90deg",'-webkit-transform':")ged09(etator".z(),'-webkit-transform-origin':s+'px 0px','-moz-transform':")ged09(etator".z(),'-moz-transform-origin':s+'px 0px','-o-transform':")ged09(etator".z(),'-o-transform-origin':s+'px 0px'
  446.                     }
  447.                     );
  448.                     u(spine);
  449.                 }
  450.             }
  451.             B();
  452.             if(self.options.hideSpines!==true)
  453.                 {
  454.                 self.spines.bind('click',function(event)
  455.                     {
  456.                     event.preventDefault();
  457.                     self.goTo(self.spines.index(this)+1);
  458.                 }
  459.                 );
  460.             }
  461.             if(self.options.keys!==false)
  462.                 {
  463.                 $(document).bind('keydown',function(event)
  464.                     {
  465.                     if($(event.target).parents().index(self.deck)==-1)
  466.                         {
  467.                         if(event.keyCode==39)
  468.                             {
  469.                             self.pauseAutoPlay=true;
  470.                             self.next();
  471.                         }
  472.                         else if(event.keyCode==37)
  473.                             {
  474.                             self.pauseAutoPlay=true;
  475.                             self.prev();
  476.                         }
  477.                     }
  478.                 }
  479.                 );
  480.             }
  481.             if(typeof($.event.special.mousewheel)!="undefined")
  482.                 {
  483.                 d.bind("mousewheel",function(event)
  484.                     {
  485.                     if(self.options.scroll!==false)
  486.                         {
  487.                         if(!D(event))
  488.                             {
  489.                             var ad=event.detail?event.detail:event.wheelDelta;
  490.                             if(self.browser.msie||self.browser.safari||self.browser.chrome)
  491.                                 {
  492.                                 ad=0-ad;
  493.                             }
  494.                             var ae=false;
  495.                             if($(event.originalTarget).parents(self.deck).length)
  496.                                 {
  497.                                 if($.inArray(event.originalTarget.nodeName.toLowerCase(),['input','select','option','textarea'])!=-1)
  498.                                     {
  499.                                     ae=true;
  500.                                 }
  501.                             }
  502.                             if(ae!==true)
  503.                                 {
  504.                                 if(ad>0)
  505.                                     {
  506.                                     switch(self.options.scroll)
  507.                                         {
  508.                                         case "stop":event.preventDefault();
  509.                                         break;
  510.                                         case true:default:if(self.current<self.slides.length||self.options.cycle==true)
  511.                                             {
  512.                                             event.preventDefault();
  513.                                         }
  514.                                         break;
  515.                                     }
  516.                                     self.pauseAutoPlay=true;
  517.                                     self.next();
  518.                                 }
  519.                                 else
  520.                                     {
  521.                                     switch(self.options.scroll)
  522.                                         {
  523.                                         case "stop":event.preventDefault();
  524.                                         break;
  525.                                         case true:default:if(self.current!=1||self.options.cycle==true)
  526.                                             {
  527.                                             event.preventDefault();
  528.                                         }
  529.                                         break;
  530.                                     }
  531.                                     self.pauseAutoPlay=true;
  532.                                     self.prev();
  533.                                 }
  534.                             }
  535.                         }
  536.                     }
  537.                 }
  538.                 );
  539.             }
  540.             if(self.browser.msie!==true)
  541.                 {
  542.                 var aa=
  543.                     {
  544.                     x:0,y:0
  545.                 };
  546.                 var ab=
  547.                     {
  548.                     x:0,y:0
  549.                 };
  550.                 var ac=
  551.                     {
  552.                     x:50,y:30
  553.                 };
  554.                 d[0].addEventListener('touchstart',function(event)
  555.                     {
  556.                     aa.x=event.targetTouches[0].pageX;
  557.                     aa.y=event.targetTouches[0].pageY;
  558.                 }
  559.                 ,false);
  560.                 d[0].addEventListener('touchmove',function(event)
  561.                     {
  562.                     event.preventDefault();
  563.                     ab.x=event.targetTouches[0].pageX;
  564.                     ab.y=event.targetTouches[0].pageY;
  565.                 }
  566.                 ,false);
  567.                 d[0].addEventListener('touchend',function(event)
  568.                     {
  569.                     var ad=aa.x-ab.x;
  570.                     var ae=aa.y-ab.y;
  571.                     if(ad<(0-ac.x))
  572.                         {
  573.                         self.pauseAutoPlay=true;
  574.                         self.prev();
  575.                     }
  576.                     else if(ad>ac.x)
  577.                         {
  578.                         self.pauseAutoPlay=true;
  579.                         self.next();
  580.                     }
  581.                     if(ae<(0-ac.y))
  582.                         {
  583.                         self.pauseAutoPlay=true;
  584.                         self.vertical().prev();
  585.                     }
  586.                     else if(ae>ac.y)
  587.                         {
  588.                         self.pauseAutoPlay=true;
  589.                         self.vertical().next();
  590.                     }
  591.                 }
  592.                 ,false);
  593.             }
  594.             $(self.spines[self.current-2]).addClass(self.classes.previous);
  595.             $(self.spines[self.current]).addClass(self.classes.next);
  596.             w();
  597.             C();
  598.             E.track(self.current);
  599.             if(self.options.autoPlay===true)
  600.                 {
  601.                 F();
  602.             }
  603.             self.isLoaded=true;
  604.         };
  605.         var H=function(S)
  606.             {
  607.             S=Math.max(1,S-1);
  608.             if($.inArray(S,self.disabledSlides)!=-1)
  609.                 {
  610.                 if(S==1)
  611.                     {
  612.                     S=1;
  613.                 }
  614.                 else
  615.                     {
  616.                     S=H(S);
  617.                 }
  618.             }
  619.             return S;
  620.         };
  621.         var I=function(S)
  622.             {
  623.             S=Math.min(self.slides.length,S+1);
  624.             if($.inArray(S,self.disabledSlides)!=-1)
  625.                 {
  626.                 if(S==self.slides.length)
  627.                     {
  628.                     S=self.current;
  629.                 }
  630.                 else
  631.                     {
  632.                     S=I(S);
  633.                 }
  634.             }
  635.             return S;
  636.         };
  637.         var J=function(S)
  638.             {
  639.             S=Math.min(self.slides.length,Math.max(1,S));
  640.             if($.inArray(S,self.disabledSlides)!=-1)
  641.                 {
  642.                 if(S<self.current)
  643.                     {
  644.                     S=H(S);
  645.                 }
  646.                 else
  647.                     {
  648.                     S=I(S);
  649.                 }
  650.             }
  651.             return S;
  652.         };
  653.         var K=function(S,T)
  654.             {
  655.             S=J(S);
  656.             if((S<=self.controlTo||self.options.controlProgress!==true))
  657.                 {
  658.                 if(typeof(self.options.before)=="function")
  659.                     {
  660.                     self.options.before(self);
  661.                 }
  662.                 if(typeof(T)!="undefined")
  663.                     {
  664.                     if(typeof(T.before)=="function")
  665.                         {
  666.                         T.before(self);
  667.                     }
  668.                 }
  669.                 var U=true;
  670.                 if(S<self.current)
  671.                     {
  672.                     U=false;
  673.                 }
  674.                 var V=[self.classes.active,self.classes.next,self.classes.previous].join('\x20');
  675.                 self.current=S;
  676.                 self.spines.removeClass(V);
  677.                 self.slides.removeClass(V);
  678.                 d.find('\x2e'+self.classes.activeCorner).hide();
  679.                 $(self.spines[self.current-2]).addClass(self.classes.previous);
  680.                 $(self.spines[self.current]).addClass(self.classes.next);
  681.                 for(var i=0;
  682.                 i<self.slides.length;
  683.                 i++)
  684.                     {
  685.                     var W=0;
  686.                     if(self.options.hideSpines!==true)
  687.                         {
  688.                         var spine=$(self.spines[i]);
  689.                     }
  690.                     var X=$(self.slides[i]);
  691.                     if(i<self.current)
  692.                         {
  693.                         if(i==(self.current-1))
  694.                             {
  695.                             X.addClass(self.classes.active);
  696.                             if(self.options.hideSpines!==true)
  697.                                 {
  698.                                 spine.addClass(self.classes.active);
  699.                                 spine.next('\x2e'+self.classes.activeCorner).show();
  700.                             }
  701.                             w();
  702.                         }
  703.                         W=i*p;
  704.                     }
  705.                     else
  706.                         {
  707.                         W=i*p+q;
  708.                     }
  709.                     if(self.options.hideSpines===true)
  710.                         {
  711.                         W=(i-self.current+1)*d.width();
  712.                     }
  713.                     var Y=
  714.                         {
  715.                         duration:self.options.speed,easing:self.options.transition
  716.                     };
  717.                     if(i==(U===true&&self.current-1)||i==(U===false&&self.current))
  718.                         {
  719.                         var Z=[];
  720.                         if(typeof(self.options.complete)=="function")
  721.                             {
  722.                             Z.push(function()
  723.                                 {
  724.                                 self.options.complete(self);
  725.                             }
  726.                             );
  727.                         }
  728.                         switch(typeof(T))
  729.                             {
  730.                             case "function":Z.push(function()
  731.                                 {
  732.                                 T(self);
  733.                             }
  734.                             );
  735.                             break;
  736.                             case "object":Z.push(function()
  737.                                 {
  738.                                 T.complete(self);
  739.                             }
  740.                             );
  741.                             break;
  742.                         }
  743.                         E.track(self.current);
  744.                         if(i==0)
  745.                             {
  746.                             Y.complete=function()
  747.                                 {
  748.                                 for(var z=0;
  749.                                 z<Z.length;
  750.                                 z++)
  751.                                     {
  752.                                     Z[z]();
  753.                                 }
  754.                             };
  755.                         }
  756.                     }
  757.                     X.stop().animate(
  758.                         {
  759.                         left:W+"px",width:self.slide_width+"px"
  760.                     }
  761.                     ,Y);
  762.                     if(self.options.hideSpines!==true)
  763.                         {
  764.                         u(spine);
  765.                         if(spine.css('left')!=W+"px")
  766.                             {
  767.                             spine.stop().animate(
  768.                                 {
  769.                                 left:W+"px"
  770.                             }
  771.                             ,
  772.                                 {
  773.                                 duration:self.options.speed,easing:self.options.transition
  774.                             }
  775.                             );
  776.                             spine.next('\x2e'+self.classes.activeCorner).stop().animate(
  777.                                 {
  778.                                 left:W+p+"px"
  779.                             }
  780.                             ,
  781.                                 {
  782.                                 duration:self.options.speed,easing:self.options.transition
  783.                             }
  784.                             );
  785.                         }
  786.                     }
  787.                 }
  788.                 B();
  789.             }
  790.         };
  791.         var L=function(S,T)
  792.             {
  793.             var U=S;
  794.             if(typeof(S)==="string")
  795.                 {
  796.                 U=
  797.                     {
  798.                 };
  799.                 U[S]=T;
  800.             }
  801.             for(var V in U)
  802.                 {
  803.                 T=U[V];
  804.                 switch(V)
  805.                     {
  806.                     case "speed":case "start":T=parseFloat(T);
  807.                     if(isNaN(T))
  808.                         {
  809.                         T=self.options[V];
  810.                     }
  811.                     break;
  812.                     case "scroll":case "keys":case "activeCorner":case "controlProgress":case "hideSpines":case "autoPlay":case "cycle":if(typeof(T)!=="boolean")
  813.                         {
  814.                         T=self.options[V];
  815.                     }
  816.                     break;
  817.                     case "cufonRefresh":case "transition":if(typeof(T)!=="string")
  818.                         {
  819.                         T=self.options[V];
  820.                     }
  821.                     break;
  822.                     case "complete":case "before":if(typeof(T)!=="function")
  823.                         {
  824.                         T=self.options[V];
  825.                     }
  826.                     break;
  827.                     case "index":if(typeof(T)!=="boolean")
  828.                         {
  829.                         if(!$.isArray(T))
  830.                             {
  831.                             T=self.options[V];
  832.                         }
  833.                     }
  834.                     break;
  835.                 }
  836.                 self.options[V]=T;
  837.             }
  838.         };
  839.         var M=function(S)
  840.             {
  841.             if($.inArray(S,self.disabledSlides)==-1&&S!==1&&S!==0)
  842.                 {
  843.                 self.disabledSlides.push(S);
  844.             }
  845.         };
  846.         var N=function(S)
  847.             {
  848.             var T=$.inArray(S,self.disabledSlides);
  849.             if(T!=-1)
  850.                 {
  851.                 self.disabledSlides.splice(T,1);
  852.             }
  853.         };
  854.         var O=function(S,T,U)
  855.             {
  856.             var self=this;
  857.             var S=$(S);
  858.             var V=S.children();
  859.             var W=V.length;
  860.             var X=S.parents('dd.slide');
  861.             var Y=S.parent();
  862.             var Z=X.innerHeight();
  863.             var aa=100;
  864.             if(T.deck.find('\x2e'+T.classes.activeCorner).length)
  865.                 {
  866.                 aa=T.deck.find('\x2e'+T.classes.activeCorner).css('z-index')-1;
  867.             }
  868.             this.navParent=null;
  869.             this.navChildren=null;
  870.             this.current=0;
  871.             this.slides=V;
  872.             this.options=
  873.                 {
  874.                 speed:500,scroll:true,continueScrolling:false
  875.             };
  876.             if(typeof(U)=='object')
  877.                 {
  878.                 for(var k in U)
  879.                     {
  880.                     this.options[k]=U[k];
  881.                 }
  882.             }
  883.             this.classes=
  884.                 {
  885.                 navContainer:"vaNedilSlacitrev".z(),arrow:'arrow',prefix:"edilSlacitrev".z()
  886.             };
  887.             var ab=function(af,ag,ah)
  888.                 {
  889.                 if(typeof(self.options.before)=='function')
  890.                     {
  891.                     self.options.before(self);
  892.                 }
  893.                 if(typeof(ah)=='object')
  894.                     {
  895.                     if(typeof(ah.before)=='function')
  896.                         {
  897.                         ah.before(self);
  898.                     }
  899.                 }
  900.                 self.current=af;
  901.                 var ai=self.options.speed;
  902.                 if(typeof(ag)!='undefined')
  903.                     {
  904.                     ai=0;
  905.                 }
  906.                 X.find('ul.'+self.classes.navContainer+' li.'+self.classes.arrow).stop().animate(
  907.                     {
  908.                     top:$(self.navChildren[self.current]).position().top+'px'
  909.                 }
  910.                 ,250);
  911.                 self.navChildren.removeClass('active');
  912.                 $(self.navChildren[self.current]).addClass('active');
  913.                 S.stop().animate(
  914.                     {
  915.                     top:0-(self.current*Z)+'px'
  916.                 }
  917.                 ,ai,function()
  918.                     {
  919.                     if(typeof(self.options.complete)=='function')
  920.                         {
  921.                         self.options.complete(self);
  922.                     }
  923.                     if(typeof(ah)=='object')
  924.                         {
  925.                         if(typeof(ah.complete)=='function')
  926.                             {
  927.                             ah.complete(self);
  928.                         }
  929.                     }
  930.                     else if(typeof(ah)=='function')
  931.                         {
  932.                         ah(T);
  933.                     }
  934.                 }
  935.                 );
  936.             };
  937.             var ac=function()
  938.                 {
  939.                 var af=document.createElement('UL');
  940.                 af.className=self.classes.navContainer;
  941.                 af.style.position='absolute';
  942.                 af.style.zIndex=aa;
  943.                 af.style.listStyleType='none';
  944.                 for(a=0;
  945.                 a<W;
  946.                 a++)
  947.                     {
  948.                     var ag=document.createElement('LI');
  949.                     ag.className='nav_'+(a+1)+(a===0?' active':'');
  950.                     ag.style.listStyleType='none';
  951.                     var ah=document.createElement('\x41');
  952.                     ah.href="\x23"+(a+1);
  953.                     ah.appendChild(document.createTextNode('Nav '+(a+1)));
  954.                     ag.appendChild(ah);
  955.                     af.appendChild(ag);
  956.                 }
  957.                 var ai=document.createElement('LI');
  958.                 ai.className=self.classes.arrow;
  959.                 ai.style.top=0;
  960.                 ai.appendChild(document.createTextNode('\x20'));
  961.                 af.appendChild(ai);
  962.                 X.append(af);
  963.                 self.navChildren=X.find('\x2e'+af.className+' li');
  964.                 X.find('\x2e'+af.className+' li a').click(function(event)
  965.                     {
  966.                     event.preventDefault();
  967.                     ab(this.href.split('\x23')[1]-1);
  968.                 }
  969.                 );
  970.             };
  971.             this.goTo=function(v,h,af)
  972.                 {
  973.                 v=Math.min(W-1,Math.max(0,v-1));
  974.                 h=Math.min(T.slides.length-1,Math.max(0,v));
  975.                 $(T.slides[h]).find('\x2e'+this.classes.navContainer+' a:eq('+v+'\x29').addClass(T.classes.active).siblings().removeClass(T.classes.active);
  976.                 ab(v,af);
  977.             };
  978.             this.next=function(af)
  979.                 {
  980.                 ab(Math.min(W-1,self.current+1),undefined,af);
  981.             };
  982.             this.prev=function(af)
  983.                 {
  984.                 ab(Math.max(0,self.current-1),undefined,af);
  985.             };
  986.             this.snapTo=function(v,af)
  987.                 {
  988.                 ab(Math.max(0,Math.min(W-1,v)),true,af);
  989.             };
  990.             var ad=function()
  991.                 {
  992.                 if(!X.find('\x2e'+self.classes.navContainer).length)
  993.                     {
  994.                     var af=((T.browser.msie!==true||T.browser.chromeFrame)?$(T.spines[0]).outerHeight():$(T.spines[0]).outerWidth());
  995.                     if(T.options.hideSpines===true)
  996.                         {
  997.                         af=0;
  998.                     }
  999.                     S.css(
  1000.                         {
  1001.                         position:'absolute',zIndex:aa-1,top:'0px',left:af,listStyleType:'none',padding:'0px',margin:'0px',width:Y.innerWidth()-af,height:Z*W
  1002.                     }
  1003.                     );
  1004.                     var ag=
  1005.                         {
  1006.                         top:parseInt(V.css('padding-top'),10),right:parseInt(V.css("thgir-gniddap".z()),10),bottom:parseInt(V.css("mottob-gniddap".z()),10),left:parseInt(V.css("tfel-gniddap".z()),10)
  1007.                     };
  1008.                     var ah=
  1009.                         {
  1010.                         top:parseInt(V.css("htdiw-pot-redrob".z()),10),right:parseInt(V.css("htdiw-thgir-redrob".z()),10),bottom:parseInt(V.css("htdiw-mottob-redrob".z()),10),left:parseInt(V.css("htdiw-tfel-redrob".z()),10)
  1011.                     };
  1012.                     for(var k in ah)
  1013.                         {
  1014.                         if(isNaN(ah[k]))
  1015.                             {
  1016.                             ah[k]=0;
  1017.                         }
  1018.                     }
  1019.                     var ai=Z-ag.top-ag.bottom-ah.top-ah.bottom;
  1020.                     var aj=S.width()-ag.right-ag.left-ah.right-ah.left;
  1021.                     V.each(function(ak,e)
  1022.                         {
  1023.                         $(e).css(
  1024.                             {
  1025.                             listStyleType:'none',position:'absolute',top:ak*Z,width:aj,height:ai
  1026.                         }
  1027.                         ).addClass(self.classes.prefix+'\x5f'+(ak+1));
  1028.                     }
  1029.                     );
  1030.                     Y.css(
  1031.                         {
  1032.                         overflow:'hidden'
  1033.                     }
  1034.                     );
  1035.                     ac();
  1036.                     if(typeof($.event.special.mousewheel)!="undefined")
  1037.                         {
  1038.                         S.bind("mousewheel",function(event)
  1039.                             {
  1040.                             if(self.options.scroll!==false)
  1041.                                 {
  1042.                                 var ak=event.detail?event.detail:event.wheelDelta;
  1043.                                 if(T.browser.msie||T.browser.safari||T.browser.chrome)
  1044.                                     {
  1045.                                     ak=0-ak;
  1046.                                 }
  1047.                                 var al=false;
  1048.                                 if($(event.originalTarget).parents(self.deck).length)
  1049.                                     {
  1050.                                     if($.inArray(event.originalTarget.nodeName.toLowerCase(),['input','select','option','textarea'])!=-1)
  1051.                                         {
  1052.                                         al=true;
  1053.                                     }
  1054.                                 }
  1055.                                 if(al!==true)
  1056.                                     {
  1057.                                     var am,an=false;
  1058.                                     if(self.options.continueScrolling===true)
  1059.                                         {
  1060.                                         if((self.current+1)==1)
  1061.                                             {
  1062.                                             am=true;
  1063.                                         }
  1064.                                         else if((self.current+1)==self.slides.length)
  1065.                                             {
  1066.                                             an=true;
  1067.                                         }
  1068.                                     }
  1069.                                     if(ak>0)
  1070.                                         {
  1071.                                         event.preventDefault();
  1072.                                         T.pauseAutoPlay=true;
  1073.                                         if(an)
  1074.                                             {
  1075.                                             T.next();
  1076.                                             return false;
  1077.                                         }
  1078.                                         else
  1079.                                             {
  1080.                                             self.next();
  1081.                                         }
  1082.                                     }
  1083.                                     else
  1084.                                         {
  1085.                                         event.preventDefault();
  1086.                                         T.pauseAutoPlay=true;
  1087.                                         if(am)
  1088.                                             {
  1089.                                             T.prev();
  1090.                                             return false;
  1091.                                         }
  1092.                                         else
  1093.                                             {
  1094.                                             self.prev();
  1095.                                         }
  1096.                                     }
  1097.                                 }
  1098.                             }
  1099.                         }
  1100.                         );
  1101.                     }
  1102.                 }
  1103.             };
  1104.             if(Z>0)
  1105.                 {
  1106.                 ad();
  1107.             }
  1108.             else
  1109.                 {
  1110.                 var ae;
  1111.                 ae=setInterval(function()
  1112.                     {
  1113.                     S=$(S);
  1114.                     V=S.children();
  1115.                     W=V.length;
  1116.                     X=S.parents('dd.slide');
  1117.                     Y=S.parent();
  1118.                     Z=X.innerHeight();
  1119.                     if(Z>0)
  1120.                         {
  1121.                         clearInterval(ae);
  1122.                         ad();
  1123.                     }
  1124.                 }
  1125.                 ,20);
  1126.             }
  1127.         };
  1128.         var P=function()
  1129.             {
  1130.             n=d.height();
  1131.             m=d.width();
  1132.             d.css('height',n+"px");
  1133.             o=0;
  1134.             p=0;
  1135.             if(self.options.hideSpines!==true&&self.spines.length>0)
  1136.                 {
  1137.                 o=$(self.spines[0]).height();
  1138.                 p=$(self.spines[0]).outerHeight();
  1139.             }
  1140.             q=m-p*self.spines.length;
  1141.             if(self.options.hideSpines===true)
  1142.                 {
  1143.                 q=m;
  1144.             }
  1145.             s=Math.ceil(o/2);
  1146.         };
  1147.         var Q=function(S)
  1148.             {
  1149.             if((self.browser.opera&&self.browser.version<"10.5")||self.browser.msie6||self.browser.firefox2||self.browser.firefox30)
  1150.                 {
  1151.                 if(typeof(console)!="undefined")
  1152.                     {
  1153.                     if(typeof(console.error)=="function")
  1154.                         {
  1155.                         console.error("rerolpxE tenrenI fo noisrev tnerruc a ro resworb elbapac 3SSC ,nredom a ni egap siht weiv esaelP .kceDedilS yb detroppus ton si resworb bew sihT".z());
  1156.                     }
  1157.                 }
  1158.                 return false;
  1159.             }
  1160.             if(typeof(S)!="undefined")
  1161.                 {
  1162.                 for(var T in S)
  1163.                     {
  1164.                     self.options[T]=S[T];
  1165.                 }
  1166.             }
  1167.             if(self.spines.length<1)
  1168.                 {
  1169.                 self.options.hideSpines=true;
  1170.             }
  1171.             if(self.options.hideSpines===true)
  1172.                 {
  1173.                 self.options.activeCorner=false;
  1174.             }
  1175.             self.current=Math.min(self.slides.length,Math.max(1,self.options.start));
  1176.             if(d.height()>0)
  1177.                 {
  1178.                 P();
  1179.                 G();
  1180.             }
  1181.             else
  1182.                 {
  1183.                 var U;
  1184.                 U=setTimeout(function()
  1185.                     {
  1186.                     P();
  1187.                     if(d.height()>0)
  1188.                         {
  1189.                         clearInterval(U);
  1190.                         P();
  1191.                         G();
  1192.                     }
  1193.                 }
  1194.                 ,20);
  1195.             }
  1196.         };
  1197.         var R=function(S)
  1198.             {
  1199.             var T;
  1200.             T=setInterval(function()
  1201.                 {
  1202.                 if(self.isLoaded==true)
  1203.                     {
  1204.                     clearInterval(T);
  1205.                     S();
  1206.                 }
  1207.             }
  1208.             ,20);
  1209.         };
  1210.         this.loaded=function(S)
  1211.             {
  1212.             R(S);
  1213.             return self;
  1214.         };
  1215.         this.next=function(S)
  1216.             {
  1217.             var T=Math.min(self.slides.length,(self.current+1));
  1218.             if(self.options.cycle===true)
  1219.                 {
  1220.                 if(self.current+1>self.slides.length)
  1221.                     {
  1222.                     T=1;
  1223.                 }
  1224.             }
  1225.             K(T,S);
  1226.             return self;
  1227.         };
  1228.         this.prev=function(S)
  1229.             {
  1230.             var T=Math.max(1,(self.current-1));
  1231.             if(self.options.cycle===true)
  1232.                 {
  1233.                 if(self.current-1<1)
  1234.                     {
  1235.                     T=self.slides.length;
  1236.                 }
  1237.             }
  1238.             K(T,S);
  1239.             return self;
  1240.         };
  1241.         this.goTo=function(S,T)
  1242.             {
  1243.             self.pauseAutoPlay=true;
  1244.             K(Math.min(self.slides.length,Math.max(1,S)),T);
  1245.             return self;
  1246.         };
  1247.         this.progressTo=function(S,T)
  1248.             {
  1249.             self.pauseAutoPlay=true;
  1250.             self.updateControlTo(S);
  1251.             self.goTo(S,T);
  1252.             return self;
  1253.         };
  1254.         this.updateControlTo=function(S)
  1255.             {
  1256.             self.controlTo=S;
  1257.             C();
  1258.             return self;
  1259.         };
  1260.         this.disableSlide=function(S)
  1261.             {
  1262.             M(S);
  1263.             return self;
  1264.         };
  1265.         this.enableSlide=function(S)
  1266.             {
  1267.             N(S);
  1268.             return self;
  1269.         };
  1270.         this.setOption=function(S,T)
  1271.             {
  1272.             L(S,T);
  1273.             return self;
  1274.         };
  1275.         this.vertical=function(S)
  1276.             {
  1277.             var self=this;
  1278.             if(typeof(this.verticalSlides)=='undefined')
  1279.                 {
  1280.                 this.verticalSlides=
  1281.                     {
  1282.                 };
  1283.                 for(i=0;
  1284.                 i<this.slides.length;
  1285.                 i++)
  1286.                     {
  1287.                     var T=$(this.slides[i]).find('\x2e'+this.classes.vertical);
  1288.                     var v=
  1289.                         {
  1290.                         next:function()
  1291.                             {
  1292.                             return false;
  1293.                         }
  1294.                         ,prev:function()
  1295.                             {
  1296.                             return false;
  1297.                         }
  1298.                         ,goTo:function()
  1299.                             {
  1300.                             return false;
  1301.                         }
  1302.                     };
  1303.                     if(T.length)
  1304.                         {
  1305.                         v=new O(T,this,S);
  1306.                     }
  1307.                     this.verticalSlides[i]=v;
  1308.                 }
  1309.             }
  1310.             else
  1311.                 {
  1312.                 return this.verticalSlides[this.current-1];
  1313.             }
  1314.         };
  1315.         this.goToVertical=function(v,h)
  1316.             {
  1317.             if(typeof(h)!='undefined')
  1318.                 {
  1319.                 if(this.verticalSlides[h-1]!==false)
  1320.                     {
  1321.                     if(this.current==h)
  1322.                         {
  1323.                         this.vertical().goTo(v);
  1324.                     }
  1325.                     else
  1326.                         {
  1327.                         this.verticalSlides[h-1].goTo(v,h,true);
  1328.                         this.goTo(h);
  1329.                     }
  1330.                 }
  1331.             }
  1332.             else
  1333.                 {
  1334.                 this.vertical().goTo(v);
  1335.             }
  1336.         };
  1337.         this.resetVertical=function(h)
  1338.             {
  1339.             if(typeof(h)=='undefined')
  1340.                 {
  1341.                 h=this.current;
  1342.             }
  1343.             this.verticalSlides[h-1].snapTo(0);
  1344.         };
  1345.         Q(f);
  1346.     };
  1347.     $.fn.slidedeck=function(d)
  1348.         {
  1349.         var f=[];
  1350.         for(var i=0;
  1351.         i<this.length;
  1352.         i++)
  1353.             {
  1354.             if(!this[i].slidedeck)
  1355.                 {
  1356.                 this[i].slidedeck=new SlideDeck(this[i],d);
  1357.             }
  1358.             f.push(this[i].slidedeck);
  1359.         }
  1360.         return f.length>1?f:f[0];
  1361.     };
  1362. }
  1363. )(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement