function checkLang(name) { $.get('/pajax/lang?lang='+name, function () { window.location.reload(); }) } $(function () { $("#lang").on("click", function (e) { e.preventDefault(); var l = $(this).attr("data-lang"); checkLang(l); }); $(".to_link").on("click", function (e) { e.preventDefault(); var l = $(this).attr("data-link"); if (l && l.length > 0) { var t = $(this).attr("data-target"); if (t && t == "blank") { window.open(l); } else { window.location.href = l; } } }) }) $(function () { var $x = $(".staff-click"); $x.on("click", function (e) { e.preventDefault(); var _id = $(this).attr("data-id"); $(".staff-show").css("display", "none"); $(".staff-click").removeClass("current"); $("#"+_id).css("display", "block"); $(this).addClass("current"); }); var isShow = false; $(window).scroll(function() { if ($(document).scrollTop() <= 50){ if (isShow) { $("#header").removeClass("header_shadow"); } isShow = false; } else { if (!isShow) { $("#header").addClass("header_shadow"); } isShow = true; } }); })