// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code. $(function () { $("#focus1 .carousel-item").eq(0).addClass("active"); $("#focus2 .carousel-item").eq(0).addClass("active"); $(".topnav li").mouseover(function(){ $(".topnav_hover").css("display", "block"); $(".nav_list").css("display", "none"); var index = $(".topnav li").index(this); $(".nav_list").eq(index).css("display", "block"); }); $(".header").mouseleave(function () { $(".topnav_hover").css("display", "none"); }); //$(".index1_left .content ul li").mouseover(function () { // $(".index1_left .content ul li").removeClass("on"); // $(this).addClass("on"); // var index = $(".index1_left .content ul li").index(this); // $(".index1_right_fra").removeClass("active"); // $(".index1_right_fra").eq(index).addClass("active"); //}); $("#btnSearch").click(function () { var key = $("#id").val().trim(); if (key !== "") { $("#form_search").submit(); } }); $('.focus1').carousel(); $('.focus2').carousel({ interval: 50000, wrap: false }); $('.goTop-btn').click(function () { $('html,body').stop().animate({ scrollTop: 0 }, 500); }); }); topPos(); jQuery(window).scroll(function () { topPos(); }); function topPos() { ST = $(window).scrollTop(); if (ST < 1) { $('#goTop').removeClass('show'); } else { $('#goTop').addClass('show'); } } function uaredirect(f) { try { if (document.getElementById("bdmark") != null) { return } var b = false; if (arguments[1]) { var e = window.location.host; var a = window.location.href; if (isSubdomain(arguments[1], e) == 1) { f = f + "/#m/" + a; b = true } else { if (isSubdomain(arguments[1], e) == 2) { f = f + "/#m/" + a; b = true } else { f = a; b = false } } } else { b = true } if (b) { var c = window.location.hash; if (!c.match("fromapp")) { if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i))) { location.replace(f) } } } } catch (d) { } } function isSubdomain(c, d) { this.getdomain = function (f) { var e = f.indexOf("://"); if (e > 0) { var h = f.substr(e + 3) } else { var h = f } var g = /^www\./; if (g.test(h)) { h = h.substr(4) } return h }; if (c == d) { return1 } else { var c = this.getdomain(c); var b = this.getdomain(d); if (c == b) { return 1 } else { c = c.replace(".", "\\."); var a = newRegExp("\\." + c + "$"); if (b.match(a)) { return 2 } else { return 0 } } } }