// JavaScript Document
function bigSlideControl(arg) {
	var oBigController = arg;
	var currentItem = oBigController.getCurrentID();
	if(currentItem==0) {
		$("#imgLeftBig").css({opacity:0.4});
	} else {
		$("#imgLeftBig").css({opacity:1});
	}
	
	//console.debug("currentItem "+currentItem)
	if(thumbs!=undefined) {
		thumbs.goto(parseInt(currentItem));
	}	
//	alert(currentItem);
}
function thumbSlideControl(arg) {
	var oController = arg;
	var currentItem = oController.getCurrentID();
	if(currentItem==0) {
		$("#imgLeftThumb").css({opacity:0.4});
	} else {
			$("#imgLeftThumb").css({opacity:1})
	}
}

// autoSlide:2000, 
var oBigController = $("#carouselBig").msCarousel({width:900, height:369,callback:bigSlideControl, autoSlide:7000, showMessage:true, messageOpacity:1}).data("msCarousel");
var thumbs = $("#carouselThumb").msCarousel({boxClass:'li', width:900, height:78, callback:thumbSlideControl, scrollSpeed:500}).data("msCarousel");

//big button click
$("#imgRightBig").click(function() {
	oBigController.next();
});
$("#imgLeftBig").click(function() {
	oBigController.previous();
})

