var isSupportTouch = $(window).width() <= 1024; var historyNum = 0; (function ($) { $(function () { /*if(!$(".menu_phone").is(":hidden")){ $(".other_banner > img").attr("src",$(".other_banner > img").attr("data-phone")); }*/ if($(".menu_phone").is(":hidden")){ var headt = $(".header").height(); $(window).scroll(function () { var st = $(window).scrollTop(); if (st >= headt) { $(".header").addClass("fixedhede").fadeIn(); //$(".main").css({ paddingTop: headt }) } else { $(".header").removeClass("fixedhede"); //$(".main").css({ paddingTop: 0 }) } }) } $(".span02Down input").focus(function(){ $(this).blur(); }) //nav if ($(".menu_phone").is(":hidden")) { var navTimer = null; $(".header_bottom > nav li").hover(function () { if ($(this).find("span").size() == 0) return false; clearTimeout(navTimer); $(this).find(".nav_down").css({ "left": "50%", "marginLeft": $(this).find(".nav_down").width() / 2 * -1 - 18, "display": "block" }); $(".nav_down_bg").css({ "display": "block" }); $(this).find("i").css({ "display": "block" }); $(this).siblings().find(".nav_down").hide(); $(this).siblings().find("i").hide(); }, function () { var $h = $(this); navTimer = setTimeout(function () { $h.find(".nav_down").css({ "display": "none" }); $(".nav_down_bg").css({ "display": "none" }); $h.find("i").hide(); }, 100) }) } else { $(".footer_top_l").insertBefore(".footer_top_r"); $(".footer_top_r").css("paddingBottom", 10); $(".footer_top_l").css({"paddingBottom":0,"paddingTop":0}); $(".header_bottom > nav li").click(function () { if ($(this).hasClass("show")) { $(this).removeClass("show"); } else { $(this).addClass("show").siblings().removeClass("show"); } }) } $(".history_top_main ul li:last").after('
'); $(window).resize(function () { if ($(".menu_phone").is(":visible")) { $(".searchWrap").width($(window).width() - 20); $(".searchWrap").css({ "left": "50%", "marginLeft": ($(window).width() - 20)/2*-1 }); } }) $(window).resize(); var setTimer=null; $(".searchWrap").hover(function(){ clearTimeout(setTimer); $(".searchWrap_box").show(); },function(){ setTimer=setTimeout(function(){ $(".searchWrap_box").hide(); },300) }) $(".span02Down").click(function(){ if($(this).find("dl").is(":hidden")){ $(this).find("dl").show(); return false; }else{ $(this).find("dl").hide(); } $(this).find("dl").width($(this).width()-2); }) $(".span02Down dd").click(function(){ $(".span02Down > input").val($(this).text()).attr("value", $(this).text()); $(".span02Down dl").hide(); return false; }) $(document).click(function () { $(".span02Down dl").hide(); }) $('.font_size a').click(function () { var index = jQuery(this).index(); jQuery(this).addClass('on').siblings().removeClass('on'); if (index == 0) { $('.conts').css('font-size', '14px'); } else if (index == 1) { $('.conts').css('font-size', '18px'); } }) $(".span03 i").click(function () { if (!$(this).hasClass("active")) { $(this).removeClass("active").addClass("active"); $(this).siblings("i").removeClass("active"); $(this).find("input").prop("checked", true); $(this).siblings("i").find("input").prop("checked", false); } }) $(".contact_active li dl").height($(".contact_active li:eq(0) dl").height()); $(".inv_notice_l li:odd").addClass("odd"); var bg_cur = 0 //褰撳墠椤垫暟 var listnum = 0 //鎬婚〉 var mouseW = true;//鏄惁婵€娲绘粴鍔� var listnum = 3//鎬诲睆鏁� var winh = $(window).height(); if ($(".in_banner li").length <= 0) { $(".bx-controls-direction").hide(); } if ($(".phone_bxslider1 ").find("li").length <= 1) { if($(window).width()>1024){ $(".scrollPage0,.scrollPage1,.scrollPage2").css({"height":$(window).height()}); $(".phone_bxslider1 li img").css({"marginLeft":$(window).height()/0.38/2*-1,"left":"50%"}); $(".main_part3").css({ "width": $(window).width()}); $(".main_part3").css({ "height": $(window).height() }); }else{ $(".scrollPage0").css({"height":$(window).width()*0.38}); $(".main_part3").css({ "width": $(window).width()}); $(".main_part3").css({ "height": $(window).height()*0.5 }); } } else { //$(".scrollPage0").css({"height":$(window).height(),"width":$(window).height()/0.38,"left":"50%","marginLeft":$(window).height()/0.38/2*-1,"position":"relative"},function(){ //}) $('.phone_bxslider1').bxSlider({ auto: true, autoControls: true, onSlideBefore:function(){ $(".bx-wrapper .bx-viewport ul li img").css("marginLeft",$(".bx-wrapper .bx-viewport ul li:eq(0) img").width()/2*-1); } }); } $(".menu_phone").click(function () { if ($("nav").hasClass("show")) { $("nav").removeClass("show"); } else { $("nav").addClass("show"); } }) $(".right_menu li").click(function () { var nIndex = $(".right_menu li").index(this); $(this).removeClass().addClass("active").siblings().removeClass(); try{ if(nIndex==0){ $("body,html").stop().animate({ scrollTop: 0}, 800, "easeOutQuad") }else{ $("body,html").stop().animate({ scrollTop: $(".scrollPage" + nIndex).offset().top}, 800, "easeOutQuad") } } catch (e) { } bg_cur = nIndex; }) if ($(".menu_phone").is(":hidden")) { $(".main_part2_part").css({ "top": "50%", "marginTop": $(".main_part2_part").height() / 2 * -1+50 }).show(); } $(".comp_reset").click(function(){ $(".again").click(); }) /*$(".contact_active li:nth-child(4n-2)").addClass("odd"); $(".contact_active li:nth-child(4n-1)").addClass("odd");*/ $(".contact_active li").addClass("odd"); $(".cul_active_part li:odd").addClass("odd"); var historySize = $(".history_top_main li").length; var historyGroup = $(".history_top_main").width() / 124; $(".history_top_l").addClass("active"); $(".history_top_r").click(function () { if (!$(".history_top_main ul").is(":animated")) { if (historyNum >= historySize - 2) { $(".history_top_r").addClass("active"); } if (historyNum >= historySize - 1) { } else { historyNum++; $(".history_top_l").removeClass("active"); var movePoint = historyGroup / 2-1; var endPoint= historySize -movePoint; if (historyNum > movePoint && historyNum < endPoint-1) { $(".history_top_main ul").stop().animate({ "left": "-=250" }); } $(this).prev().find("li").eq(historyNum).click(); } } }) $(".history_top_l").click(function () { if (!$(".history_top_main ul").is(":animated")) { if (historyNum <= 1) { $(".history_top_l").addClass("active"); } if (historyNum <= 0) { } else { historyNum--; $(".history_top_r").removeClass("active"); var movePoint = historyGroup / 2 - 1; var endPoint = historySize - movePoint; if (historyNum > movePoint && historyNum < endPoint - 1) { $(".history_top_main ul").stop().animate({ "left": "+=250" }); } $(this).next().find("li").eq(historyNum).click(); } } }) //$(".right_menu li:eq(0)").click(); if (document.getElementById("home")) { if (!isSupportTouch) { /* if(getCookie("scrollPageCookie")=="1"){ $("body,html").stop().animate({ scrollTop: $(".scrollPage1").offset().top }, 600, "easeOutQuad"); bg_cur=1; }else if(getCookie("scrollPageCookie")=="3"){ $("body,html").stop().animate({ scrollTop: $(".scrollPage3").offset().top }, 600, "easeOutQuad"); bg_cur=3; }else{ $("body,html").stop().animate({ scrollTop: 0 }, 600); } */ $(document).mousewheel(function (event, delta, deltaX, deltaY) { if (delta < 0) { if (mouseW) { if(!$("body,html").is(":animated")){ bg_cur++; bg_cur > listnum ? bg_cur = listnum : 0; mouseW = false; try { $(".right_menu li:eq("+bg_cur+")").click(); mouseW = true; } catch (e) { } $(".right_menu li:eq(" + bg_cur + ")").removeClass().addClass("active").siblings().removeClass(); } } } else if (delta > 0) { if (mouseW) { if(!$("body,html").is(":animated")){ bg_cur--; mouseW = false; bg_cur < 0 ? bg_cur = 0 : 0; try { $(".right_menu li:eq("+bg_cur+")").click(); mouseW = true; } catch (e) { } $(".right_menu li:eq(" + bg_cur + ")").removeClass().addClass("active").siblings().removeClass(); } } } return false; }) } } try { $(".group0").colorbox({ rel: 'group0' }); $("#cboxContent").css("width", $(window).width() - 42); } catch (e) { } if (!$(".menu_phone").is(":visible")) { $(".culture_part").each(function () { var eqLast = $(this).find("li").size() - 1; var eqLast_1 = $(this).find("li").size() - 2; $(this).find("li").eq(eqLast).css("marginBottom", 0); $(this).find("li").eq(eqLast_1).css("marginBottom", 0); }) $(".culture_menu ul li").hover(function(){ $(this).removeClass("on").addClass("on").siblings().removeClass("on"); },function(){ $(this).removeClass("on"); }) }else{ if($(".header_bottom > nav li").find("span").size()>=1){ $(".header_bottom > nav li > a").attr("href","javascript:void(0)"); } } }) $(function () { imgratio()//鍒濆鍖栧浘鐗噐atio //绐楀彛鏀瑰彉澶у皬鍥炶皟ratio锛� var rtime = new Date(); var timeout = false; var delta = 200; $(window).resize(function () { rtime = new Date(); if (timeout === false) { timeout = true; setTimeout(resizeend, delta); //resize鍙洖璋冩渶鍚庝竴娆� } }); function resizeend() { //window.resize鍥炶皟 if (new Date() - rtime < delta) { setTimeout(resizeend, delta); } else { timeout = false; imgratio()//ratio } } // }) var nullimg = 'images/error.png'; function lod(t) { t.onerror = null; t.src = nullimg } $(function () { $(".ratio-img").each(function () { if ($(this).attr("src") == "") { $(this).attr({ "src": nullimg }) } }) }) })(jQuery); function imgratio() { $(".ratio-img").each(function (index, element) { if ($(this).is(":visible")) { $(this).css({ height: Math.floor($(this).width() * $(this).data("ratio")) }); } }); } function doPrint() { bdhtml = window.document.body.innerHTML; sprnstr = ""; eprnstr = ""; prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17); prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); OpenWindow = window.open(""); OpenWindow.document.write("鎵撳嵃椤�<\/TITLE><link href=\"..\/css\/common.css\" rel=\"stylesheet\" type=\"text\/css\" \/><link href=\"..\/css\/style.css\" rel=\"stylesheet\" type=\"text\/css\" \/><\/HEAD><body><h1><a href='/'>澳门皇冠app-皇冠app手机投注下载</a></h1><div id=\"printbox\" ><\/div><\/BODY><\/HTML>"); OpenWindow.document.getElementById("printbox").innerHTML = prnhtml; OpenWindow.document.close(); OpenWindow.print(); } var nullimg = '../images/error.jpg'; function lod(t) { t.onerror = null; t.src = nullimg } $(document).ready(function () { $("img").each(function () { if ($(this).attr("src") == "") { $(this).attr({ "src": nullimg }) } }) }) // function SetCookie(name,value) { var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } function getCookie(name) { var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return null; } function delCookie(name) { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval=getCookie(name); if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString(); } function showVideo(title,url,fileurl){ if(fileurl == '') return false; var html = '<div id="goodcover"></div>' +'<div id="code">' +'<div class="close1"><a href="javascript:void(0)" id="closebt">X</a></div>' +'<div class="goodtxt">' +'' +'</div>' +'</div>'; $("body").append(html); $('#goodcover').fadeIn("slow"); $("#code").slideDown(200); $('#closebt,#goodcover').on('click', function() { $("#code").remove(); $('#goodcover').remove(); });}