$(document).ready(function () {
    onerror = handleErr;

    /* Sub menu effect */
    $('#flMenu li').hover(function () {
        $(this).children("a").addClass($(this).children("a").attr('id'));
        $(this).children("ul").fadeIn(150)
    }, function () {
        $(this).children("a").removeClass($(this).children("a").attr('id'));
        $(this).children("ul").fadeOut(150)
    });

    $("#flMenu li:first").css({ "background-image": "none" });

    var panelGoster = $("#panelGoster").html();
    if (panelGoster == "yok" || ($("#panelGoster").length == 0)) {
        $("#sol").attr("style", "width: 920px !important;");
    }
    $("#dilListesi li:last").css({ "margin-right": "0px", "padding-right": "0px", "border-right": "medium none" });

    $("img").each(function () {
        var renk = $(this).css("borderColor");

        if ((renk == 'rgb(157, 3, 72)') || (renk == '#9D0348')) {
            $(this).css({ "borderColor": "#3D6888" });
        }
    });



    var t = setTimeout("haralaGurele()", 500);

});
function haralaGurele() {
    var menuGenislik = $("#menu").width();
    var toplam = menuGenislik + 12;
    $("#menuIci").css({ "margin": "0 auto", "width": toplam });

}
function fotoBilgiler() {
    window.open("fotoBilgilerTR.htm", "fotoBilgi", "width=600,height=660");
}
function consultation() {
    window.open("Consultation.aspx", "Consultation", "scrollbars=yes,width=700,height=660");
}
function printIns() {
    window.open("fotoBilgilerEN.htm", "photoIns", "width=600,height=660");
}
function triDanimasyonEN() {
    window.open("triDanimasyonEN.htm", "triDanimasyonEN", "scrollbars=yes,width=800,height=600");
}
function triDanimasyonTR() {
    window.open("triDanimasyonTR.htm", "triDanimasyonTR", "scrollbars=yes,width=800,height=600");
}
function krokiAc() {
    window.open("krokiTR.htm", "kroki", "width=550,height=500");
}
function openMap() {
    window.open("krokiEN.htm", "map", "width=550,height=500");
}
function sertifikaAc(sayfa) {
    switch (sayfa) {
        case 1:
            dosya = "antalya.htm";
            isim = "antalya";
            ozellik = "width=550,height=400";
            break;
        case 2:
            dosya = "belcika.htm";
            isim = "belcika";
            ozellik = "width=550,height=400"
            break;
        case 3:
            dosya = "kktc.htm";
            isim = "kktc";
            ozellik = "width=550,height=400"
            break;
    }

    window.open(dosya, isim, ozellik);



}

function handleErr(msg, url, line_no) {
    errorMsg = "Javascript Errörle Mücadele Ekibi\n\n\n";
    errorMsg += "Şu oldu:\n" + msg + "\n\n";
    errorMsg += "Yukarıdan aşağıya:\n" + line_no + "\n\n";
    errorMsg += "Soldan sağa:\n" + url + "\n\n";
    alert(errorMsg);
    return false;
}
