$(document).ready(function() {

	$('.preview_link').colorbox();
	
	//var st = 0;
	$("ul.wpsc_categories > li > a").attr('href','javascript:void(0)');
	$("ul.wpsc_categories > li").click(function(e) { //When trigger is clicked...
		
		//e.preventDefault();

		if($('ul',this).hasClass('opened'))
		{
			$(this).removeClass('opened-menu')
			$('ul',this).slideUp('slow').show(); //Drop down the subnav on click
			$('ul',this).removeClass('opened')
		}	
		else
		{
			
			$(this).addClass('opened-menu');
			$('ul',this).addClass('opened');
			$('ul',this).slideDown('slow').show(); //Drop down the subnav on click
		}
		
		})
		
	$('.more-btn').click(function(e){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		e.preventDefault();
		$.scrollTo('#lower-space', 1000);
		//$(this.hash).find('span.message').text( this.title );
		return false;
	});
	
})

function scTo(id)
{
	jQuery(window).stop().scrollTo( "#" + id + "", 500 );
}
function prodFader()
{	
	
	$('.prod-image a').click(
		function(e)
		{
			e.preventDefault();
			var link = $(this).attr('href');
			$('.product_image').attr('src',link);
			//alert (link);
		}
	);
	
}

