$(document).ready(function() {

    if ($(".M28_refine").length) {
        MapHelper.Init('M28_refine');
    }
    else if ($(".M28_refine_more").length) {
        MapHelper.Init('M28_refine_more');
    }

//    $('.m28-1 h4').each(function() {
//        if ($(this).hasClass('refine')) {
//            MapHelper.InitializeObject('M28_refine');
//        }
//        else if ($(this).hasClass('refine_more')) {
//            MapHelper.InitializeObject('M28_refine_more');
//        }
//    });

    if ($(".M28-1-step-1").length) {
        GetPlaceNames();
    }
});

function GetPlaceNames()
{    
    $.ajax({
        type: 'POST',
        url: '/_vti_bin/PortalSearchService.asmx/GetPlaceNames',
        contentType: "application/json; charset=utf-8",
        data: "{}",
        dataType: 'json',
        success: function(cities) {
	        $(".autocomplete-place").autocomplete(cities.d);
        }
    });
}