function dashboardInit() {
    document.getElementById("dashboard-nav-bar-hamburger").addEventListener("click", toggleDashboardNavBar);
    initEasybook()
}

function toggleDashboardNavBar() {
    var elm = document.getElementsByClassName("dashboard-nav-bar")[0];
    if (elm.style.display == "none") {
        elm.style.display = "block"
    } else {
        elm.style.display = "none"
    }
}

function profileInit() {

    document.getElementById("dashboard-nav-bar-hamburger").addEventListener("click", toggleDashboardNavBar);

}

function getRangeSliderValue(id) {
    var range = document.getElementById(id).value;
    return range.split(";");
}

function setRangeSliderValue(id, from, to) {
    var range = document.getElementById(id);
    range.value = from+";"+to;
}
function signInModel()
{
    $('.modal-open').on("click", function(e) {
        e.preventDefault();
        $('.modal , .reg-overlay').fadeIn(200);
        $("html, body").addClass("hid-body");
    });
}

function calendarInit()
{
    document.getElementsByClassName("fc-right")[0].id ="buttons"
    document.getElementsByClassName("fc-right")[1].addEventListener("click", alert());
}

function openMapPopup()
{
    $(document).ready(function() {
        google.maps.event.trigger(single_map, 'resize');
        $(".map-modal-wrap").fadeIn(400);
        var $that = $(this),
            newln = $that.data("newlatitude"),
            newlg = $that.data("newlongitude"),
            newtitle = $that.parents(".title-sin_item").find(".title-sin_map a").text(),
            newurl = $that.parents(".title-sin_item").find(".title-sin_map a").attr('href');
        var latlng = new google.maps.LatLng(newln, newlg);
        marker.setPosition(latlng);
        single_map.panTo(latlng);
        $(".map-modal-container h3 a").text(newtitle).attr("href", newurl);
    });
}