$(document).ready(function(){
			$("a.single_image").fancybox({
				'titleShow'		: false
			});

$('#superaccordion h3').click(function(){
	$(this).next().toggle();
	if($(this).hasClass('orange')){
		window.setTimeout("window.scrollTo(0, 983)", 100);
		document.getElementById('gmapframe').src="http://maps.google.de/maps?f=q&hl=de&geocode=&q=Spaldingstra%C3%9Fe+152,+20097+Hammerbrook,+Hamburg&sll=51.124213,10.546875&sspn=12.922529,44.296875&ie=UTF8&s=AARTsJo-jZqmrZgs3es3NEtBxiVQTY2uUA&amp;ll=53.556524,10.025196&spn=0.011523,0.042915&z=14&output=embed";
		$('#googlemap').show();
	}
}).next().hide();

				$("#parent1").wslide({
					width: 250,
					height: 300,
					horiz:true,
					duration:500,
				    autolink: false
				});
				
				$("#parent2").wslide({
					width: 250,
					height: 290,
					duration:500,
				    autolink: false
				});
				
				$("#parent3").wslide({
					width: 250,
					height: 300,
					horiz:true,
					duration:500,
				    autolink: false
				});
				
				$("#parent4").wslide({
					width: 800,
					height: 300,
					duration:500,
					horiz:true,
				    autolink: false
				});
				
				$("#parent5").wslide({
					width: 250,
					height: 240,
					horiz:true,
					duration:500,
				    autolink: false
				});
				
				$("#parent6").wslide({
					width: 530,
					height: 240,
					duration:500,
				    autolink: false
				});
				
				$("#parent7").wslide({
					width: 530,
					height: 300,
					duration:500,
					horiz:true,
				    autolink: false
				});
				
				$("#parent8").wslide({
					width: 250,
					height: 300,
					horiz:true,
					duration:500,
				    autolink: false
				});
			});






			$(function()
            {
				$('.date-pick').datePicker()
				$('#start-date').bind(
					'dpClosed',
					function(e, selectedDates)
					{
						var d = selectedDates[0];
						if (d) {
							d = new Date(d);
							$('#end-date').dpSetStartDate(d.addDays(1).asString());
						}
					}
				);
				$('#end-date').bind(
					'dpClosed',
					function(e, selectedDates)
					{
						var d = selectedDates[0];
						if (d) {
							d = new Date(d);
							$('#start-date').dpSetEndDate(d.addDays(-1).asString());
						}
					}
				);





	$("#contact input").attr("disabled", "disabled");
	$("#contact textarea").attr("disabled", "disabled");
	$("#contact select").attr("disabled", "disabled");


	$("#secondstep input").attr("disabled", "disabled");
	$("#thirdstep input").attr("disabled", "disabled");

	$("#secondstep select").attr("disabled", "disabled");
	$("#thirdstep select").attr("disabled", "disabled");

	$("#secondstep textarea").attr("disabled", "disabled");
	$("#thirdstep textarea").attr("disabled", "disabled");

	$(".tab_preise").click(function() {
		$("#contact input").attr("disabled", "disabled");
		$("#contact textarea").attr("disabled", "disabled");
		$("#contact select").attr("disabled", "disabled");
	});

	$(".tab_specials").click(function() {
		$("#contact input").attr("disabled", "disabled");
		$("#contact textarea").attr("disabled", "disabled");
		$("#contact select").attr("disabled", "disabled");
	});

	$(".tab_contact").click(function() {
		$("#contact input").removeAttr("disabled");
		$("#contact textarea").removeAttr("disabled");
		$("#contact select").removeAttr("disabled");
	});





	$("#buttontosecondstep").click(function() {
		$("#secondstep input").removeAttr("disabled");
		$("#firststep input").attr("disabled", "disabled");
		$("#secondstep select").removeAttr("disabled");
		$("#firststep select").attr("disabled", "disabled");
		$("#secondstep textarea").removeAttr("disabled");
		$("#firststep textarea").attr("disabled", "disabled");
	});
	$("#buttontothirdstep").click(function() {
		$("#thirdstep input").removeAttr("disabled");
		$("#secondstep input").attr("disabled", "disabled");
		$("#thirdstep select").removeAttr("disabled");
		$("#secondstep select").attr("disabled", "disabled");
		$("#thirdstep textarea").removeAttr("disabled");
		$("#secondstep textarea").attr("disabled", "disabled");
	});
	$("#buttonbacktosecondstep").click(function() {
		$("#secondstep input").removeAttr("disabled");
		$("#thirdstep input").attr("disabled", "disabled");
		$("#secondstep select").removeAttr("disabled");
		$("#thirdstep select").attr("disabled", "disabled");
		$("#secondstep textarea").removeAttr("disabled");
		$("#thirdstep textarea").attr("disabled", "disabled");
	});
	$("#buttonbacktofirststep").click(function() {
		$("#firststep input").removeAttr("disabled");
		$("#secondstep input").attr("disabled", "disabled");
		$("#firststep select").removeAttr("disabled");
		$("#secondstep select").attr("disabled", "disabled");
		$("#firststep textarea").removeAttr("disabled");
		$("#secondstep textarea").attr("disabled", "disabled");
	});
	
	$("#impressumlink").click(function() {
		// jQuery('#superaccordion').activate(0);
		$('h3.rosa').next().show();
		$('.tab_background').click();
	});

	$("#work4us_link").click(function() {
		// jQuery('#superaccordion').activate(0);
		$('h3.rosa').next().show();
		$('.tab_staff').click();
	});

	$("#wallpaper").click(function() {
		$('h3.gelb').next().show();
		$('.tab_wallpaper').click();
	});


$('#bookingsubmitbutton').click(function(){
		$('#secondstep input').removeAttr("disabled");
		$('#secondstep select').removeAttr("disabled");
		$('#secondstep textarea').removeAttr("disabled");
		$('#firststep input').removeAttr("disabled");
		$('#firststep select').removeAttr("disabled");
		$('#firststep textarea').removeAttr("disabled");
	});
    var options = { 
        target:        '#output1',   // target element(s) to be updated with server response 
        beforeSubmit:  show_indicator,  // pre-submit callback 
        success:       hide_indicator,  // post-submit callback 
 
        // other available options: 
        //url:       url         // override for form's 'action' attribute 
        //type:      type        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        //clearForm: true        // clear all form fields after successful submit 
        resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
      };
 
    // bind form using 'ajaxForm' 
    $('#myForm').ajaxForm(options);
	
	function show_indicator() { 
		$('#formindicator').show();
	}
	
	function hide_indicator() { 
		$('#formindicator').hide();
		$("#secondstep input").attr("disabled", "disabled");
		$("#secondstep select").attr("disabled", "disabled");
		$("#secondstep textarea").attr("disabled", "disabled");
		$("#firststep input").attr("disabled", "disabled");
		$("#firststep select").attr("disabled", "disabled");
		$("#firststep textarea").attr("disabled", "disabled");
	}

  //
  // Contact form
  //

    var contactoptions = { 
        target:        '#output2',   // target element(s) to be updated with server response 
        beforeSubmit:  show_contactformindicator,  // pre-submit callback 
        success:       hide_contactformindicator,  // post-submit callback 
        resetForm: true        // reset the form after successful submit 
      };
 
    // bind form using 'ajaxForm' 
    $('#myContactForm').ajaxForm(contactoptions);
	
	function show_contactformindicator() { $('#contactformindicator').show();}
	
	function hide_contactformindicator() { $('#contactformindicator').hide();}






            });