		$(document).ready(
			function(){
if ( $("#togglersort") != undefined && $("#togglersort").html() != undefined ) {  
	$("#togglersort").toggler({target: $("#sortbox"),flop:$("#flopsort")});
}
			$('li.leaf').hide();
			$('li.directory').hover(
				function() {
				$('li.leaf').hide();
				$(this).children().find("li").each( function() { $(this).show();  } )
					return false;
				},
				function() {
					return false;
	  }
);


/*			$("#togglerstatus").toggler({target: $("#statusbox"),flop:$("#flopstatus")});
*/	

		//	$("#togglerbrand").toggler({target: $("#brandbox"),flop:$("#flopbrand")});
				$("a.hint").cluetip({
					dropShadow: false,
						arrows: true, 
					showTitle: false
				});
				$("a.web").cluetip({ 
						width: 400,
						height:200,
						closePosition:   'title',
						dropShadow: false,
						sticky: true,
						cluetipClass: 'jtip',
						arrows: true, 
						positionBy: 'mouse'});
				$("#search1").autocomplete(
									"search.php", 
									{ extraParams: { part: 0,action:"reset" } ,
									minChars:3, 
									max:20,
									scrollHeight:400,
									cacheLength:10,  
									width:500,
									selectFirst:false,
									autofill:true,
									formatItem: function(row, i, max) {
										return  row[0] + ' : <br/>' + row[1] + "";
									},
									formatResult: function(row) {
										return row.to;
									}
								 });
						$("#search2").autocomplete(
									"search.php", 
									{ extraParams: 
									{ part: 1 , action:'reset' },
									minChars:3, 
									max:20,
									scrollHeight:400,
									cacheLength:10,  
									width:500,
									selectFirst:false,
									autofill:true,
									formatItem: function(row, i, max) {
										return  row[0] + ' :<br/>' + row[1] + "";
									},
									formatResult: function(row) {
										return row.to;
									}
										 });

				/*$("#cart").show();
				$("#cart").fadeTo("slow", 0.8);
				*/$("#cart").load("/cart.php");
			}
		);

