/** 
* pewo.de - js funktions *
* @author Ron Kappler 
* @version 1.0 
* @see http://www.pewo.de/
*/
// pewo JavaScript Document
$(document).ready( function(){
	var ulL1 = 0;
	var ulL2 = 0;
	var contentwrap = 0;
	ulL1 = ($('#mainnav').find('.mnulLa1:visible').height())+27;
	ulL2 = ($('#mainnav').find('.mnulLa2:visible').height())+44;
	if (ulL1 > 27) contentwrap = ulL1;
	if (ulL1 > 27) { $('#mainnav').find('.mnulLa2').css('top',ulL1+'px'); }
	if (ulL2 > 44) contentwrap = contentwrap + ulL2;	
	$('#content-wrapper').css('margin-top',contentwrap+'px');
	
	$('.amsnpiclink').each(function() {
		$(this).children('img').css('opacity','0.4');
		$(this).mouseenter(function(){
			$(this).children('img').fadeTo('fast', 1);
		});
	});
	$('.amsnbase').find('h2').each(function() {
		$(this).mouseenter(function(){
			$(this).parents('.amsnbase').find('.amsnpiclink').children('img').fadeTo('fast', 1);
		});
	});
	$('.amsnbase').mouseleave(function(){
	  $(this).find('.amsnpiclink').children('img').fadeTo('fast', 0.4);
	});

	
	$('.amsnpic').each(function() { $(this).children('img').css('opacity','0.5'); } );

	$("#search").focus(function() { if(this.value == 'Stichworte eingeben') this.value=''; return false; });
	$("#search").blur(function() { if (this.value=='') this.value='Stichworte eingeben'; });
	
	$("#searchEn").focus(function() { if(this.value == 'Keyword search') this.value=''; return false; });
	$("#searchEn").blur(function() { if (this.value=='') this.value='Keyword search'; });	
	
	$("#searchSv").focus(function() { if(this.value == 'anger nyckelord') this.value=''; return false; });
	$("#searchSv").blur(function() { if (this.value=='') this.value='anger nyckelord'; });

});	


