jQuery(document).ready(function() {

    // Attach status indicator
    jQuery('#status').ajaxStart(function() {
        jQuery(this).show();
    });
    jQuery('#status').ajaxStop(function() {
        jQuery(this).hide();
    });

    // Attach GeoCoder
    jQuery('input.geocoder').nGeoCoder();

    // Attach center button
    jQuery('#myLocationButton').click(function() {
        var map = jQuery('#myMap').data('map');
        if (map) {
            jQuery.nGeoUtil.google.centerInCurrentLocation(map);
        }
    });
});
