$(document).ready(function(){

	//mainPoint
	//When mouse rolls over
	$(".animatedNavigation, .animatedNavigationAndSubAnimated").mouseover(function(){
		$(this).stop().animate({height:'337px'},{queue:false, duration:400, easing: 'easeOutQuad'})
	});
	//When mouse is removed
	$(".animatedNavigation, .animatedNavigationAndSubAnimated").mouseout(function(){
		$(this).stop().animate({height:'25px'},{queue:false, duration:400, easing: 'easeOutQuad'})
	});


	//subPoint
	//When mouse rolls over
	$("#subNavigationID40").mouseover(function(){
		$(this).stop().animate({height:'280px'},{queue:false, duration:400, easing: 'easeOutQuad'})
	});
	$("#subNavigationID41").mouseover(function(){
		$(this).stop().animate({height:'270px'},{queue:false, duration:400, easing: 'easeOutQuad'})
	});
	//When mouse is removed
	$("#subNavigationID40, #subNavigationID41").mouseout(function(){
		$(this).stop().animate({height:'20px'},{queue:false, duration:800, easing: 'easeOutQuad'})
	});


    //preload images
    rolloverD = new Image();
    rolloverD.src = 'fileadmin/templates/res/images/languageNavigationD-ro.jpg';
    rolloverF = new Image();
    rolloverF.src = 'fileadmin/templates/res/images/languageNavigationF-ro.jpg';
    rolloverE = new Image();
    rolloverE.src = 'fileadmin/templates/res/images/languageNavigationE-ro.jpg';

	//Rollover for the Language Labels
	$(".langNavRollover").mouseover(function(){
		var elementId = $(this).attr('id');
		var imgSrc = 'fileadmin/templates/res/images/'+elementId+'-ro.jpg';
		$(this).attr('src', imgSrc);
	});
	$(".langNavRollover").mouseout(function(){
		var elementId = $(this).attr('id');
		var imgSrc = 'fileadmin/templates/res/images/'+elementId+'.jpg';
		$(this).attr('src', imgSrc);
	});


	//searchField
	var searchLabel = $("#searchInput").attr('value');
	$("#searchInput").focusin(function(){
		if($(this).attr('value')==searchLabel) {
			$(this).attr('value', '');
		}
	});
	$("#searchInput").focusout(function(){
		if($(this).attr('value')=='') {
			$(this).attr('value', searchLabel);
		}
	});


	//routPlanerField
	var routePlanerLabel = $("#saddr").attr('value');
	$("#saddr").focusin(function(){
		if($(this).attr('value')==routePlanerLabel) {
			$(this).attr('value', '');
		}
	});
	$("#saddr").focusout(function(){
		if($(this).attr('value')=='') {
			$(this).attr('value', routePlanerLabel);
		}
	});
});


function printdocument() {
    window.print();
}
