/* Called on Thrill Experience control load */
function LoadThrill() 
{
    $(".open-close").hide();
    $(".nextAvailableDatesGraded").click(function() 
    {
        $(this).next(".open-close").slideToggle(600); 
    });
}

/* Initialise PlayVideo Link */
function InitPlayVideoLink() {
    $("a[rel^='prettyPhoto']").unbind().prettyPhoto();
    initNewSlideshow();
}

/* Update Page Meta Data on Ajax load */
function UpdatePageMeta(author, keywords, description) {

    $("meta[name=author]").attr("content", author);
    $("meta[name=keywords]").attr("content", keywords);
    $("meta[name=description]").attr("content", description);
}

function ShowFlashCircuit(filename) {
    var params = {};
    var attributes = {};
    var flashvars = {};
    swfobject.embedSWF(filename, "circuit", "566", "446", "8", false, flashvars, params, attributes);
}

function InitialiseContactMap() {
    var latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
        zoom: 8,
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map"), myOptions);
}

function inlineVideoLink(){
	var first = "/Templates/Public/flash/player.swf?width=640&amp;height=392&amp;flashvars=skin=/Templates/Public/flash/modieus.swf&amp;show_title=1&amp;file=";
	var last = "&amp;autostart=true&amp;stretching=fill";
	$(".textVideoLink").each(function(){
		$(this).attr("rel","prettyPhoto[flash]").attr("href", first+$(this).attr("href")+last);
	});
	InitPlayVideoLink();
}


//Removes the book online link from the header when you're in corporate.
$(document).ready(function() {
    if ($("body").hasClass("corporatePage"))
        $("a.buyonlinelink").removeAttr("href");
    if ($("body").hasClass("experiencesPage"))
        $("a.buyonlinelink").removeAttr("href");
});