$(document).ready(function(){
	
	$(".specialtours_object .topphoto .headerbg").animate({opacity:"0.7"});
	
	$("#mpst_right").click(function(){
		stepcarousel.stepBy('mpst_gallery', 4)
	})
	$("#mpst_left").click(function(){
		stepcarousel.stepBy('mpst_gallery', -4)
	})
	
	$("#mplm_right").click(function(){
		stepcarousel.stepBy('mplm_gallery', 4)
	})
	$("#mplm_left").click(function(){
		stepcarousel.stepBy('mplm_gallery', -4)
	})
	
});
	
stepcarousel.setup({
	galleryid: 'mpst_gallery', //id of carousel DIV
	beltclass: 'mpst_scbelt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'mpst_object', //class of panel DIVs each holding content
	defaultbuttons: {enable: false},
	autostep: {enable:false, moveby:4, pause:3000},
	panelbehavior: {speed:500, wraparound:false, persist:true},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
	onslide:function(){
		//alert('a: '+statusA+"\n"+'b: '+statusB+"\n"+'c: '+statusC);
		if (statusB==statusC) {
			$("#mpst_right img").animate({ "opacity": 0.3 }, { duration: -1 });
		} else {
			$("#mpst_right img").animate({ "opacity": 1.0 }, { duration: -1 });
		}
		if (parseInt(statusA)==1){
			$("#mpst_left img").animate({ "opacity": 0.3 }, { duration: -1 });
		} else {
			$("#mpst_left img").animate({ "opacity": 1.0 }, { duration: -1 });
		}
	}
});
