"use strict";var viewNum=5,moveNum=1,moveTime=400,thumbnailBoxItem=$(".thumbnail-box .wrapper .item"),thumbnailBox=$(".thumbnail-box"),thumbnailBoxWrapper=$(".thumbnail-box .wrapper"),thumbnailBoxNextBtn=$(".thumbnail-box a.btn.btn-next"),thumbnailBoxPrevBtn=$(".thumbnail-box a.btn.btn-prev"),bigBox=$(".preview-container .big-box"),bigBoxImg=bigBox.find("img"),smallBox=$(".preview-container .small-box"),smallBoxMask=$(".preview-container .small-box .hover"),picNum=thumbnailBoxItem.length,tempLength=0,moveLength=thumbnailBoxItem.eq(0).outerWidth(!0)*moveNum,countLength=(picNum-viewNum)*moveLength;0==picNum&&(bigBox.remove(),thumbnailBox.remove(),smallBoxMask.remove()),countLength<5?($(".thumbnail-box a.btn.btn-prev").addClass("btn-prev_disabled"),$(".thumbnail-box a.btn.btn-next").addClass("btn_next_disabled")):$(".thumbnail-box a.btn.btn-next").removeClass("btn_next_disabled"),thumbnailBoxNextBtn.on("click",function(){tempLength$(this).width()-smallBoxMask.width()&&(e.left=$(this).width()-smallBoxMask.width()),e.top<0?e.top=0:e.top>$(this).height()-smallBoxMask.height()&&(e.top=$(this).height()-smallBoxMask.height()),smallBoxMask.css(e);t=smallBoxMask.position().left/(smallBox.width()-smallBoxMask.width()),e=smallBoxMask.position().top/(smallBox.height()-smallBoxMask.height()),t*=bigBoxImg.width()-bigBox.width(),e*=bigBoxImg.height()-bigBox.height();bigBox.scrollLeft(t).scrollTop(e)})}),smallBox.on("mouseleave",function(){bigBox.fadeOut(200),smallBox.find(".hover").fadeOut(200)}),$(function(){thumbnailBoxItem.each(function(t){0===t&&$(this).addClass("item-cur")})});