$(document).ready(function() {
	
//$("#content img:not(#pause)").hide().fadeIn(1500);
$("#accordion").accordion({ header: "h3",autoHeight: false });
$("#propertyInfo" ).tabs();
$('#carousel').carousel( {
	interval: 2000
});

$("#submitButton").click(function(){
	var error = "";
	//"Gelieve volgende velde in te vullen:<br />";
	
	if($("#last_name").val() == "") {
		error = "\nAchternaam";
	}
	if($("#first_name").val() == "") {
		error += "\nVoornaam";
	}
	if($("#email").val() == "") {
		error += "\nE-mail";
	}
	if($("#phone").val() == "") {
		error += "\nTelefoon";
	}
	if($("#00N20000002Jy5f").val() == "") {
		error += "\nBericht";
	}
	
	if(error != "") {
		alert("Gelieve volgende velde in te vullen:" + error);
	}
});

$('.gallery').gallery({
  interval: 4500,
  height: '356px',
  width: '576px',
  toggleBar: false,
  ratio: 0.0
});


$('textarea.tinymce').tinymce({
			// Location of TinyMCE script
			script_url : '/js/tinymce/jscripts/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			width : "100%",
			height : "200px",
			nowrap : false,
			plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,styleselect,formatselect,|,cut,copy,paste,pastetext,|,bullist,numlist,|,undo,redo",
			theme_advanced_buttons2 : "link,unlink,image,cleanup,code,|,hr,removeformat,visualaid,|,sup,sub,|,charmap,|,fullscreen",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			content_css : "http://www.chateau-provence.com/css/myStyle.css",

			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js"
		});

});


window.log = function(){
  log.history = log.history || [];   
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};
(function(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);



