function createSrollDivs(){
	var myPageDivs = document.getElementsByTagName("div");
	var myScollItems;
	try{
		for(i=0;i<myPageDivs.length;i++){
			if (myPageDivs[i].className == "scrollable"){
				var myActiveDiv = myPageDivs[i]
				for(j=0;j<myActiveDiv.childNodes.length;j++){
					if (myActiveDiv.childNodes[j].className == "items"){
						myActiveDiv = myActiveDiv.childNodes[j];
						for(k=0;k<myActiveDiv.childNodes.length;k++){
							var displayOverlay = document.createElement('DIV');
							displayOverlay.className = "nestedCornerGraphic";
							myActiveDiv.childNodes[k].appendChild(displayOverlay)
							
						}
						break;
					}
				}
			}
		}
	}catch(e){
	
	}
}

function setEasing(){	 
	// custom easing called "custom"
	$.easing.custom = function (x, t, b, c, d) {
		var s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	}
	 
	// use the custom easing
	$("div.scrollable").scrollable({easing: 'custom', speed: 700});

	// get handle to the API upon initialization
	//var api = $("div.scrollable").scrollable({api: true}); 
	
	$(function() {   
		$("div.scrollable").scrollable({ 
			size: 2,         
			items: '.thumbs'
		});     
	})
	
	// a method chaining example 
}

addEventSimple(window,'load',setEasing);
addEventSimple(window,'load',createSrollDivs);

