text: (function(e){e.fn.ImgWheel=function(t){var n=e.extend({animateSpeedMax:500,animateSpeedMin:2e3,delayMax:500,delayMin:2e3,imgPlacement:"center",displayWidth:"100%",direction:"",articleWidth:"100%",articleAlignment:"center",functionality:""},t);return this.each(function(){function M(){if(L[x]!==""){s.eq(x).unwrap()}if(L[T]!==""){s.eq(T).wrap('<a href="'+L[T]+'"></a>')}u.eq(x).hide();u.eq(T).show();s.eq(x).animate({width:A[x]*(3/5)+"px",height:d*(3/5)+"px",left:p*(17/20)-A[x]*(3/5)/2+"px",top:S,"z-index":0},animateInterval).removeClass("onlyCentral").addClass("everythingBut");s.eq(T).animate({width:A[T]+"px",height:d+"px",left:p/2-A[T]/2+"px",top:"0px","z-index":15},animateInterval).removeClass("everythingBut").addClass("onlyCentral");s.eq(N).animate({width:"0px",height:"0px",left:"0px",top:E},0).animate({width:A[N]*(3/5)+"px",height:d*(3/5)+"px",left:p*(3/20)-A[N]*(3/5)/2+"px",top:S},animateInterval);s.eq(C).animate({width:"0px",height:"0px",left:"0px",top:E},animateInterval);s.eq(k).animate({width:"0px",height:"0px",left:p+"px",top:E},animateInterval);if(x===o-1){x=0}else{x++}if(T===o-1){T=0}else{T++}if(N===o-1){N=0}else{N++}if(C===o-1){C=0}else{C++}if(k===o-1){k=0}else{k++}}function _(){if(L[x]!==""){s.eq(x).unwrap()}if(L[k]!==""){s.eq(k).wrap('<a href="'+L[k]+'"></a>')}u.eq(x).hide();u.eq(k).show();s.eq(x).animate({width:A[x]*(3/5)+"px",height:d*(3/5)+"px",left:p*(3/20)-A[x]*(3/5)/2+"px",top:S,"z-index":0},animateInterval).removeClass("onlyCentral").addClass("everythingBut");s.eq(T).animate({width:"0px",height:"0px",left:"0px",top:E},animateInterval);s.eq(N).animate({width:"0px",height:"0px",left:p+"px",top:E},animateInterval);s.eq(C).animate({width:"0px",height:"0px",left:p+"px",top:E},0).animate({width:A[C]*(3/5)+"px",height:d*(3/5)+"px",left:p*(17/20)-A[C]*(3/5)/2+"px",top:S},animateInterval);s.eq(k).animate({width:A[k]+"px",height:d+"px",left:p/2-A[k]/2+"px",top:"0px","z-index":15},animateInterval).removeClass("everythingBut").addClass("onlyCentral");if(x===0){x=o-1}else{x--}if(T===0){T=o-1}else{T--}if(N===0){N=o-1}else{N--}if(C===0){C=o-1}else{C--}if(k===0){k=o-1}else{k--}}function D(){counterclockwise_timeout=setTimeout(function(){M()},300)}function P(){clockwise_timeout=setTimeout(function(){_()},300)}function H(){if(n.direction==="reverse"){animateInterval=(1-rel_x/range)*(n.animateSpeedMin-n.animateSpeedMax)+n.animateSpeedMax;delay=(1-rel_x/range)*(n.delayMin-n.delayMax)+n.delayMax}else{if(n.direction===""){animateInterval=rel_x/range*(n.animateSpeedMin-n.animateSpeedMax)+n.animateSpeedMax;delay=rel_x/range*(n.delayMin-n.delayMax)+n.delayMax}}D();left_timeout=setTimeout(function(){H()},delay)}function B(){if(n.direction==="reverse"){animateInterval=rel_x/range*(n.animateSpeedMin-n.animateSpeedMax)+n.animateSpeedMax;delay=rel_x/range*(n.delayMin-n.delayMax)+n.delayMax}else{if(n.direction===""){animateInterval=(1-rel_x/range)*(n.animateSpeedMin-n.animateSpeedMax)+n.animateSpeedMax;delay=(1-rel_x/range)*(n.delayMin-n.delayMax)+n.delayMax}}P();right_timeout=setTimeout(function(){B()},delay)}function j(){animateInterval=n.animateSpeedMax;if(n.direction==="reverse"){_()}else{M()}setTimeout(function(){c.one("click",j)},animateInterval)}function F(){animateInterval=n.animateSpeedMax;if(n.direction==="reverse"){M()}else{_()}setTimeout(function(){h.one("click",F)},animateInterval)}function I(){p=t.width();r.css({width:p+"px",height:p/4+"px"});d=parseInt(r.css("height"),10);i.css("top",d+"px");a.add(f).css({width:1/3*p+"px",height:d+"px"});A=[];for(var o=0;o<s.length;o++){A.push(O[o]*d)}if(n.imgPlacement==="top"){E="0px";S="0px"}else{if(n.imgPlacement==="bottom"){E=d+"px";S=d*(2/5)+"px"}else{E=d/2+"px";S=d*(1/5)+"px"}}s.css({width:"0px",height:"0px",left:"0px",top:E});s.eq(k).css({width:A[k]*(3/5)+"px",height:d*(3/5)+"px",left:p*(17/20)-A[k]*(3/5)/2+"px",top:S});s.eq(x).addClass("onlyCentral").css({width:"auto",height:d+"px",left:p/2-A[x]/2+"px",top:"0px","z-index":15});s.eq(T).css({width:A[T]*(3/5)+"px",height:d*(3/5)+"px",left:p*(3/20)-A[T]*(3/5)/2+"px",top:S});i.css({position:"absolute",top:d+"px",width:n.articleWidth});v=parseInt(i.css("width"),10);m=[];u.each(function(){var t=e(this).innerHeight();m.push(t)});g=[];l.each(function(){e(this).css({top:d+"px"});var t=e(this).height();g.push(t)});y=m.concat(g);b=Math.max.apply(Math,y);t.css({height:d+b+"px"});if(n.articleAlignment==="left"){w="0px"}else{if(n.articleAlignment==="right"){w=p-v+"px"}else{w=p/2-v/2+"px"}}i.css("left",w)}var t=e(this);t.css("position","relative");var r=e(this).children(".image-container"),i=e(this).children(".article-container"),s=r.find("img"),o=s.length,u=i.find("article");r.append('<div class="left-ImgWheel-scroll"></div><div class="right-ImgWheel-scroll"></div>');var a=r.children(".left-ImgWheel-scroll"),f=r.children(".right-ImgWheel-scroll");var l=t.children("div:not(.image-container, .article-container)");if(n.functionality==="click"){if(n.direction===""){a.append('<div class="left-arrow">&#9664;</div>');f.append('<div class="right-arrow">&#9654;</div>')}if(n.direction==="reverse"){a.append('<div class="right-arrow">&#9654;</div>');f.append('<div class="left-arrow">&#9664;</div>')}}if(n.functionality==="click"){var c=r.find(".left-arrow"),h=r.find(".right-arrow");c.add(h).hide().css({position:"absolute",color:"white","text-shadow":"1px 1px 5px black, 1px -1px 5px black, -1px -1px 5px black, -1px 1px 5px black",cursor:"pointer"});r.hover(function(){c.add(h).fadeIn(100)},function(){c.add(h).fadeOut(100)})}if(n.direction==="reverse"){a.css({position:"absolute",top:"0",right:"0","z-index":"20"});f.css({position:"absolute",top:"0",left:"0","z-index":"20"})}else{a.css({position:"absolute",top:"0",left:"0","z-index":"20"});f.css({position:"absolute",top:"0",right:"0","z-index":"20"})}t.css("width",n.displayWidth);var p=t.width();r.css({width:p+"px",height:p/4+"px",position:"relative"});var d=parseInt(r.css("height"),10);a.add(f).css({width:1/3*p+"px",height:d+"px"});i.css({position:"absolute",top:d+"px",width:n.articleWidth});var v=parseInt(i.css("width"),10);var m=[];u.each(function(){var t=e(this).height();m.push(t)});var g=[];l.each(function(){e(this).css({top:d+"px"});var t=e(this).height();g.push(t)});var y=m.concat(g),b=Math.max.apply(Math,y);t.css({height:d+b+"px"});if(n.articleAlignment==="left"){var w="0px"}else{if(n.articleAlignment==="right"){w=p-v+"px"}else{w=p/2-v/2+"px"}}i.css("left",w);u.hide();if(n.imgPlacement==="top"){var E="0px",S="0px";if(n.functionality==="click"){c.css({bottom:"5px",left:"5px"});h.css({bottom:"5px",right:"5px"})}}else{if(n.imgPlacement==="bottom"){var E=d+"px",S=d*(2/5)+"px";if(n.functionality==="click"){c.css({top:"5px",left:"5px"});h.css({top:"5px",right:"5px"})}}else{var E=d/2+"px",S=d*(1/5)+"px";if(n.functionality==="click"){c.css({bottom:"5px",left:"5px"});h.css({bottom:"5px",right:"5px"})}}}s.css("position","absolute").hide();var x=0,T=1,N=2,C=o-2,k=o-1;var L=[];s.each(function(){if(e(this).parent().is("a")){href=e(this).parent().attr("href");e(this).unwrap()}else{href=""}L.push(href);e(this).attr("src",e(this).attr("src"))});if(L[x]!==""){s.eq(x).wrap('<a href="'+L[x]+'"></a>')}var A=[];var O=[];s.load(function(){A=[];O=[];s.each(function(){var t=new Image;t.src=e(this).attr("src");var n=t.width,r=t.height;O.push(n/r)});for(var t=0;t<o;t++){A.push(O[t]*d)}s.css({width:"0px",height:"0px",left:"0px",top:E});s.eq(k).css({width:A[k]*(3/5)+"px",height:d*(3/5)+"px",left:p*(17/20)-A[k]*(3/5)/2+"px",top:S});s.eq(x).addClass("onlyCentral").css({width:"auto",height:d+"px",left:p/2-A[x]/2+"px",top:"0px","z-index":15});s.eq(T).css({width:A[T]*(3/5)+"px",height:d*(3/5)+"px",left:p*(3/20)-A[T]*(3/5)/2+"px",top:S});s.not(s.eq(x)).addClass("everythingBut");u.eq(x).show();s.show()});if(n.functionality==="click"){c.one("click",j);h.one("click",F)}else{if(n.functionality===""){f.bind("touchstart mouseover",function(t){this_position=e(this).offset();rel_x=t.pageX-this_position.left;range=e(this).width();e(this).mousemove(function(t){this_position=e(this).offset();rel_x=t.pageX-this_position.left;range=e(this).width()});B()});f.bind("touchend mouseout",function(e){clearTimeout(clockwise_timeout);clearTimeout(right_timeout);e.preventDefault()});a.bind("touchstart mouseover",function(t){this_position=e(this).offset();rel_x=t.pageX-this_position.left;range=e(this).width();e(this).mousemove(function(t){this_position=e(this).offset();rel_x=t.pageX-this_position.left;range=e(this).width()});H()});a.bind("touchend mouseout",function(e){clearTimeout(counterclockwise_timeout);clearTimeout(left_timeout);e.preventDefault()})}}var q;e(window).resize(function(){clearTimeout(q);q=setTimeout(I,25)})})}})(jQuery)