﻿/*
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,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('d 4S(){a.2C={4j:50,3e:1.4H,3f:g,3n:l,17:g,3F:\'1L\',K:\'4F\',2O:1.0,C:4,4c:\'\',2M:l,3r:0.4E,3B:1.0,2R:d(){n.4z=a.2l},2d:g,27:[10,8,6,4,2],38:4A,32:15,3X:l,3i:l,3K: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b 4f=n.3L(\' \');1R.I(4f);b 34=7.m.O(\'X\',\'3D\');b 3Q=7.m.O(\'X\',\'4D\');34.I(3Q);b 1Q=7.m.O(\'X\',\'26\');b 11=7.m.O(\'X\',\'4n\');b 1E=7.m.O(\'X\',\'30\');11.I(1E);9(7.3f){b 2A=7.m.O(\'X\',\'4o\',\'3S\');b 2H=7.m.O(\'X\',\'4t\',\'3S\');11.I(2A);11.I(2H)}b 1d=7.m.O(\'X\',\'4v\');1d.I(1Q);1d.I(11);b 2Q=g;9(7.s.I(q)&&7.s.I(1R)&&7.s.I(34)&&7.s.I(1d)){j=7.s.r.1y;12(y=0;y<j;y++){D=7.s.r[y];9(D&&D.2L==1&&D.2I==\'2J\'){7.s.4N(D)}}2Q=l}N 2Q};a.2f=d(){b p=7.4a();9((p<15||7.2j)&&7.3X){9(7.2j&&p==15){7.2j=g;B.1m(7.2f,15)}t{B.1m(7.2f,40)}}t{n.M(7.K+\'2V\').k.1U=\'31\';n.M(7.K+\'4I\').k.1U=\'31\';B.1m(7.m.49,4B);7.2i();9(7.j>1){7.1b.S();7.v.S();7.A.S();7.2u.S();9(7.1C){7.H.S()}9(7.30){7.11.k.1P=\'2n\'}}}};a.4a=d(){b j=7.q.r.1y;b i=0,1V=0;b c=T;12(b y=0;y<j;y++){c=7.q.r[y];9(c&&c.2L==1&&c.2I==\'2J\'){9(c.3T){1V++}i++}}b 1X=Q.V((1V/i)*15);b 3o=n.M(7.K+\'4O\');3o.k.1c=1X+\'%\';9(7.17){i=i-(7.C*2);1V=(1X<1)?0:Q.V((i/15)*1X)}b 1R=n.M(7.K+\'2V\');b 3A=n.3L(\'3D 2g \'+1V+\'/\'+i);1R.4P(3A,1R.4T);N 1X};a.2i=d(){a.P=7.q.3j+7.q.41;a.1x=Q.V(7.P/7.3e);a.2a=7.C*7.1f;a.1S=7.P*0.5;a.1B=7.1B*0.5;a.1h=(7.P-(Q.V(7.1B)*2))*7.3k;a.2G=Q.V(7.1x*7.3r);7.s.k.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1p){28=7.27[1p-1]}t{28=7.27[i]}1I=f+i;1H=f-i;9(1I<7.j){7.m.2m(7.q.r[1I],28);7.q.r[1I].1g=7.q.r[1I].2k}9(1H>=0){7.m.2m(7.q.r[1H],28);7.q.r[1H].1g=7.q.r[1H].2k}}}9(21){7.1K(21)}9(7.J===g){7.J=l;7.2Y()}};a.2Y=d(){1N(7.16<7.1z-1||7.16>7.1z+1){1D l:7.1K(7.1z+(7.16-7.1z)/3);B.1m(7.2Y,7.4j);7.J=l;W;1L:7.J=g;5O(7.q.r[7.f]);W}};a.2F=d(f){9(7.1C){7.H.2t()}7.1O(f)};a.H={2p:1,S:d(){(7.4m)?7.H.1A():7.H.1e()},2t:d(){7.m.2X(7.s,\'4l\',7.H.2t);7.H.1e()},4i:d(){7.m.13(7.s,\'4l\',7.H.2t)},1A:d(){7.m.2E(7.2b,\'1C 5P\');7.2b.1q=d(){7.H.1e()};7.H.3P=B.5J(7.H.2P,7.4h);B.1m(7.H.4i,15)},1e:d(){7.m.2E(7.2b,\'1C 5F\');7.2b.1q=d(){7.H.1A()};B.4U(7.H.3P)},2P:d(){b 1s=7.f+7.H.2p;b 2q=g;9(1s===7.j){7.H.2p=-1;2q=l}9(1s<0){7.H.2p=1;2q=l}(2q)?7.H.2P():7.1O(1s)}};a.1b={S:d(){9(B.1r){7.s.1r(\'5G\',7.1b.2c,g)}7.m.13(7.s,\'5H\',7.1b.2c)},2c:d(u){b 1u=0;9(!u){u=B.u}9(u.3R){1u=u.3R/5Q}t 9(u.3Y){1u=-u.3Y/3}9(1u){7.1b.1a(1u)}7.m.2z(u)},1a:d(1u){b 2D=g;b 1s=0;9(1u>0){9(7.f>=1){1s=7.f-1;2D=l}}t{9(7.f<(7.j-1)){1s=7.f+1;2D=l}}9(2D){7.2F(1s)}}};a.v={1l:T,36:0,2s:0,F:0,J:g,S:d(){7.m.13(7.s,\'5n\',7.v.42);7.m.13(7.s,\'47\',7.v.1e);7.m.13(n,\'47\',7.v.1e);7.s.55=d(){b 3g=l;9(7.v.J){3g=g}N 3g}},1A:d(o){7.v.1l=o;7.v.36=7.v.2s-o.41+7.19},1e:d(){7.v.1l=T;7.v.J=g},42:d(e){b 2r=0;9(!e){e=B.u}9(e.35){2r=e.35}t 9(e.3U){2r=e.3U+n.2S.43+n.56.43}7.v.2s=2r;9(7.v.1l!==T){b F=(7.v.2s-7.v.36)+7.1B;9(F<(-7.19)){F=-7.19}9(F>(7.1h-7.19)){F=7.1h-7.19}b 1Y,f;9(7.17){1Y=(F+7.19)/(7.1h/(7.j-(7.C*2)-1));f=Q.V(1Y)+7.C}t{1Y=(F+7.19)/(7.1h/(7.j-1));f=Q.V(1Y)}7.v.F=F;7.v.1l.k.45=F+\'E\';9(7.f!==f){7.2F(f)}7.v.J=l}}};a.A={x:0,3h:0,2h:0,J:g,1M:l,S:d(){7.m.13(7.1d,\'57\',7.A.1A);7.m.13(n,\'58\',7.A.1a);7.m.13(n,\'53\',7.A.1e)},4k:d(e){b 3b=g;9(e.2K){b 16=e.2K[0].16;9(16===7.1d||16===7.1E||16===7.11){3b=l}}N 3b},3c:d(e){b x=0;9(e.2K){x=e.2K[0].35}N x},1A:d(e){7.A.3h=7.A.3c(e);7.A.J=l;7.m.2z(e)},4d:d(){b J=g;9(7.A.J){J=l}N J},1a:d(e){9(7.A.4d&&7.A.4k(e)){b j=(7.17)?(7.j-(7.C*2)-1):(7.j-1);9(7.A.1M){7.A.2h=(j-7.f)*(7.P/j);7.A.1M=g}b F=-(7.A.3c(e)-7.A.3h-7.A.2h);9(F<0){F=0}9(F>7.P){F=7.P}7.A.x=F;b f=Q.V(F/(7.P/j));f=j-f;9(7.f!==f){9(7.17){f=f+7.C}7.2F(f)}7.m.2z(e)}},1e:d(){7.A.2h=7.A.x;7.A.J=g}};a.2u={S:d(){n.4W=d(u){7.2u.1a(u)}},1a:d(u){b 3Z=7.2u.2c(u);1N(3Z){1D 39:7.1b.1a(-1);W;1D 37:7.1b.1a(1);W}},2c:d(u){u=u||B.u;N u.4Y}};a.m={13:d(G,L,R){9(G.1r){G.1r(L,R,g)}t 9(G.4g){G["e"+L+R]=R;G[L+R]=d(){G["e"+L+R](B.u)};G.4g("3V"+L,G[L+R])}},2X:d(G,L,R){9(G.3G){G.3G(L,R,g)}t 9(G.3I){9(G[L+R]===1F){51(\'m.2X » 4Z 3w 3C u 59 1F - 5a 5j 5i 5k 3w 3C 5l 5m u?\')}G.3I(\'3V\'+L,G[L+R]);G[L+R]=T;G[\'e\'+L+R]=T}},2m:d(1l,2W){9(7.2d===l){1l.k.2d=2W/10;1l.k.5h=\'5g(2d=\'+2W*10+\')\'}},O:d(L,23,33){b 1i=n.5b(L);1i.2B(\'23\',7.K+\'5d\'+23);9(33!==1F){23+=\' \'+33}7.m.2E(1i,23);N 1i},2E:d(1i,2y){9(1i){1i.2B(\'5f\',2y);1i.2B(\'2y\',2y)}},2z:d(e){9(e.4b){e.4b()}t{e.5c=g}N g},49:d(){b 3a=B.2w;9(29 B.2w!=\'d\'){B.2w=d(){7.2i()}}t{B.2w=d(){9(3a){3a()}7.2i()}}}}}b 1j={1o:"1j",1W:{},1G:1,1T:g,2T:T,3z:d(Z){9(!Z.$$1G){Z.$$1G=a.1G++;9(a.1T){Z()}a.1W[Z.$$1G]=Z}},5o:d(Z){9(Z.$$1G){5E a.1W[Z.$$1G]}},18:d(){9(a.1T){N}a.1T=l;12(b i 44 a.1W){a.1W[i]()}},2x:d(){9(a.1T){N}9(/5u|54/i.48(5K.5e)){9(/4X|3T/.48(n.52)){a.18()}t{1m(a.1o+".2x()",15)}}t 9(n.M("5I")){N l}9(29 a.2T==="d"){9(29 n.3O!==\'1F\'&&(n.3O(\'2S\')[0]!==T||n.2S!==T)){9(a.2T()){a.18()}t{1m(a.1o+".2x()",5C)}}}N l},S:d(){9(n.1r){n.1r("5t",d(){1j.18()},g)}1m("1j.2x()",15);d 18(){1j.18()}9(29 13!=="1F"){13(B,"3J",18)}t 9(n.1r){n.1r("3J",18,g)}t 9(29 B.2v==="d"){b 3E=B.2v;B.2v=d(){1j.18();3E()}}t{B.2v=18}}};b 5A=d(Z){1j.3z(Z)};1j.S();',62,363,'|||||||my||if|this|var|image|function||imageID|false|||max|style|true|Helper|document|||imagesDiv|childNodes|ImageFlowDiv|else|event|MouseDrag|||index||Touch|window|imageFocusMax|node|px|newX|obj|Slideshow|appendChild|busy|ImageFlowID|type|getElementById|return|createDocumentElement|imagesDivWidth|Math|fn|init|null|height|round|break|div|imageNode|handler||scrollbarDiv|for|addEvent||100|target|circular|run|newSliderX|handle|MouseWheel|width|navigationDiv|stop|xStep|pc|scrollbarWidth|element|domReadyEvent|zIndex|object|setTimeout|newImageH|name|last|onclick|addEventListener|newImageID|src|delta|getAttribute|clonedImageID|maxHeight|length|current|start|sliderWidth|slideshow|case|sliderDiv|undefined|domReadyID|leftID|rightID|memTarget|moveTo|default|first|switch|glideTo|visibility|captionDiv|loadingP|size|bDone|display|completed|events|finished|step|indexArray|reflectionP|jumpTarget||id|newImageW|currentImage|caption|opacityArray|opacityValue|typeof|maxFocus|buttonSlideshow|get|opacity|cloneNode|loadingProgress|images|stopX|refresh|firstCheck|pcMem|url|setOpacity|visible|firstRefresh|direction|reverseDirection|posx|mouseX|interrupt|Key|onload|onresize|schedule|className|suppressBrowserDefault|buttonPreviousDiv|setAttribute|defaults|change|setClassName|glideOnEvent|imagesDivHeight|buttonNextDiv|nodeName|IMG|touches|nodeType|imageScaling|options|imageFocusM|slide|success|onClick|body|DOMContentLoadedCustom|marginLeft|_loading_txt|value|removeEvent|animate|version|slider|none|percentOther|optionalClass|loadingDiv|pageX|objectX||percentLandscape||otherFunctions|state|getX|maxId|aspectRatio|buttons|selection|startX|reflections|offsetWidth|scrollbarP|multi|paddingTop|captions|loadingBar|sliderCursor|slideshowButton|imagesHeight|totalImagesWidth|cursor|glideToStartID|startID|to|xs|startAnimation|add|loadingTxt|imagesM|detach|loading|oldonload|imageCursor|removeEventListener|reflectPath|detachEvent|load|reflectionGET|createTextNode|newImageTop|hidden|getElementsByTagName|action|loadingBarDiv|wheelDelta|button|complete|clientX|on|02|preloadImages|detail|charCode||offsetLeft|drag|scrollLeft|in|left|createStructure|mouseup|test|addResizeEvent|loadingStatus|preventDefault|imagePath|isBusy|reflectionPNG|loadingText|attachEvent|slideshowSpeed|addInterruptEvent|animationSpeed|isOnNavigationDiv|click|slideshowAutoplay|scrollbar|previous|marginTop|_slideshow|_scrollbar|_slider|next|_next|navigation|_navigation|_previous|php|location|118|1000|reflect|loading_bar|67|imageflow|loading_txt|964|_loading|img|150|_images|_caption|removeChild|_loading_bar|replaceChild|resize|1500|ImageFlow|firstChild|clearInterval|onmousedown|onkeydown|loaded|keyCode|Pointer||alert|readyState|touchend|WebKit|onselectstart|documentElement|touchstart|touchmove|is|perhaps|createElement|returnValue|_|userAgent|class|alpha|filter|are|you|trying|an|unattached|mousemove|remove|sqrt|5000|10000|block|DOMContentLoaded|KHTML|paddingLeft|inline|xPosition|longdesc|position|domReady|relative|250|top|delete|play|DOMMouseScroll|mousewheel|__ie_onload|setInterval|navigator|nbsp|alt2|innerHTML|slideChanged|pause|120'.split('|'),0,{}))
/* Create ImageFlow instances when the DOM structure has been loaded */
domReady(function()
{
	var instanceOne = new ImageFlow();
	instanceOne.init({ ImageFlowID: 'myImageFlow',
					   opacity: true,
					   buttons: true,
					   opacityArray: [10,8,6,4,2],
					   reflectionPNG: true,
					   aspectRatio: 4.8,
					   imagesHeight: 0.5,
					   imagesM: 1,
					   percentLandscape: 45,
					   percentOther: 41,
					   sliderWidth: 30,
					   sliderCursor: 'default',
					   imageCursor: 'pointer',
					   scrollbarP: 0.4,
					   startID: Math.round($("div#myImageFlow img").length / 2),
					   onClick: function(){ tooltip2('img.thumbList','CLICK ON BANNER TO OPEN PROJECT'); },
					   slideshow: true,
					   slideshowAutoplay: true,
					   slideshowSpeed: 5000
					 });
});
function slideChanged(img) {
	$("div.bannerLists").animate({ left: -1000 * img.id },{ duration: 'fast', easing: 'swing' });
}
