//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
// PageSlide JS - pageSlide.js v1.0, Thur Aug 22, 2007
//
// Copyright (c) 2007 Jade Rauenzahn (http://pageslide.ifeedfish.com, http://www.rauenzahner.com)
// 
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
// 
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// For details, see the PageSlide JS Website at http://pageslide.ifeedfish.com
//
// Requires Prototype 1.5.1 and Scriptaculous 1.7.1
//////////////////////////////////////////////////////////////////////////////////////////////////////


/* Configuration Settings */

var moveX = 380 // x axis movement
var moveY = 0 // y axis movement
var sliderPos = 1 // where the slider starts
var sliderLimit = 2 // How many slides there are total
var sliderLowLimit = 1 // low limit for the slider (99% chance of not changing)


/* ==================== */
/* ===   Functions 	=== */
/* ==================== */

function moveBack(content) {
	if(sliderPos > sliderLowLimit) {
		new Effect.Move($(content),{x: moveX, y: moveY, queue: {position: 'end', scope: 'contentscope'}})
		sliderPos--
	} else 
	
	if(sliderPos == sliderLowLimit) {
		new Effect.Move($(content),{x: -moveX*(sliderLimit-1), y: -moveY*(sliderLimit-1), queue: {position: 'end', scope: 'contentscope'}})
		sliderPos = sliderLimit
	}
}

function moveForward(content) {
	if(sliderPos < sliderLimit) {
		new Effect.Move($(content),{x: -moveX, y: -moveY, queue: {position: 'end', scope: 'conentscope'}})
		sliderPos++
	} else 
	
	if(sliderPos == sliderLimit) {
		new Effect.Move($(content),{x: moveX*(sliderLimit-1), y: 0, queue: {position: 'end', scope: 'conentscope'}})
		sliderPos = 1
	}
}