var aufgerufeneUrl = window.location.href.split("cms");

if( aufgerufeneUrl[0] == 'http://holger.intranet.mediata.com/' )
{
	function oscClass() {
		this.originalSrc = '';
	}

	oscClass.prototype.evt = function(eventName, eventValue) {
		return true;
	}

	var osc = new oscClass();
}

var http_request = false;
function makePOSTRequest(url, parameters, output_id) {
  http_request = false;
  if (window.XMLHttpRequest) { // Mozilla, Safari,...
     http_request = new XMLHttpRequest();
     if (http_request.overrideMimeType) {
     	// set type accordingly to anticipated content type
        //http_request.overrideMimeType('text/xml');
        http_request.overrideMimeType('text/html');
     }
  } else if (window.ActiveXObject) { // IE
     try {
        http_request = new ActiveXObject("Msxml2.XMLHTTP");
     } catch (e) {
        try {
           http_request = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
     }
  }
  if (!http_request) {
     alert('Cannot create XMLHTTP instance');
     return false;
  }

  http_request.onreadystatechange = function(){
	alertContents(output_id);
  };
  http_request.open('POST', url, true);
  http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http_request.setRequestHeader("Content-length", parameters.length);
  http_request.setRequestHeader("Connection", "close");
  http_request.send(parameters);
}

function alertContents(output_id) {
  if (http_request.readyState == 4) {
     if (http_request.status == 200) {
        //alert(http_request.responseText);
        result = http_request.responseText;
		document.getElementById(output_id).innerHTML = result;

     } else {
        alert(http_request.status + 'There was a problem with the request.');
     }
  }
}

function get(obj) {
  var poststr = "YourName=" + encodeURI( document.getElementById("yourname").value ) +
                "&YourEmail=" + encodeURI( document.getElementById("youremail").value ) +
                "&ReceiversName=" + encodeURI( document.getElementById("recipientname").value ) +
                "&ReceiversEmail=" + encodeURI( document.getElementById("recipientemail").value ) +
                "&Comment=" + encodeURI( document.getElementById("yourcomment").value ) +
                "&NodeID=" + encodeURI( document.getElementById("tafnodeid").value ) +
                "&Subject=" + encodeURI( "Schlank im Schlaf" ) +
                "&SendButton=1";
  /*makePOSTRequest("/cms/index_tipafriend.php", poststr);*/
  makePOSTRequest("/cms/ger/content/tipafriend", poststr, "modalboxContentID");
}

function getRemember(obj) {
  var poststr = "ContentObjectAttribute_ezstring_data_text_95338=" + encodeURI( document.getElementById("name-callback-element").value ) +
                "&ContentObjectAttribute_data_text_95339=" + encodeURI( document.getElementById("email-callback-element").value ) +
                "&ContentNodeID=" + encodeURI( document.getElementById("contentnodeid").value ) +
                "&ContentObjectID=" + encodeURI( document.getElementById("contentobjectid").value ) +
                "&ViewMode=" + encodeURI( document.getElementById("viewmode").value ) +
                "&Subject=" + encodeURI( "Erinnerungs-E-Mail" ) +
                "&ActionCollectInformation=1";
  /*makePOSTRequest("/cms/index_tipafriend.php", poststr);*/
  makePOSTRequest("/cms/content/action", poststr, "modalboxContentID");
}

function getNikolaus(obj) {
  var question_value = $(".option-box .radio-group input:checked").val();
  var poststr = "ContentObjectAttribute_ezselect_selected_array_98357[]=" + encodeURI( question_value ) +
                "&ContentObjectAttribute_ezselect_selected_array_98358[]=" + encodeURI( document.getElementById("salutation-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98359=" + encodeURI( document.getElementById("first_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98360=" + encodeURI( document.getElementById("last_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98361=" + encodeURI( document.getElementById("street-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98362=" + encodeURI( document.getElementById("postcode-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98363=" + encodeURI( document.getElementById("city-callback-element").value ) +
                "&ContentObjectAttribute_country_98364[]=" + encodeURI( document.getElementById("country-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98365=" + encodeURI( document.getElementById("day_of_birth-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98366=" + encodeURI( document.getElementById("phone-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98367=" + encodeURI( document.getElementById("email-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98368=" + encodeURI( document.getElementById("captcha-callback-element").value ) +
                "&ContentNodeID=" + encodeURI( document.getElementById("contentnodeid").value ) +
                "&ContentObjectID=" + encodeURI( document.getElementById("contentobjectid").value ) +
                "&ViewMode=" + encodeURI( document.getElementById("viewmode").value ) +
                "&Subject=" + encodeURI( "Nikolaus-Gewinnspiel" ) +
                "&ActionCollectInformation=1";
  /*makePOSTRequest("/cms/index_tipafriend.php", poststr);*/
  makePOSTRequest("/cms/content/action", poststr, "modalboxContentID-over");
}

function get14december(obj) {
  var question_value = $(".option-box .radio-group input:checked").val();
  var poststr = "ContentObjectAttribute_ezselect_selected_array_98380[]=" + encodeURI( question_value ) +
                "&ContentObjectAttribute_ezselect_selected_array_98381[]=" + encodeURI( document.getElementById("salutation-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98382=" + encodeURI( document.getElementById("first_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98383=" + encodeURI( document.getElementById("last_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98384=" + encodeURI( document.getElementById("street-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98385=" + encodeURI( document.getElementById("postcode-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98386=" + encodeURI( document.getElementById("city-callback-element").value ) +
                "&ContentObjectAttribute_country_98387[]=" + encodeURI( document.getElementById("country-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98388=" + encodeURI( document.getElementById("day_of_birth-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98389=" + encodeURI( document.getElementById("phone-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98390=" + encodeURI( document.getElementById("email-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98391=" + encodeURI( document.getElementById("captcha-callback-element").value ) +
                "&ContentNodeID=" + encodeURI( document.getElementById("contentnodeid").value ) +
                "&ContentObjectID=" + encodeURI( document.getElementById("contentobjectid").value ) +
                "&ViewMode=" + encodeURI( document.getElementById("viewmode").value ) +
                "&Subject=" + encodeURI( "Adventskalender-Gewinnspiel 14. Dezember" ) +
                "&ActionCollectInformation=1";
  /*makePOSTRequest("/cms/index_tipafriend.php", poststr);*/
  makePOSTRequest("/cms/content/action", poststr, "modalboxContentID-over");
}

function get22decembernew(obj) {
  var poststr = "ContentObjectAttribute_ezstring_data_text_98446=" + encodeURI( document.getElementById("letter_1-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98447=" + encodeURI( document.getElementById("letter_2-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98448=" + encodeURI( document.getElementById("letter_3-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98449=" + encodeURI( document.getElementById("letter_4-callback-element").value ) +
                "&ContentObjectAttribute_ezselect_selected_array_98450[]=" + encodeURI( document.getElementById("salutation-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98451=" + encodeURI( document.getElementById("first_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98452=" + encodeURI( document.getElementById("last_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98453=" + encodeURI( document.getElementById("street-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98454=" + encodeURI( document.getElementById("postcode-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98455=" + encodeURI( document.getElementById("city-callback-element").value ) +
                "&ContentObjectAttribute_country_98456[]=" + encodeURI( document.getElementById("country-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98457=" + encodeURI( document.getElementById("day_of_birth-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98458=" + encodeURI( document.getElementById("phone-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98459=" + encodeURI( document.getElementById("email-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98460=" + encodeURI( document.getElementById("captcha-callback-element").value ) +
                "&ContentNodeID=" + encodeURI( document.getElementById("contentnodeid").value ) +
                "&ContentObjectID=" + encodeURI( document.getElementById("contentobjectid").value ) +
                "&ViewMode=" + encodeURI( document.getElementById("viewmode").value ) +
                "&Subject=" + encodeURI( "Adventskalender-Gewinnspiel 22. Dezember" ) +
                "&ActionCollectInformation=1";
  /*makePOSTRequest("/cms/index_tipafriend.php", poststr);*/
  makePOSTRequest("/cms/content/action", poststr, "modalboxContentID-over");
}

/* online */
/*
function get22december(obj) {
  var poststr = "ContentObjectAttribute_ezstring_data_text_98446=" + encodeURI( document.getElementById("letter_1-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98447=" + encodeURI( document.getElementById("letter_2-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98448=" + encodeURI( document.getElementById("letter_3-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98449=" + encodeURI( document.getElementById("letter_4-callback-element").value ) +
                "&ContentObjectAttribute_ezselect_selected_array_98450[]=" + encodeURI( document.getElementById("salutation-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98451=" + encodeURI( document.getElementById("first_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98452=" + encodeURI( document.getElementById("last_name-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98453=" + encodeURI( document.getElementById("street-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98454=" + encodeURI( document.getElementById("postcode-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98455=" + encodeURI( document.getElementById("city-callback-element").value ) +
                "&ContentObjectAttribute_country_98456[]=" + encodeURI( document.getElementById("country-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98457=" + encodeURI( document.getElementById("day_of_birth-callback-element").value ) +
                "&ContentObjectAttribute_ezstring_data_text_98458=" + encodeURI( document.getElementById("phone-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98459=" + encodeURI( document.getElementById("email-callback-element").value ) +
                "&ContentObjectAttribute_data_text_98460=" + encodeURI( document.getElementById("captcha-callback-element").value ) +
                "&ContentNodeID=" + encodeURI( document.getElementById("contentnodeid").value ) +
                "&ContentObjectID=" + encodeURI( document.getElementById("contentobjectid").value ) +
                "&ViewMode=" + encodeURI( document.getElementById("viewmode").value ) +
                "&Subject=" + encodeURI( "Adventskalender-Gewinnspiel 22. Dezember" ) +
                "&ActionCollectInformation=1";
  makePOSTRequest("/cms/content/action", poststr, "modalboxContentID-over");
}
*/

$(document).ready(function(){
	/* FREIZEITPARKS/DEUTSCHLANDKARTE */
	$("#deutschlandkarte").addClass("deutschlandkarte");
	$("#magic").parent("p").addClass("deutschlandkarte");
	$("#magic").addClass("deutschlandkarte").text('');
	$("#pullman").addClass("deutschlandkarte").text('');
	$("#saurier").addClass("deutschlandkarte").text('');
	$("#movie").addClass("deutschlandkarte").text('');
	$("#zwerge").addClass("deutschlandkarte").text('');
	$("#erzgebirge").addClass("deutschlandkarte").text('');
	$("#taunus").addClass("deutschlandkarte").text('');
	$("#holiday").addClass("deutschlandkarte").text('');
	$("#tripsdrill").addClass("deutschlandkarte").text('');
	$("#irrgarten").addClass("deutschlandkarte").text('');

	$('#deutschlandkarte .class-image').mouseover(function () {
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	});

	$("#magic").mouseover(function () {
		$(this).addClass("hover");
		$("#content-magic").attr("class", "fixed");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#pullman").mouseover(function () {
		$(this).addClass("hover");
		$("#content-pullman").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#saurier").mouseover(function () {
		$(this).addClass("hover");
		$("#content-saurier").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#movie").mouseover(function () {
		$(this).addClass("hover");
		$("#content-movie").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#zwerge").mouseover(function () {
		$(this).addClass("hover");
		$("#content-zwerge").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#erzgebirge").mouseover(function () {
		$(this).addClass("hover");
		$("#content-erzgebirge").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#taunus").mouseover(function () {
		$(this).addClass("hover");
		$("#content-taunus").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#holiday").mouseover(function () {
		$(this).addClass("hover");
		$("#content-holiday").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#tripsdrill").mouseover(function () {
		$(this).addClass("hover");
		$("#content-tripsdrill").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-irrgarten").attr("class", "");
		$("#irrgarten").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#irrgarten").mouseover(function () {
		$(this).addClass("hover");
		$("#content-irrgarten").attr("class", "fixed");
		$("#content-magic").attr("class", "");
		$("#magic").attr("class", "deutschlandkarte");
		$("#content-pullman").attr("class", "");
		$("#pullman").attr("class", "deutschlandkarte");
		$("#content-saurier").attr("class", "");
		$("#saurier").attr("class", "deutschlandkarte");
		$("#content-movie").attr("class", "");
		$("#movie").attr("class", "deutschlandkarte");
		$("#content-erzgebirge").attr("class", "");
		$("#erzgebirge").attr("class", "deutschlandkarte");
		$("#content-taunus").attr("class", "");
		$("#taunus").attr("class", "deutschlandkarte");
		$("#content-zwerge").attr("class", "");
		$("#zwerge").attr("class", "deutschlandkarte");
		$("#content-holiday").attr("class", "");
		$("#holiday").attr("class", "deutschlandkarte");
		$("#content-tripsdrill").attr("class", "");
		$("#tripsdrill").attr("class", "deutschlandkarte");
	}).click(function (event) {
    	event.preventDefault();
	});

	$("#send-freizeitpark-form").click(function (event) {
		event.preventDefault();

		var current_action = $("#freizeitpark-form").attr("action");
		var form_data = $("#freizeitpark-form").serialize();
		var extended_form_data = form_data.concat( '&ActionCollectInformation=1' );

		osc.evt( 'Zentis-Aktionen', 'Freizeitparks_gesendet' );

		$.post( current_action,
				extended_form_data,
				function(data){
					var jquery_data = $(data);
					if( jquery_data.find("#freizeitpark-feedback").length == 1 )
					{
						$("#email-sent").css("display", "none");
						$("#email-not-sent").css("display", "none");
						$("#email-already-sent").css("display", "none");
						collectionID = jquery_data.find("#collection-id").text();
						$(".overflow-fix").html( '<div class="contactform-feedback" style="background: none;">' + jquery_data.find(".contactform-feedback").html() + '</div>');
						_manageCouponEMail(collectionID);
					}
					else {
						$("#freizeitpark-form .block_spam").html(jquery_data.find(".block_spam").html());
						if( $("#freizeitpark-form").find(".warning").length == 1 ){
							$("#freizeitpark-form .warning").html(jquery_data.find(".warning").html());
						}
						else {
							$("#freizeitpark-form").prepend('<div class="warning">' + jquery_data.find(".warning").html() + '</div>');
						}
					}
				} );
	});

	/* LIGHTBOX */
	$(function() {
	    $('a.lightbox-enabled').lightBox();
	});
	/* FRÜHSTÜCKS-GUIDE */
	$('a#flag-berlin .lightbox-link-content').text('');
	$('a#flag-hamburg-1 .lightbox-link-content').text('');
	$('a#flag-hamburg-2 .lightbox-link-content').text('');
	$('a#flag-leipzig .lightbox-link-content').text('');
	$('a#flag-frankfurt .lightbox-link-content').text('');
	$('a#flag-stuttgart .lightbox-link-content').text('');
	$('a#flag-muenchen .lightbox-link-content').text('');
	/* ADVENTS-COUNTDOWN */
	var eventdate = new Date("December 24, 2010 00:00:00 GMT");
	d=new Date();
	count=Math.floor((eventdate.getTime()-d.getTime())/1000);
	count=Math.floor(count/(60*60*24)) + 1;
	if(count > 0){
		$("#days-to-advent").html( 'Noch <span style="color: #C31924;">' + count + '</span> mal schlafen, dann ist Weihnachten!' );
	}
	else {
		$("#days-to-advent").html( 'Fröhliche Weihnachten' );
	}

	/* STARRATING */
	$(".ezsr-star-rating").click(function () {
		$(".ezsr-before-rating").css( "display", "none" );
    });

	/* TIPAFRIEND */
	$(".attribute-tipafriend").css("display", "block");

	/* LANGUAGE-NAVI */
	$("#unstyled-possible-languages").css( "display", "none" );
	$("#current-language").css( "display", "block" );

	$("#current-language").click(function () {
		$("#possible-languages").toggleClass("hidden");
    });

    /* TOP-NAVI */
    /*
    $("#nav-2010 .not-selected").mouseover(function () {
      $(this).parent("#nav-2010").find("#selected ul").css("display","none");
      $(this).parent("#nav-2010").children("#selected").children("a").addClass("inactive");
    });

    $("#nav-2010 .not-selected").mouseout(function () {
      $(this).parent("#nav-2010").find("#selected ul").css("display","block");
      $(this).parent("#nav-2010").children("#selected").children("a").removeClass("inactive");
    });
    */
    /* TOP-NAVI */
    $("#nav-2010 .not-selected").mouseover(function () {
      $(this).parent("#nav-2010").find("#selected ul").css("display","none");
      $(this).parent("#nav-2010").children("#selected").children("a").addClass("inactive");
      $(this).children("a").addClass("inactive");
      $(this).addClass("list-hover");
    });

    $("#nav-2010 .not-selected").mouseout(function () {
      $(this).parent("#nav-2010").find("#selected ul").css("display","block").css('visibility','visible').show();
      $(this).parent("#nav-2010").children("#selected").children("a").removeClass("inactive");
      $(this).children("a").removeClass("inactive");
      $(this).removeClass("list-hover");
    });

     $("ul#nav-2010").superfish({

    pathLevels:    0,                  // the number of levels of submenus that remain open or are restored using pathClass
    delay:         0,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing
    animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method
    speed:         0,           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method
    autoArrows:    false,
    dropShadows:   false,
    disableHI:     false

        });

    /* LEFT NAVI KUNDENSTIMMEN */
    $('#sidemenu .menu-list li form input').mouseover(function () {
		$(this).addClass( "hover-input" );
	}).mouseout(function () {
		$(this).removeClass( "hover-input" );
	});

	/* KUNDENSTIMMEN BUTTON */
	$('.kundenstimmenform').mouseover(function () {
		$(this).find(".kundenstimmenbutton").addClass("underline");
	}).mouseout(function () {
		$(this).find(".kundenstimmenbutton").removeClass("underline");
	});

	/* SHOW HIDE BOX (WM-AKTION) */
	$('.show-hide-box').each(function () {
		$(this).css("display", "none");
		var current_id = $(this).attr("id");
		var new_id = current_id + '-jquery';
		$(this).attr("id", new_id);
	});

	$('#soccer-flags area').click(function () {
		var flag_id = $(this).attr("href");
		var show_id = flag_id + '-jquery';

		if ( flag_id == '#ger'){
			$('#ger-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#ger-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#arg'){
			$('#arg-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#arg-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#bra'){
			$('#bra-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#bra-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#uru'){
			$('#uru-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#uru-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#eng'){
			$('#eng-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#eng-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#fra'){
			$('#fra-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#fra-wm-eyecatcher').css("display", "none");
		}

		if ( flag_id == '#ita'){
			$('#ita-wm-eyecatcher').css("display", "block");
		}
		else {
			$('#ita-wm-eyecatcher').css("display", "none");
		}

		$('.show-hide-box').css("display", "none");
		$(show_id).css("display", "block");
    });

    /* SELECT-BOXEN */
    $(".contactform .form-area form fieldset select").each(function () {
		var current_option_text = $(this).find("option:selected").text();
		var before_class = $(this).prev().attr( "class" );

		if( before_class != 'select-style-box' ){
			$(this).before( '<div class="select-style-box" id="' + $(this).attr("id") + '-helper"><span class="show-text">' + current_option_text + '</span>' );
			$(this).after( '</div>' );
			$(this).addClass( "styled" );
		}

	});

    $(".contactform .form-area form fieldset select").change(function() {
	  	var new_current_option_text = $(this).find("option:selected").text();
	  	var selector = "#" + $(this).attr("id") + "-helper";
	  	$(selector).find(".show-text").html(new_current_option_text);
	});

	/* POPUP (z. B. Rechtliche Hinweise) */
	$("a.popup").each(function () {
		$(this).css( "display", "block" );
	}).click(function () {
		var popup_id = $(this).find(".popup-id").text();
		var close_id = "#close-popup-" + popup_id;
		var content_id = "#popup-content-" + popup_id;
		$(close_id).css( "display", "block" );
		$(content_id).css( "display", "block" );
	});

	$("a.close-popup").click(function () {
		var popup_id = $(this).find(".popup-id").text();
		var close_id = "#close-popup-" + popup_id;
		var content_id = "#popup-content-" + popup_id;
		$(close_id).css( "display", "none" );
		$(content_id).css( "display", "none" );
	});

	$(".popup-content").each(function () {
		$(this).css( "display", "none" ).addClass("popup-styled");
	});

	/* FORMULARE */
	/*
	$("#house_number").each(function () {
		var street_label_width = $("#street").width();
		var left_position = street_label_width + 10;
		var left_position_text = left_position + 'px';
		var next_class = $("#street").next().attr( "class" );

		if( next_class != 'division' ){
			$("#street").after( '<span class="division">/</span>' );
		}

		$(this).css("left", left_position_text);
	});

	$("#city").each(function () {
		var street_label_width = $("#postcode").width();
		var left_position = street_label_width + 10;
		var left_position_text = left_position + 'px';
		var next_class = $("#postcode").next().attr( "class" );

		if( next_class != 'division' ){
			$("#postcode").after( '<span class="division">/</span>' );
		}

		$(this).css("left", left_position_text);
	});

	$("#day_of_birth-callback-element").focus(function () {
		if ( $(this).val() == 'TT' ){
			$(this).val('');
		}
	}).blur(function () {
		if ( $(this).val() == '' ){
			$(this).val('TT');
		}
	});

	$("#month_of_birth-callback-element").focus(function () {
		if ( $(this).val() == 'MM' ){
			$(this).val('');
		}
	}).blur(function () {
		if ( $(this).val() == '' ){
			$(this).val('MM');
		}
	});

	$("#year_of_birth-callback-element").focus(function () {
		if ( $(this).val() == 'JJJJ' ){
			$(this).val('');
		}
	}).blur(function () {
		if ( $(this).val() == '' ){
			$(this).val('JJJJ');
		}
	});
	*/
	/* BUTTONS */
	$(".flexible-button").mouseover(function () {
		$(this).addClass( "hover-button" );
	}).mouseout(function () {
		$(this).removeClass( "hover-button" );
	});

	/* CHECKBOXEN */
	$(":checkbox").each(function () {
		var helper_id = $(this).attr( "id" ) + '-helper';
		$(this).addClass( "checkbox" );

		var before_class = $(this).prev().attr( "class" );

		if( before_class != 'checkbox-helper' ){
			$(this).before( '<span id="' + helper_id + '" class="checkbox-helper"></span>' );
		}

	}).click(function () {
		var current_helper_id = '#' + $(this).attr( "id" ) + '-helper';
		$(current_helper_id).toggleClass( "checked" );
	});

	/* RADIOBUTTONS */
	$(":radio").each(function () {
		var helper_id = $(this).attr( "id" ) + '-helper';
		$(this).addClass( "radio" );

		var before_class = $(this).prev().attr( "class" );

		if( before_class != 'radio-helper' ){
			$(this).before( '<span id="' + helper_id + '" class="radio-helper"></span>' );
		}

	}).click(function () {
		var current_helper_id = '#' + $(this).attr( "id" ) + '-helper';
		$(this).parent( "div" ).parent( ".option-box" ).find( ":radio" ).prev().removeClass( "checked-radio" );
		$(current_helper_id).addClass( "checked-radio" );
	});

    /* CARROUSEL GENERAL */
    var carrousel_general = jQuery("ul#myCarousel.general").carrousel({
    		controls	    : '',
    		effects         : '',
	        speed           : 100,
	        dispTimeout     : 100,
	        dispNumber      : 7,
	        align           : 'center',
	        auto            : false,
	        move            : '',
	        api             : true,
	        mode            : 'img'
	});

	jQuery('#next-general').click(function () {
		carrousel_general.next();

		$("#myCarousel.general li a").mouseover(function () {
		  $(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      $(".product-slider-box").css("overflow", "hidden");
	    });

	    $('#myCarousel.general li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	});
	jQuery('#prev-general').click(function () {
		carrousel_general.prev();

		$("#myCarousel.general li a").mouseover(function () {
		  $(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      $(".product-slider-box").css("overflow", "hidden");
	    });

	    $('#myCarousel.general li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	});

	/* MOUSE OVER ZOOM PICS (CARROUSEL) */
	$("#myCarousel.general li a").mouseover(function () {
	  $(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      $(".product-slider-box").css("overflow", "hidden");
    });

    $('#myCarousel.general li a').tinyTips($(this).find(".tooltip-content").html());

    /* STATIC */
    /* MOUSE OVER ZOOM PICS (CARROUSEL) */
	$("#myStaticCarousel.general li a").mouseover(function () {
	  $(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      $(".product-slider-box").css("overflow", "hidden");
    });

    $('#myStaticCarousel.general li a').tinyTips($(this).find(".tooltip-content").html());

    /* CARROUSEL GENERAL-ANIMATED */
	var carrousel_general_animated = jQuery("ul#myCarousel.general-animated").carrousel({
    		controls	    : '',
    		effects         : '',
	        speed           : 1000,
	        dispTimeout     : 2000,
	        dispNumber      : 7,
	        align           : 'center',
	        auto            : true,
	        move            : '',
	        api             : true,
	        mode            : 'img',
	        direction       : 'left',
	        stopOver        : true
	});

	jQuery('#next-general-animated').click(function () {
		carrousel_general_animated.next();

		$("#myCarousel.general-animated li a").mouseover(function () {
		  	$(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      	$(".product-slider-box").css("overflow", "hidden");
	    });

	    $('#myCarousel.general-animated li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	}).mouseover(function () {
		carrousel_general_animated.stop();
	}).mouseout(function () {
		carrousel_general_animated.start();
	});

	jQuery('#prev-general-animated').click(function () {
		carrousel_general_animated.prev();

		$("#myCarousel.general-animated li a").mouseover(function () {
		  	$(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      	$(".product-slider-box").css("overflow", "hidden");
	    });

	    $('#myCarousel.general-animated li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	}).mouseover(function () {
		carrousel_general_animated.stop();
	}).mouseout(function () {
		carrousel_general_animated.start();
	});

	/* MOUSE OVER ZOOM PICS (CARROUSEL) */
	$("#myCarousel.general-animated li a").mouseover(function () {
	  	$(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      	$(".product-slider-box").css("overflow", "hidden");
    });

    $('#myCarousel.general-animated li a').tinyTips($(this).find(".tooltip-content").html());

    /* STATIC */
    /* MOUSE OVER ZOOM PICS (CARROUSEL) */
	$("#myStaticCarousel.general-animated li a").mouseover(function () {
	  $(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      $(".product-slider-box").css("overflow", "hidden");
    });

    $('#myStaticCarousel.general-animated li a').tinyTips($(this).find(".tooltip-content").html());

    /* CARROUSEL SORTS */
    var carrousel_sorts = jQuery("ul#myCarousel.sorts").carrousel({
    		controls	    : '',
    		effects         : '',
	        speed           : 100,
	        dispTimeout     : 100,
	        dispNumber      : 5,
	        align           : 'center',
	        auto            : false,
	        move            : '',
	        api             : true,
	        mode            : 'img'
	});

	jQuery('#next-sorts').click(function () {
		carrousel_sorts.next();

		$("#myCarousel.sorts li a").mouseover(function () {
		  $(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      $(".product-slider-box").css("overflow", "hidden");
	    });

	    /*
	    .click(function () {
	      $(".sortiment-billboard").css("display", "none");
	      var node_id = $(this).find(".node-id").html();
	      var id_name = "#sort-node-" + node_id;
	      $(".more-link").css("display", "none");
	      var node_id = $(this).find(".node-id").html();
	      var link_id_name = "#more-link-" + node_id;

	      $(id_name).css("display", "block");
	      $(link_id_name).css("display", "inline");
	    });
	    */

		$('#myCarousel.sorts li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	});
	jQuery('#prev-sorts').click(function () {
		carrousel_sorts.prev();

		$("#myCarousel.sorts li a").mouseover(function () {
		  $(".product-slider-box").css("overflow", "visible");
	    }).mouseout(function () {
	      $(".product-slider-box").css("overflow", "hidden");
	    });

	    /*
	    .click(function () {
	      $(".sortiment-billboard").css("display", "none");
	      var node_id = $(this).find(".node-id").html();
	      var id_name = "#sort-node-" + node_id;
	      $(".more-link").css("display", "none");
	      var node_id = $(this).find(".node-id").html();
	      var link_id_name = "#more-link-" + node_id;

	      $(id_name).css("display", "block");
	      $(link_id_name).css("display", "inline");
	    });
	    */

		$('#myCarousel.sorts li a').tinyTips($(this).find(".tooltip-content").html());
		return false;
	});

	/* MOUSE OVER ZOOM PICS (CARROUSEL) */
	$("#myCarousel.sorts li a").mouseover(function () {
	  $(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      $(".product-slider-box").css("overflow", "hidden");
    });

    /*
    .click(function () {
      $(".sortiment-billboard").css("display", "none");
      var node_id = $(this).find(".node-id").html();
      var id_name = "#sort-node-" + node_id;
      $(".more-link").css("display", "none");
      var node_id = $(this).find(".node-id").html();
      var link_id_name = "#more-link-" + node_id;

      $(id_name).css("display", "block");
      $(link_id_name).css("display", "inline");
    });
    */

    $('#myCarousel.sorts li a').tinyTips($(this).find(".tooltip-content").html());

    /* STATIC */
	$("#myStaticCarousel.sorts li a").mouseover(function () {
	  $(".product-slider-box").css("overflow", "visible");
    }).mouseout(function () {
      $(".product-slider-box").css("overflow", "hidden");
    });

    /*
    .click(function () {
      $(".sortiment-billboard").css("display", "none");
      var node_id = $(this).find(".node-id").html();
      var id_name = "#sort-node-" + node_id;
      $(".more-link").css("display", "none");
      var node_id = $(this).find(".node-id").html();
      var link_id_name = "#more-link-" + node_id;

      $(id_name).css("display", "block");
      $(link_id_name).css("display", "inline");
    });
    */

    $('#myStaticCarousel.sorts li a').tinyTips($(this).find(".tooltip-content").html());

} );

function _manageCouponEMail( collectionID )
{
    jQuery.ez( 'zentis::managecoupon::' + collectionID, {}, _callBackCoupon );
    return false;
}

function _callBackCoupon( data )
{
    return false;
}
