$(document).ready(function() {

// initialize jQuery Tools scrollable for main feature area

var scrollingFeatures = $("#promo").scrollable({
										size:1,
										clickable:false,
										onSeek : function() {
											//stop flash movie if playing
											var movieH6 = $("#promo h6");
											// var currentMovie = movieH6.eq(this.getPageIndex()).siblings("object").attr("id");
											// if (currentMovie){
											 //resetFlash(currentMovie);
											// }
											// get title and category info from hidden h6 tag
											var pg = this.getPageIndex() + 1;
											var c2 = movieH6.eq(pg).attr("class");
											var c1 = movieH6.eq(pg).attr("alt");
											var d1 =movieH6.eq(pg).text();
											// display acquired info
											$("#promo .cat2").html(c2);
											$("#promo .cat1").html(c1);
											$("#promo .desc").html(d1);
											// control Flash if not a static image
											//var nextMovie = movieH6.eq(pg).siblings("object").attr("id");
											//if (nextMovie){
											//advanceFrame(nextMovie);
											//}
											}
											}).circular().navigator().autoscroll({interval: 10000, autoplay: true, api: true}); // 30 second delay



// display first slide text
var firstSlide = $("#promo h6").eq(1);
$("#promo .cat2").html(firstSlide.attr("class"));
$("#promo .cat1").html(firstSlide.attr("alt"));
$("#promo .desc").html(firstSlide.text());

// display slide number in nav link
$(".navi a").each(function(){
			$(this).html(($(this).index()+1));
});

if (scrollingFeatures) {
adjustScroller = scrollingFeatures.getConf();
}
function stopScrolling() {
	//scrollingFeatures.stop();
}




$("#promo>div.items>div.stopscroll").mouseover(function(){
					scrollingFeatures.stop();
					adjustScroller.autoplay(false);
	});


function getFlashMovie(movieName) {
   var isIE = navigator.appName.indexOf("Microsoft") != -1;
   return (isIE) ? window[movieName] : document[movieName];
   
   }  
   
	function advanceFrame(mov) {
		//getFlashMovie(mov).advanceFrame();
		return false;	
	}
	
	function resetFlash(mov) {
		//getFlashMovie(mov).resetFlash();
		return false;
	}
	
	

// initialize scrollable for horizontal product lists
    $("div.scrollable").scrollable({clickable:false}).circular();


						  

		});
