
$(document).ready(function() {

	
	ddsmoothmenu.init({
		 mainmenuid: "smoothmenu2", //menu DIV id
		 orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
		 classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
		 //customtheme: ["#1c5a80", "#18374a"],
		 contentsource: "markup", //"markup" or ["container_id", "path_to_menu_file"]
		 transition: {overtime:100, outtime:100}, //duration of slide in/ out animation, in milliseconds
		//shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow?
		//showhidedelay: {showdelay: 50, hidedelay: 100} //set delay in milliseconds before sub menus appear and disappear, respectively
		});
			
			
			
		ddsmoothmenu.init({
			 mainmenuid: "marken", //menu DIV id
			 orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
			 classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
			 //customtheme: ["#1c5a80", "#18374a"],
			 contentsource: "markup", //"markup" or ["container_id", "path_to_menu_file"]
			 transition: {overtime:100, outtime:100}, //duration of slide in/ out animation, in milliseconds
			//shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow?
			//showhidedelay: {showdelay: 50, hidedelay: 100} //set delay in milliseconds before sub menus appear and disappear, respectively
			});

 
 
	

	$('#searchfield').bubbletip($('#tip1_focusblur'), {
				deltaDirection: 'right',
				bindShow: 'focus',
				bindHide: 'blur'
			});
	
	if ( $("#hsearchfield").length > 0 ) {
		
	
	$('#hsearchfield').bubbletip($('#tip2_focusblur'), {
		deltaDirection: 'left',
		bindShow: 'focus',
		bindHide: 'blur'
	});

	
		
	
	}
	
	

	
	if ( $("#anmeldebox2").length > 0 ) {
		$('#hname').bubbletip($('#tip_hlogin'), {
			deltaDirection: 'left',
			bindShow: 'focus',
			bindHide: 'blur'
		});
	
	
		$('#hpass').bubbletip($('#tip_hloginpw'), {
			deltaDirection: 'left',
			bindShow: 'focus',
			bindHide: 'blur'
		});
	}
	

	$("#prodnav").tabs();
	
	
	   $('ul#topmenu').lavaLamp();
		
	   

	
		$( "#searchfield" ).autocomplete({
			minLength: 3,
			delay: 500,
			source: function(req, add){  
  
                //pass request to server  
                $.getJSON("ajaxindex.php?searchsugg=?", req, function(data) {  
  
                    //create array for response objects  
                    var suggestions = [];  
  
                    //process response  
                    $.each(data, function(i, val){  
                    suggestions.push(val.s);  
                });  
  
                //pass array to callback  
                add(suggestions);  
            });
		}
		});
	
	
	
});

	
function ImgError(source){
    source.src = "/IMG/PRODUKTBILDER/100/keinbild.jpg";
    source.onerror = "";
    return true;
}
	
function ImgError400(source){
    source.src = "/IMG/PRODUKTBILDER/400/keinbild.jpg";
    source.onerror = "";
    return true;
}	
	


  
