
$(document).ready(function() {
						   
//JS Check-------------------------------------------------------------
	
//	$('#keinJS').hide();
//	
//	
//	
//	$('.nojs').hide();
//	$('.js').show();
//	$('h4.js').css('display', 'inline');
//	$('form.kontaktform fieldset#zeitraum label').css('top', '7px');
//	$('div#col2 div.reisezeitraum  ol#termin  li  label').css('top', '5px');
//	$('select#jahr').css('display','block');
	



		
//reisezeitraum	---------------------------------------------------

	//$('#time').show();
	//$('#flexContainer').show();
	//$('#fixContainer').hide();
	
//	$('#periodSearch').submit(function(){
//			
//			von = $('#von').datepicker('getDate');
//			bis = $('#bis').datepicker('getDate');
//			
//			if(von < bis) {
//				//alert('OK');
//			}
//			if(von > bis) {
//				$('#bis').datepicker('setDate', $('#von').datepicker('getDate') + '+1m' );
//			}
//			
//			//$('#bis').datepicker( 'setDate' , date );
//			
//			//alert(von);
//			
//			//cookie
//			typ = $('#periodSearch input[name=time]:checked').val();
//			
//			if(typ == "fixtime") {
//				von = $('#von').val();
//				bis = $('#bis').val();
//			}
//			if(typ == "flextime") {
//				von = $('#anreise').val();
//				bis = $('#abreise').val();
//			}			
//			
//			$.cookie('from_to_pers', von + '_' + bis + '_' + 2, {expires: 1, path: '/', domain: 'fincallorca.de', secure: false});
//			
//			
//	});
//	
//	if($.cookie("from_to_pers")) {
//		var from_to = $.cookie("from_to_pers").split("_");
//		$("form #vonDetails").val(from_to[0]);
//		$("form #bisDetails").val(from_to[1]);
//		$("form #adultSelect").val(from_to[2]);
//	}
//	
//	$('#entferneZeitraum').click(function(){
//		$.cookie("from_to_pers", null, {path: '/', domain: 'fincallorca.de'});
//	});

//	$('#fix, .fix').click(function(){			
//			$('#fix').attr('checked','checked')
//                        $('#duration').attr('disabled','disabled')
//			
//	});// Ende click()
//	
//	$('#flex, .flex').click(function(){			
//			$('#flex').attr('checked','checked')
//                        $('#duration').attr('disabled','disabled')
//			
//	});// Ende click()
//            $('#flex, .flex').live('click', function(){
//                        $('#duration').removeAttr('disabled');
//                        $('label span').show();
//                                    });
//            $('#fix, .fix').live('click', function(){
//                        $('#duration').attr('disabled','disabled');
//                        $('label span').hide();
//                                    });

// Zusatzinformationen erweitern---------------------------------------------------

	//$('.rest').hide();
//	$('.button').addClass('mehr');
//	$('.button').toggle(
//			function(){
//			$(this).prev().children('.rest').slideDown();
//			$(this).addClass('weniger').removeClass('mehr');
//			},
//			function(){
//			$(this).prev().children('.rest').slideUp();
//			$(this).addClass('mehr').removeClass('weniger');
//			
//			
//			});// Ende toggle()
	
//kalender einblenden---------------------------------------------------

//	$('.datepicker').datepicker({
//		showOn: 'both',
//		buttonImage: '/img/site/cal.png',
//		altField: '#actualDate',
//		buttonText: 'Kalender ' + unescape("%F6") + 'ffnen',
//		buttonImageOnly: true,
//		dateFormat: 'dd.mm.yy',
//		changeMonth: true,
//		changeYear: true,
//		dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
//		firstDay: 1,
//		monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
//		monthNamesShort: ['Jan','Feb','Mrz','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],
//		yearRange: '2011:2012'//,
//		//beforeShow: customRange
//	});
//
//	function customRange(input) {
//			
//			if(input.id == "abreise") {
//				return {minDate: $('#anreise').datepicker('getDate') ? new Date(new Date($('#anreise').datepicker('getDate')).getTime() + 86400000 *5) : new Date()}
//			}
//			else if(input.id == "bis") {
//				return {minDate: $('#von').datepicker('getDate') ? new Date(new Date($('#von').datepicker('getDate')).getTime() + 86400000 *5) : new Date()}
//			}
//			else if(input.id == "bisDetails") {
//				return {minDate: $('#vonDetails').datepicker('getDate') ? new Date(new Date($('#vonDetails').datepicker('getDate')).getTime() + 86400000 *5) : new Date()}
//			}			
//			else {
//				return {minDate: new Date()}
//			}
//			
//	}// Ende datepicker()
	
//weitere fincas carousel------------------------------------------------

		
   // jQuery('#mycarousel').jcarousel();
	
////lightbox-------------------------------------------------------------	
//
//
//	//$("#strand a, #straende a.bild, #heiraten_mallorca a.bild, a.lightbox").not("#linkBildbearbeitung").fancybox();
//	$("a.bild, a.lightbox").not("#linkBildbearbeitung").fancybox({
//		overlayOpacity		:	0,
//		hideOnOverlayClick	:	true,
//		transitionIn		: 	"elastic",
//		transitionOut		:	"elastic"
//		});
//	$(".map a").fancybox({
//		overlayShow			:	false,
//		width				:	620,
//		height				:	420,
//		overlayOpacity		:	0,
//		hideOnOverlayClick	:	true,
//		transitionIn		: 	"elastic",
//		transitionOut		:	"elastic"
//		});
//	$("a.njSpecial_link").fancybox({
//		overlayShow			:	false,
//		width				:	770,
//		height				:	430,
//		overlayOpacity		:	0,
//		hideOnOverlayClick	:	true
//	    });
//	$("a.lightbox.faq").fancybox({
//		overlayShow			:	true,
//		autoDimensions		:	false,
//		width				:	700,
//		height				:	600,
//		overlayOpacity		:	0.5,
//		hideOnOverlayClick	:	true
//	    });
	




//$('a[href*=#]').not('#finca_listing  a[href*=#], #front a[href*=#], #uebersicht a[href*=#], #footer a[href*=#], #request a[href*=#]').bind("click", function(event) {
//		event.preventDefault();
//		var ziel = $(this).attr("href");
//
//		$('html,body').animate({
//			scrollTop: $(ziel).offset().top
//		}, 2000 , function (){location.hash = ziel;});
//});


//----------Kontaktformular aus Detailseiten ein- und ausblenden-------------
//$('#contact').hide();
//$('#contactSwitch').click(function() {
//	$('#contact').slideToggle(
//		function(){			
//			$('html,body').animate({
//			scrollTop: $('#enquiry') .offset().top
//			}, 1000);
//		});
//	$(this).hide();
//	$('#enquiry_text').css('width','auto');
//return false;			
//});// Ende click()
//$('#requestLink').click(function() {
//	$('#contact').slideDown(
//		function(){			
//			$('html,body').animate({
//			scrollTop: $('#request') .offset().top
//			}, 1000);
//		});
//	$('#contactSwitch').hide();
//	$('#enquiry_text').css('width','auto');
//return false;			
//});// Ende click()



//---------------Gewinnspiel Layer Startseite-------------

//window.onload = function() {
//    
//
//
//$('#gewinnspielLayer').animate({"top": "-300px"}, 1000).animate({"top": "0px"}, 2000);
//$('#gewinnspielLayer #close').click(function(){
//	$('#gewinnspielLayer').animate({"top": "-284px"}, 1000)
//	});
//
//}






//---------------highlight offers-------------------------
//  window.setTimeout(function(){ 
//$('div.object .highlight').each(function(){
//    var height      = $(this).height();
//    var k           = (height - 40) / 2
//    var position    = $(this).offset();
//    var top         = position.top + k;
//    var left        = $('#main').offset().left + 940;                   
//    var content  = '<div class="offerLabel" style="top:'+ top + 'px; left:' + left + 'px"><div>'
//    //alert(position.top);
//  
//    $('body').append(content);
//    $(window).resize(function(){
//                    var left = $('#main').offset().left + 940;  
//                    $('.offerLabel').css({'left':(($('#main').offset().left)+940)+'px'});
//
//                        });
//    
//    });
//    }, 400);
//$(window).unload(function(){
//    $('.offerLabel').remove()
//});
//--------------------------------------------------------

return false;
});// ende ready


