1( function($) { 2 $( document ).ready( function() { 3 if ( $( '.page-template-default #main' ).height() < $( '#sidebar' ).height() ) 4 $( '.page-template-default #main' ).css( 'height', $( '#sidebar' ).height() - 37 ); 5 if ( $( '.error404 #main' ).height() < $( '#sidebar' ).height() ) 6 $( '.error404 #main' ).css( 'height', $( '#sidebar' ).height() - 62 ); 7 if ( $( '.page-template-passback-php #main' ).height() < $( '#sidebar' ).height() ) 8 $( '.page-template-passback-php #main' ).css( 'height', $( '#sidebar' ).height() - 37 ); 9 $( '#sidebar ul li.widget:last' ).css( 'margin-bottom', '0' ); 10 /* Target blank for links in footer */ 11 $( '#footer .share_box a' ).on( 'click', function() { 12 var newWindow = window.open( $( this ).attr( 'href' ), '_blank' ); 13 newWindow.focus(); 14 return false; 15 } ); 16 17 /* Search show\hide text */ 18 $( 'input[type="text"], input[type="email"]' ).focus( function() { 19 $( this ).addClass( 'focus' ); 20 } ).focusout( function() { 21 $( this ).removeClass( 'focus' ); 22 } ); 23 24 $( '.search-button' ).on( 'click', function() { 25 if ( $( this ).siblings( '.search-text' ).val() == '' ) 26 return false; 27 } ); 28 29 $( '#wrapper .share_links_box ul li a' ).hover( function() { 30 $( this ).parent().addClass( 'shareIconHover' ); 31 }, function() { 32 $( this ).parent().removeClass( 'shareIconHover' ); 33 } ); 34 35 $( 'input[type="text"], input[type="email"]' ).addClass( 'inputs_text' ); 36 $( 'input[type="submit"]' ).addClass( 'inputs_submit' ); 37 $( '#wrapper .services form .inputs_submit' ).hover( function() { 38 $( this ).addClass( 'input_hover' ); 39 }, function() { 40 $( this ).removeClass( 'input_hover' ); 41 } ); 42 43 $( '.help_box' ).hover( function() { 44 $( this ).children().show(); 45 }, function() { 46 $( this ).children().hide(); 47 } ); 48 49 $( '#author, #email, #url, #comment' ).focus( function() { 50 if ( $( this ).val() == 'Please enter your full name...' || 51 $( this ).val() == 'Please enter your email address...' || 52 $( this ).val() == 'Please enter your website url...' || 53 $( this ).val() == 'Please enter your message...' ) 54 $( this ).val( "" ); 55 $( this ).css( 'color', '#000' ); 56 } ); 57 $( '#author' ).blur( function() { 58 if ( $.trim( $( this ).val() ) == "" ) { 59 $( this ).val( 'Please enter your full name...' ); 60 $( this ).css( 'color', '#A7A9AC' ); 61 } else 62 $( this ).removeClass( "error" ); 63 } ); 64 $( '#email' ).blur( function() { 65 if ( $.trim( $( this ).val() ) == "" ) { 66 $( this ).val( 'Please enter your email address...' ); 67 $( this ).css( 'color', '#A7A9AC' ); 68 } else 69 $( this ).removeClass( "error" ); 70 } ); 71 $( '#url' ).blur( function() { 72 if ( $.trim( $( this ).val() ) == "" ) { 73 $( this ).val( 'Please enter your website url...' ); 74 $( this ).css( 'color', '#A7A9AC' ); 75 } else 76 $( this ).removeClass( "error" ); 77 } ); 78 $( '#comment' ).blur( function() { 79 if ( $.trim( $( this ).val() ) == "" ) { 80 $( this ).val( 'Please enter your message...' ); 81 $( this ).css( 'color', '#A7A9AC' ); 82 } else 83 $( this ).removeClass( "error" ); 84 } ); 85 86 $( "input[name=cptch_number]" ).blur( function() { 87 if ( $.trim( $( this ).val() ) != "" ) 88 $( this ).removeClass( "error" ); 89 } ); 90 $( "input[name=cptchpr_number]" ).blur( function() { 91 if ( $.trim( $( this ).val() ) != "" ) 92 $( this ).removeClass( "error" ); 93 } ); 94 95 $( '#commentform' ).submit( function() { 96 var flag_error = false; 97 $( '#author, #email, #url, #comment' ).each( function() { 98 if ( $.trim( $( this ).val() ) == "" || 99 $.trim( $( this ).val() ) == 'Please enter your full name...' || 100 $.trim( $( this ).val() ) == 'Please enter your email address...' || 101 $.trim( $( this ).val() ) == 'Please enter your message...' || 102 $.trim( $( this ).val() ) == 'Please enter your website url...' ) { 103 flag_error = true; 104 $( this ).addClass( "error" ); 105 } else { 106 $( this ).removeClass( "error" ); 107 } 108 } ); 109 110 if ( $( "#commentform input[name=cptch_number]" ).length > 0 ) { 111 if ( $.trim( $( "#commentform input[name=cptch_number]" ).val() ) == "" ) { 112 flag_error = true; 113 $( "#commentform input[name=cptch_number]" ).addClass( "error" ); 114 } else { 115 $( "#commentform input[name=cptch_number]" ).removeClass( "error" ); 116 } 117 } else { 118 if ( $( "input[name=cptchpr_number]" ).length > 0 ) { 119 if ( $.trim( $( "#commentform input[name=cptchpr_number]" ).val() ) == "" ) { 120 flag_error = true; 121 $( "#commentform input[name=cptchpr_number]" ).addClass( "error" ); 122 } else { 123 $( "#commentform input[name=cptchpr_number]" ).removeClass( "error" ); 124 } 125 } 126 } 127 128 if ( ! flag_error ) { 129 if ( $( '#url' ).val() == 'Please enter your website url...' ) 130 $( '#url' ).val( "" ); 131 return true; 132 } else { 133 return false;
134 } 135 } ); 136 137 /* show more comments */ 138 $( 'input[name="submit_all_commments"]' ).on( 'click', function() { 139 $( '.ajax_loader' ).css( 'display', 'block' ); 140 var post_id = $( ".commentlist" ).attr( 'id' ); 141 $.ajax( { 142 type: "POST", 143 url: ajaxurl, 144 data: { action: 'submit_all_commments', post_id : post_id }, 145 success:function( msg ) { 146 $( '.ajax_loader' ).css( 'display', 'none' ); 147 $( 'input[name="submit_all_commments"]' ).css( 'display', 'none' ); 148 $( ".commentlist" ).html( msg ); 149 } 150 } ); 151 return false; 152 } ); 153 154 /* products single page - license widget buttom */ 155 $( '.strshwcs_license_widget .strshwcs_bottom_div a.strshwcs_button' ).on( 'click', function( event ) { 156 var tab_name = $( this ).attr( 'id' ); 157 if ( tab_name.length > 0 ) { 158 event.preventDefault(); 159 history.replaceState( 3, tab_name, $( this ).attr( 'href' ) ); 160 $( '.strshwcs-info #strshwcs_sections span' ).removeClass( 'current' ); 161 $( '.strshwcs-info #strshwcs_sections span.section-' + tab_name ).addClass( 'current' ); 162 $( ".strshwcs_block_content" ).addClass( 'strshwcs_hidden' ); 163 $( ".strshwcs_block_content#strshwcs_content_" + tab_name ).removeClass( 'strshwcs_hidden' ); 164 var destination = $( ".strshwcs_block_content#strshwcs_content_" + tab_name ).offset().top - 80; 165 $( "html:not(:animated),body:not(:animated)" ).animate( { scrollTop: destination }, 800 ); 166 } 167 } ); 168 /* redirect from old structure */ 169 var anc = window.location.hash.replace( '#', '' ); 170 if ( anc != "" ) { 171 if ( anc == 'purchase' ) { 172 anc = 'buy'; 173 } 174 if ( $( '.strshwcs-info #strshwcs_sections span.section-' + anc ).length > 0 ) { 175 var new_url = $( '.strshwcs-info #strshwcs_sections span.section-' + anc ).find( 'a' ).attr( 'href' ) + window.location.search; 176 $( '.strshwcs-info #strshwcs_sections span' ).removeClass( 'current' ); 177 $( '.strshwcs-info #strshwcs_sections span.section-' + anc ).addClass( 'current' ); 178 $( ".strshwcs_block_content" ).addClass( 'strshwcs_hidden' ); 179 $( ".strshwcs_block_content#strshwcs_content_" + anc ).removeClass( 'strshwcs_hidden' ); 180 history.replaceState( null, null, new_url ); 181 } 182 } 183 184 /*================================================== New Site =======================================================================================*/ 185 186 /*---------------- Main Menu ---------------------------------*/ 187 $( '#bstwbst_touch_menu_hover li:has(ul)' ).doubleTapToGo(); 188 189 var count = 0; 190 $( '#main_menu > li' ).each( function() { 191 count++; 192 if ( count >= 5 ) { 193 $( this ).addClass( 'menu-item-hidden-sub' ); 194 } 195 }); 196 $( '#main_menu > li.menu-item-hidden-sub' ).wrapAll( '<li class="menu-item-hidden"></li>' ).wrapAll( '<ul class="sub-menu-hidden"></ul>' ); 197 $( '#main_menu > .menu-item-hidden' ).prepend( '<i class="fa fa-circle"></i><i class="fa fa-circle"></i><i class="fa fa-circle"></i>' ); 198 $( '.fa-circle' ).on( 'click touchstart', function() { 199 $( this ).siblings( ".sub-menu-hidden" ).slideToggle( 0 ); 200 return false; 201 }); 202 203 $( this ).on( 'click touchstart', function( event ) { 204 205 if ( $( '.sub-menu-hidden' ).is( ':visible' ) && ! $( event.target ).closest( ".sub-menu-hidden" ).length ) { 206 $( ".sub-menu-hidden" ).slideUp( 0 ); 207 } 208 209 if ( $( '#bstwbst_site_mobile_navigation_header' ).hasClass( 'collapse' ) && 210 ! $( event.target ).closest( '#bstwbst_site_mobile_navigation_header' ).length && 211 ! $( event.target ).closest( '.navbar-toggle' ).length ) { 212 213 $( '#bstwbst_site_mobile_navigation_header' ).collapse( 'hide' ); 214 } 215 216 if ( ! $( event.target ).closest( "#bstwbst_dropdown_menu" ).length && 217 ! $( event.target ).closest( ".bstwbst-cart" ).length ) { 218 $( '#wrapper, #footer, #header .navbar' ).removeClass( 'navbar-open-right' ); 219 } 220 }); 221 /*---------------- End Main Menu -----------------------------*/ 222 } ); 223} ) ( 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.