$(document).ready(function() {
	if ($("#psearch").val() == "") { $("#psearch").DefaultValue("Produkt suchen"); }
	$("span[rel]").overlay({speed:'fast',mask: '#ffffff', top: '2%', fixed:false});
	$("img[rel]").overlay({speed:'fast',mask: '#ffffff', top: '2%', fixed:false});


	$('.search_btn').click(function() {		
		var SearchItem = $('#psearch').val();
		if ( SearchItem == 'Produkt suchen') {			
			$('#psearch').attr('value','');	
		}
	});

	
	$("#nav-company ul li").mouseover(function(){
		//$("#menulist").css('z-index', 0);
     		$(this).find("ul").show();
   	}).mouseout(function(){
		//$("#menulist").css('z-index', 1);
      		$(this).find("ul").hide();
   	});


	$("#menulist li").mouseover(function(){
     		$(this).find("ul").show();
   	}).mouseout(function(){
      		$(this).find("ul").hide();
   	});

});



$(document).ready(function(){
   $("#menulist li").mouseover(function(){
      $(this).find("ul").show();
   }).mouseout(function(){
      $(this).find("ul").hide();
   });
});





function submenuShow(id) {	
	$('#sub'+id).show();
}


function submenuHide(id) {
	
	setTimeout(function() { $('#sub'+id).hide(); }, 0);
}



function shar() {
	$("#start_sharing").click();
	$("#share_hl").html(document.title);
}

 

jQuery.fn.DefaultValue = function() {
 
		// Scope
		var elements = this;
		var args = arguments;
		var c = 0;
 
		return(
			elements.each(function() {				
 
				// Default values within scope
				var el = $(this);
				var def = args[c++];
 
				el.val(def).focus(function() {
					if(el.val() == def) {
						el.val("");
					}
					el.blur(function() {
						if(el.val() == "") {
							el.val(def);
						}
					});
				});
 
			})
		);
	};

























