/* 
 * CUTANIS MENU
 * created by Sky High Design - www.skyhigh-design.de
 * based on JQUERY
 */
 
 $(document).ready(function() {
		
		// FIRST HIDE ALL SECOND LEVEL MENUS
		$(".col1-menu").find("ul").hide();
		
		// NOW OPEN ACTIVE MENU
		$(".col1-menu-level1-cur").find("ul").show();
		
		// OPEN / CLOSE MENU ON CLICK
		$(".col1-menu-level1-no , .col1-menu-level1-cur").click(function(event){
																		 
			//check if its current
			if ($(this).hasClass("col1-menu-level1-cur") == false ) {
   			// Hide the act menu
			$(".col1-menu").find("ul").slideUp("fast");
			// Now show current menu
			$(this).find("ul").slideDown("fast");
			// change current active class
			$(".col1-menu-level1-cur").addClass("col1-menu-level1-no");
			$(".col1-menu-level1-cur").removeClass("col1-menu-level1-cur");
     		$(this).addClass("col1-menu-level1-cur");
			}
		});
		
		// Searchbox Focus
		function autoFill(id, v){
			$(id).css({ color: "#b2adad" }).attr({ value: v }).focus(function(){
			if($(this).val()==v){
				$(this).val("").css({ color: "#333" });
			}
			}).blur(function(){
			if($(this).val()==""){
				$(this).css({ color: "#b2adad" }).val(v);
			}
		});		 
		}
		autoFill($("input[name='tx_indexedsearch[sword]']"), $("input[name='tx_indexedsearch[sword]']").attr('value') );

							
 });
