1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/js/imageflow.packed.js

39 lines
13 KiB
JavaScript
Raw Normal View History

/*
Name: ImageFlow
Version: 1.3.0 (March 9 2010)
Author: Finn Rudolph
Support: http://finnrudolph.de/ImageFlow
License: ImageFlow is licensed under a Creative Commons
Attribution-Noncommercial 3.0 Unported License
(http://creativecommons.org/licenses/by-nc/3.0/).
You are free:
+ to Share - to copy, distribute and transmit the work
+ to Remix - to adapt the work
Under the following conditions:
+ Attribution. You must attribute the work in the manner specified by the author or licensor
(but not in any way that suggests that they endorse you or your use of the work).
+ Noncommercial. You may not use this work for commercial purposes.
+ For any reuse or distribution, you must make clear to others the license terms of this work.
+ Any of the above conditions can be waived if you get permission from the copyright holder.
+ Nothing in this license impairs or restricts the author's moral rights.
Credits: This script is based on Michael L. Perrys Cover flow in Javascript [1].
The reflections are generated server-sided by a slightly hacked version
of Richard Daveys easyreflections [2] written in PHP. The mouse wheel
support is an implementation of Adomas Paltanavicius JavaScript mouse
wheel code [3]. It also uses the domReadyEvent from Tanny O'Haley [4].
[1] http://www.adventuresinsoftware.com/blog/?p=104#comment-1981
[2] http://reflection.corephp.co.uk/v2.php
[3] http://adomas.org/javascript-mouse-wheel/
[4] http://tanny.ica.com/ICA/TKO/tkoblog.nsf/dx/domcontentloaded-for-browsers-part-v
*/
/* ImageFlow - compressed with http://dean.edwards.name/packer/ */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('v 4Z(){u.2v={3Q:50,2N:1.5a,2J:y,30:C,1a:y,3j:\'1E\',S:\'5u\',2h:1.0,J:4,33:\'\',2f:C,3a:0.49,36:1.0,2z:v(){B.3V=u.2i},1Y:y,1T:[10,8,6,4,2],2x:5t,2y:1d,3e:C,2M:C,3G:\'\',1N:0.5,31:y,3L:\'\',3u:0.6,2G:C,2X:\'e-5m\',1q:14,1y:y,34:5n,3k:y,3r:1,3D:C,3H:y,1g:4w};9 t=u;u.X=v(a){17(9 b 3T t.2v){u[b]=(a!==1t&&a[b]!==1t)?a[b]:t.2v[b]}9 c=B.R(t.S);7(c){c.A.1H=\'2g\';u.N=c;7(u.3N()){u.H=B.R(t.S+\'5j\');u.2j=B.R(t.S+\'4z\');u.1V=B.R(t.S+\'3X\');u.1B=B.R(t.S+\'4c\');u.1R=B.R(t.S+\'4f\');u.3x=B.R(t.S+\'4j\');u.3l=B.R(t.S+\'4s\');u.1L=B.R(t.S+\'5e\');u.1M=[];u.1w=0;u.E=0;u.1C=0;u.1D=0;u.2q=C;u.2s=C;u.T=y;9 d=u.N.3F;9 e=W.11(d/t.2N);B.R(t.S+\'2A\').A.3b=((e*0.5)-22)+\'M\';c.A.1c=e+\'M\';u.21()}}};u.3N=v(){9 a=t.D.U(\'12\',\'23\');9 b,2S,1l,15;9 c=t.N.F.1r;17(9 d=0;d<c;d++){b=t.N.F[d];7(b&&b.24==1&&b.29==\'2b\'){7(t.2M===C){2S=(t.31)?\'3\':\'2\';1l=t.33+b.1z(\'1l\',2);1l=t.3L+\'3W\'+2S+\'.45?5p=\'+1l+t.3G;b.2d(\'1l\',1l)}15=b.1O(C);a.Q(15)}}7(t.1a){9 e=t.D.U(\'12\',\'23\');9 f=t.D.U(\'12\',\'23\');c=a.F.1r;7(c<t.J){t.J=c}7(c>1){9 i;17(i=0;i<c;i++){b=a.F[i];7(i<t.J){15=b.1O(C);e.Q(15)}7(c-i<t.J+1){15=b.1O(C);f.Q(15)}}17(i=0;i<c;i++){b=a.F[i];15=b.1O(C);f.Q(15)}17(i=0;i<t.J;i++){b=e.F[i];15=b.1O(C);f.Q(15)}a=f}}7(t.1y){9 g=t.D.U(\'12\',\'1y\');a.Q(g)}9 h=t.D.U(\'p\',\'52\');9 j=B.3h(\' \');h.Q(j);9 k=t.D.U(\'12\',\'3v\');9 l=t.D.U(\'12\',\'4o\');k.Q(l);9 m=t.D.U(\'12\',\'4J\');9 n=t.D.U(\'12\',\'57\');9 o=t.D.U(\'12\',\'2G\');n.Q(o);7(t.2J){9 p=t.D.U(\'12\',\'4t\',\'35\');9 q=t.D.U(\'12\',\'41\',\'35\');n.Q(p);n.Q(q)}9 r=t.D.U(\'12\',\'46\');r.Q(m);r.Q(n);9 s=y;7(t.N.Q(a)&&t.N.Q(h)&&t.N.Q(k)&&t.N.Q(r)){c=t.N.F.1r;17(d=0;d<c;d++){b=t.N.F[d];7(b&&b.24==1&&b.29==\'2b\'){t.N.5q(b)}}s=C}V s};u.21=v(){9 p=t.2Y();7((p<1d||t.2s)&&t.3e){7(t.2s&&p==1d){t.2s=y;L.1n(t.21,1d)}G{L.1n(t.21,40)}}G{B.R(t.S+\'2A\').A.1Z=\'2H\';B.R(t.S+\'4L\').A.1Z=\'2H\';L.1n(t.D.3c,4W);t.2m();7(t.O>1){t.1e.X();t.I.X();t.K.X();t.2o.X();7(t.1y){t.P.X()}7(t.2G){t.1B.A.1H=\'2g\'}}}};u.2Y=v(){9 a=t.H.F.1r;9 i=0,20=0;9 b=Z;17(9 c=0;c<a;c++){b=t.H.F[c];7(b&&b.24==1&&b.29==\'2b\'){7(b.2I){20++}i++}}9 d=W.11((20/i)*1d);9 e=B.R(t.S+\'5g\');e.A.1u=d+\'%\';7(t.1a){i=i-(t.J*2);20=(d<1)?0:W.11((i/1d)*d)}9 f=B.R(t.S+\'2A\');9 g=B.3h(\'3v 23 \'+20+\'/\'+i);f.5i(g,f.4i);V d};u.2m=v(){u.Y=t.H.3F+t.H.3I;u.1A=W.11(t.Y/t.2N);u.1U=t.J*t.1g;u.1I=t.Y*0.5;u.1q=t.1q*0.5;u.1f=(t.Y-(W.11(t.1q)*2))*t.3u;u.2u=W.11(t.1A*t.3a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