1$(function(){ 2 var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 3 if (!isMobile && jQuery().zoom) { 4 $('.gr-image-zoom').zoom({ 5 magnify: 1, 6 duration: 10, 7 onZoomIn: function(){ 8 $(this).parent().addClass('hide_small_pic'); 9 }, 10 onZoomOut: function(){ 11 $(this).parent().removeClass('hide_small_pic'); 12 }, 13 callback: function(){ 14 var $zoomImg = $(this); 15 var zoomImgHeight = Math.floor($zoomImg.height()); 16 var zoomImgWidth = Math.floor($zoomImg.width()); 17 var floatHeight = Math.floor(20 * zoomImgHeight / 100); 18 var floatWidth = Math.floor(20 * zoomImgWidth / 100); 19 var prevWidth = Math.floor($(this).prev().outerWidth()); 20 var prevHeight = Math.floor($(this).prev().outerHeight()); 21 22 var zoomFloatHeight = zoomImgHeight + floatHeight; 23 var zoomFloatWidth = zoomImgWidth + floatWidth; 24 var finalHeight = prevHeight+floatHeight; 25 var finalWidth = prevWidth+floatWidth; 26 27 if (zoomFloatHeight<=prevHeight-floatHeight || zoomFloatWidth<=prevWidth-floatWidth) { 28 $(this).parent().addClass('hide_big_pic'); 29 }; 30 31 if (zoomImgHeight<=prevHeight || zoomImgWidth <=prevWidth) { 32 $zoomImg.css({ 33 'width': finalWidth, 34 'height': finalHeight 35 }); 36 } 37 } 38 }); 39 }; 40});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.