var CURRENT_PHRASE;var WIDTH;jQuery.easing.def="easeInOutCubic";function create_testimonial(a){if(a=="next"){CURRENT_PHRASE++;if(CURRENT_PHRASE==PHRASES.length){CURRENT_PHRASE=0}a=CURRENT_PHRASE+1;if(a==PHRASES.length){a=0}}if(a=="prev"){CURRENT_PHRASE--;if(CURRENT_PHRASE==-1){CURRENT_PHRASE=PHRASES.length-1}a=CURRENT_PHRASE-1;if(a==-1){a=PHRASES.length-1}}return"<p>"+PHRASES[a]+"</p>"}var prev=function(){if($("#slide2").css("left")=="0px"){var a=function(){$("#slide3").html($("#slide2").html());$("#slide2").html($("#slide1").html());$("#slide1").css({left:"-"+WIDTH});$("#slide2").css({left:"0px"});$("#slide1").html(create_testimonial("prev"))};$("#slide1").animate({left:"0px"},800,"easeOutExpo");$("#slide2").animate({left:WIDTH},800,"easeOutExpo",a)}};var next=function(){if($("#slide2").css("left")=="0px"){var a=function(){$("#slide1").html($("#slide2").html());$("#slide2").html($("#slide3").html());$("#slide2").css({left:"0px"});$("#slide3").css({left:WIDTH});$("#slide3").html(create_testimonial("next"))};$("#slide2").animate({left:"-"+WIDTH},800,"easeOutExpo");$("#slide3").animate({left:"0px"},800,"easeOutExpo",a)}};function randomize(c){var b=c.length;if(b==0){return false}while(--b){var a=Math.floor(Math.random()*(b+1));var e=c[b];var d=c[a];c[b]=d;c[a]=e}}var init_testimonials=function(){randomize(PHRASES);$("#slide1").html(create_testimonial(0));$("#slide2").html(create_testimonial(1));$("#slide3").html(create_testimonial(2));CURRENT_PHRASE=1;WIDTH=$("#slide_window").css("width");$("#prev_img").bind("click",prev);$("#next_img").bind("click",next)};var page_init=function(){init_testimonials();document.getElementById("productdrop").style.display="";$.pop()};$(document).ready(page_init);
