// JavaScript Document
			//no conflict jquery
			jQuery.noConflict();
			//jquery stuff
			(function($) {
				
				//set the dropdown menu select choice in custom search
				var str = jQuery.trim($("#page-content-title-tabs").text());
//				if (str == 'Pro Audio Equipment') {
//					str = 'Pro Audio';
//				}
				switch (str) {
					case 'Pro Audio Equipment':
						//alert("4-1");
						$("#selectequipment option[value='4-1']").attr("selected", "selected");
						break;
					case 'DJ Equipment':
						//alert("4-2");
						$("#selectequipment option[value='4-2']").attr("selected", "selected");
						break;
					case 'Wireless Systems':
						//alert("4-3");
						$("#selectequipment option[value='4-3']").attr("selected", "selected");
						break;
				}
				//$("#selectequipment option:contains('"+str+"')").attr("selected", "selected");
				$("#selectequipment option[value='" +category+ "']").attr("selected", "selected");
					  
				//For page sorted by Mfg., set activeitem=2
				//For page sorted by Category, set activeitem=3
				//For page sorted by Custom Search, set activeitem=4
				//set sort by hightlight
				switch (activeitem) {
					case 2:
						$("#viewby2").attr("src", "source/nav-viewby/navon2.gif");
						break;
					case 3:
						$("#viewby3").attr("src", "source/nav-viewby/navon3.gif");
						break;
					case 4:
						$("#viewby4").attr("src", "source/nav-viewby/navon4.gif");
						$("#customsearchlayer").show();
						break;
					default:
				}
				
				
				//hide sort by Category when categoy 1,2,8,9,10,11 are chosen
				switch (category) {
					case 1:
					case 2:
					case 8:
					case 9:
					case 10:
					case 11:
						$("#viewby-tabs tr td:eq(4), #viewby-tabs tr td:eq(5)").hide();
						$("#viewby2").attr("src", "source/nav-viewby/navon2.gif");
						$("#jumplist").replaceWith("<h3>Jump to Manufacturer</h3>");
						break;
					case 4:
						if(type == 'wireless-systems') {
							$("#viewby-tabs tr td:eq(4), #viewby-tabs tr td:eq(5)").hide();
							$("#viewby2").attr("src", "source/nav-viewby/navon2.gif");
							$("#jumplist").replaceWith("<h3>Jump to Manufacturer</h3>");
						}
						break;
				}
				
				
				//Set Hover for all 3 sort by
				//set sort by Mfg.
				$("#viewby2").hover(
					function() {
						origImage = $(this).attr("src"); 
						$(this).attr("src", "source/nav-viewby/navover2.gif");
					},
					function() {
						$(this).attr("src", origImage);
					}
				);
				//set sort by Category
				$("#viewby3").hover(
					function() {
						origImage = $(this).attr("src"); 
						$(this).attr("src", "source/nav-viewby/navover3.gif");
					},
					function() {
						$(this).attr("src", origImage);
					}
				);
				//set sort by Custom Search
				//Close action for Custom Search close button
				$("#viewby4").hover(
					function() {
						origImage = $(this).attr("src"); 
						$(this).attr("src", "source/nav-viewby/navover4.gif");
					},
					function() {
						$(this).attr("src", origImage);
					}).click(function(){
						$("#customsearchlayer").slideToggle("1000");
						return false;
					}
				);


				//set Hover for Custom Search close button
				//set close action for Custom Search close button
				$("#searchclose").hover(
					function() {
						origImage = $(this).attr("src"); 
						$(this).attr("src", "source/nav-other/searchclosedotover2.png");
					},
					function() {
						$(this).attr("src", origImage);
					}).click(function(){
						$("#customsearchlayer").slideToggle("1000");
					}
				);
				
				
				//Other Location Map slider
				//set hide location when load
				$('#locationmenulayer').hide();
				
				//set location slide down and up when click
				//set Hover for Other Location Map
				$('#networkmap').hover(
					function() {
						origImage = $(this).attr("src"); 
						$(this).attr("src", "source/networkmapwBAR1over.png");
					},
					function() {
						$(this).attr("src", origImage);
					}).toggle(
					function() {
						$('#locationmenulayer').slideDown("slow");
						$(this).attr("src", "source/networkmapwBAR1over.png");
						$('#networkmap').unbind('mouseover').unbind('mouseout');
					},
					function() {
						$('#locationmenulayer').slideUp("slow");//css('display', 'none');
						$(this).attr("src", "source/networkmapwBAR1.png");
						$('#networkmap')
						.bind('mouseover', function() {
							origImage = $(this).attr("src"); 
							$(this).attr("src", "source/networkmapwBAR1over.png");
						})
						.bind('mouseout', function() {
							$(this).attr("src", origImage);
						});
					}
				);
			})(jQuery);
