/*jQuery(function($){
	$.datepicker.regional['de'] = {
		closeText: 'schlie&szlig;en',
		prevText: '&#x3c;zur&uuml;ck',
		nextText: 'Vor&#x3e;',
		currentText: 'heute',
		monthNames: ['Januar','Februar','M&auml;rz','April','Mai','Juni',
		'Juli','August','September','Oktober','November','Dezember'],
		monthNamesShort: ['Jan','Feb','Mauml;r','Apr','Mai','Jun',
		'Jul','Aug','Sep','Okt','Nov','Dez'],
		dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
		dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
		weekHeader: 'Wo',
		dateFormat: 'dd.mm.yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['de']);
});*/
function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

function layoutHeight(group) {
   tallest = 0;
   group.each(function() {
     // thisHeight = $("#sidebar").height() - 42;	  
	   if((jQuery.browser.msie && jQuery.browser.version < 9)){
		  thisHeight = $("#sidebar").height() - 62;
		  } else {
		  thisHeight = $("#sidebar").height() - 42;
		}
		
      if(thisHeight > tallest) {
         tallest = thisHeight;
      }
   });
   
   if((jQuery.browser.msie && jQuery.browser.version < 7)){
		  group.css("height", tallest);
		  } else {
		  group.css("min-height", tallest);
	}
}

jQuery(document).ready(function()	{
	if((jQuery.browser.msie && jQuery.browser.version < 7)){
		 $("div.calendar div.calendarItem:first-child, ul.links li:first-child, #footermenu li:first-child, ul#topmenu li:first-child,ul.submenu li:first-child").addClass("first")
	}
		
	//$("#datepicker").datepicker();
	$(".trigger").tooltip({ effect: 'slide',layout :"<span/>"});
	
	
    
	  layoutHeight($("#mainContent"));
	  equalHeight($("div.assistant > *"));
	
	
	jQuery("ul#mainmenu li ul").hide();
	jQuery("ul#mainmenu li").hover(
		function (hoverOn) {
			jQuery(this).addClass("sfHover");
			jQuery(this).find("ul.submenu").slideDown("fast");
		},
		function (hoverOff) {
			jQuery(this).find("ul.submenu").slideUp("fast"); 
			jQuery(this).removeClass("sfHover");
	});

});


function changePage(strParamname,strDiv)
{
    var page = $(strDiv).val()
	page = $.base64_decode(page);

	window.location=page;
}

function ajaxCall(strReplaceDiv,strVarDiv,strParamname)
{
	var page = '';
	page = $(strVarDiv).val();
	page = $.base64_decode(page);
	
	
	$("html").css("cursor", "progress"); 
	$.blockUI({ 
            message: "", 
            showOverlay: true
        }); 
	$.ajax({
      url: page,
      global: false,
      type: "GET",
      dataType: "html",
      success: function(data)
			{
				$(strReplaceDiv).html(data);
				$.unblockUI();
				$("html").css("cursor", "auto");
				$("html,body").animate({scrollTop: $("#inner").offset().top},1200);
			}
		}
	);
}

function ajaxCallDirect(strReplaceDiv,strURL)
{

	strURL = $.base64_decode(strURL);
	strURL = strURL;
	
	
	$("html").css("cursor", "progress"); 
	$.blockUI({ 
            message: "", 
            showOverlay: true 
        }); 
	$.ajax({
      url: strURL,
      global: false,
      type: "GET",
      dataType: "html",
      success: function(data)
			{
				$(strReplaceDiv).html(data);
				$.unblockUI();
				$("html").css("cursor", "auto");
				$("html,body").animate({scrollTop: $("#inner").offset().top},1200);
			}
		}
	);
}

function sendEmpfehlung(strURL)
{
	$("html").css("cursor", "progress"); 
	$.blockUI({ 
            message: "", 
            showOverlay: true 
        }); 
	
	$.ajax({
      url: strURL,
      global: false,
      type: "POST",
      data: $('#empfehlenForm').serialize(),
      dataType: "html",
      success: function(data)
			{
				$('#weiterempfehlen_box').html(data);
				$.unblockUI();
				$("html").css("cursor", "auto");
			}
		}
	);

}

function sendSubscribe(strURL)
{
	$("html").css("cursor", "progress"); 
	$.blockUI({ 
            message: "", 
            showOverlay: true 
        }); 
	$.ajax({
      url: strURL,
      global: false,
      type: "POST",
      data: "nlemail=" + $('#nlemail').val(),
      dataType: "html",
      success: function(data)
			{
				$('#nlmessage').html(data);
				$.unblockUI();
				$("html").css("cursor", "auto");
			}
		}
	);

} 


