$(document).ready(
	function()
	{

        $(".categoryList").click(function(){
			var subCategoryList = $(this).parents("div").next(".subCategoryListwanhomelayout");
			if(subCategoryList.is(":hidden"))
			{
				$(".subCategoryListwanhomelayout").not(subCategoryList).slideUp("slow");
				subCategoryList.slideDown("slow");
			}
			return true;
		});

		$(".subCategoryClose").click(function() {
			$(this).parent().slideUp("slow");
			return false;
		});

//        $(".myclass").click(function(){
//            $("#trprojectHead").attr("style", "");
//            $("#trprojects").attr("style", "");
//			var id = $(this).attr('title');
//            //var productName = $(this).attr('innerHTML');
//            //$('#projectHead').attr('innerHTML',"Projects that used the product "+ productName);
//
//            loadProjectList(id);
//		});

	});

//function loadProjectList(id)
//{
//     $.ajax({
//          url : "http://www.worldarchitecturenews.com/index.php?fuseaction=supplierzone.pojectsusedbysupplierproduct",
//          data : 'product_id='+id,
//		  type : "GET",
//          dataType : "html",
//         success : function(reply){
//            	$("#projects").html(reply);
//          },
//		  error : function(){
//			alert("Could not complete request.");
//		  }
//     });
//}
//$(document).ready(
//	function()
//	{
//		$(".categoryList").click(function(){
//			var subCategoryList = $(this).next(".subCategoryList");
//
//			if(subCategoryList.is(":hidden"))
//			{
//				$(".subCategoryList").not(subCategoryList).slideUp("slow");
//				subCategoryList.slideDown("slow");
//			}
//			return false;
//		});
//
//		$(".subCategoryClose").click(function() {
//			$(this).parent().slideUp("slow");
//			return false;
//		});
//	});
