1$(function() { 2 3// console.log($('.gallery_block').length); 4 5 6if($('body').attr('id') == 'gallery'){ 7 $('a.box').fancybox({ 8 'titlePosition' : 'over', 9 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 10 return '<span id="fancybox-title-over">'+title+'<span style="float:right">image ' + (currentIndex + 1) + ' / ' + currentArray.length +'</span></span>'; 11 }, 12 'transitionIn' : 'elastic', 13 'transitionOut' : 'elastic', 14 'speedIn' : 600, 15 'speedOut' : 200 16 } 17 18 ); 19 20 $('.trigger').click(function(){ 21 var thisid = $(this).attr('name'); 22 var thistitle = $(this).attr('data-title'); 23 var thisgroup = []; 24 $('a[rel='+thisid+']').each(function(){ 25 thisgroup.push({'href' : 'http://ullagami.com/' + $(this).attr('href'),'title' : thistitle }); 26 }); 27 console.log(thistitle); 28 29 $.fancybox( 30 thisgroup, 31 { 32 'titlePosition' : 'over', 33 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 34 return '<span id="fancybox-title-over">'+title+'<span style="float:right">image ' + (currentIndex + 1) + ' / ' + currentArray.length +'</span></span>'; 35 }, 36 'transitionIn' : 'elastic', 37 'transitionOut' : 'elastic', 38 'speedIn' : 600, 39 'speedOut' : 200 40 } 41 42 ); 43 44 45 }); 46 47} 48 49if($('body').attr('id') == 'gallery2'){ 50 51 $('#shadow_close').click(function(){ // close button 52 $('#shadowbox').hide(); 53 $('#shadow_thumbs,#shadow_main').empty(); 54 $('body').removeClass('stop-scrolling'); 55 }); 56 57 58/* 59 $('.shadow_main_image').click(function(){ // 60 var rel = parseInt($(this).attr(rel)); 61 rel++; 62 console.log(rel); 63 if ( rel == $('.shadow_thumb').length ){ rel = 0; } 64 $(this).attr('rel',rel); 65 $(this).attr('src', $('.shadow_thumb').eq(rel).attr('src')); 66 67 68 }); 69*/ 70 71 $("#shadow_main").click(function(e){ // click in main area 72 if($(e.target).hasClass('shadow_main_image')){ // click on photo, rotate through thumbs 73 var rel = parseInt($('.shadow_main_image').attr('rel')); 74 rel++; 75 if ( rel == $('.shadow_thumb').length ){ rel = 0; } 76 $('.shadow_main_image').attr('rel',rel); 77 $('.shadow_main_image').attr('src', $('.shadow_thumb').eq(rel).attr('src')); 78 } else if (!$(e.target).hasClass('shadow_main_text')) { // click on text, ignore 79 $('#shadow_close').click(); // clicked on the background. close up shop 80 } 81 }); 82 83 84 85 86 87 $('#shadow_thumbs').on("click",".shadow_thumb",function(){ 88 var clickedImage = $(this).attr('src'); 89 $('.shadow_main_image').attr('src',clickedImage); 90 91 92 }); 93 94 $('#shadowbox').hide(); 95 96 $('.gallery_thumb>img').click(function(){ 97 98 99 var clickedModel = $(this).attr('rel'); 100 101 var firstImage = $(this).parent().children('a.box').first().attr('href'); 102 $('#shadow_main').html('<img class="shadow_main_image" rel="0" src="'+firstImage+'">'); 103 104 var imageTitle = $(this).attr('alt'); 105 $('#shadow_main').append('<div class="shadow_main_text">'+imageTitle+'</div>'); 106 107 if($(this).parent().children('a.box').length > 1){ 108 $(this).parent().children('a.box').each(function(){ 109 $('#shadow_thumbs').append('<img class="shadow_thumb" src="'+$(this).attr('href')+'">'); 110 }); 111 } 112 113 $('body').addClass('stop-scrolling'); 114 $('#shadowbox').fadeIn(1000); 115 116 }); 117 118 119 120 121 122} 123 124 125if($('body').attr('id') == 'howto'){ 126 $('a.box').fancybox({ 127 'titlePosition' : 'over', 128 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 129 return ''; 130 }, 131 'transitionIn' : 'elastic', 132 'transitionOut' : 'elastic', 133 'speedIn' : 600, 134 'speedOut' : 200 135 }); 136} 137 138if($('body').attr('id') == 'stuff'){ 139 $('a.box').fancybox({ 140 'titlePosition' : 'over', 141 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { 142 return ''; 143 }, 144 'transitionIn' : 'fade', 145 'transitionOut' : 'fade', 146 'speedIn' : 600, 147 'speedOut' : 200 148 }); 149} 150 151if($('body').attr('id') == 'stuff2'){ 152 Fancybox.bind("[data-fancybox]", { 153 // Your custom options 154 }); 155} 156 157$('#bigpic').click(function(){ 158 console.log('hey'); 159 var image = images[Math.floor(Math.random()*images.length)]; 160 $(this).attr('src','assets/images/models/'+image); 161}); 162 163 164$('.tips').click(function(){ 165 if($(this).attr('data-open') == "closed"){ 166 $(this).parent('.boxed').find('.tiplist').slideDown(500); 167 var x = $(this).attr('data-open','open') 168 $(this).text($(this).attr('data-title')); 169 } else { 170 $(this).parent('.boxed').children('.tiplist').slideUp(500); 171 var x = $(this).attr('data-open','closed') 172 $(this).text('click here to see ' + $(this).attr('data-title')); 173 174 } 175 176 177}); 178 179 180 181 182 183}); 184 185 // in .js: 186 187/* 188 var a = [1,2,4,8,16,32,64,128]; 189 190 var result = a.map((y,i)=>i%2?[]:[y,a[i+1]]).filter(y=>y[0]); 191 192 console.log(result); 193*/
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.