$(document).ready(function () {

    if ($(".languageRowItem").length <= 1) {
        $(".languagearrow").hide();
    }

    $("#languageTag").click(function () {
        if ($("#langaugeDropDown_Overlay").is(":visible")) {
            $("#langaugeDropDown_Overlay").hide();
            $("#languagebar").addClass("bottomround");
        } else {
            $("#langaugeDropDown_Overlay").show();
            $("#languagebar").removeClass("bottomround");
        }
    });

    $("#innerdestinationDrop a").click(function () {
        $("#destinationDrop").hide();
    });

    $("ul#NewsTicker").liScroll();
});

$(window).load(function () {
    //     $('#watermarkHolder').hide();
    //    $('.hidePreLoad').css('visibility', 'visible');
})



function showMoreNews(showClass, hideClass) {
    $("." + showClass).show();
    $("." + hideClass).hide();
}

function isValidEmail(strEmail) {
    validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

    // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) {
        return false;
    }
    return true;
}



function checkMail() {
    $(".mailinput").css('background-color', "#fff")
    $(".mailinput").css('color', "#666")
    if ($(".txtNameVal").val() == "") {
        $(".txtNameVal").css('background-color', "#FF5033")
        $(".txtNameVal").css('color', "#fff")
        return false;
    }

    if ($(".txtMailVal").val() == "") {
        $(".txtMailVal").css('background-color', "#FF5033")
        $(".txtMailVal").css('color', "#fff")
        return false;
    }

    if (!isValidEmail($(".txtMailVal").val())) {
        $(".txtMailVal").css('background-color', "#FF5033")
        $(".txtMailVal").css('color', "#fff")
        return false;
    }

    return true;
}
