//= require OpenLayers
//= require OpenStreetMap
//= require SimpleLayerSwitcher
//= require SimplePanZoom

OpenLayers.Util.imageURLs = {
    "404.png": "<%= asset_path 'img/404.png' %>",
    "blank.gif": "<%= asset_path 'img/blank.gif' %>",
    "cloud-popup-relative.png": "<%= asset_path 'img/cloud-popup-relative.png' %>",
    "drag-rectangle-off.png": "<%= asset_path 'img/drag-rectangle-off.png' %>",
    "drag-rectangle-on.png": "<%= asset_path 'img/drag-rectangle-on.png' %>",
    "east-mini.png": "<%= asset_path 'img/east-mini.png' %>",
    "layer-switcher-maximize.png": "<%= asset_path 'img/layer-switcher-maximize.png' %>",
    "layer-switcher-minimize.png": "<%= asset_path 'img/layer-switcher-minimize.png' %>",
    "marker-blue.png": "<%= asset_path 'img/marker-blue.png' %>",
    "marker-gold.png": "<%= asset_path 'img/marker-gold.png' %>",
    "marker-green.png": "<%= asset_path 'img/marker-green.png' %>",
    "marker.png": "<%= asset_path 'img/marker.png' %>",
    "measuring-stick-off.png": "<%= asset_path 'img/measuring-stick-off.png' %>",
    "measuring-stick-on.png": "<%= asset_path 'img/measuring-stick-on.png' %>",
    "north-mini.png": "<%= asset_path 'img/north-mini.png' %>",
    "panning-hand-off.png": "<%= asset_path 'img/panning-hand-off.png' %>",
    "panning-hand-on.png": "<%= asset_path 'img/panning-hand-on.png' %>",
    "slider.png": "<%= asset_path 'img/slider.png' %>",
    "south-mini.png": "<%= asset_path 'img/south-mini.png' %>",
    "west-mini.png": "<%= asset_path 'img/west-mini.png' %>",
    "zoombar.png": "<%= asset_path 'img/zoombar.png' %>",
    "zoom-minus-mini.png": "<%= asset_path 'img/zoom-minus-mini.png' %>",
    "zoom-plus-mini.png": "<%= asset_path 'img/zoom-plus-mini.png' %>",
    "zoom-world-mini.png": "<%= asset_path 'img/zoom-world-mini.png' %>"
};

OpenLayers.Util.origGetImageLocation = OpenLayers.Util.getImageLocation;

OpenLayers.Util.getImageLocation = function(image) {
    return OpenLayers.Util.imageURLs[image] || OpenLayers.Util.origGetImageLocation(image);
};

OpenLayers.Lang.setCode($('html').attr('lang'));
