﻿/*
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 4o(){u.2d={2W:50,2C:1.3U,2H:y,3T:B,1a:y,3C:\'1H\',R:\'5b\',2o:1.0,J:4,3f:\'\',2h:B,32:0.5c,2X:1.0,2O:v(){C.5n=u.2t},1T:y,1P:[10,8,6,4,2],2V:5o,2T:1d,31:B,2S:B,3k:\'\',1Y:0.5,3Q:y,2Z:\'\',30:0.6,2R:B,3b:\'e-5k\',1v:14,1s:y,3w:5j,3F:y,3G:1,3J:B,3L:y,1j:5f};9 t=u;u.Z=v(a){17(9 b 3a t.2d){u[b]=(a!==1y&&a[b]!==1y)?a[b]:t.2d[b]}9 c=C.S(t.R);7(c){c.A.1E=\'2m\';u.N=c;7(u.3u()){u.H=C.S(t.R+\'58\');u.2r=C.S(t.R+\'57\');u.1N=C.S(t.R+\'56\');u.1C=C.S(t.R+\'55\');u.1Q=C.S(t.R+\'54\');u.3R=C.S(t.R+\'53\');u.2Y=C.S(t.R+\'52\');u.1W=C.S(t.R+\'51\');u.1Z=[];u.1t=0;u.E=0;u.1J=0;u.1G=0;u.25=B;u.2c=B;u.V=y;9 d=u.N.3q;9 e=X.13(d/t.2C);C.S(t.R+\'2L\').A.3x=((e*0.5)-22)+\'M\';c.A.1b=e+\'M\';u.2p()}}};u.3u=v(){9 a=t.D.U(\'11\',\'2K\');9 b,2J,1m,15;9 c=t.N.F.1r;17(9 d=0;d<c;d++){b=t.N.F[d];7(b&&b.27==1&&b.28==\'2a\'){7(t.2S===B){2J=(t.3Q)?\'3\':\'2\';1m=t.3f+b.1A(\'1m\',2);1m=t.2Z+\'4Y\'+2J+\'.4U?4J=\'+1m+t.3k;b.2g(\'1m\',1m)}15=b.1R(B);a.Q(15)}}7(t.1a){9 e=t.D.U(\'11\',\'2K\');9 f=t.D.U(\'11\',\'2K\');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.1R(B);e.Q(15)}7(c-i<t.J+1){15=b.1R(B);f.Q(15)}}17(i=0;i<c;i++){b=a.F[i];15=b.1R(B);f.Q(15)}17(i=0;i<t.J;i++){b=e.F[i];15=b.1R(B);f.Q(15)}a=f}}7(t.1s){9 g=t.D.U(\'11\',\'1s\');a.Q(g)}9 h=t.D.U(\'p\',\'4F\');9 j=C.3j(\' \');h.Q(j);9 k=t.D.U(\'11\',\'4E\');9 l=t.D.U(\'11\',\'4D\');k.Q(l);9 m=t.D.U(\'11\',\'4C\');9 n=t.D.U(\'11\',\'4z\');9 o=t.D.U(\'11\',\'2R\');n.Q(o);7(t.2H){9 p=t.D.U(\'11\',\'4y\',\'3v\');9 q=t.D.U(\'11\',\'4x\',\'3v\');n.Q(p);n.Q(q)}9 r=t.D.U(\'11\',\'4w\');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.27==1&&b.28==\'2a\'){t.N.4s(b)}}s=B}T s};u.2p=v(){9 p=t.3E();7((p<1d||t.2c)&&t.31){7(t.2c&&p==1d){t.2c=y;K.1k(t.2p,1d)}G{K.1k(t.2p,40)}}G{C.S(t.R+\'2L\').A.1M=\'2A\';C.S(t.R+\'4q\').A.1M=\'2A\';K.1k(t.D.3P,4p);t.2b();7(t.O>1){t.1f.Z();t.I.Z();t.L.Z();t.2e.Z();7(t.1s){t.P.Z()}7(t.2R){t.1C.A.1E=\'2m\'}}}};u.3E=v(){9 a=t.H.F.1r;9 i=0,1O=0;9 b=W;17(9 c=0;c<a;c++){b=t.H.F[c];7(b&&b.27==1&&b.28==\'2a\'){7(b.2y){1O++}i++}}9 d=X.13((1O/i)*1d);9 e=C.S(t.R+\'4n\');e.A.1u=d+\'%\';7(t.1a){i=i-(t.J*2);1O=(d<1)?0:X.13((i/1d)*d)}9 f=C.S(t.R+\'2L\');9 g=C.3j(\'4l... \'+1O+\'/\'+i);f.4k(g,f.4i);T d};u.2b=v(){u.Y=t.H.3q+t.H.3t;u.1q=X.13(t.Y/t.2C);u.1V=t.J*t.1j;u.1D=t.Y*0.5;u.1v=t.1v*0.5;u.1e=(t.Y-(X.13(t.1v)*2))*t.30;u.2s=X.13(t.1q*t.32);t.N.A.1b=t.1q+\'M\';t.H.A.1b=t.2s+\'M\';t.1N.A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=t.1P[i]}e=a+i;f=a-i;7(e<t.O){t.D.2i(t.H.F[e],d);t.H.F[e].1h=t.H.F[e].29}7(f>=0){t.D.2i(t.H.F[f],d);t.H.F[f].1h=t.H.F[f].29}}}7(b){t.1K(b)}7(t.V===y){t.V=B;t.2U()}};u.2U=v(){1B(t.1J<t.1t-1||t.1J>t.1t+1){1z B:t.1K(t.1t+(t.1J-t.1t)/3);K.1k(t.2U,t.2W);t.V=B;12;1H:t.V=y;12}};u.24=v(a){7(t.1s){t.P.2k()}t.1F(a)};u.P={2v:1,Z:v(){(t.3F)?t.P.1p():t.P.1g()},2k:v(){t.D.2P(t.N,\'3K\',t.P.2k);t.P.1g()},3I:v(){t.D.18(t.N,\'3K\',t.P.2k)},1p:v(){t.D.21(t.1W,\'1s 41\');t.1W.1l=v(){t.P.1g()};t.P.3B=K.43(t.P.2F,t.3w);K.1k(t.P.3I,1d)},1g:v(){t.D.21(t.1W,\'1s 45\');t.1W.1l=v(){t.P.1p()};K.46(t.P.3B)},2F:v(){9 a=t.E+t.P.2v;9 b=y;7(a===t.O){t.P.2v=-1;b=B}7(a<0){t.P.2v=1;b=B}(b)?t.P.2F():t.1F(a)}};u.1f={Z:v(){7(K.1o){t.N.1o(\'48\',t.1f.1L,y)}t.D.18(t.N,\'4a\',t.1f.1L)},1L:v(a){9 b=0;7(!a){a=K.1I}7(a.3p){b=a.3p/4d}G 7(a.3m){b=-a.3m/3}7(b){t.1f.1c(b)}t.D.2j(a)},1c:v(a){9 b=y;9 c=0;7(a>0){7(t.E>=1){c=t.E-1;b=B}}G{7(t.E<(t.O-1)){c=t.E+1;b=B}}7(b){t.24(c)}}};u.I={20:W,2I:0,2l:0,2q:0,V:y,Z:v(){t.D.18(t.N,\'4j\',t.I.36);t.D.18(t.N,\'35\',t.I.1g);t.D.18(C,\'35\',t.I.1g);t.N.4m=v(){9 a=B;7(t.I.V){a=y}T a}},1p:v(o){t.I.20=o;t.I.2I=t.I.2l-o.3t+t.19},1g:v(){t.I.20=W;t.I.V=y},36:v(e){9 a=0;7(!e){e=K.1I}7(e.2x){a=e.2x}G 7(e.3S){a=e.3S+C.2z.3O+C.4r.3O}t.I.2l=a;7(t.I.20!==W){9 b=(t.I.2l-t.I.2I)+t.1v;7(b<(-t.19)){b=-t.19}7(b>(t.1e-t.19)){b=t.1e-t.19}9 c,E;7(t.1a){c=(b+t.19)/(t.1e/(t.O-(t.J*2)-1));E=X.13(c)+t.J}G{c=(b+t.19)/(t.1e/(t.O-1));E=X.13(c)}t.I.2q=b;t.I.20.A.3H=b+\'M\';7(t.E!==E){t.24(E)}t.I.V=B}}};u.L={x:0,2B:0,26:0,V:y,2D:B,Z:v(){t.D.18(t.1N,\'4t\',t.L.1p);t.D.18(C,\'4u\',t.L.1c);t.D.18(C,\'4v\',t.L.1g)},3y:v(e){9 a=y;7(e.2u){9 b=e.2u[0].1J;7(b===t.1N||b===t.1Q||b===t.1C){a=B}}T a},2G:v(e){9 x=0;7(e.2u){x=e.2u[0].2x}T x},1p:v(e){t.L.2B=t.L.2G(e);t.L.V=B;t.D.2j(e)},3r:v(){9 a=y;7(t.L.V){a=B}T a},1c:v(e){7(t.L.3r&&t.L.3y(e)){9 a=(t.1a)?(t.O-(t.J*2)-1):(t.O-1);7(t.L.2D){t.L.26=(a-t.E)*(t.Y/a);t.L.2D=y}9 b=-(t.L.2G(e)-t.L.2B-t.L.26);7(b<0){b=0}7(b>t.Y){b=t.Y}t.L.x=b;9 c=X.13(b/(t.Y/a));c=a-c;7(t.E!==c){7(t.1a){c=c+t.J}t.24(c)}t.D.2j(e)}},1g:v(){t.L.26=t.L.x;t.L.V=y}};u.2e={Z:v(){C.4A=v(a){t.2e.1c(a)}},1c:v(a){9 b=t.2e.1L(a);1B(b){1z 39:t.1f.1c(-1);12;1z 37:t.1f.1c(1);12}},1L:v(a){a=a||K.1I;T a.4B}};u.D={18:v(a,b,c){7(a.1o){a.1o(b,c,y)}G 7(a.3o){a["e"+b+c]=c;a[b+c]=v(){a["e"+b+c](K.1I)};a.3o("3n"+b,a[b+c])}},2P:v(a,b,c){7(a.3l){a.3l(b,c,y)}G 7(a.3h){7(a[b+c]===1y){4G(\'D.2P » 4H 3e 38 1I 4K 1y - 4L 4M 4N 4O 3e 38 4P 4Q 1I?\')}a.3h(\'3n\'+b,a[b+c]);a[b+c]=W;a[\'e\'+b+c]=W}},2i:v(a,b){7(t.1T===B){a.A.1T=b/10;a.A.4R=\'4S(1T=\'+b*10+\')\'}},U:v(a,b,c){9 d=C.4T(a);d.2g(\'34\',t.R+\'4V\'+b);7(c!==1y){b+=\' \'+c}t.D.21(d,b);T d},21:v(a,b){7(a){a.2g(\'4W\',b);a.2g(\'4X\',b)}},2j:v(e){7(e.33){e.33()}G{e.4Z=y}T y},3P:v(){9 a=K.2n;7(1X K.2n!=\'v\'){K.2n=v(){t.2b()}}G{K.2n=v(){7(a){a()}t.2b()}}}}}9 1i={2M:"1i",1U:{},1x:1,1S:y,2N:W,3A:v(a){7(!a.$$1x){a.$$1x=u.1x++;7(u.1S){a()}u.1U[a.$$1x]=a}},59:v(a){7(a.$$1x){5a u.1U[a.$$1x]}},16:v(){7(u.1S){T}u.1S=B;17(9 i 3a u.1U){u.1U[i]()}},23:v(){7(u.1S){T}7(/5d|5e/i.3N(5g.5h)){7(/5i|2y/.3N(C.3D)){u.16()}G{1k(u.2M+".23()",1d)}}G 7(C.S("2Q")){T B}7(1X u.2N==="v"){7(1X C.3d!==\'1y\'&&(C.3d(\'2z\')[0]!==W||C.2z!==W)){7(u.2N()){u.16()}G{1k(u.2M+".23()",5l)}}}T B},Z:v(){7(C.1o){C.1o("5m",v(){1i.16()},y)}1k("1i.23()",1d);v 16(){1i.16()}7(1X 18!=="1y"){18(K,"3c",16)}G 7(C.1o){C.1o("3c",16,y)}G 7(1X K.2f==="v"){9 a=K.2f;K.2f=v(){1i.16();a()}}G{K.2f=16}/*@5p@7(@5q||@5r)C.5s("<3M 34=2Q 5t 1m=\\"//:\\"><\\/3M>");9 b=C.S("2Q");b.5u=v(){7(u.3D=="2y"){1i.16()}};@5v@*/}};9 5w=v(a){1i.3A(a)};1i.Z();',62,343,'|||||||if||var|||||||||||||||||||||this|function|||false||style|true|document|Helper|imageID|childNodes|else|imagesDiv|MouseDrag|imageFocusMax|window|Touch|px|ImageFlowDiv|max|Slideshow|appendChild|ImageFlowID|getElementById|return|createDocumentElement|busy|null|Math|imagesDivWidth|init||div|break|round||imageNode|run|for|addEvent|newSliderX|circular|height|handle|100|scrollbarWidth|MouseWheel|stop|pc|domReadyEvent|xStep|setTimeout|onclick|src|zIndex|addEventListener|start|maxHeight|length|slideshow|current|width|sliderWidth|clonedImageID|domReadyID|undefined|case|getAttribute|switch|scrollbarDiv|size|visibility|glideTo|memTarget|default|event|target|moveTo|get|display|navigationDiv|completed|opacityArray|sliderDiv|cloneNode|bDone|opacity|events|maxFocus|buttonSlideshow|typeof|reflectionP|indexArray|object|setClassName||schedule|glideOnEvent|firstRefresh|stopX|nodeType|nodeName|pcMem|IMG|refresh|firstCheck|defaults|Key|onload|setAttribute|imageScaling|setOpacity|suppressBrowserDefault|interrupt|mouseX|visible|onresize|imageFocusM|loadingProgress|newX|captionDiv|imagesDivHeight|url|touches|direction|marginLeft|pageX|complete|body|none|startX|aspectRatio|first|maxId|slide|getX|buttons|objectX|version|images|_loading_txt|name|DOMContentLoadedCustom|onClick|removeEvent|__ie_onload|slider|reflections|percentOther|animate|percentLandscape|animationSpeed|imagesM|buttonPreviousDiv|reflectPath|scrollbarP|preloadImages|imagesHeight|preventDefault|id|mouseup|drag||detach||in|sliderCursor|load|getElementsByTagName|to|imagePath|02|detachEvent|cursor|createTextNode|reflectionGET|removeEventListener|detail|on|attachEvent|wheelDelta|offsetWidth|isBusy|totalImagesWidth|offsetLeft|createStructure|button|slideshowSpeed|paddingTop|isOnNavigationDiv|hidden|add|action|imageCursor|readyState|loadingStatus|slideshowAutoplay|startID|left|addInterruptEvent|glideToStartID|click|startAnimation|script|test|scrollLeft|addResizeEvent|reflectionPNG|buttonNextDiv|clientX|captions|964|innerHTML|alt|top|block|10000||pause|sqrt|setInterval|5000|play|clearInterval|paddingLeft|DOMMouseScroll|inline|mousewheel|relative|position|120|xPosition|longdesc|onmousedown|marginTop|firstChild|mousemove|replaceChild|Cargando|onselectstart|_loading_bar|ImageFlow|1000|_loading|documentElement|removeChild|touchstart|touchmove|touchend|navigation|next|previous|scrollbar|onkeydown|keyCode|caption|loading_bar|loading|loading_txt|alert|Pointer|nbsp|img|is|perhaps|you|are|trying|an|unattached|filter|alpha|createElement|php|_|class|className|reflect|returnValue||_slideshow|_previous|_next|_slider|_scrollbar|_navigation|_caption|_images|remove|delete|imageflow|67|KHTML|WebKit|150|navigator|userAgent|loaded|1500|resize|250|DOMContentLoaded|location|118|cc_on|_win32|_win64|write|defer|onreadystatechange|end|domReady'.split('|'),0,{}));

/* Create ImageFlow instances when the DOM structure has been loaded */
domReady(function()
{	var posada = new ImageFlow();
	posada.init({ ImageFlowID: 'slideshow',
				   //slider: false,
				   imageCursor: 'pointer',
				   circular: true,
                   captions: false,
                   reflections: false, 
				   xStep: 65,
				   imagesM: 0.65,
				   imageFocusM: 1.2,
				   imageFocusMax: 1,
				   imagesHeight: 0.55,
				   startID:  1,
				   buttons: true,
				   onClick: ''
				   });
});
