var map=null;var geocoder=null;var totalDistance;$(window).unload(function(){GUnload()});$(document).ready(function(){$("#viewVideo").click(function(A){$("#viewVideo").colorbox({inline:true,href:"#videoContainer"})})});function initialize(){if(GBrowserIsCompatible()){map=new GMap2($("#retailersMap").get(0));map.setCenter(new GLatLng(0,0),0);map.setUIToDefault();geocoder=new GClientGeocoder()}}function showAddress(F,C,B){initialize();map.clearOverlays();var G=new GIcon(G_DEFAULT_ICON);G.image="http://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png";G.iconSize=new GSize(32,32);markerOptions={icon:G};var E=new GLatLng(F,C);if(E){map.setCenter(E,9);var A=new createMarker(E,B,markerOptions);var D="<strong>Your Zip Code</strong>: "+B+"<br /><br /><i>Please Click on Red Bubbles for<br />Information about Retailers near you</i>";map.addOverlay(A);A.openInfoWindowHtml(D)}else{alert("Address: "+B+" not found")}showLocations()}function showLocations(){$.each(Storelocations,function(B,A){var C=A.Field3Value+", "+A.Field4Value;GetCoords(A.Field2Value,C,A.Field7Value,A.Field5Value,A.Field8Value,A.Field9Value)})}function GetCoords(F,A,B,I,E,G){var H=new GLatLng(E,G);if(H){var C="<strong>"+F+"</strong><br />"+A+"<br />"+I+'<br /><a href="http://'+B+'" target="_blank">'+B+"</a>";var D=new createMarker(H,C,null);map.addOverlay(D)}}function createMarker(A,C,D){var B;if(D!=null){B=new GMarker(A,D)}else{B=new GMarker(A)}var E=C;GEvent.addListener(B,"click",function(){B.openInfoWindowHtml(E)});return B};
