1function backToTop() { 2 var x1 = x2 = x3 = 0; 3 var y1 = y2 = y3 = 0; 4 5 if (document.documentElement) { 6 x1 = document.documentElement.scrollLeft || 0; 7 y1 = document.documentElement.scrollTop || 0; 8 } 9 10 if (document.body) { 11 x2 = document.body.scrollLeft || 0; 12 y2 = document.body.scrollTop || 0; 13 } 14 15 x3 = window.scrollX || 0; 16 y3 = window.scrollY || 0; 17 18 var x = Math.max(x1, Math.max(x2, x3)); 19 var y = Math.max(y1, Math.max(y2, y3)); 20 21 window.scrollTo(Math.floor(x / 1.5), Math.floor(y / 1.5)); 22 23 if (x > 0 || y > 0) { 24 window.setTimeout("backToTop()", 25); 25 } 26} 27 28var j$ = jQuery; 29 30j$(function(){ 31 j$(".side_menu").each(function(){ 32 j$("li > a", this).each(function(index){ 33 var $this = j$(this); 34 if(index > 0) $this.next().hide(); 35 36 $this.mousedown(function(){ 37 var params = {height:"toggle", opacity:"toggle"}; 38 j$(this).next().animate(params).parent().siblings() 39 .children("ul:visible").animate(params); 40 41 return false; 42 43 }); 44 }); 45 }); 46}); 47 48$(function() { 49 $('#nav').droppy({speed: 200}); 50 }); 51 52/* 53 * Droppy 0.1.2 54 * (c) 2008 Jason Frame ([email protected]) 55 */ 56$.fn.droppy = function(options) { 57 58 options = $.extend({speed: 250}, options || {}); 59 60 this.each(function() { 61 62 var root = this, zIndex = 1000; 63 64 function getSubnav(ele) { 65 if (ele.nodeName.toLowerCase() == 'li') { 66 var subnav = $('> ul', ele); 67 return subnav.length ? subnav[0] : null; 68 } else { 69 return ele; 70 } 71 } 72 73 function getActuator(ele) { 74 if (ele.nodeName.toLowerCase() == 'ul') { 75 return $(ele).parents('li')[0]; 76 } else { 77 return ele; 78 } 79 } 80 81 function hide() { 82 var subnav = getSubnav(this); 83 if (!subnav) return; 84 $.data(subnav, 'cancelHide', false); 85 setTimeout(function() { 86 if (!$.data(subnav, 'cancelHide')) { 87 $(subnav).slideUp(options.speed); 88 } 89 }, 500); 90 } 91 92 function show() { 93 var subnav = getSubnav(this); 94 if (!subnav) return; 95 $.data(subnav, 'cancelHide', true); 96 $(subnav).css({zIndex: zIndex++}).slideDown(options.speed); 97 if (this.nodeName.toLowerCase() == 'ul') { 98 var li = getActuator(this); 99 $(li).addClass('hover'); 100 $('> a', li).addClass('hover'); 101 } 102 } 103 104 $('ul, li', this).hover(show, hide); 105 $('li', this).hover( 106 function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); }, 107 function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); } 108 ); 109 110 }); 111 112};
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.