﻿function getNumeric(selector, prop) { return $(selector).css(prop).match(/^\d+/); }
function isIE() { return /msie 6\.0/i.test(navigator.userAgent); }
function isChrome() { return /chrome/.test(navigator.userAgent.toLowerCase()); }
function isSafari() { return /safari/i.test(navigator.userAgent); }
function isOpera() { return /opera/i.test(navigator.userAgent); }
var shapesData = { "smarket": [[0, 0], [-37, 0]], "malls": [[0, -29], [-37, -29]], "flowers": [[0, -58], [-37, -58]], "gas": [[0, -116], [-37, -116]], "parking": [[0, -145], [-37, -145]], "tolls": [[0, -174], [-37, -174]], "ring": [[0, -203], [-37, -203]], "ministries": [[0, -263], [-37, -263]], "kep": [[0, -292], [-37, -292]], "efories": [[0, -321], [-37, -321]], "townHall": [[0, -350], [-37, -350]], "prefectures": [[0, -379], [-37, -379]], "elta": [[0, -408], [-37, -408]], "police": [[0, -437], [-37, -437]], "presvies": [[0, -466], [-37, -466]], "aei": [[0, -527], [-37, -527]], "tei": [[0, -556], [-37, -556]], "highSchool": [[0, -585], [-37, -585]], "primarySchool": [[0, -614], [-37, -614]], "wikipedia": [[0, -643], [-37, -643]], "churches": [[0, -704], [-37, -704]], "monastery": [[0, -733], [-37, -733]], "cemeteries": [[0, -762], [-37, -762]], "hsap": [[0, -819], [-37, -819]], "metro": [[0, -848], [-37, -848]], "tram": [[0, -877], [-37, -877]], "ose": [[0, -906], [-37, -906]], "suburban": [[0, -935], [-37, -935]], "ktel": [[0, -964], [-37, -964]], "airport": [[0, -993], [-37, -993]], "harbors": [[0, -1022], [-37, -1022]], "attractions": [[0, -1116], [-37, -1116]], "museums": [[0, -1145], [-37, -1145]], "camping": [[0, -1174], [-37, -1174]], "ski": [[0, -1203], [-37, -1203]], "beaches": [[0, -1232], [-37, -1232]], "hospitals": [[0, -1293], [-37, -1293]], "maternity": [[0, -1322], [-37, -1322]], "clinical": [[0, -1351], [-37, -1351]], "ika": [[0, -1380], [-37, -1380]], "banks": [[0, -1450], [-37, -1450]], "atm": [[0, -1479], [-37, -1479]], "cinema": [[0, -1536], [-37, -1536]], "theatre": [[0, -1565], [-37, -1565]], "exhibCenters": [[0, -1594], [-37, -1594]], "golf": [[0, -1623], [-37, -1623]] }; function setPOIsHandlers() {
    $(".msg_head").addClass("categoryPois"); $(".msg_head").click(function() { $(".poisTitle").parent().find(".poisContent").each(function() { if ($(this).find("a.selectedPoisLink").length == 0) { $(this).parent().find(".poisTitle").removeClass("selectedPois"); } }); $(".msg_body").hide(); $(this).next(".msg_body").slideToggle(600); $(this).addClass("selectedPois"); }); $(".poisContent a span.poisImg").each(function(i) {
        var myid = $(this).parent().attr("id"); $(this).css({ "background-position": shapesData[myid][0][0] + "px " + shapesData[myid][0][1] + "px" }); $(this).parent().click(function(e) {
            e.preventDefault(); if ($(this).hasClass("selectedPoisLink")) { $(this).find("span.poisImg").css({ "background-position": shapesData[myid][0][0] + "px " + shapesData[myid][0][1] + "px" }); $(this).removeClass("selectedPoisLink"); $(this).find(".poisText").css({ color: "#000000" }); }
            else { $(this).find("span.poisImg").css({ "background-position": shapesData[myid][1][0] + "px " + shapesData[myid][1][1] + "px" }); $(this).addClass("selectedPoisLink"); } 
        });
    });
}
$(document).ready(function() {
    if ($('#costEstmation.scroll').is(':visible')) { $("#Tip").css({ display: "none" }); }
    if (isChrome() || isSafari()) { $(".costTitle").css({ width: "123px" }); $("#ddlRadioTaxi").css({ width: "74px" }); }
    var menuWidth = 270; var width = document.documentElement.clientWidth; $("input#SLOCTbx1").addClass("textGrey"); $("input#SLOCTbx1").attr('value', "π.χ. Φαλήρου 10 Πειραιάς"); $("input#SLOCTbx1").focus(function() {
        $(this).removeClass("textGrey").addClass("textBlack"); if (this.value == this.defaultValue) { this.value = ''; }
        if (this.value != this.defaultValue) { this.select(); } 
    }); $("#panUp").mouseover(function() { $(this).parent().addClass("testUp"); }); $("#panUp").mouseout(function() { $(this).parent().removeClass("testUp"); }); $("#panLeft").mouseover(function() { $(this).parent().addClass("testLeft"); }); $("#panLeft").mouseout(function() { $(this).parent().removeClass("testLeft"); }); $("#panDown").mouseover(function() { $(this).parent().addClass("testUp"); }); $("#panDown").mouseout(function() { $(this).parent().removeClass("testUp"); }); $("#panRight").mouseover(function() { $(this).parent().addClass("testLeft"); }); $("#panRight").mouseout(function() { $(this).parent().removeClass("testLeft"); }); $(".msg_body").hide(); $(".poisOuter .poisContent:last").css({ borderBottom: "none" }); setPOIsHandlers(); document.getElementById('expand_menu').style.visibility = "hidden"; document.getElementById('expand_menu').style.marginLeft = "-18px"; document.getElementById('collapse_menu').style.visibility = "visible"; document.getElementById('collapse_menu').style.marginLeft = "0px"; $('a#collapse_menu').click(function() {
        $('#menuTest').hide(); document.getElementById('expand_menu').style.visibility = "visible"; document.getElementById('collapse_menu').style.visibility = "hidden"; if (isIE()) { document.getElementById('divMap').style.width = width + "px"; }
        if (isChrome() || isSafari()) { $("#menuTest").hide(); $("#Tip").hide(); document.getElementById('divMap').style.marginLeft = "-1px"; }
        positionPans();
    }); $('a#expand_menu').click(function() {
        $('#menuTest').show(); document.getElementById('expand_menu').style.visibility = "hidden"; document.getElementById('collapse_menu').style.visibility = "visible"; if (isIE()) { document.getElementById('divMap').style.width = (width - menuWidth - 3) + "px"; $("#menuTest").show(); }
        if (isChrome() || isSafari()) { $("#menuTest").show(); $("#Tip").show(); document.getElementById('divMap').style.marginLeft = "0px"; }
        positionPans(); return false;
    }); $(".Content").hide(); $(".inner_choice").click(function() {
        if (isIE()) { $(this).prevAll(".Content").hide(300); $(this).nextAll(".Content").hide(300); $(this).next(".Content").toggle(100); }
        else { $(this).prevAll(".Content").slideUp(300); $(this).nextAll(".Content").slideUp(300); $(this).next(".Content").slideToggle(100); }
        adjustMenu();
    });
}); $(".inner_choice").mouseover(function() { $(this).css({ backgroundImage: "url(Assets/Images/arrowTabs_expand.gif)", color: "#fff", cursor: "pointer" }); }); $(".inner_choice").mouseout(function() { $(this).css({ backgroundImage: "url(Assets/Images/arrowTabs_collapse.gif)", color: "#fcd726" }); });