$(document).ready(function(){
	
	/* PrettyCheckbox */
	$("input.kontaktformCheck").prettyCheckboxes();


	/* PrettyPhoto */
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 10, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});


	/* Header, MouseOver-Links */
	var aktURL = String(document.location);
	$("img#kw_hochzeiten").hover(
		function () {
			$(this).attr({src:"media/dsg/btn/hochzeitenHover.png"});
		}, 
		function () {
			if (aktURL.indexOf("bereich=hochzeiten") == -1) {
				$(this).attr({src:"media/dsg/btn/hochzeiten.png"});			
			}
		}
	);
	$("img#kw_geburtstagsfeste").hover(
		function () {
			$(this).attr({src:"media/dsg/btn/geburtstagsfesteHover.png"});
		}, 
		function () {
			if (aktURL.indexOf("bereich=geburtstage") == -1) {
				$(this).attr({src:"media/dsg/btn/geburtstagsfeste.png"});			
			}		
		}
	);
	$("img#kw_firmenanlaesse").hover(
		function () {
			$(this).attr({src:"media/dsg/btn/firmenanlaesseHover.png"});
		}, 
		function () {
			if (aktURL.indexOf("bereich=firmenanlaesse") == -1) {
				$(this).attr({src:"media/dsg/btn/firmenanlaesse.png"});			
			}				
		}
	);
	$("img#kw_salatbuffet").hover(
		function () {
			$(this).attr({src:"media/dsg/btn/salatbuffetHover.png"});
		}, 
		function () {
			if (aktURL.indexOf("bereich=salatbuffet") == -1) {
				$(this).attr({src:"media/dsg/btn/salatbuffet.png"});			
			}				
		}
	);

	// Galerie "Hochezeit", zu langer Text
	/*if (aktURL.indexOf("bereich=hochzeiten") != -1) {
		$(".galerie").css({top: "440px"});
		if (aktURL.indexOf("seite=") != -1) {
			$(".galerie").css({top: "120px"});
			$(".right .contentText").css({height: "40px"});
		}
	}	*/


	// Galerie aufklappen, Text aufklappen und umgekehrt
	$("a#hochzeitsGalerie").click(function () { 
		$(".galerie").animate({top:"120px"},1300,"swing");
		$(".right .contentText").animate({height:"40px"},1300,"swing");
	});
	

	$("a#hochzeitsText").click(function () { 
		$(".galerie").animate({top:"440px"},1300,"swing");
		$(".right .contentText").animate({height:"500px"},1300,"swing");	
	});	
	

	// Kontaktformular
	if (aktURL.indexOf("bereich=kontakt") != -1) {
		$(".contentText").css({height: "67px"});
	}		


	// Walker anzeigen?
	if ($(".galerie .walker").find("a").length <= 1) {
		$(".galerie .walker").css({display: "none"});
	}


	// Team
	$(".mitarbeiter .eintrag img").hover(
		function () {
			$("img#teamBild").attr({src:"admin/team/gross/" + $(this).attr("id") + ".jpg"});
			$("span#mitarbeiterInfo").text($(this).attr("alt"));
		}	
	);	
	

});
