$(document).ready(function() { 
	
	//find all elements containing cdquantity
	
	
	var nextBtn = $('input.nextBtn');
	
	nextBtn.mouseover(function(){$(this).css("border", "1px solid #333");});
	nextBtn.mouseout(function(){$(this).css("border", "0px solid #333");});
	
	var toolbars = $('#products').find('div.cde').each(function(){
		$(this).find('img.plus').mouseover(function(){
			$(this).addClass("hover_btn");
		});
		
		$(this).find('img.plus').click(function(){
			var input = $(this).parents('div.cde').find('input');
			var currentValue = input.val();
			
			if(input.val() < 11){
				currentValue++;
				input.val(currentValue);	
			}
	
		});
		
		$(this).find('img.minus').click(function(){
			var input = $(this).parents('div.cde').find('input');
			var currentValue = input.val();
			
			if(input.val() > 0){
				currentValue--;
				input.val(currentValue);	
			}
	
		});
		
		$(this).find('img.minus').mouseover(function(){
			$(this).addClass("hover_btn");
		});
		
		$(this).find('img.plus').mouseout(function(){
			$(this).removeClass("hover_btn");
		});
		
		$(this).find('img.minus').mouseout(function(){
			$(this).removeClass("hover_btn");
		});
			
	});
	/*
	plusButtons.click(function(){
		
	});
	
	plusButtons.mouseover(function(){
		$(this).addClass("hover_btn");
	});
	
	plusButtons.mouseout(function(){
		$(this).removeClass("hover_btn");
		
	});
	*/
	
	
	
});
