$(document).ready(function () {

    // make all links with a class of ext open in a new window (or tab)
    $('.ext').click(function () { window.open(this.href); return false; });

    // makes hide and shows.
    if ($(".hideShow").length) {
        hideShow();
    }
});
// triggers hide and shows if the class is on page

function hideShow() {
    $(".hideShow dd").addClass("hidden");
    $(".hideShow a.toggle").each(function (i) {
        $(".hideShow a.toggle").eq(i).toggle(function () {
            $(this).addClass("selected");
            $(this).parent().parent().children(".hideShow dd").addClass("visible").removeClass("hidden");
        }, function () {
            $(this).removeClass("selected");
            $(this).parent().parent().children(".hideShow dd").removeClass("visible").addClass("hidden");
        });
    });
    return false;
}


function initGoogleMap(lat, lng, container) {
    var latlng = new google.maps.LatLng(lat, lng);

    var myOptions = {
        zoom: 15,
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    var map = new google.maps.Map(document.getElementById(container), myOptions);

    var marker = new google.maps.Marker({
        position: latlng,
        map: map
    });
}
