P_images = 'http://www.euro-education.de/lib/images/generic/';
P_video = 'http://www.euro-education.de/';

$(document).ready(function() {
	
	if($("#mnavi").length > 0) {
		// Höhe aufs Maximum ausdehnen
		//$("#mnavi").css("height", $(document).height());
		
		// Rollover für Navibuttons
		$("#mnavi div:eq(0) a").children('img').each(function() {		
			$(this).bind('mouseover', function() {	
				$(this).attr("oris", $(this).attr("src"));
				$(this).attr("src", P_images +"nlay/n_roll/"+ $(this).attr("rel") +".jpg");
			});
			$(this).bind('mouseout', function() {
				$(this).attr("src", $(this).attr("oris"));
				$(this).attr("oris", "");
			});
			
		});
	}
	
	
	p_div_length = 2;
	p_div_position = 1;
	
	if($('#p1').length > 0) {
		var timer = setInterval( rotatepartner, 5000);
	}
	
	function rotatepartner() {
		toHide = p_div_position;
		p_div_position++;
		if(p_div_position > p_div_length) p_div_position = 1;
		toShow = p_div_position;
		
	//	alert('hide '+ toHide + '   toShow '+ toShow);
		
		//$('#p'+ toHide).hide('slow');		
		///.delay(500).css({'display':'block','opacity':'0'});
		$('#p'+ toHide).animate({opacity: 0}, 750, 'linear', function() { 
			$('#p'+ toHide).css('display','none');
			$('#p'+ toShow).css({'display':'block','opacity':'0'}).animate({opacity: 1}, 750);
		});
		//.delay(800).css({'display':'none','opacity':'0'});
		
		//$('#p'+ toShow).show('slow');	

		
	}

	/*
	$(".ilegend").children('span').each(function() {
		$(this).bind('click', function() {
			$(this).parent('legend').parent('fieldset').children('div').each( function() {
				$(this).toggle("fast");
			});
		});
		$(this).css("cursor","pointer");
	});
	
	$(".ilegend").eq(2).click();

	$(".ilegend").eq(1).children('span').click();
	$(".ilegend").eq(2).children('span').click();

	loadIC("empf","",<?php echo $mailing["id"] ?>);
	*/
});


