/******************************************************************************************************************/
// HANDLE SLIDER
/******************************************************************************************************************/

function handleSlider(){
	$('#slider li a').hover(function(){
		myid = $(this).attr('id');
		$('#slider li').removeClass('sel');
		$(this).parents('li').addClass('sel');
		$('#slide').attr('class', myid);
	}, function(){
	
	});
}

/******************************************************************************************************************/
// HANDLE PRODUCTS
/******************************************************************************************************************/

function handleProds(){
	$('#packs .pack').hide();
	
	myid = '#' + $('#prods #sel').attr('class');
	$(myid).show();
	
	$('#prods li').click(function(){
		$('#prods li').removeAttr('id');
		$(this).attr('id','sel');
		
		$('#packs .pack').hide();
		
		myid = '#' + $('#prods #sel').attr('class');
		$(myid).fadeIn();
	});
}

/******************************************************************************************************************/
// HANDLE SCROLL
/******************************************************************************************************************/

function handleScroll(){
	$('.scrollto').click(function(){
		mytarget = $(this).attr('href');
		
		$(document).scrollTo($(mytarget), 1000);
		
		return false;
	});
}

/******************************************************************************************************************/
// On document load...
/******************************************************************************************************************/

$(function(){
	// slider
	handleSlider();
	
	// prods
	handleProds();
	
	// scroll
	handleScroll();
});
