		$(document).ready(function(){
			
			// reset the quick search checkbox values
			$(".quickSearchCheck").attr({ 
		          checked: "checked"
			});

			// Category Menu JS
			$('#accordion-container > li > a').click(function() {
				$('.firstLevelSelect').removeClass('firstLevelSelect');
				$(this).addClass('firstLevelSelect');
				var $next = $(this).next();
				  if($next.is(':hidden')){
				openedUL = $(this).parent().parent().find('li > ul:visible');
				openedUL.hide();

				$next.show();
				}else{
				  $next.hide();
				}
			});

			$('.arrowImage').click(function() {
				
				currentUL = $(this).parents('.thirdTableWrapper').children('ul');
				
				if(currentUL.is(':hidden')){
					$(this).parents('.arrowTable').addClass('secondLevelSelect');
				}else{
					$(this).parents('.arrowTable').removeClass('secondLevelSelect');
				}
				
				catLink = $(this).parents('.arrowTable').next('ul').children('li').children('a');
				rotateArrow(catLink, currentUL);
			});
			
		    $("#contentType").toggle(
		    	function () {
		    		$("#arrow").attr({
		    	        src: "images/down_arrow.png"
		    	    });
		    	    $("#contentType").css({ border:"solid 1px #ccc", borderBottom:"#fff", top:"1px",left:"1px" });
		    		$("#searchmenu").show();
		    	     },
		    	function () {
		    	    $("#arrow").attr({
		    	        src: "images/right_arrow.png"
		    	     });
		    	    $("#contentType").css({ border:"0", top:"2px",left:"2px"});
		    		$("#searchmenu").hide();
		    });

});

			function rotateArrow(catLink, currentUL)
			{
			  arrowImage = catLink.parents('.thirdTableWrapper').children('table').find('img');
				if(currentUL.is(':hidden')){
					currentUL.show();
					$(arrowImage).attr({
						src: "images/open_arrow.gif"
					});
				}else{
					currentUL.hide();
					$(arrowImage).attr({
						src: "images/right_arrow.gif"
					});
				}

			}