jQuery(document).ready(function() {
	jQuery('a.panel').click(function () {
		jQuery('a.panel').removeClass('selected');
		jQuery(this).addClass('selected');
		current = jQuery(this);
		jQuery('#wrapper').scrollTo(jQuery(this).attr('href'), 1200);		
		return false;
	});
	jQuery(window).resize(function () {
		resizePanel();
	});
});


function resizePanel() {  
     //get the browser width and height  
     width = jQuery(window).width();  
     height = jQuery(window).height();  
     //get the mask width: width * total of items  
     mask_width = width * jQuery('.item').length;  
     //set the dimension   
     jQuery('#wrapper, .item').css({width: width, height: height});  
     jQuery('#mask').css({width: mask_width, height: height});  
     //if the item is displayed incorrectly, set it to the corrent pos  
     jQuery('#wrapper').scrollTo(jQuery('a.selected').attr('href'), 0);  
}  

