jQuery.noConflict();

jQuery(document).ready(function(){

	if (jQuery('#product-container').length != 0){
		var itemWidth = 400;
		
		var itemCount = jQuery('#product-container ul li').length;
		
		var itemPos = 0;
		
		function pageScroll(dir){
			itemPosTemp = itemPos + dir;
			if (itemPosTemp >= 0 && itemPosTemp <= (itemCount - 1)) {
				itemPos = itemPosTemp;
				leftPos = itemPos * itemWidth * -1;
				jQuery('#product-container ul').animate({
				left: leftPos+'px' }, 1000, function() {});
			}
		}
		
		jQuery('#product-container ul').width(itemCount * itemWidth + 'px');
		

		
		jQuery('div.product-image').prepend('<a href="javascript://" id="leftArrow">Left</a><a href="javascript://" id="rightArrow">Right</a>');
		
		jQuery('#leftArrow').click(function(){
			pageScroll(-1);
		});
		
		jQuery('#rightArrow').click(function(){
			pageScroll(1);
		});
	}
	
});
