// JavaScript Document
<!-- 
$(document).ready(function() {	

	$('#panel').width(parseInt($('#mask').width() * $('#panel div').length+1));
	//Set the sub-panel width according to the #mask width (width of #mask and sub-panel must be same)
	$('#panel div').width($('#mask').width());
	
	//Get all the links with rel as panel
	$('a[rel=panel]').click(function () {
	
		//Set class for the selected item
		$('a[rel=panel]').removeClass('selected');
		
		//Set class for the next item
		$('a[rel=panel]').removeClass('next');
		
		$(this).addClass('selected');
		
		if($(this).next().length== 0){
			$('a[rel=panel]:first').addClass('next');
			//$('#panel div:first').insertAfter('#panel div:last');
		} else {
			$(this).next().addClass('next');
		}
        //$('#panel div:first').clone().insertAfter('#panel div:last')
		$('#mask').animate({queue:true, duration:50});	
		//console.log($(this).attr('href'));
		$('#mask').scrollTo($(this).attr('href'), 1500,{onAfter:function(){
			
		}});
	
		return false;
	});
	
	//interval
	window.setInterval("$('a.next[rel=panel]').click();", 7500);
});

-->