// JavaScript Document

$(document).ready(function(){
						   
	$('.soldout').siblings().css({'opacity' : 0.45});					   
						   
	// Add overlay to images					   
	$('img.image').wrap('<div class="image"></div>').removeClass("image");
	$('.image').prepend('<span></span>');				   

	$(".thumbs a").lightBox();
	$(".productimage").lightBox();
	
	$('a[rel=popup]').click(function(){
		window.open(this.href);
		return false;
	});
	
	$("#header li:not(#newsletter)").css({'background-position' : 'left -60px'});
	
	$("#header li:not(#newsletter) a").hover(function() {
		$(this).parent().animate({backgroundPosition : 'left 0px'}, "fast");					  
	}, function(){
		$(this).parent().animate({'background-position' : 'left -60px'}, "fast");	
	});
											
	/*$(function(){
	
		//Get our elements for faster access and set overlay width
		var div = $('div#products div'), ul = $('div#products ul'), ulPadding = 15;
		
		//Get menu width
		var divWidth = div.width();
		
		//Remove scrollbars
		div.css({overflow: 'hidden'});
		
		//Find last image container
		var lastLi = ul.find('li:last-child');
		
		//When user move mouse over menu
		div.mousemove(function(e){
		
			//As images are loaded ul width increases,
			//so we recalculate it each time
			var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;
			
			var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
			div.scrollLeft(left);
		});
	});*/
											
											
											
											
});
