﻿

 
 
 
  
 
 
$(document).ready(function() {

$('.moreinfobtn').live('click', function() {

    $.fn.colorbox({ width: "420px", height: "620px", iframe:true, href: "/CheckAvailability.aspx" });
 
});


});

         
  


function createMarker(point, index, pn, infohtml) {
    var letter = String.fromCharCode("A".charCodeAt(0) + index);
    var image = new google.maps.MarkerImage("http://www.google.com/mapfiles/marker" + letter + ".png",
                        new google.maps.Size(20, 34),
                        new google.maps.Point(0, 0),
                        new google.maps.Point(9, 34));
    var marker = new google.maps.Marker({
        map: map,
        title: pn,
        shadow: shadow,
        icon: image,
        content: infohtml,
        position: point
    });
    map.addMarker(marker, point);

    //  var infowindow = new google.maps.InfoWindow(
    //      { content: infohtml
    //     });
    //  infoWindow.setOptions();
    google.maps.event.addListener(marker, 'click', function() {
        infoWindow.setOptions({
            map: map,
            title: pn,
            shadow: shadow,
            icon: image,
            content: infohtml,
            position: point
        });
        infoWindow.open(map, marker);
    });
    markerArray.push(marker);

    return marker;


}
    

    function ShowMap(mymarkerid, latitude, longitude) 
    {   
        var CenterTo = new google.maps.LatLng(latitude, longitude);
        map.setCenter(CenterTo);
      //  infoWindow.open(map, markerArray[mymarkerid]);
        map.setZoom(20);
         google.maps.event.trigger(markerArray[mymarkerid], 'click');
    }
    function ShowPopUpFavorites() {
        document.getElementById('overlay').style.display = 'block';
        document.getElementById('lightboxFavorites').style.display = 'block';
    }
    function HidePopUpFavorites() {
        document.getElementById('overlay').style.display = 'none';
        document.getElementById('lightboxFavorites').style.display = 'none';
    }
    function ShowPopUpContact(propertyName) {
       var lblContactHeader = parent.window["ContactFrame"].LblContactHeader;
       lblContactHeader.innerText = "Contact " + propertyName;
    }
    function HideContactPopUp() {
        $.fn.colorbox({width:"300px",height:"200px", inline:true, href:"#inline_example3"});
    }
    function HideUserLoginPopUp() {
        $.fn.colorbox({ width: "300px", height: "200px", inline: true, href: "#inline_exampleULWelcome",onClosed:function(){  document.location.reload(); } });
       
    }
    function HideUserLoginFBPopUp() {
        $.fn.colorbox({ width: "300px", height: "300px", inline: true, href: "#inline_exampleFBWelcome" });
    }
    function HideFB() {
       $(document).ready(function() {
         $.fn.colorbox({ width: "400px", height: "300px", inline: true, href: "#inline_example9" });
         });
    }

       
