function invLightbox(full) {
     if (document.getElementById("inventory_blur")) {
         document.getElementById("inventory_blur").style.display = "block";
         document.getElementById("inventory_lightwrap").style.display = "block";
         document.getElementById("inventory_lightimg").src = full;
     }
}

function invHideLightbox() {
	if (document.getElementById("inventory_blur")) {
         document.getElementById("inventory_blur").style.display = "none";
         document.getElementById("inventory_lightwrap").style.display = "none";
		 document.getElementById("inventory_lightimg").src = "";
     }
}


jQuery(document).ready(function() {
	jQuery('.product2').hide();	
	jQuery('.product3').hide();
	jQuery('.product4').hide();
	jQuery('.newproduct3').hide();
	jQuery('.newproduct4').hide();			
	
	
	// add functions to the links
	jQuery('#addProduct2').click(function() {  
 	   jQuery('input[name="inv_quantity2"]').val();
	   jQuery('input[name="inv_size2"]').val();
	   jQuery('.product2').show();
	   
       jQuery('.newproduct2').hide();	   
	   jQuery('.newproduct3').show();
	   return false;
    });
			
	
	// add functions to the links
	jQuery('#addProduct3').click(function() {  
 	   jQuery('input[name="inv_quantity3"]').val();
	   jQuery('input[name="inv_size3"]').val();
	   jQuery('.product3').show();

       jQuery('.newproduct3').hide();	   
	   jQuery('.newproduct4').show();	   
	   
	   return false;
    });
	
	// add functions to the links
	jQuery('#addProduct4').click(function() {  
 	   jQuery('input[name="inv_quantity4"]').val();
	   jQuery('input[name="inv_size4"]').val();
	   jQuery('.product4').show();	   
	   
	   jQuery('.newproduct4').hide();
	   
	   return false;
    });
	

    // remove elements
	// add functions to the links
	jQuery('#removeProduct2').click(function() {  
	   jQuery('input[name="inv_quantity2"]').val();
	   jQuery('input[name="inv_size2"]').val();   
	   jQuery('.product2').hide();
	   
	   jQuery('.newproduct2').show();
	   jQuery('.newproduct3').hide();
	   jQuery('.newproduct4').hide();
	   
	   return false;
    }); 
	 
	// add functions to the links
	jQuery('#removeProduct3').click(function() {  
	   jQuery('input[name="inv_quantity3"]').val();
	   jQuery('input[name="inv_size3"]').val();   
	   jQuery('.product3').hide();
   	   
	   if ( jQuery('.product2').is(':visible')){
 	      jQuery('.newproduct3').show();
	   }
   	   jQuery('.newproduct4').hide();

	   return false;
    });	 
	// add functions to the links
	jQuery('#removeProduct4').click(function() {  
	   jQuery('input[name="inv_quantity4"]').val();
	   jQuery('input[name="inv_size4"]').val();   
	   jQuery('.product4').hide();
	   
	   if ( jQuery('.product3').is(':visible')){
		   jQuery('.newproduct4').show();		   
	   }
	   
	   return false;
    });

});

