$(function() {
	$.fn.superbgimage.options = {
		transition: 1,
		slideshow: 1,
		slide_interval: 4000,
		randomimage: 0,
		speed: 'slow'
	};
	
	jQuery.fn.center = function () {
		this.css("position","absolute");
		this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
		this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
		return this;
	}
	
	jQuery.fn.resizer = function () {
		this.css("height", (($(window).height() - ( 85 * 2 )) * 0.65 ) + "px");
		this.css("width", ($(window).width()*0.55) + "px");
		return this;
	}
	
	jQuery.fn.wellness = function () {
		this.css("height", (130) + "px");
		this.css("width", (370) + "px");
		return this;
	}
	
	jQuery.fn.vimeocontroller = function () {
		this.css("position","absolute");
		this.css("height", ($(window).height() - ( 85 * 2 )) + "px");
		this.css("width",  ($(window).width()) + "px");
		this.css("top", 85 + "px");
		this.css("left", 0 + "px");
		return this;
	}
	
	jQuery.fn.mapresizer = function () {
		this.css("height", ($('#contents-box').height()) + "px");
		this.css("width",  ($('#contents-box').width()) + "px");
		return this;
	}
	
	$('#slider').superbgimage().hide();
	$('#contents-box').resizer().center();
	$('#contents-box-wellness').wellness().center();
	$('#vimeo').vimeocontroller();
	$('#gmap').mapresizer();
});
	
$(window).resize(function() {
	$('#contents-box').resizer().center();
	$('#contents-box-wellness').wellness().center();
	$('#vimeo').vimeocontroller();
	$('#gmap').mapresizer();
});
    
$(document).ready(function(){
	$('#fast-menu').hover(showMenu, hideMenu);
});

function showMenu(){ $(this).animate({'left': 0}, 200);}
function hideMenu(){ $(this).animate({'left': -80}, 200);}
