/*
FILE ARCHIVED ON 18:31:57 十一月 25, 2018 AND RETRIEVED FROM THE
AN OPENWAYBACK INSTANCE ON 12:23:33 五月 14, 2026.
JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
$(function() {
// navigation submenu
$('#evn_header').after('
')
$('#evn_navigation > li > a').focus(
function() {
if ($(this).parent().find('.evn_navigation-submenu').length == 0) {
$('.evn_navigation-submenu').css("display","none");
}
$(this).siblings('.evn_navigation-submenu').slideToggle()
.parent().siblings().find('.evn_navigation-submenu')
.slideUp();
$('#evn_mask').show()
})
$('#evn_mask').click(function() {
$(this).hide()
$('.evn_navigation-submenu').slideUp();
})
// goTOP
$('.evn_go-top').click(function() {
$("html,body").animate({
scrollTop : 0
}, 500);
})
// right-menu-slide
$('.evn_slide-menu').click(function() {
$(this).toggleClass('active').siblings('ul').slideToggle()
})
$('#evn_right-submenu ul').slideDown();
// guide
$('#evn_guide .evn_menu ul li a').click(function() {
$(this).parent().addClass('active').siblings().removeClass('active');
})
$('#evn_guide .evn_menu .evn_select').click(function() {
$(this).removeClass('active');
$('#evn_guide .evn_menu ul').slideDown();
})
$(window).on('resize' , function(){
if($(this).width() > 640){
$('#evn_guide .evn_menu .select').removeClass('active');
$('#evn_guide .evn_menu ul').show();
}
})
var tabIndexBut = true;
// geobox
$('#evn_header .evn_login').on('click', function() {
var idx = 0;
$.each($(".evn_inner").find('#mainContent,a,input,select,textarea,button,object,.tabIndexFun').not('.tab-custom-focus'), function(i, elmn) {
idx++;
$(this).attr("tabindex", idx);
});
if(tabIndexBut){
$(".tabIndexFun").keyup(function(e) {
if (e.key === "Enter") {
if(e.key === "Enter") {
$(this).click();
}
}
});
tabIndexBut = false;
}
$("#urlMethod").val('');
$('#evn_geobox').fadeIn().css('display', 'table');
var firstId = $('#evn_geobox').find('select').first().attr('id');
$('#'+firstId).focus();
if($('#randPicIndex').length){
changePicIndex();
}
$('#dialogFocus').val('loginBtn');
})
$(".evn_logo").focus(function(){
$('#evn_geobox').fadeOut();
$('#inline2').fadeOut();
if($('#randPic').length){
changePicIndex();
}
})
$('body').find('a').on('click', function(e) {
if($("#userTypeStatus").val() != 'N'){
var url = $(this).attr('href');
if(url != undefined || url != null) {
if (url.indexOf('APCONSUMER') > -1 ){
if(url.indexOf('BTC504') > -1 || url.indexOf('BTC505') > -1){
var randomId = url.substr(url.indexOf('BTC'), 7) + "_" + Math.random();
$(this).attr('id', randomId);
$('#dialogFocus').val(randomId);
$("#loginSelect").val('F1348636507435');
changeSelect('F1348636507435');
$('#evn_geobox').fadeIn().css('display', 'table');
var firstId = $('#evn_geobox').find('input[type=text]').first().attr('id');
$('#'+firstId).focus();
if($('#randPicIndex').length){
changePicIndex();
}
url = url.replace('/APCONSUMER/','').replace('/','');
$("#urlMethod").val(url);
return false;
}
}
}
}
})
$('#dataCount').on('click', function() {
$("#moreData").focus();
})
$('#evn_geobox .evn_close').on('click', function() {
$('#evn_geobox').fadeOut();
if($('#randPic').length){
changePicIndex();
}
var pointId = $('#dialogFocus').val();
document.getElementById(pointId).focus();
})
$('#inline2 .inline2_close').on('click', function() {
$('#inline2').fadeOut();
var pointId = $('#dialogFocus').val();
document.getElementById(pointId).focus();
})
$(document).keyup(function(e) {
if (e.key === "Escape" || e.keyCode == 27) {
$('#evn_geobox').fadeOut();
$('#inline2').fadeOut();
if ($('#randPic').length) {
changePicIndex();
}
if($(".gsc-results-close-btn").hasClass("gsc-results-close-btn-visible")){
$(".gsc-results-close-btn").click();
}
var pointId = $('#dialogFocus').val();
document.getElementById(pointId).focus();
}
});
// banner slider
$("#evn_banner").owlCarousel({
items : 1,
nav : true,
dots : false,
loop : false,
autoplay : false,
autoplayTimeout : 5000,
autoplayHoverPause : true
})
// link slider
$("#evn_link").owlCarousel({
items : 5,
nav : true,
dots : false,
margin : 10,
responsive : {
0 : {
items : 1
},
400 : {
items : 2
},
600 : {
items : 3
},
900 : {
items : 5
}
}
})
var urlValue = window.location.search;
if (urlValue.indexOf('evn_data=Y') > 0)
{
$(window).scrollTop($('#evn_data').offset().top - 130);
$("#moreData").focus();
}
//數據統計(此為新增)
$('#evn_navigation .evn_anchor a').click(function(){
try{
$(window).scrollTop($('#evn_data').offset().top - 130);
} catch(err) {
location.href = '/index?evn_data=Y';
}
})
$(".owl-prev").focus(function() {
$(this).trigger("click");
})
$(".owl-next").focus(function() {
$(this).trigger("click");
})
$("body").find("a").each(function(){
if($(this).find("img").length > 0){
$(this).addClass("ImgFocusStyle");
}
})
})