1(function($){ 2 if($.G2 == undefined){ 3 $.G2 = {}; 4 } 5 $.G2.composer = {}; 6 7 $.G2.scrollTo = function(Elem){ 8 if(Elem.length > 0){ 9 $('html, body').animate({ 10 scrollTop: Elem.offset().top - 50 11 }, 'slow'); 12 } 13 }; 14 15 $.G2.centerOn = function(Elem){ 16 if(Elem.length > 0){ 17 $('html, body').animate({ 18 scrollTop: Elem.offset().top - $(window).height()/2 19 }, 'slow'); 20 } 21 }; 22 23 $.G2.split = function(inputs, maxcount){ 24 var data = {}; 25 if(inputs.length > maxcount){ 26 for(i = 0; i <= inputs.length; i = i + maxcount){ 27 data[i] = inputs.slice(i, i + maxcount).serialize(); 28 } 29 }else{ 30 data[0] = inputs.serialize(); 31 } 32 33 return data; 34 }; 35 36 $.G2.composer.init = function(){ 37 var section = arguments[0]; 38 var args = arguments[1]; 39 40 $.G2.composer[section] = {}; 41 $.G2.composer[section].params = args; 42 }; 43 44 $.G2.composer.ready = function(){ 45 var section = arguments[0]; 46 var args = arguments[1]; 47 48 $.extend($.G2.composer[section].params, args); 49 50 $.each($.G2.composer[section].params, function(i, arr){ 51 $.G2[i]['ready'].apply($.G2[i], arr); 52 }); 53 }; 54}(jQuery));
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.