// JavaScript Document
var $pageheight = 378; // our single page height
var $pagewidth = 267; // our single page width
var $pageYpos = 0; // current Y position of our bg-image (in both pages)
$(document).ready(function(){ // When the page is ready
/* left page turner */
$("#leftpage").click( function() {
$pageYpos = $pageYpos + $pageheight; // update Y postion
$("#leftpage").css("background-position", "0px "+$pageYpos+"px");// move the background position
setTimeout ('$("#flip").css("background-position", "top center");', 300);
setTimeout ('$("#rightpage").css("background-position", "267px "+$pageYpos+"px");', 300);
}); // close leftpage click function
/* right page turner */
$("#rightpage").click( function() {
$pageYpos = $pageYpos - $pageheight; // note: minus page height
$("#rightpage").css("background-position", "0px "+$pageYpos+"px");
$("#flip").css("background-position", "top left");
setTimeout ('$("#flip").css("background-position", "top center");', 300);
setTimeout ('$("#leftpage").css("background-position", "267px "+$pageYpos+"px");', 300);
}); // close rightpage click function
}); // close doc ready
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
