/* Copyright (c) 2008 Kean Loong Tan http://www.gimiti.com/kltan * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * jFlow * Version: 1.2 (July 7, 2008) * Requires: jQuery 1.2+ */ (function(A){A.fn.jFlow=function(K){var B=A.extend({},A.fn.jFlow.defaults,K);var G=Math.floor(Math.random()*11);var I=B.controller;var C=B.slideWrapper;var H=B.selectedWrapper;var J=0;var E=A(I).length;var F=function(M,L){A(B.slides).children().css({overflow:"hidden"});A(B.slides+" iframe").hide().addClass("temp_hide");A(B.slides).animate({marginLeft:"-"+(L*A(B.slides).find(":first-child").width()+"px")},B.duration*(M),B.easing,function(){A(B.slides).children().css({overflow:"auto"});A(".temp_hide").show()})};A(this).find(I).each(function(L){A(this).click(function(){if(A(B.slides).is(":not(:animated)")){A(I).removeClass(H);A(this).addClass(H);var M=Math.abs(J-L);F(M,L);J=L}})});A(B.slides).before('
').appendTo(C);A(B.slides).find("div").each(function(){A(this).before('').appendTo(A(this).prev())});A(I).eq(J).addClass(H);var D=function(L){A(C).css({position:"relative",width:B.width,height:B.height,overflow:"hidden"});A(B.slides).css({position:"relative",width:A(C).width()*A(I).length+"px",height:A(C).height()+"px",overflow:"hidden"});A(B.slides).children().css({position:"relative",width:A(C).width()+"px",height:A(C).height()+"px","float":"left",overflow:"auto"});A(B.slides).css({marginLeft:"-"+(J*A(B.slides).find(":eq(0)").width()+"px")})};D();A(window).resize(function(){D()});A(B.prev).click(function(){if(A(B.slides).is(":not(:animated)")){var L=1;if(J>0){J--}else{J=E-1;L=J}A(I).removeClass(H);F(L,J);A(I).eq(J).addClass(H)}});A(B.next).click(function(){if(A(B.slides).is(":not(:animated)")){var L=1;if(J