1$(function () { 2 if (!_.isEmpty(current_variant)) { 3 current_slide = _.indexOf(images, current_variant.image); 4 current_slide = current_slide != -1 ? current_slide : 0; 5 } 6 else { 7 current_slide = 0; 8 } 9 10 $('.prev').click(function() { 11 current_slide -= 1; 12 if (current_slide < 0) { 13 current_slide = $('.b_preview a').size() - 1; 14 } 15 $('.b_preview a').removeClass('active'); 16 $('.b_preview a').eq(current_slide).addClass('active'); 17 $('.jcarousel').jcarousel('scroll', current_slide); 18 return false; 19 }); 20 21 $('.next').click(function() { 22 current_slide += 1; 23 if (current_slide > $('.b_preview a').size() - 1) { 24 current_slide = 0; 25 } 26 $('.b_preview a').removeClass('active'); 27 $('.b_preview a').eq(current_slide).addClass('active'); 28 $('.jcarousel').jcarousel('scroll', current_slide); 29 return false; 30 }); 31 32 $('.b_preview a').each(function(index){ 33 $(this).click(function(){ 34 current_slide = index; 35 $(this).addClass('active'); 36 $(this).siblings().removeClass('active'); 37 $('.jcarousel').jcarousel('scroll', current_slide); 38 return false; 39 }); 40 }); 41 42 $(".b_pr_tabs").delegate("a", "click", function() { 43 var prev = $(this).parent().siblings().has("span"); 44 $(".parts").children().hide(); 45 /*$(".parts").children().eq($(this).parent().index()).fadeIn(500);*/ 46 $(".parts").children().eq($(this).parent().index()).show(); 47 $(this).parent().siblings().removeClass("active"); 48 prev.html($("<a href='#'>" + prev.text() + "</a>")); 49 $(this).parent().addClass("active"); 50 $(this).parent().html($("<span>" + $(this).text() + "</span>")); 51 return false; 52 }); 53 54 $(".opBlock .detailed").click(function() { 55 var detailedHide = $(this).parent().find(".detailedHide"); 56 if (detailedHide.is(":visible")) { 57 detailedHide.hide(); 58 } 59 else { 60 detailedHide.show(); 61 } 62 return false; 63 }); 64 65 $(".b_preview a").eq(current_slide).addClass("active"); 66 67 $(".jcarousel").jcarousel(); 68 69 var fbimages = $(".carousel a"); 70 71 fbimages.fancybox({ 72 cyclic: true, 73 onComplete: function () { 74 var fb = this; 75 $('#fancybox-content').click(function () { 76 if(fb.orig.get(0) === fbimages.last().children().get(0)) { 77 $.fancybox.close(); 78 } 79 else { 80 $.fancybox.next(); 81 } 82 }); 83 } 84 }); 85 86 selected_properties = _.clone(current_variant.properties); 87 selected_keys = _.keys(selected_properties); 88 allowed = get_allowed_properties(); 89 90 $(".b_parameters").html(_.template($("#product-parameters").html(), { 91 property_map: property_map, 92 allowed: allowed, 93 selected_properties: selected_properties, 94 indexOf: _.indexOf 95 })); 96 97 98 $(".product_info").html(_.template($("#product-info").html(), { 99 current_variant: current_variant, 100 unit: unit, 101 url: url, 102 product_balance: PRODUCT_BALANCE, 103 cart_button_text: CART_BUTTON_TEXT, 104 cart_button_text_bought: CART_BUTTON_TEXT_BOUGHT 105 })); 106});
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.