function initialiseMap() {

   var latlng = new google.maps.LatLng(51.513797, -0.146041);

   var myOptions = {
      zoom: 16,
      center: latlng,
      scrollwheel: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
   };

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

   var marker = new google.maps.Marker({
      position: latlng,
      map: map,
      title:"Barnaby Stewart"
   });

}

$(document).ready(function(){

   // Open links in new windows

   $('a.new-window').click(function(){
      window.open(this.href);
      return false;
   });

   // Add / remove default text on form input fields

   var defaultValues =  new Array();

   $(".default-text").focus(function() {

      if (!defaultValues[$(this).attr('id')]) {

         defaultValues[$(this).attr('id')] = $(this).val();
         $(this).val('');

      } else if (defaultValues[$(this).attr('id')] == $(this).val()) {

         $(this).val('');

      }

   });

   $(".default-text").blur(function() {

      if ($(this).val().length <= 0) {
        $(this).val(defaultValues[$(this).attr('id')]);
      }

   });

   // UI Select Menus

   $('#frontpage-search-form select').selectmenu({
      style: 'dropdown',
      width: 320,
      maxHeight: 300
   });

   $('#candidates-search-form select').selectmenu({
      style: 'dropdown',
      width: 260,
      maxHeight: 200
   });

   $('#candidates-upload-cv-form select').selectmenu({
      style: 'dropdown',
      width: 260,
      maxHeight: 200
   });

   // Highlight result table rows

   $('#candidates-table-container table tr.result-row td').hover(function(){
      $(this).parent().addClass('highlighted');
   },
   function(){
      $(this).parent().removeClass('highlighted');
   });

   // Clickable table rows

   $('#candidates-table-container table tr').click(function(){
      var href = $(this).find("a").attr("href");
      if (href) {
         window.location = href;
      }
   });

   // History link

   $('a.history-back').attr('href', 'javascript:history.back()');

   // Enhance file upload

   $('#upload-cv').filestyle({
     image: "/images/assets/add-cv.png",
     imageheight : 32,
     imagewidth : 82,
     width : 160
   });

   // Validatation workaround for the file upload
   
   $('input.file').attr('id', 'upload-cv-filestyle');
   $('li.form-row.file div input#upload-cv-filestyle').removeClass('validate[required]');

   // Form inline validation

   $('#submit-vacancy-form').validationEngine();
   $('#candidates-cv-form').validationEngine();

   // Our clients scrolling carousel

   $('#our-clients-carousel').jcarousel({
        vertical: true,
        auto: 2,
        easing: 'easeInOutSine',
        scroll: 20,
        animation: 10000,
        wrap: 'circular'
   });

});

