1var boxy_displayed = false; 2 3function load_quick_view(item_code, link_id, category_id, product_id) { 4 5 var url = sagro_base_url + "/storefront/ajax.php?ajax_mode=load_product_preview&link_itemcode=" + item_code + "&link_id=" + link_id + "&category=" + category_id + "&product=" + product_id; 6 7 if ( !boxy_displayed ) { 8 boxy_displayed = true; 9 10 $.get(url, function(data) { 11 12 var inet_dialog = new Boxy(data, {title: 'Product Quick View', modal: true, unloadOnHide: false, closeable: true, fixed: false, afterHide: function() { 13 boxy_displayed = false; 14 }}); 15 inet_dialog.resize(400); 16 17 }); 18 } 19} 20 21function view_alternate_image(image, alt_text, thumb_id, large_image) { 22 23 $('.additional_images_picker').find('div').removeClass('additional_image_thumbnail_selected'); 24 $("#" + thumb_id).addClass('additional_image_thumbnail_selected'); 25 26 if ( image != undefined ) { 27 var html = "<img class=\"product_image img-fluid\" src=\"" + image + "\" id=\"product_detail_image\" border=\"0\" alt=\"" + alt_text + "\">"; 28 document.getElementById("product_detail_image_wrapper").innerHTML = html; 29 30 if ( large_image != '' ) { 31 $("#product_detail_image").attr("data-large-image", large_image); 32 $("#product_detail_image_wrapper").addClass('inet_zoom_image_wrapper'); 33 } else { 34 $("#product_detail_image_wrapper").removeClass('inet_zoom_image_wrapper'); 35 } 36 } 37} 38 39function view_youtube(image, origin, thumb_id ) { 40 41 $('.additional_images_picker').find('div').removeClass('additional_image_thumbnail_selected'); 42 $("#" + thumb_id).addClass('additional_image_thumbnail_selected'); 43 44 var html = '<div class="product_video_container"><iframe id="ytplayer" type="text/html" width="640" height="390" src="' + image
44+ '?enablejsapi=1&version=3&playerapiid=ytplayer&origin='+origin+'" frameborder="0" allowfullscreen></iframe></div>'; 45 document.getElementById("product_detail_image_wrapper").innerHTML = html; 46} 47 48/* 49* Function triggers product image zoom on product detail page 50*/ 51$(document).ready(function (){ 52 53 $(".inet_zoom_image_wrapper").on('mouseenter', 54 function () { 55 var image_attr = $('#product_detail_image').attr('data-large-image'); 56 if ( typeof image_attr !== typeof undefined && image_attr !== false ) { 57 $(".inet_zoom_image_wrapper").zoom({ 58 url: $('#product_detail_image').attr('data-large-image'), 59 on: 'grab', 60 callback: function () { 61 $(".zoomImg").attr('alt',$('#product_detail_image').attr('alt')); 62 } 63 }); 64 } 65 }).on('mouseleave', 66 function () { 67 $('.inet_zoom_image_wrapper').trigger("zoom.destroy"); 68 } 69 ); 70 71 72 // if the lightbox wrapper is clicked open the lightbox 73 $(".inet_lightbox_image_wrapper").on('click', function() { 74 var large_image_src = $('#product_detail_image').attr('data-large-image'); 75 var product_image_src = $('#product_detail_image').attr('src'); 76 var image_src = ''; 77 var product_detail_img_alt = $('#product_detail_image').attr('alt'); 78 79 // if large image is not present display the same image in the lightbox 80 if ( large_image_src != undefined ) { 81 image_src = large_image_src 82 } else { 83 image_src = product_image_src; 84 } 85 86 // if additional images are present display, them in a gallery mode 87 if ( (typeof additional_image_sources != 'undefined') && (large_image_src == undefined) && (typeof additional_image_sources != 'undefined') ) { 88 var additional_image_index = additional_image_sources.indexOf(product_image_src); 89 inet_lightbox_open(additional_image_sources, additional_image_index, additional_image_alt); 90 return; 91 } 92 93 // open the lightbox on click of the image 94 inet_lightbox_open(image_src,additional_image_index=0, product_detail_img_alt); 95 } ); 96 97});
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.