jQuery(document).ready(function(){
var paused = "F";
jQuery(".buttonpage25").click(function(){if(paused == "F"){jQuery(".buttonpage25").html("");paused = "T";
jQuery(".leftpage25").animate({opacity:"1"},"fast");
jQuery(".rightpage25").animate({opacity:"1"},"fast");
jQuery(".leftpage25").css("cursor","pointer");
jQuery(".rightpage25").css("cursor","pointer");}else{jQuery(".buttonpage25").html("");
jQuery(".rightpage25").animate({opacity:"0"},"fast");
jQuery(".leftpage25").animate({opacity:"0"},"fast");
jQuery(".leftpage25").css("cursor","auto");
jQuery(".rightpage25").css("cursor","auto");paused = "F";}});
jQuery(".buttonpage25").mouseover(function(){jQuery(".buttonpage25").css("background-image","url(files/button_hover_bgpage25.png)");});
jQuery(".buttonpage25").mouseout(function(){jQuery(".buttonpage25").css("background-image","url(files/button_bgpage25.png)");});

jQuery().everyTime(10000,function() {if(paused == "F"){
	slidepage25("right");}});

function slidepage25(direction){
var peeker = jQuery("div[@id^=yespage25]");

if(direction == "left"){
if(parseInt(peeker.attr("class").substring(4,5)) == (0)){
jQuery(peeker).attr("id","nopage25");
jQuery(".cell4page25").attr("id","yespage25");
jQuery(".tubepage25").animate({left: "+=790"},150, function(){
jQuery(this).css("display","none");})
.animate({left: "-=4740"},"fast", function(){jQuery(this).css("display","block");}).animate({left: "+=790"},150);}

else{
var nextLeft = ".cell" + (parseInt(jQuery(peeker).attr("class").substring(4,5)) - 1) + "page25";
jQuery(peeker).attr("id","nopage25");
jQuery(nextLeft).attr("id","yespage25");
jQuery(".tubepage25").animate({left: "+=790"},150);}}

if(direction == "right"){
var peeker = jQuery("div[@id^=yespage25]");
if(parseInt(peeker.attr("class").substring(4,5)) == 4){
jQuery(peeker).attr("id","nopage25");
jQuery(".cell0page25").attr("id","yespage25");
jQuery(".tubepage25").animate({left: "-=790"},150, function(){jQuery(this).css("display","none");})
.animate({left: "+=4740"},"fast", function(){jQuery(this).css("display","block");}).animate({left: "-=790"},150);}

else{
var nextRight = ".cell" + (parseInt(jQuery(peeker).attr("class").substring(4,5)) + 1) + "page25";
jQuery(peeker).attr("id","nopage25");
jQuery(nextRight).attr("id","yespage25");
jQuery(".tubepage25").animate({left: "-=790"},150);}
}}

jQuery(".leftpage25").click(function(){
slidepage25("left");});
jQuery(".rightpage25").click(function(){
slidepage25("right");});
});