 jQuery.noConflict();

 function addToolBug(idTool){
	 jQuery.post("add_to_bag.php", {
           action: "add",
           idTool: idTool
    }, function() {
           jQuery.post("add_to_bag.php", {
               action: "refresh"
               },function(html) {
                   refreshBag(html);
           });
    });
}

function refreshOnly()
{
           jQuery.post("add_to_bag.php", {
               action: "refresh"
               },function(html) {
                   refreshBag(html);
           });
}


function refreshBag(html){
	if (html == "No products in your Project Bag"){
	   document.getElementById("alsoSugges").innerHTML = "<b>We also suggest <b>";
	   document.getElementById("productSuggest").style.display = "";
	   document.getElementById("toolBug").style.display = "none";
	}else{
	   document.getElementById("alsoSugges").innerHTML = "<b>My Project Bag<b>";
	   document.getElementById("productSuggest").style.display = "none";
	   document.getElementById("toolBug").style.display = "";
	   document.getElementById("content").innerHTML = html;
	}
}

function removeTool(idTool){
	jQuery.post("add_to_bag.php", {
           action: "remove",
           idTool: idTool
    });

    jQuery.post("add_to_bag.php", {
               action: "refresh"
               },function(html) {
                   refreshBag(html);
    });
}
