/**
 * Google maps for the london office
 *
 * @package    byronfinance.com
 * @author     Rob Edwards
 * @copyright  (c)  bryce:FARRAH
 */



/**
 * Kicks the map off
 *
 * @author Rob Edwards
 */
$(document).ready(function() {
    setGoogleMaps();
});


/**
 * Generates the google maps content
 *
 * @author Rob Edwards
 */
function setGoogleMaps() {
    //Check that the browser is compatible
    if (GBrowserIsCompatible()) {
        
        //Create the map div and create a Google maps instance
        var map = new GMap2(document.getElementById("map"));
        
        //Enable special zoom on browsers which support it
        map.enableContinuousZoom();
        
        //Add controls to the map
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        
        //Set the start location of the map and the zoom level
        map.setCenter(new GLatLng(51.468952,-0.439453), 9);
        
        //Set up the marker
        point = new GLatLng(51.49485,-0.1458);
        name = 'London';
        address = "111 Buckingham Palace Road, SW1W 0SR";
        details = '<h1>London Office</h1>'+
        '<p> Tel: +44 (0)20 7340 8555<br />'+
        'Email: <a href="mailto:london@byronfinance.com" title="Email our London office">london@byronfinance.com</a>'+
        '</p>';
        
        //Add the marker to the map
        createMarker(map, point, name, details, address);
        
    }
}