<!--

/* IMAGE FADE - Home and about pages */

$(document).ready(function() {
	$('.HomeImgFade').cycle({
		fx: 'fade',
		timeout: 6000,
		speed: 1500
	});
	$('.AboutImgFade').cycle({
		fx: 'fade',
		timeout: 6000,
		speed: 1500
	});
});

/* GOOGLE MAP POPUP - Contact page */

// Open Map

function openMap() {
								   
	$("body").append("<div id='Overlay'>&nbsp;</div>");
	$("#Overlay").width($(window).width()).height($(document).height()).css("opacity", "0.7");		
	$("body").append("<div id='Map'></div>");
	$('#Map').load('../common/map.html');
	
	$("#Map").centerInClient({ container: window });

};

// Close Map

function closeMap() {
	
	$("#Map").remove();
	$("#Overlay").remove();
	
}

// Open Subscribe

function openSub(pageID, pageWidth) {
								   
	$("body").append("<div id='Overlay'>&nbsp;</div>");
	$("#Overlay").width($(window).width()).height($(document).height()).css("opacity", "0.7");		
	$("body").append("<div id='Sub' style='height:500px;width:" + pageWidth + ";'></div>");
	$('#Sub').load('../common/' + pageID);
	
	$("#Sub").centerInClient({ container: window });
	$("#Sub").css('height', '');

};

// Close Subscribe

function closeSub() {
	
	$("#Sub").remove();
	$("#Overlay").remove();
	
}

// Center on Resize

$(window).resize(function() {
						  
  	$("#Overlay").width($(window).width()).height($(document).height());	
	$("#Map").centerInClient({ container: window });
	$("#Sub").centerInClient({ container: window });

});

-->
