var mapsConfig=[{name:"Spearfish Attractions",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6d59e698fb42053&amp;ll=44.487459,-103.839738&amp;spn=0.036366,0.060622&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6d59e698fb42053&amp;ll=44.487459,-103.839738&amp;spn=0.036366,0.060622&amp;source=embed"},{name:"Spearfish Lodging",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a524fa22e5236585&amp;ll=44.472652,-103.857354&amp;spn=0.241008,0.247558&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a524fa22e5236585&amp;ll=44.472652,-103.857354&amp;spn=0.241008,0.247558&amp;source=embed"},{name:"Black Hills Attractions",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6db19bffcb17e2d&amp;ll=44.260937,-104.018555&amp;spn=1.37691,2.334595&amp;z=8&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6db19bffcb17e2d&amp;ll=44.260937,-104.018555&amp;spn=1.37691,2.334595&amp;z=8&amp;source=embed"},{name:"Spearfish Nightlife",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a721dc587e75e45b&amp;ll=44.494546,-103.859253&amp;spn=0.021429,0.036478&amp;z=14&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a721dc587e75e45b&amp;ll=44.494546,-103.859253&amp;spn=0.021429,0.036478&amp;z=14&amp;source=embed"},{name:"Spearfish Shopping",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a724ca3b16506c44&amp;ll=44.4922,-103.859549&amp;spn=0.004199,0.001112&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a724ca3b16506c44&amp;ll=44.4922,-103.859549&amp;spn=0.004199,0.001112&amp;source=embed"},{name:"Spearfish Dining",src:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6ee57d563071f5e&amp;ll=44.493322,-103.843117&amp;spn=0.085716,0.145912&amp;z=12&amp;output=embed",href:"http://www.google.com/maps/ms?hl=en&amp;gl=us&amp;ptab=2&amp;ie=UTF8&amp;oe=UTF8&amp;msa=0&amp;msid=109924647998758149803.00046a6ee57d563071f5e&amp;ll=44.493322,-103.843117&amp;spn=0.085716,0.145912&amp;z=12&amp;source=embed"}];function insertAfter(nodeToInsert,afterNode){if(afterNode.nextSibling==null){afterNode.parentNode.appendChild(nodeToInsert)}else{afterNode.parentNode.insertBefore(nodeToInsert,afterNode.nextSibling)}}$(document).ready(function(){var more=document.createElement("h2");more.appendChild(document.createTextNode("More Maps"));var links=document.createElement("ul");for(var x=0;x<mapsConfig.length;x++){var li=links.appendChild(document.createElement("li"));var a=li.appendChild(document.createElement("a"));a.setAttribute("href","#"+x);a.onclick=mapClick;a.appendChild(document.createTextNode(mapsConfig[x].name))}var gmaps=document.getElementById("gmaps");insertAfter(links,gmaps);insertAfter(more,gmaps);if(location.hash){var id=location.hash.substr(location.hash.indexOf("#")+1);if(!isNaN(parseInt(id,10))){showMap(id)}}});function mapClick(){var href=this.getAttribute("href");var id=href.substring(href.indexOf("#")+1);showMap(id);return false}function showMap(id){var map=mapsConfig[id];if(map==null){return}var html='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+map.src+'"></iframe><br /><small>View <a href="'+map.href+'">'+map.name+"</a> in a larger map</small>";document.getElementById("gmaps").innerHTML=html};
