1 2 3 4 5// Adds a class 'js_on' to the <html> tag if JavaScript is enabled, 6 7// also helps remove flickering... 8 9document.documentElement.className += ' js_on '; 10 11 12 13// Quick script to detect some more popular mobile devices 14 15var detectedDeviceAgent = navigator.userAgent.toLowerCase(); 16 17var detectedAgentID = detectedDeviceAgent.match(/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/); 18 19if (detectedAgentID) { document.body.className += ' mobile-detected'; } 20 21 22 23 24 25 26 27// Cufon Related Script 28 29jQuery(function($){ 30 31 if( $('body').hasClass('cufon-on') ) { 32 33 // Add Cufon fonts 34 35 Cufon.replace('#slogan'); 36 37 Cufon.replace('h1'); 38 39 Cufon.replace('h2:not(.slide-desc h2)'); 40 41 Cufon.replace('h3:not(.twtr-widget, .slide-desc h2, .accordion-toggle)'); 42 43 Cufon.replace('h4:not(.twtr-widget, #bottom .latest_posts h4)'); 44 45 Cufon.replace('h5'); 46 47 Cufon.replace('h6'); 48 49 Cufon.replace('#page-content #page-title h2'); 50 51 Cufon.replace('.single-post-categories'); 52 53 } 54 55}); 56 57 58 59// Signup Button 60 61jQuery(document).ready(function($){ 62 63 $('p.signup-button a') 64 65 .css({'backgroundPosition': '0 0'}) 66 67 .hover(function(){ 68 69 $(this).stop() 70 71 .animate({ 72 73 'opacity': 0 74 75 }, 650); 76 77 }, 78 79 function(){ 80 81 $(this).stop() 82 83 .animate({ 84 85 'opacity': 1 86 87 }, 650); 88 89 } 90 91 ); 92 93}); 94 95 96 97// Smooth scrolling related scripts 98 99jQuery(document).ready(function($) { 100 101 102 103 /*yohanndev place une lighttbox pour le produit ACQUISITION DE DONNEE, uniquement!!*/ 104 105 $(".fancybox_iframe").fancybox({ 106 107 maxWidth : 1060, 108 109 maxHeight : 600, 110 111 fitToView : false, 112 113 width : '100%', 114 115 height : '800px', 116 117 autoSize : true, 118 119 closeClick : false, 120 121 openEffect : 'none', 122 123 closeEffect : 'none' 124 125 }); 126 127 $( ".cat-item-1086" ).hide(); 128 129 130 131 $(".cat-item-1018 a").attr("data-fancybox-type","iframe"); 132 133 $(".cat-item-1018 a").removeAttr("href"); 134 135 $(".cat-item-1018 a").attr("href","http://www.icpdas.com/root/product/solutions/solutions.php"); 136 137 $(".cat-item-1018 a").addClass("fancybox_iframe"); 138 139 140 $(".cat-item-1015 a").attr("data-fancybox-type","iframe"); 141 142 $(".cat-item-1015 a").removeAttr("href"); 143 144 $(".cat-item-1015 a").attr("href","http://www.ewinsonic.com/New/"); 145 146 $(".cat-item-1015 a").addClass("fancybox_iframe"); 147 148 149 $(".cat-item-1001540").attr("data-fancybox-type","iframe"); 150 151 $(".cat-item-1001540").removeAttr("href"); 152 153 $(".cat-item-1001540").attr("href","http://www.perfectron.com"); 154 155 $(".cat-item-1001540").addClass("fancybox_iframe"); 156 157 158 $(".cat-item-1243").attr("data-fancybox-type","iframe"); 159 160 $(".cat-item-1243").removeAttr("href"); 161 162 $(".cat-item-1243").attr("href","http://www.solidatassd.com/"); 163 164 $(".cat-item-1243").addClass("fancybox_iframe"); 165 166 167 $(".post-1104444").attr("data-fancybox-type","iframe"); 168 169 $(".post-1104444").removeAttr("href"); 170 171 $(".post-1104444").attr("href","http://www.perfectron.com"); 172 173 $(".post-1104444").addClass("fancybox_iframe"); 174 175 176 177 $(".cat-item-1001546").attr("data-fancybox-type","iframe"); 178 179 $(".cat-item-1001546").removeAttr("href"); 180 181 $(".cat-item-1001546").attr("href","http://www.aplextec.com/en/home.php"); 182 183 $(".cat-item-1001546").addClass("fancybox_iframe"); 184 185 186 $(".post-1105040").attr("data-fancybox-type","iframe"); 187 188 $(".post-1105040").removeAttr("href"); 189 190 $(".post-1105040").attr("href","http://www.aplextec.com/en/home.php"); 191 192 $(".post-1105040").addClass("fancybox_iframe"); 193 194 195 196 $(".cat-item-1001547").attr("data-fancybox-type","iframe"); 197 198 $(".cat-item-1001547").removeAttr("href"); 199 200 $(".cat-item-1001547").attr("href","http://www.kingdy.biz/product-all.html"); 201 202 $(".cat-item-1001547").addClass("fancybox_iframe"); 203 204 205 206 $(".post-1105041").attr("data-fancybox-type","iframe"); 207 208 $(".post-1105041").removeAttr("href"); 209 210 $(".post-1105041").attr("href","http://www.kingdy.biz/product-all.html"); 211 212 $(".post-1105041").addClass("fancybox_iframe"); 213 214 /**EV On peut en ajouter autant qu'on veut**/ 215 216 217 218 219 220 221 222 223 224 // "Back to Top" smooth scrolling 225 226 $('a[href=#top]').click(function(){ 227 228 $('html, body').animate({scrollTop:0}, 'slow'); 229 230 return false; // returning 'false' will prevent hashtag being added to URL 231 232 }); 233 234 235 236 // Smooth page scrolling to an anchor on the same page 237 238 if (udesign_script_vars.disable_smooth_scrolling_on_pages != 'yes') { 239 240 $('a[href*=#]:not([href=#], a.vc-carousel-control, a.vc_carousel-control, .wpb_tabs_nav a, a.acomment-reply.bp-primary-action)').click(function() { 241
242 if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 243 244 // determine if the scroll-to target position should be offset (ex. if "Stay-on-Top" menu, "Admin Bar", etc.) 245 246 var offsetElement = 0; 247 248 if ($('body').hasClass('u-design-fixed-menu-on')) { offsetElement = 40; } 249 250 if ($('body').hasClass('admin-bar')) { offsetElement += 32; } 251 252 253 254 var target = $(this.hash); 255 256 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 257 258 if (target.length) { 259 260 $('html,body').animate({ 261 262 scrollTop: target.offset().top - offsetElement 263 264 }, 1000); 265 266 // if anchor is pointing to any "Tabs" then keep the hash "tab-..." else remove the hash 267 268 if ( this.hash.slice(1,5) === "tab-" ) { 269 270 return true; // add the hashtag to URL 271 272 } else { 273 274 return false; // remove hashtag from URL 275 276 } 277 278 } 279 280 } 281 282 }); 283 284 } 285 286}); 287 288 289 290// Menu Related Scripts 291 292jQuery(document).ready(function($){ 293 294 var showAutoArrows = ( $('body').hasClass('u-design-menu-auto-arrows-on') ) ? 1 : 0; 295 296 $("ul.sf-menu").supersubs({ 297 298 minWidth: 12, // minimum width of sub-menus in em units 299 300 maxWidth: 15, // maximum width of sub-menus in em units 301 302 extraWidth: 1 // extra width can ensure lines don't sometimes turn over 303 304 // due to slight rounding differences and font-family 305 306 }).superfish({ 307 308 hoverClass: 'sfHover', // the class applied to hovered list items 309 310 delay: 700, // the delay in milliseconds that the mouse can remain outside a submenu without it closing 311 312 animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation 313 314 speed: 'normal', 315 316 cssArrows: showAutoArrows 317 318 }); 319 320 321 322 // Fixed Menu 323 324 var allowFixedMenuOnMobile = true; 325 326 if ($("body").hasClass( "mobile-detected" ) && udesign_script_vars.remove_fixed_menu_on_mobile == 'yes') { 327 328 allowFixedMenuOnMobile = false; 329 330 } 331 332 if ($('body').hasClass('u-design-fixed-menu-on') && allowFixedMenuOnMobile) { 333 334 var distanceToMainMenu = $('#top-elements').height(); 335 336 $(window).scroll(function() { 337 338 if ($(this).scrollTop() > distanceToMainMenu) { 339 340 $('#sticky-menu-alias').css({ 341 342 'display':'block', 343 344 'height': distanceToMainMenu + $('#main-menu').height() 345 346 }); 347 348 $('body').addClass('fixed-menu'); 349 350 } else { 351 352 $('body').removeClass('fixed-menu'); 353 354 $('#sticky-menu-alias').css('display', 'none'); 355 356 } 357 358 }); 359 360 } 361 362}); 363 364 365 366/** 367 368 * CoolInput Plugin 369 370 * 371 372 * @version 1.5 (10/09/2009) 373 374 * @requires jQuery v1.2.6+ 375 376 * @author Alex Weber <alexweber.com.br> 377 378 * @author Evan Winslow <[email protected]> (v1.5) 379 380 * @copyright Copyright (c) 2008-2009, Alex Weber 381 382 * @see http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/ 383 384 * 385 386 * Distributed under the terms of the GNU General Public License 387 388 * http://www.gnu.org/licenses/gpl-3.0.html 389 390 */ 391 392jQuery(document).ready(function($){ 393 394 $.fn.coolinput=function(b){ 395 396 var c={ 397 398 hint:null, 399 400 source:"value", 401 402 blurClass:"blur", 403 404 iconClass:false, 405 406 clearOnSubmit:true, 407 408 clearOnFocus:true, 409 410 persistent:true 411 412 };if(b&&typeof b=="object") 413 414 $.extend(c,b);else 415 416 c.hint=b;return this.each(function(){ 417 418 var d=$(this);var e=c.hint||d.attr(c.source);var f=c.blurClass;function g(){ 419 420 if(d.val()=="") 421 422 d.val(e).addClass(f) 423 424 } 425 426 function h(){ 427 428 if(d.val()==e&&d.hasClass(f)) 429 430 d.val("").removeClass(f) 431 432 } 433 434 if(e){ 435 436 if(c.persistent) 437 438 d.blur(g);if(c.clearOnFocus) 439 440 d.focus(h);if(c.clearOnSubmit) 441 442 d.parents("form:first").submit(h);if(c.iconClass) 443 444 d.addClass(c.iconClass);g() 445 446 } 447 448 }) 449 450 } 451 452}); 453 454jQuery(document).ready(function($){ 455 456 // first input box is a search box, notice passing of a custom class and an icon to the coolInput function 457 458 $('#search_field').coolinput({ 459 460 blurClass: 'blur' 461 462 }); 463 464 465 466 // add placeholder attribute to the default Search widget form 467 468 $(".widget_search input#s").attr("placeholder", udesign_script_vars.search_widget_placeholder); 469 470 $(".widget_search input#searchsubmit").val(''); // remove default value "Search" 471 472}); 473 474 475 476 477 478// ThumbCaption script 479 480jQuery(document).ready(function($){ 481 482 $(".portfolio-img-thumb-1-col, .portfolio-img-thumb-2-col, .portfolio-img-thumb-3-col, .portfolio-img-thumb-4-col").hover(function(){ 483 484 var info=$(this).find(".hover-opacity"); 485 486 info.stop().animate({opacity:0.4},600); 487 488 }, 489 490 function(){ 491 492 var info=$(this).find(".hover-opacity"); 493 494 info.stop().animate({opacity:1},800); 495 496 }); 497 498 499 500 $(".post-image").hover(function(){ 501 502 var info=$(this).find(".hover-opacity"); 503 504 info.stop().animate({opacity:0.6},400); 505 506 }, 507 508 function(){ 509 510 var info=$(this).find(".hover-opacity"); 511 512 info.stop().animate({opacity:1},600); 513 514 }); 515 516}); 517 518 519 520// jQuery Validate 521 522jQuery(document).ready(function($){ 523 524 if( $('body').hasClass('page-template-page-Contact-php') ) { 525 526 // load js translated strings only when Contact page template is loaded 527 528 $("#contactForm").validate({ 529 530 rules: { 531 532 contact_name: { 533 534 required: true, 535 536 minlength: 2 537 538 }, 539 540 contact_email: { 541 542 required: true, 543 544 email: true 545 546 }, 547 548 contact_message: $('input#rules_contact_message').val() 549 550 }, 551 552 messages: { 553 554 contact_name: { 555 556 required: $('input#contact_name_required').val(), 557 558 minlength: $('input#contact_name_min_length').val() 559 560 }, 561 562 contact_email: $('input#messages_contact_email').val(), 563 564 contact_message: $('input#messages_contact_message').val() 565 566 } 567 568 }); 569 570 // phone number + extension format validator 571 572 $("#contact_phone_NA_format").mask("(999) 999-9999"); 573 574 $("#contact_ext_NA_format").mask("? 99999"); 575 576 } 577 578}); 579 580 581 582 583 584// Content Toggle 585 586jQuery(function($){ 587 588 // Initial state of toggle (hide) 589 590 $(".slide_toggle_content").hide(); 591 592 // Process Toggle click (http://api.jquery.com/toggle/) 593 594 $("h4.slide_toggle").toggle(function(){ 595 596 $(this).addClass("clicked"); 597 598 }, function () { 599 600 $(this).removeClass("clicked"); 601 602 }); 603 604 // Toggle animation (http://api.jquery.com/slideToggle/) 605
606 $("h4.slide_toggle").click(function(){ 607 608 $(this).next(".slide_toggle_content").slideToggle(); 609 610 }); 611 612}); 613 614 615 616// Content Accordion 617 618jQuery(document).ready(function($){ 619 620 $('.accordion-container').hide(); 621 622 $('.accordion-toggle:first').addClass('active').next().show(); 623 624 $('.accordion-toggle').click(function(){ 625 626 if( $(this).next().is(':hidden') ) { 627 628 $('.accordion-toggle').removeClass('active').next().slideUp(); 629 630 $(this).toggleClass('active').next().slideDown(); 631 632 } 633 634 return false; // Prevent the browser jump to the link anchor 635 636 }); 637 638}); 639 640 641 642//Page Peel 643 644jQuery(document).ready(function($){ 645 646 $("#page-peel").hover(function() { 647 648 $("#page-peel img, .msg_block").stop() 649 650 .animate({width: '307px', height: '319px'}, 500); 651 652 }, function() { 653 654 $("#page-peel img").stop() 655 656 .animate({width: '50px', height: '52px'}, 220); 657 658 $(".msg_block").stop() 659 660 .animate({width: '50px', height: '50px'}, 200); 661 662 }); 663 664}); 665 666 667 668// remove the title attributes from the main menu and Subpages Widget 669 670jQuery(document).ready(function($) { 671 672 // remove 'title' attribute from menu items 673 674 $("#navigation-menu a, .widget_subpages a").removeAttr("title"); 675 676 // Add the 'default' cursor when hover to menu link that have no links 677 678 $('#navigation-menu a').each(function() { 679 680 if ( !$(this).attr("href") ) { 681 682 $(this).addClass("default-cursor"); 683 684 } 685 686 }); 687 688}); 689 690 691 692// Tabs 693 694jQuery(document).ready(function($){ 695 696 $('.tabs a').click(function(){ 697 698 // Switch the tabs 699 700 switch_tabs($(this)); 701 702 // Add URL hash to clicked tab without page jump 703 704 if(history.pushState) { 705 706 history.pushState(null, null, '#'+$(this).attr('id')); 707 708 } else { // fall back for older browsers 709 710 window.location.hash = "tabs"; 711 712 } 713 714 }); 715 716 switch_tabs($('.defaulttab')); 717 718 function switch_tabs(obj) { 719 720 $('.tabs-wrapper .tab-content').hide(); 721 722 $('.tabs-wrapper .tabs a').removeClass("selected"); 723 724 var id = obj.attr("id"); 725 726 $('#'+id+'-content').show(); 727 728 obj.addClass("selected"); 729 730 } 731 732 // The following allows to link with hashtag to a specific tab when the hashtag has been changed 733 734 $(window).bind( 'hashchange', function(e) { 735 736 // Grabs the hash tag from the url 737 738 var hash = window.location.hash.substring(1); 739 740 741 742 // Checks whether a hash tag is set and if it matches any of the tab id's 743 744 if ( hash != "" && $('.tabs a[id$="'+hash+'"]' ).attr('id') ) { 745 746 // Removes all 'selected' classes from tabs 747 748 $('.tabs a').each(function() { 749 750 $(this).removeClass('selected'); 751 752 }); 753 754 // This will add the 'selected' class to the matched tab 755 756 var link = ""; 757 758 $('.tabs a').each(function() { 759 760 link = $(this).attr('id'); 761 762 if (link == hash) { 763 764 $(this).addClass('selected'); 765 766 } 767 768 }); 769 770 // Take care of the content part of each tab accordingly 771 772 $('.tabs-wrapper .tab-content').each(function() { 773 774 link = $(this).attr('id'); 775 776 if (link == hash+'-content') { 777 778 $(this).css({ 779 780 "display":"block" 781 782 }); 783 784 } else { 785 786 $(this).css({ 787 788 "display":"none" 789 790 }); 791 792 } 793 794 }); 795 796 } 797 798 }); 799 800 $(window).trigger( 'hashchange' ); 801 802}); 803 804 805 806// Takes care of multiple WP galleries with prettyPhoto in a single page/post 807 808jQuery(document).ready(function($) { 809 810 $('.gallery').each(function(g) { 811 812 $(".gallery-item a[rel*='wp-prettyPhoto[gallery]']", this).each(function() { 813 814 $(this).attr('rel', function() { 815 816 return this.rel.replace('wp-prettyPhoto[gallery]', 'wp-prettyPhoto[gallery-' + g + ']'); 817 818 }); 819 820 }); 821 822 }); 823 824}); 825 826 827
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.