$(document).ready(function() {

$("#agendabtn").colorbox({
	iframe:true,
	scrolling:true,
	innerWidth:"550px",
	innerHeight:"700px"
	});
	
$('#facebookflap').mouseover(function() {
	$pos=$('#facebookbox').css("right");
	if ($pos< "0")
	{
	$('#facebookbox').animate({	
     right : "0"}, 300, function() {  
	});
	}      
    });

$('#facebookbox').mouseleave(function() {
$pos=$('#facebookbox').css("right");
if ($pos> "-1")
	{	
	$('#facebookbox').animate({	
     right : "-250"}, 300, function() {  
	});
	} 
  });	

//position content vertically
$(function(){
	$hoog=$(window).height();
	$top=(Math.round($hoog/2))-200;
	if ($top<40)
		{$trans="40px";
		$transf="40px"
		}else{
		$trans=$top+"px";
		$topf=$top-70;
		$transf=$topf+"px";
		}	
	$(".drag_block").css("top",$trans);
	$("#facebookholder").css("top",$transf);
});

 // fire background plugin
$(function(){
	$.fn.supersized.options = {  
	startwidth: 1024,  
	startheight: 692,
	vertical_center: 1,
	slides : [
	{image : 'images/bg.jpg' }
	]
	};
	$('#supersized').supersized(); 
  });
  
  $( ".drag_block" ).draggable({ 
    disabled: false,
    handle: '.drag_top',
    stack: ".drag_block"
     });
		 
$(".ytlink").colorbox({iframe:true, innerWidth:640, innerHeight:390});
 $(".aboutus").colorbox({iframe:true, innerWidth:500, innerHeight:400});
  $(".bookings").colorbox({iframe:true, innerWidth:500, innerHeight:600});
 });
 
