jquery(document).ready(function($){ /* google maps */ // initialize map function initgmap($map) { // get map position var latitude = parsefloat(string($map.data('gmap-latitude')).replace(',', '.')); var longitude = parsefloat(string($map.data('gmap-longitude')).replace(',', '.')); var tooltip = string($map.data('gmap-tooltip')); var position = new google.maps.latlng(latitude, longitude); // render map var map = new google.maps.map($map[0], { zoom: $map.data('gmap-zoom') || 16, scrollwheel: false, center: position, maptypeid: google.maps.maptypeid.roadmap, maptypecontrol: false, pancontroloptions: { position: google.maps.controlposition.left_center }, zoomcontroloptions: { position: google.maps.controlposition.left_center }, scalecontroloptions: { position: google.maps.controlposition.left_center }, maptypecontroloptions: { maptypeids: [ //google.maps.maptypeid.roadmap, 'tehgrayz' ] } }); // center map on window resize google.maps.event.adddomlistener(window, 'resize', function() { settimeout(function() { map.setcenter(position); }, 50); }); // center map when switching between boxed/full layout var $switcher = $('#switcher'); if ($switcher.length) $('.switch.layout', $switcher).on('switch', function() { var interval = setinterval(function() { google.maps.event.trigger(window, 'resize', map); }, 50); settimeout(function() { clearinterval(interval); }, 350); }); // grayscale map.maptypes.set('grayscale', new google.maps.styledmaptype( [ { featuretype: "all", elementtype: "all", stylers: [ { //saturation: -100 } ] } ], { name: "grayscale" } )); map.setmaptypeid('grayscale'); // map is ready google.maps.event.addlisteneronce(map, 'idle', function() { // set custom marker $.getscript('http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker-compiled.js', function() { new richmarker({ draggable: false, map: map, position: position, shadow: false, content: '