1jQuery( document ).ready(function( $ ) { 2 3 $('.menu-1 .menu-toggle').click( function(){ 4 $( '.menu-1 ul.nav-horizontal, .menu-1 div.nav-horizontal > ul' ).toggleClass( 'visible' ); 5 return false; 6 }); 7 8 $('.menu-2 .menu-toggle').click( function(){ 9 $( '.menu-2 ul.nav-horizontal, .menu-2 div.nav-horizontal > ul' ).toggleClass( 'visible' ); 10 return false; 11 }); 12 13 $('#menu-4 .menu-toggle').click( function(){ 14 $( '#menu-4 ul.nav-horizontal' ).toggle( 'slow' ); 15 return false; 16 }); 17 18 $('.nav-horizontal li').bind('mouseover', sgwindow_openSubMenu); 19 var is_scroll = false; 20 21 function sgwindow_openSubMenu() { 22 var all = $(window).width(); 23 var height = $(document).height(); 24 25 if(parseInt(all) < 680) 26 return; 27 28 var left = $(this).offset().left; 29 var width = $(this).outerWidth(true); 30 31 var offset = all - (left + width + 100); 32 if( offset < 0 ) { 33 $(this).find( 'ul' ).css('left','auto').css('right','0').css('top','100%').css('width','220'); 34 $(this).find( 'ul ul' ).css('left','auto').css('right','100%').css('top','-2px').css('width','220'); 35 } 36 37 if( $(this).offset().top + parseInt($(this).height()) + parseInt($(this).find( '> ul' ).height()) > height ) { 38 $(this).find( '> ul' ).css('top','-'+parseInt($(this).find( '> ul' ).height())+'px').css('left','auto').css('right','0'); 39 } 40 } 41 42 $('.scrollup').click( function(){ 43 $('html, body').animate({scrollTop : 0}, 1000); 44 return false; 45 }); 46 47 var adm = 0; 48 if(parseInt($('#wpadminbar')) != 'undefined') 49 adm = parseInt($('#wpadminbar').css('height')); 50 51 if ( isNaN( adm ) ) 52 adm = 0; 53 54 $(window).scroll(function () { 55 stickIt(); 56 if ( $(this).scrollTop() > 200 ) { 57 if( $('.scrollup').hasClass( 'visible' ) ) 58 return; 59 $('.scrollup').addClass( 'visible' ).fadeIn(); 60 } else { 61 $('.scrollup').removeClass( 'visible' ).fadeOut(); 62 } 63 }); 64 65 $(window).resize( function(){ 66 resizeIt(); 67 if ( parseInt($(window).width()) > 680 ) 68 $('.menu-2 ul.nav-horizontal').show(); 69 else 70 $('.menu-2 ul.nav-horizontal').hide(); 71 }); 72 73 $('.scrollup').click( function(){ 74 $('html, body').animate({scrollTop : 0}, 1000); 75 return false; 76 }); 77 78 $('.top-menu') 79 .addClass('original') 80 .clone() 81 .insertAfter('.top-menu') 82 .addClass('cloned') 83 .css('position','fixed') 84 .css('top','0') 85 .css('margin-top',adm) 86 .css('margin-left','0') 87 .css('z-index','500') 88 .removeClass('original') 89 .hide(); 90 91 function stickIt() { 92 93 var orgElement = $('.original'); 94 if( orgElement.size() <= 0) 95 return; 96 97 var orgElementPos = $('.original').offset(); 98 var orgElementTop = orgElementPos.top; 99 100 if ($(window).scrollTop() + adm > (orgElementTop) && parseInt($(window).width()) > 680 ) { 101 102 if ( $(window).scrollTop() + adm > (orgElementTop) + 100 && ! $('.cloned .small-logo').hasClass( 'on-screen' ) ) { 103 $('.cloned .small-logo').addClass( 'on-screen' ); 104 } 105 106 if ( $(window).scrollTop() + adm < (orgElementTop) + 100 ) { 107 $('.cloned .small-logo') 108 .removeClass( 'on-screen' ); 109 } 110 111 if ( $('.cloned').hasClass( 'on-sceen' ) ) 112 return; 113 114 var coordsOrgElement = orgElement.offset(); 115 var leftOrgElement = coordsOrgElement.left; 116 var widthOrgElement = parseInt(orgElement.css('width')); 117 118 $('.cloned') 119 .css('left',leftOrgElement+'px') 120 .css('top',0) 121 .css('width',widthOrgElement) 122 .show() 123 .addClass( 'on-sceen' ); 124 125 $('.original .horisontal-navigation') 126 .css('visibility','hidden') 127 $('.original') 128 .css('visibility','hidden') 129 130 } else { 131 $('.original .horisontal-navigation') 132 .css('visibility','visible'); 133 $('.original') 134 .css('visibility','visible') 135 $('.cloned') 136 .hide() 137 .removeClass( 'on-sceen' ); 138 $('.cloned .small-logo') 139 .removeClass( 'on-screen' ); 140 } 141 } 142 function resizeIt() { 143 var orgElement = $('.original'); 144 if( orgElement.size() <= 0) 145 return; 146 var orgElementPos = $('.original').offset(); 147 var orgElementTop = orgElementPos.top; 148 149 if ($(window).scrollTop() + adm > (orgElementTop) && parseInt($(window).width()) > 680 ) { 150 151 var coordsOrgElement = orgElement.offset(); 152 var leftOrgElement = coordsOrgElement.left; 153 var widthOrgElement = parseInt(orgElement.css('width')); 154 155 $('.cloned') 156 .css('left',leftOrgElement+'px') 157 .css('top',0) 158 .css('width',widthOrgElement) 159 .show() 160 .addClass( 'on-sceen' ); 161 162 $('.original .horisontal-navigation') 163 .css('visibility','hidden'); 164 165 } else { 166 $('.original .horisontal-navigation') 167 .css('visibility','visible'); 168 $('.cloned') 169 .hide() 170 .removeClass( 'on-sceen' ); 171 } 172 } 173});
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.