/* /webgame/home/js/ks.slide.js */
!function(t){"function"==typeof define?define(t):t("",window.ue=window.ue||{},"")}(function(t,e,n){function i(t){if(this.constructor!==i)return new i(t);var e={hovertarget:"",target:"",items:"",gotobtn:"",prevbtn:"",nextbtn:"",trigger:"click",delay:3e3,speed:300,autoplay:!0,currentclass:"",maxzIndex:2,afterSlide:function(){},beforeSlide:function(){}};t=this.options=$.extend(e,t),this.hovertarget=$(t.hovertarget),this.target=$(t.target),this.prevbtn=$(t.prevbtn),this.nextbtn=$(t.nextbtn),this.gotobtn=$(t.gotobtn),this.items=$(t.items),this.items.length<2||(this.current=0,this.items.eq(0).css("z-index",t.maxzIndex),this.bind(),this.start())}i.prototype={constructor:i,bind:function(){var t=this.options,e=this;this.prevbtn.bind("click",function(){return e.prev(),!1}),this.nextbtn.bind("click",function(){return e.next(),!1}),this.gotobtn.bind(t.trigger,function(){var n=$(this).index();return e["goto"](n),"click"==t.trigger?!1:void 0}),this.hovertarget.bind("mouseover mouseout",function(t){"mouseover"==t.type?(e.hoverstatus=!0,setTimeout(function(){e.checkHover()},300)):"mouseout"==t.type&&(e.hoverstatus=!1,setTimeout(function(){e.checkHover()},300))})},next:function(){var t=this.current+1;this["goto"](t)},prev:function(){var t=this.current-1;this["goto"](t)},"goto":function(t){var e=this,n=this.options;return t==e.current?!1:(t>=this.items.length&&(t=0),0>t&&(t=this.items.length-1),e.preIndex=e.current,e.current=t,e.options.beforeSlide.call(e,e.preIndex,e.current),e.items.stop(!0,!0),e.items.eq(t).css({"z-index":n.maxzIndex-1,opacity:0}),e.gotobtn.removeClass(n.currentclass),e.gotobtn.eq(e.current).addClass(n.currentclass),e.items.eq(e.preIndex).animate({opacity:0},n.speed,function(){e.items.eq(e.preIndex).css("z-index",0)}),void e.items.eq(e.current).animate({opacity:1},n.speed,function(){e.items.eq(t).css("z-index",n.maxzIndex).siblings().css("z-index",0),e.options.afterSlide.call(e,e.preIndex,e.current)}))},stop:function(){clearInterval(this.timer)},start:function(){var t=this.options,e=this;t.autoplay&&(this.stop(),this.timer=setInterval(function(){e.next()},t.delay+t.speed))},checkHover:function(){this.hoverstatus?this.stop():this.start()}},"[object Object]"=={}.toString.call(n)?n.exports=i:e.slide=i});
/* /webgame/home/js/ks.tab.js */
!function(t){"function"==typeof define?define(t):t("",window.ue=window.ue||{},"")}(function(t,e,n){function i(t){if(this.constructor!==i)return new i(t);var e={tab:$(),defaultIndex:0,delay:0,tabCurrentClass:"",only:!0,content:$(),trigger:"click",beforeSwitch:o,afterSwitch:o,beforeShow:o,afterShow:o};this.options=t=$.extend(e,t),this.init()}var o=function(){};i.prototype={constructor:i,init:function(){var t=this,e=this.options;this.switchTab(e.defaultIndex),this.showContent(e.defaultIndex),this.last_trigger_time=new Date,e.tab.bind(e.trigger,function(){var n=e.tab.index($(this)),i=$(this).hasClass("cur");return clearTimeout(t.delay_timer),t.delay_timer=setTimeout(function(){t.switchTab(n,i),t.showContent(n,i)},e.delay),!1})},switchTab:function(t,e){var n=this.options;0>t||(n.beforeSwitch.call(this,t,e),n.only?(n.tab.removeClass(n.tabCurrentClass),n.tab.eq(t).addClass(n.tabCurrentClass)):e?n.tab.eq(t).removeClass(n.tabCurrentClass):n.tab.eq(t).addClass(n.tabCurrentClass),n.afterSwitch.call(this,t,e))},showContent:function(t,e){var n=this.options;0>t||(n.beforeShow.call(this,t,e),n.only?(n.content.hide(),n.content.eq(t).show()):e?n.content.eq(t).hide():n.content.eq(t).show(),n.afterShow.call(this,t,e))}},"[object Object]"=={}.toString.call(n)?n.exports=i:e.tab=i});
/* /webgame/home/js/ks.scrollbar.js */
!function(t){"function"==typeof define?define(t):t("",window.ue=window.ue||{},"")}(function(t,e,s){function o(t){var e=0,s=0;return"touchstart"==t.type||"touchend"==t.type||"touchmove"==t.type?(s=t.originalEvent.changedTouches[0].clientX,e=t.originalEvent.changedTouches[0].clientY):t.pageY?(e=t.pageY,s=t.pageX):t.clientY&&(e=t.clientY+document.body.scrollTop||document.documentElement.scrollTop,s=t.clientX+document.body.scrollLeft||document.documentElement.scrollLeft),{x:s,y:e}}function i(t){var e=0,s=0,o=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),o=e,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(o=0,s=-1*e),void 0!==t.wheelDeltaY&&(o=t.wheelDeltaY/120),void 0!==t.wheelDeltaX&&(s=-1*t.wheelDeltaX/120),{delta:e,deltaX:s,deltaY:o}}function r(t){if(this.constructor!==r)return new r(t);var e={height:0,scroll_per:20,min_scroll_size:30,scrollbarbg:$(),target:$(),box:$(),scrollbar:$(),btn:$(),onscroll:function(){},btn_prev:$(),btn_next:$()};if(this.options=t=$.extend(e,t),"number"==typeof t.height&&t.height>0)this.type=1,this.size=t.height;else{if(!("number"==typeof t.width&&t.width>0))return;this.type=0,this.size=t.width}this.lastMousePos=0,this.lastElemOffset=0,this.btn_pos=0,this.box_scroll_pos=0,this.init()}r.prototype={constructor:r,init:function(){var t=this,e=this.options;this.reset(),e.btn.unbind("mousedown.scrollbar touchstart.scrollbar").bind("mousedown.scrollbar touchstart.scrollbar",function(e){return t.isMouseDown=!0,1==t.type?(t.lastMousePos=o(e).y,t.lastElemOffset=this.offsetTop||0):(t.lastMousePos=o(e).x,t.lastElemOffset=this.offsetLeft||0),t.updatePosition(e),document.body.onselectstart=function(){return!1},!1}),e.scrollbarbg.unbind("click.scrollbar").bind("click.scrollbar",function(e){var s=t.type?e.offsetY:e.offsetX,o=s/t.scrollbar_size,i=o*t.real_box_size;t.boxScrollTo(i,!0)}),e.btn_prev.attr("data-direction","prev"),e.btn_next.attr("data-direction","next"),e.btn_prev.add(e.btn_next).unbind("click.scrollbar").bind("click.scrollbar",function(e){var s="prev"===$(this).attr("data-direction")?-1:1,o=t.box_scroll_pos+s*t.scroll_per;o>t.real_box_size&&(o=t.real_box_size),0>o&&(o=0),t.boxScrollTo(o,!0,0,!0,!0),e.preventDefault()}),$([window,document.body]).bind("mouseup.scrollbar touchend.scrollbar",function(){return t.isMouseDown?(t.isMouseDown=!1,document.body.onselectstart=function(){return!0},!1):void 0}).bind("mousemove.scrollbar touchmove.scrollbar",function(e){return t.isMouseDown?(t.updatePosition(e),!1):void 0}),this.last_wheel_time=new Date,1==this.type&&e.target.unbind("mousewheel.scrollbar DOMMouseScroll.scrollbar").bind("mousewheel.scrollbar DOMMouseScroll.scrollbar",function(e){var s=i(e.originalEvent||e),o=t.box_scroll_pos-s.delta*t.scroll_per;return 0==t.box_scroll_pos&&1==s.delta||(t.box_scroll_pos==t.real_box_size||t.real_box_size<=0)&&-1==s.delta?!0:(o>t.real_box_size&&(o=t.real_box_size),0>o&&(o=0),e.preventDefault(),e.stopPropagation(),new Date-t.last_wheel_time<200?!1:(t.last_wheel_time=new Date,void t.boxScrollTo(o,!0)))})},reset:function(t,e){var s=this,t=t===!0,e=e||100,o=this.options;if(1==this.type?(o.scrollbar.height(o.scrollbar_height||o.height),this.btn_prev_size=o.btn_prev.height()||0,this.btn_next_size=o.btn_next.height()||0,this.box_size=o.box.outerHeight(),this.real_box_size=this.box_size-this.size,this.scrollbar_size=o.scrollbar.height(),this.btn_border_top=parseInt(o.btn.css("border-top")||o.btn.css("border-top-width"))||0,this.btn_border_bottom=parseInt(o.btn.css("border-bottom")||o.btn.css("border-bottom-width"))||0,this.scroll_size=this.scrollbar_size-this.btn_border_top-this.btn_border_bottom-this.btn_next_size):(o.scrollbar.width(o.scrollbar_width||o.width),this.btn_prev_size=o.btn_prev.width()||0,this.btn_next_size=o.btn_next.width()||0,this.box_size=o.box.outerWidth(),this.real_box_size=this.box_size-this.size,this.scrollbar_size=o.scrollbar.width(),this.btn_border_left=parseInt(o.btn.css("border-left")||o.btn.css("border-left-width"))||0,this.btn_border_right=parseInt(o.btn.css("border-right")||o.btn.css("border-right-width"))||0,this.scroll_size=this.scrollbar_size-this.btn_border_left-this.btn_border_right-this.btn_next_size),this.btn_size=this.size/this.box_size*this.scroll_size,this.btn_size<o.min_scroll_size&&(this.btn_size=o.min_scroll_size),this.remain_size=(this.options.available_scroll_size||this.scroll_size)-this.btn_size,this.scroll_per=o.scroll_per,this.box_size>this.size)if(o.scrollbar.show(),1==this.type){t?o.btn.animate({height:this.btn_size},e):o.btn.css({height:this.btn_size,zoom:1});var i=Math.abs(parseInt(o.box.css("margin-top")));i=isNaN(i)?0:i,s.boxScrollTo(i,t,e,!0)}else t?o.btn.animate({width:this.btn_size},e):o.btn.css({width:this.btn_size,zoom:1}),this.boxScrollTo(Math.abs(parseInt(o.box.css("margin-left"))),t,e,!0);else o.scrollbar.hide(),s.boxScrollTo(0,!1,200,!0)},boxScrollTo:function(t,e,s,o,i,r){var n=this,e=e!==!1,o=o===!0,i=i===!0,s=s||200,r="function"==typeof r?r:function(){},l=this.options,b=!0;t>n.real_box_size&&(t=n.real_box_size),(0>t||isNaN(t))&&(t=0),0!=t&&t!=n.real_box_size||(b=!1);var a=Math.round(t/n.real_box_size*n.remain_size);return a=isNaN(a)?0:a,this.btn_pos=a,a<n.btn_prev_size&&(a=n.btn_prev_size),this.box_scroll_pos=t,t=-t,1==this.type?e?(i&&(l.btn.stop(),l.box.stop()),l.btn.animate({top:a},s,function(){!o&&l.onscroll.call(n)}),l.box.animate({"margin-top":t},s,r)):(l.btn.css({top:a}),l.box.css({"margin-top":t}),!o&&l.onscroll.call(n)):e?(i&&(l.btn.stop(),l.box.stop()),l.btn.animate({left:a},s,function(){!o&&l.onscroll.call(n)}),l.box.animate({"margin-left":t},s,r)):(l.btn.css({left:a}),l.box.css({"margin-left":t}),!o&&l.onscroll.call(n)),b},scrollTo:function(t,e,s,o,i,r){var n,l=this,e=e!==!1,o=o===!0,i=i===!0,s=s||200;this.options;/([0-9.]+)%/.test(t)&&(t=l.remain_size*RegExp.$1/100),t>l.remain_size&&(t=l.remain_size),t<l.btn_prev_size&&(t=l.btn_prev_size),l.btn_pos=Math.round(t),n=Math.round(t/l.remain_size*l.real_box_size),l.boxScrollTo(n,e,s,o,i,r)},updatePosition:function(t){var e,s=this,i=(this.options,this.type?o(t).y:o(t).x),r=i-s.lastMousePos;e=s.lastElemOffset+r,s.scrollTo(e,!1,200,!1,!1)}},"[object Object]"=={}.toString.call(s)?s.exports=r:e.scrollbar=r});
/* /webgame/home/js/ks.select.js */
!function(t){"function"==typeof define?define(["ks.scrollbar"],t):t("",window.ue=window.ue||{},"")}(function(t,e,s){function i(t){if(this.constructor!==i)return new i(t);var e={target:$(),trigger:"click",currentClass:"cur",defaultClass:"ue-select",disabledClass:"ue-select-disabled",activeClass:"",selected:$(),title:$(),list:$(),items:$(),content:$(),scrollbar:null,dividerClass:"divider",onSelected:o,init:o,onChanged:o,onFirstShow:o,onShow:o};this.options=t=$.extend(e,t),$(t.target).data("data-select",this),this.init()}var l;l="function"==typeof t?t("ks.scrollbar"):ue.scrollbar;var o=function(){return!0};i.prototype={constructor:i,init:function(){var t=this,e=this.options;"click"==e.trigger?(e.title.unbind("click.select").bind("click.select",function(){return e.target.hasClass(e.disabledClass)?!1:(e.target.hasClass(e.activeClass)?t.hide():t.show(),!1)}),$(document.body).unbind("click.select").bind("click.select",function(t){0==$(t.target).parents(e.defaultSelector).length&&$(e.defaultSelector).each(function(){var t=$(this).data("data-select");t&&t.hide()})})):e.title.add(e.list).unbind("mouseover").bind("mouseover",function(){t.hover=!0,setTimeout(function(){t.checkHover()},150)}).bind("mouseout",function(){t.hover=!1,setTimeout(function(){t.checkHover()},150)}),e.target.addClass(e.defaultClass),e.defaultSelector="."+e.defaultClass,t.bindList(),e.init.call(this)},bindList:function(){var t=this,e=this.options;$(e.items.selector).unbind("click.select").bind("click.select",function(){var s=$(this).index(),i=$(this).attr("data-value");return $(this).hasClass(e.dividerClass)?!1:(i="undefined"==typeof i?$(this).text():i,$(this).addClass(e.currentClass).siblings().removeClass(e.currentClass),e.selected.html(i),t.selected!=this&&e.onChanged.call(t,this,s),t.selected=this,e.onSelected.call(t,this,s))})},hide:function(){var t=this.options;t.target.removeClass(t.activeClass),t.list.hide()},show:function(){var t=this,e=this.options;$(e.defaultSelector).each(function(){var t=$(this).data("data-select");t&&t.hide()}),e.target.addClass(e.activeClass),e.list.show();var s=e.content.outerHeight();if(s>e.maxHeight?e.list.height(e.maxHeight):e.list.height(s),t._isfirstshow)t.scrollbar&&t.scrollbar.reset();else if(e.onFirstShow.call(this),t._isfirstshow=!0,e.scrollbar){if("function"!=typeof l)throw new Error("please loaded the ue.scrollbar first");t.scrollbar=new l({height:e.maxHeight,scroll_per:e.scrollbar.scroll_per,scrollbarbg:e.scrollbar.scrollbarbg,target:e.list,box:e.content,scrollbar:e.scrollbar.scrollbar,btn:e.scrollbar.btn})}e.onShow.call(this),t.bindList()},checkHover:function(){this.hover?this.show():this.hide()},reset:function(){var t=this,e=this.options;t.selected=null,t.scrollbar&&t.scrollbar.scrollTo(0,!1),e.selected.html("请选择")},disabled:function(t){t?this.options.target.addClass(this.options.disabledClass):this.options.target.removeClass(this.options.disabledClass)}},"[object Object]"=={}.toString.call(s)?s.exports=i:e.select=i});
/* /webgame/home/js/ks.marquee.js */
!function(t){"function"==typeof define?define(t):t("",window.ue=window.ue||{},"")}(function(t,e,i){function s(t){var e=0,i=0,s=0;return t.originalEvent&&(t=t.originalEvent),t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),s=e,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(s=0,i=-1*e),void 0!==t.wheelDeltaY&&(s=t.wheelDeltaY/120),void 0!==t.wheelDeltaX&&(i=-1*t.wheelDeltaX/120),{delta:e,deltaX:i,deltaY:s}}function n(t){if(this.constructor!==n)return new n(t);var e={scrolltarget:"",hovertarget:"",target:"",items:"",gotobtn:"",gotobtn_activable:!0,gotobtn_currentclass:"cur",prevbtn:"",prevbtndisabled:"",nextbtn:"",nextbtndisabled:"",delay:3e3,speed:600,visiblenum:1,scrollnum:1,autoplay:!0,currentclass:"",fade:0,trigger:"click",loop:1,afterSlide:function(){},beforeSlide:function(){},beforePrev:function(){},afterPrev:function(){},beforeNext:function(){},afterNext:function(){},onTop:function(){},onBottom:function(){},mode:0,direction:0};t=this.options=$.extend(e,t),this.scrolltarget=$(t.scrolltarget),this.hovertarget=$(t.hovertarget),this.target=$(t.target),this.prevbtn=$(t.prevbtn),this.nextbtn=$(t.nextbtn),this.gotobtn=$(t.gotobtn),this.items=$(t.items),0==this.prevbtn.length&&(this.prevbtn=$("<div>")),0==this.nextbtn.length&&(this.nextbtn=$("<div>")),this.items.each(function(t,e){$(this).attr("data-index",t)}),1==t.loop?this.items.length-t.visiblenum<2*t.scrollnum&&(this.items.length>=t.visiblenum?this.target.append($(t.items).clone()):(""==t.prevbtndisabled?this.prevbtn.css("visibility","hidden"):this.prevbtn.addClass(t.prevbtndisabled),""==t.nextbtndisabled?this.nextbtn.css("visibility","hidden"):this.nextbtn.addClass(t.nextbtndisabled)),this.items=$(t.items)):(this.items.length<=t.visiblenum&&(t.autoplay=!1),""==t.prevbtndisabled?this.prevbtn.css("visibility","hidden"):this.prevbtn.addClass(t.prevbtndisabled),this.items.length<=t.visiblenum?""==t.nextbtndisabled?this.nextbtn.css("visibility","hidden"):this.nextbtn.addClass(t.nextbtndisabled):""==t.nextbtndisabled?this.nextbtn.css("visibility","visible"):this.nextbtn.removeClass(t.nextbtndisabled)),this.gotobtn.each(function(t,e){"undefined"==typeof $(this).attr("data-index")&&$(this).attr("data-index",t)}),1==t.mode&&this.target.css({width:this.items.length*this.items.outerWidth(!0)}),this.current=this.items.eq(0),this.current.addClass(t.currentclass).siblings().removeClass(t.currentclass),this.bind(),this.start()}n.prototype={constructor:n,bind:function(){var t=this.options,e=this;this.prevbtn.bind(t.trigger,function(){return""!=t.prevbtndisabled&&$(this).hasClass(t.prevbtndisabled)?(t.onTop.call(e),!1):(e.prev(),!1)}),this.nextbtn.bind(t.trigger,function(){return""!=t.nextbtndisabled&&$(this).hasClass(t.nextbtndisabled)?(t.onBottom.call(e),!1):(e.next(),!1)}),t.gotobtn_activable&&this.gotobtn.bind(t.trigger,function(){var t=$(this).attr("data-index"),i=e.current.attr("data-index");return 0>i&&(i=0),e["goto"](t,i),!1}),this.scrolltarget.bind("mousewheel DOMMouseScroll",function(t){if(e.animate)return!1;var i=s(t);return i.delta>0?e.prevbtn.trigger("click"):e.nextbtn.trigger("click"),t.preventDefault(),t.stopPropagation(),!1}),this.hovertarget.bind("mouseover mouseout",function(t){e.handleHover(t)}),t.hovergotobtn&&this.gotobtn.bind("mouseover mouseout",function(i){$(this).hasClass(t.gotobtn_currentclass)&&e.handleHover(i)})},handleHover:function(t){var e=this;"mouseover"==t.type?(e.hoverstatus=!0,setTimeout(function(){e.checkHover()},300)):"mouseout"==t.type&&(e.hoverstatus=!1,setTimeout(function(){e.checkHover()},300))},next:function(){return this.animate?!1:void this.scroll(0)},prev:function(){return this.animate?!1:void this.scroll(1)},"goto":function(t,e){return this.animate?!1:void(t>e?this.scroll(0,t-e):e>t&&this.scroll(1,e-t))},scroll:function(t,e){var i,s,n,r,a=this,o=this.options,l={},e="number"==typeof e?e:o.scrollnum;t="number"==typeof t?t:o.direction,a.items=$(o.items),this.animate=!0,this.stop(),this.target.stop(),0==t?(0==o.loop&&o.visiblenum+e+parseInt(a.items.eq(0).attr("data-index"))>a.items.length&&(e=a.items.length-o.visiblenum-a.items.eq(0).attr("data-index")),i=a.items.slice(0,e),0==o.mode?(s=i.outerHeight(!0),n="margin-top",l={"margin-top":-s*e}):(s=i.outerWidth(!0),n="margin-left",l={"margin-left":-s*e}),a.current=a.items.eq(e),r=a.current.attr("data-index"),a.gotobtn.eq(r).addClass(o.gotobtn_currentclass).siblings().removeClass(o.gotobtn_currentclass),a.current.addClass(o.currentclass).siblings().removeClass(o.currentclass),o.beforeNext.call(a),o.beforeSlide.call(a),0==o.loop&&(parseInt(a.items.eq(0).attr("data-index"))+e==a.items.length-o.visiblenum?""==o.nextbtndisabled?a.nextbtn.css("visibility","hidden"):a.nextbtn.addClass(o.nextbtndisabled):""==o.nextbtndisabled?a.nextbtn.css("visibility","visible"):a.nextbtn.removeClass(o.nextbtndisabled),""==o.prevbtndisabled?this.prevbtn.css("visibility","visible"):this.prevbtn.removeClass(o.prevbtndisabled)),a.target.animate(l,o.speed,function(){a.target.css(n,0),a.target.append(i),a.items=$(o.items),setTimeout(function(){o.afterNext.call(a),o.afterSlide.call(a)},0),a.animate=!1,setTimeout(function(){a.start()},0)})):(0==o.loop&&parseInt(a.items.eq(0).attr("data-index"))<o.scrollnum&&(e=parseInt(a.items.eq(0).attr("data-index"))),i=a.items.slice(-e),0==o.mode?(s=i.outerHeight(!0),n="margin-top",l={"margin-top":0}):(s=i.outerWidth(!0),n="margin-left",l={"margin-left":0}),a.current=a.items.eq(a.items.length-e),r=a.current.attr("data-index"),a.gotobtn.eq(r).addClass(o.gotobtn_currentclass).siblings().removeClass(o.gotobtn_currentclass),a.current.addClass(o.currentclass).siblings().removeClass(o.currentclass),a.target.prepend(i),a.items=$(o.items),setTimeout(function(){o.beforePrev.call(a),o.beforeSlide.call(a)},0),0==o.loop&&(0==this.items.eq(0).attr("data-index")?""==o.prevbtndisabled?this.prevbtn.css("visibility","hidden"):this.prevbtn.addClass(o.prevbtndisabled):""==o.prevbtndisabled?this.prevbtn.css("visibility","visible"):this.prevbtn.removeClass(o.prevbtndisabled),""==o.nextbtndisabled?a.nextbtn.css("visibility","visible"):a.nextbtn.removeClass(o.nextbtndisabled)),a.target.css(n,-s*e).animate(l,o.speed,function(){o.afterPrev.call(a),o.afterSlide.call(a),a.animate=!1,setTimeout(function(){a.start()},o.delay)}))},stop:function(){clearInterval(this.timer)},start:function(){var t=this.options,e=this;t.autoplay&&(this.hoverstatus||(this.stop(),this.timer=setInterval(function(){e.scroll()},t.delay+t.speed)))},checkHover:function(){this.hoverstatus?this.stop():this.start()}},"[object Object]"=={}.toString.call(i)?i.exports=n:e.marquee=n});
/* /webgame/home/js/ue.lazyimg.min.js */
!(function($){"use strict";function windowHeight(){return window.innerHeight||document.documentElement.clientHeight}function scrollTop(){return document.body.scrollTop||document.documentElement.scrollTop}var lazyimg=function(options){options=$.extend({},{target:'',type:''},options);this.init(options)};var loadCount=0;var scrollImgs=[];lazyimg.prototype={init:function(options){var imgs=options.target.find('img');var _this=this;if(options.type==='scroll'){for(var i=0,len=imgs.length;i<len;i++){if($(imgs[i]).attr("data-src")){imgs[i]._offsetTop=$(imgs[i]).offset().top;scrollImgs.push(imgs[i])}}this.loadByScroll();$(window).unbind("scroll.lazyImg resize.lazyImg").bind("scroll.lazyImg resize.lazyImg",function(){_this.loadByScroll()})}else{this.load(imgs)}},load:function(imgs){var img;for(var i=0,len=imgs.length;i<len;i++){img=$(imgs[i]);if(!!img.attr('data-src')){img.attr("src",img.attr('data-src')).removeAttr("data-src")}}},loadByScroll:function(){var img;for(var i=0,len=scrollImgs.length;i<len;i++){img=$(scrollImgs[i]);if(windowHeight()+scrollTop()>=scrollImgs[i]._offsetTop){if(!!img.attr('data-src')){loadCount++;img.attr("src",img.attr('data-src')).removeAttr("data-src")}if(loadCount==scrollImgs.length){$(window).unbind("scroll.lazyImg")}}}}};window.ue=window.ue||{};ue.lazyimg=function(options){return new lazyimg(options)}})(jQuery);
