var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); $(document).ready(function () { var $scroll_nav_top = $('#scroll_nav').offset(); var offset = 50; var row_1 = 0, row_2 = 0, row_3 = 0, row_4 = 0, row_5 = 0, row_6 = 0, row_7 = 0, row_8 = 0, row_9 = 0; function scrollLocation() { row_1 = $('#row_1').offset() ? $('#row_1').offset().top - offset : 0; row_2 = $('#row_2').offset() ? $('#row_2').offset().top - offset : 0; row_3 = $('#row_3').offset() ? $('#row_3').offset().top - offset : 0; row_4 = $('#row_4').offset() ? $('#row_4').offset().top - offset : 0; row_5 = $('#row_5').offset() ? $('#row_5').offset().top - offset : 0; row_6 = $('#row_6').offset() ? $('#row_6').offset().top - offset : 0; row_7 = $('#row_7').offset() ? $('#row_7').offset().top - offset : 0; row_8 = $('#row_8').offset() ? $('#row_8').offset().top - offset : 0; row_9 = $('#row_9').offset() ? $('#row_9').offset().top - offset : 0; } var li = $("#scroll_nav li"); var $scroll_nav = $('#scroll_nav'); var $scroll_nav_top = $scroll_nav.offset().top; var status = -1; $(window).on('selectTp load', function () { scrollLocation(); }).resize(function () { scrollLocation(); }).scroll(function () { //监听滚动条 //return; var $scrollTop = $(this).scrollTop(); if ($scrollTop > $scroll_nav_top) { if (!$scroll_nav.hasClass("scroll_nav")) { if ($.browser.msie) { if ($.browser.version == "6.0") { $scroll_nav.css({ position: "absolute", top: $scrollTop - 145, left: $scroll_nav.offset().left }) } else { var left = ($(window).width() - $scroll_nav.width()) / 2; left = left > 0 ? left : 0; $scroll_nav.css("left", left); } } $scroll_nav.addClass('scroll_nav'); } } else { if ($scroll_nav.hasClass("scroll_nav")) { if ($.browser.msie && $.browser.version == "6.0") { $scroll_nav.css({ position: "static" }); } $scroll_nav.removeClass('scroll_nav'); } } if (row_9 > 0 && $scrollTop >= row_9) { if (status != 9) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_9').addClass('scroll_nav_current'); status = 9; } } else if (row_8 > 0 && $scrollTop >= row_8) { if (status != 8) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_8').addClass('scroll_nav_current'); status = 8; } } else if (row_7 > 0 && $scrollTop >= row_7) { if (status != 7) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_7').addClass('scroll_nav_current'); status = 7; } } else if (row_6 > 0 && $scrollTop >= row_6) { if (status != 6) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_6').addClass('scroll_nav_current'); status = 6; } } else if (row_5 > 0 && $scrollTop >= row_5) { if (status != 5) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_5').addClass('scroll_nav_current'); status = 5; } } else if (row_4 > 0 && $scrollTop >= row_4) { if (status != 4) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_4').addClass('scroll_nav_current'); status = 4; } } else if (row_3 > 0 && $scrollTop >= row_3) { if (status != 3) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_3').addClass('scroll_nav_current'); status = 3; } } else if (row_2 > 0 && $scrollTop >= row_2) { if (status != 2) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_2').addClass('scroll_nav_current'); status = 2; } } else if (row_1 > 0 && $scrollTop >= row_1) { if (status != 1) { li.filter(".scroll_nav_current").removeClass("scroll_nav_current"); li.filter('.row_1').addClass('scroll_nav_current'); status = 1; } } }); $('.scroll_nav_ul li').removeClass('scroll_nav_current').first().addClass('scroll_nav_current').end().live('click', function (event) { //$(this).off('click'); var $scroll_nav_ul_li = $('.scroll_nav_ul li'); var li_id = $(this).attr("class"); var $li = $('#' + li_id); if ($li.length) { $('html, body').stop(true).animate({ scrollTop: $li.offset().top }, 1000); } event.stopPropagation(); }); /*pp*/ $(window).load(function () { big_banner(".dtl_focusbox", ".dtl_crtimg", ".dtl_focuslist", "dtl_focus_crt") //banner }) /*pp*/ var big_banner = function (banner_panel, img_panel, bar_list, bar_crt) { var allNum = 0; var i, j; var indexNum = $(img_panel).find("li:last-child").index(); $(img_panel).find("li:first-child").fadeIn(1000); $(bar_list).find("li").mouseover(function () { var num = $(this).index(); allNum = num; $(this).addClass(bar_crt).siblings().removeClass(bar_crt); $(img_panel).find("li").eq(num).fadeIn(800).siblings().hide(); }); function imgScroll() { $(bar_list).find("li").eq(allNum).addClass(bar_crt).siblings().removeClass(bar_crt); $(img_panel).find("li").eq(allNum).fadeIn(1000).siblings().hide(); allNum += 1; if (allNum > indexNum) allNum = 0; } var anima = setInterval(imgScroll, 3000); $(banner_panel).hover( function () { clearInterval(anima); } , function () { anima = setInterval(imgScroll, 3000); } ); }//banner $("select.start_date").change(function () {//选择日期时,费用变换 $("select.start_date").val($(this).val());//有两个选择日期的地方 var nid = $('#mybuy').attr('nid'); var nid2 = $('#mybuy2').attr('nid'); var src = $('#mybuy2').attr('src'); var d = line_date_list[$(this).val()]; var price_adult_Len = d['price_adult'].length; for (var i = 0; i < price_adult_Len; i++) { var html = ""; var html2 = ""; } $("#mybuy").html(html); $("#mybuy2").html(html2); }); //传对象进入日历函数 js_line_calender4($("#line-show-calender"), 1); }); //日历函数 var js_line_calender4 = function (id, num) { var calObj = $("div.search_pp_calendar_box", id); $("span.Next", calObj).click(function () {//查看下一个日历 var index = calObj.index($(this).parents('div.search_pp_calendar_box:first')); var next2 = calObj.eq(index + 1); //显示下一个月的日历 if (next2.size() > 0) { calObj.hide(); next2.show(); } }); $("span.Prev", calObj).click(function () {//查看前一个日历 var index = calObj.index($(this).parents('div.search_pp_calendar_box:first')); var prev2 = calObj.eq(index - 1);//显示上一个月的日历 if (prev2.size() > 0) { calObj.hide(); prev2.show(); } }); var shownum = !isNaN(num) ? num - 1 : 0; //默认显示一个 calObj.filter(":gt(" + shownum + ")").hide();//只显示前两个日历 calObj.find("div.search_pp_calendar_d_box").click(function () {//点击日期 var date = trim($('span.search_pp_calendar_day_date', this).html()); $("select.start_date").val(date).change().css({backgroundColor: '#ff9900'}); setTimeout(function () { $("select.start_date").css({backgroundColor: '#fff'}); }, 1000); $('div.calender-selected').removeClass('calender-selected'); $(this).addClass('calender-selected'); //点击日期时,动态改变类buy下的a标签链接 var buyUrl = $('.buy-line a').attr('href'); var buyUrl_obj = new Elvyo.changeURLPar(buyUrl); buyUrl_obj.set('date', date); var newbuyUrl = buyUrl_obj.url(); $('.buy-line a').attr('href', newbuyUrl); }); } }