jQuery(document).ready(function(){

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

if(direction == "left"){
if(parseInt(peeker.attr("class").substring(4,5)) == (0)){
jQuery(peeker).attr("id","nopage26");
jQuery(".cell9page26").attr("id","yespage26");
jQuery(".tubepage26").animate({left: "+=310"},"fast", function(){
jQuery(this).css("display","none");})
.animate({left: "-=3410"},"fast", function(){jQuery(this).css("display","block");}).animate({left: "+=310"},"fast");}

else{
var nextLeft = ".cell" + (parseInt(jQuery(peeker).attr("class").substring(4,5)) - 1) + "page26";
jQuery(peeker).attr("id","nopage26");
jQuery(nextLeft).attr("id","yespage26");
jQuery(".tubepage26").animate({left: "+=310"},"fast");}}

if(direction == "right"){
var peeker = jQuery("div[@id^=yespage26]");
if(parseInt(peeker.attr("class").substring(4,5)) == 9){
jQuery(peeker).attr("id","nopage26");
jQuery(".cell0page26").attr("id","yespage26");
jQuery(".tubepage26").animate({left: "-=310"},"fast", function(){jQuery(this).css("display","none");})
.animate({left: "+=3410"},"fast", function(){jQuery(this).css("display","block");}).animate({left: "-=310"},"fast");}

else{
var nextRight = ".cell" + (parseInt(jQuery(peeker).attr("class").substring(4,5)) + 1) + "page26";
jQuery(peeker).attr("id","nopage26");
jQuery(nextRight).attr("id","yespage26");
jQuery(".tubepage26").animate({left: "-=310"},"fast");}
}}

jQuery(".leftpage26").click(function(){
slidepage26("left");});
jQuery(".rightpage26").click(function(){
slidepage26("right");});
});