function locationMap() {

    // Updated map loader using V3 Google API
    
    var pointCenter = new google.maps.LatLng(53.471247, -2.294657);
    var myOptions = {
        zoom: 13,
        center: pointCenter,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    var map = new google.maps.Map(document.getElementById("map"), myOptions);

    var marker = new google.maps.Marker({
        position: pointCenter,
        map: map,
        title: "World at Your Feet Location"
    });

    var contentString = '<h2>World at Your Feet</h2>' +
        '<p style="color:#000000;">' +
        '1 Lowry Plaza<br />' +
        'Digital World Centre<br />' +
        'Salford Quays<br />' +
        'Manchester<br /><br />' +
        'M50 3UB</p>';
    

    var infowindow = new google.maps.InfoWindow({
        content: contentString
    });
    

    google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map, marker);
    });

}

function locationMapOld() {

    // Old V2 Map loader

    map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GOverviewMapControl());
    map.enableDoubleClickZoom();

    var pointCenter = new GLatLng(53.471247, -2.294657);

    map.setCenter(pointCenter, 13);

    var point1 = new GLatLng(53.471247, -2.294657);
    var marker1 = new GMarker(point1);
    GEvent.addListener(marker1, "click", function() { marker1.openInfoWindowHtml("<h2>World at Your Feet</h2><p style='color:#000000;'>1 Lowry Plaza<br />Digital World Centre<br />Salford Quays<br />Manchester<br /><br />M50 3UB</p>"); });


    map.addOverlay(marker1);

    //map.addOverlay(geoXml);

}

/* Content Switcher - courses */
$(function() {
    $('#contentswitcher>li').click(function() {
        $(this).siblings().removeClass('contentSelected');
        $("#switchablecontent div").removeClass("visible");
        $("#switchablecontent div").addClass("invis");
        $("#switchablecontent div.teamscroll").removeClass("invis");
        $("#switchablecontent div.teamscroll .carousel").removeClass("invis"); 
        $("#switchablecontent #area_" + $(this).attr('id')).addClass("visible");
        $("#switchablecontent #area_" + $(this).attr('id') + " div").addClass("visible");
        $(this).addClass('contentSelected');

    });
});

/* Gallery function - homepage centre column images */
$(function() {
    $('#gallery>li').click(function() {
        $(this).siblings().removeClass('gallerySelected');
        $('#gal').css("background-image", "url(/resources/images/photos/" + $(this).attr('class') + "/" + $(this).attr('id') + ".jpg)");
        $(this).addClass('gallerySelected');

    });
});

/* Quote switcher function - homepage right column */
$(function() {
    $('#quote>li').click(function() {
        $(this).siblings().removeClass('gallerySelected');
        $("#quotecontent").css("background-image", "url(/resources/images/photos/" + $(this).attr('class') + "/" + $(this).attr('id') + ".png)");
        $("#quotecontent div").removeClass("visible");
        $("#quotecontent div").addClass("invis");
        $("#quotecontent #quote_" + $(this).attr('id')).addClass("visible");
        $(this).addClass('gallerySelected');

    });
});

$(function() {

    $('#expander>li>div').hide();

    $('#expander>li').click(function() {

        // Close open items, and remove the class 'active'

        if ($(this).hasClass('active')) {

            // We are closing an active item

            $(this).removeClass('active');
            $(this).find('div:visible').slideUp(500);

        }

        else {

            // We have clicked on a non-active item. close all siblings and open then non-active item	

            $(this).siblings().find('div:visible').slideUp(500);

            $(this).siblings().removeClass('active');

            // Open selected item if li's closed

            $(this).find('div:hidden').slideDown(500);
            $(this).addClass('active');

        }
    })

});
