1/*! A fix for the iOS orientationchange zoom bug. 2 Script by @scottjehl, rebound by @wilto. 3 MIT / GPLv2 License. 4*/ 5;(function(e){function h(){r.setAttribute("content",o);u=true}function p(){r.setAttribute("content",s);u=false}function d(t){c=t.accelerationIncludingGravity;a=Math.abs(c.x);f=Math.abs(c.y);l=Math.abs(c.z);if((!e.orientation||e.orientation===180)&&(a>7||(l>6&&f<8||l<8&&f>6)&&a>5)){if(u){p()}}else if(!u){h()}}var t=navigator.userAgent;if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(t)&&t.indexOf("AppleWebKit")>-1)){return}var n=e.document;if(!n.querySelector){return}var r=n.querySelector("meta[name=viewport]"),i=r&&r.getAttribute("content"),s=i+",maximum-scale=1",o=i+",maximum-scale=10",u=true,a,f,l,c;if(!r){return}e.addEventListener("orientationchange",h,false);e.addEventListener("devicemotion",d,false)})(this) 6 7 8/** 9 * Functionality specific to the theme 10 * 11 */ 12;( function( $ ) { 13 14 var lightbox = WolfAjax.lightbox; 15 16 /* Add a class to be able to know that javascript is supported */ 17 $( 'html' ).addClass( 'js' ); 18 19 /** 20 * Repositions the window on jump-to-anchor to account for 21 * navbar height. 22 */ 23 var WolfAdjustAnchor = function() { 24 if ( window.location.hash ) 25 window.scrollBy( 0, -80 ); 26 }; 27 28 $( document ).on( 'ready', WolfAdjustAnchor ); 29 $( window ).on( 'hashchange', WolfAdjustAnchor ); 30 31 var html = $( 'html' ), 32 body = $( 'body' ), 33 page = $( '#page' ), 34 header = $( '#masthead' ), 35 footer = $( '#colophon' ), 36 helloBar = $( '#hello' ), 37 navbar = $( '#navbar' ), 38 topBar = $( '#top-bar' ), 39 navbarOffset = -1, 40 toolbarOffset = body.is( '.admin-bar' ) ? 28 : 0; 41 42 /** 43 * Displays the fixed navbar based on screen position. 44 */ 45 function stickyNav(posScroll){ 46 var marginTop = parseInt(page.css('marginTop')); 47 48 navbarOffset = topBar.height() + marginTop - toolbarOffset; 49 50 if ( posScroll >= navbarOffset && 767 < window.innerWidth ) 51 body.addClass( 'navbar-fixed' ); 52 else 53 body.removeClass( 'navbar-fixed' ); 54 } 55 56 57 /** 58 * Enables menu toggle for small screens. 59 */ 60 ( function() { 61 var nav = $( '#site-navigation' ), button, menu; 62 if ( ! nav ) 63 return; 64 65 button = nav.find( '.menu-toggle' ); 66 menu = nav.find( '.nav-menu' ); 67 if ( ! button ) 68 return; 69 70 // Hide button if menu is missing or empty. 71 if ( ! menu || ! menu.children().length ) { 72 button.hide(); 73 return; 74 } 75 76 $( '.menu-toggle' ).on( 'click', function() { 77 nav.toggleClass( 'toggled-on' ); 78 } ); 79 } )(); 80 81 82 /** 83 * Fluid Video (combined with CSS : tip by @grafikart_fr) 84 */ 85 var videoSelectors = [ 86 "iframe[src^='http://player.vimeo.com']", 87 "iframe[src^='http://www.youtube.com']", 88 "iframe[src^='http://www.kickstarter.com']", 89 "iframe[src^='http://www.screenr.com']", 90 "iframe[src^='http://www.blip.tv']", 91 "iframe[src^='http://www.dailymotion.com']", 92 "iframe[src^='http://www.viddler.com']", 93 "iframe[src^='http://www.qik.com']", 94 "iframe[src^='http://www.revision3.com']", 95 "iframe[src^='http://www.hulu.com']", 96 "iframe[src^='http://www.funnyordie.com']", 97 "iframe[src^='http://www.flickr.com']", 98 "embed[src^='http://v.wordpress.com']" 99 ]; 100 101 var allVideos = videoSelectors.join(','); 102 103 $( '#main, .widget' ).find( allVideos ).wrap('<div class="fluid-video" />'); 104 105 /** 106 * Shadow effect 107 */ 108 var imgEffect = $(".img-effect1, .img-effect2, .img-effect3, .img-effect4, .img-effect5, .img-effect6, .img-effect7, .img-effect8"); 109 110 if( imgEffect.length ){ 111 imgEffect.each(function(){ 112 var classEffect =$(this).attr('class').match(/img-effect(\d+)/)[1]; 113 $(this).wrap('<span class="shadow-effect effect' + classEffect +'" />'); 114 }); 115 } 116 117 118 /** 119 * Shadow Align 120 */ 121 $( '.shadow-effect' ).each(function(){ 122 123 if( $(this).find( 'img.alignleft' ).length ){ 124 $(this).addClass( 'shadow-alignleft' ); 125 } 126 127 if( $(this).find( 'img.alignright' ).length ){ 128 $(this).addClass( 'shadow-alignright' ); 129 } 130 131 }); 132 133 134 135 /** 136 * Lightbox 137 */ 138 if ( $.isFunction( $.swipebox ) && lightbox == 'swipebox' ) { 139 140 $(".lightbox").swipebox(); 141 142 }else if( $.isFunction( $.fancybox ) && lightbox == 'fancybox' ){ 143 144 $(".lightbox").attr( 'rel', 'gallery' ); 145 $(".lightbox").fancybox(); 146 } 147 148 /** 149 * Bottom Area 150 * If a google map is displayed, make it full width 151 */ 152 if( $( '.page-template-template-contact-php #bottom-holder .wolf-google-map' ).length || $( '.page-template-template-contact-php #bottom-holder iframe[src^="https://maps.google"]' ).length ){ 153 $( '#bottom-holder' ).css({ padding : 0 }); 154 $( '#bottom-holder .wrap' ).css({ 'overflow' : 'hidden', 'max-width' : '100%', width : '100%', height : $( '#bottom-holder iframe[src^="https://maps.google"]' ).height() }); 155 $( '#bottom-holder .wrap p' ).remove(); 156 } 157 158 159 /** 160 * Smooth anchor scroll 161 */ 162 $('.scroll').bind('click',function(event){ 163 var $anchor = $(this); 164 $('html, body').stop().animate({ 165 scrollTop: $($anchor.attr('href')).offset().top - toolbarOffset -55 166 }, 1E3, 'swing'); 167 event.preventDefault(); 168 }); 169 170 171 /** 172 * Back to the top link animation 173 */
174 function topLinkAnimation(posScroll){ 175 176 var scrollBottom = posScroll + $(window).height(); 177 178 if(posScroll >=550) 179 $('a#top-arrow').show(); 180 else 181 $('a#top-arrow').hide(); 182 183 if( scrollBottom >= footer.offset().top && 767 < window.innerWidth ) 184 $( 'a#top-arrow' ).css({ position : 'absolute', bottom : 80 + $('.site-info').height() }); 185 else 186 $( 'a#top-arrow' ).css({ position : 'fixed', bottom : 0 }); 187 } 188 189 /** 190 * Share Links Popup 191 */ 192 $(".share-link").click(function() { 193 var $this = $(this); 194 if( $this.data('popup') == true && 767 < window.innerWidth ){ 195 var url = $(this).attr("href"); 196 var height = $this.data('height') || 250; 197 var width = $this.data('width') || 500; 198 var popup = window.open(url,"null", "height=" + height + ",width=" + width + ", top=150, left=150"); 199 if (window.focus) { 200 popup.focus(); 201 } 202 return false; 203 } 204 }); 205 206 207 /** 208 * Scroll event 209 */ 210 $(window).scroll(function(){ 211 stickyNav($(window).scrollTop()); 212 topLinkAnimation($(window).scrollTop()); 213 }); 214 215 /** 216 * IE8 fix - Add "last-child" class 217 */ 218 $( '.ie8 #sidebar-footer .widget-area .widget:last-child, .ie8 .widget-area .widget:last-child' ).addClass( 'last-child' ); 219 220} )( jQuery ); 221 222jQuery(window).load(function(){ 223 224 var $ = jQuery; 225 226 if ( window.location.hash ) 227 window.scrollBy( 0, -100 ); 228 229 /** 230 * FlexSlider 231 */ 232 if ( $.isFunction( $.flexslider ) ) { 233 234 /* Gallery post format slider */ 235 $( '.format-gallery .flexslider' ).flexslider({ 236 controlNav: 'thumbnails', 237 animation: 'slide', 238 }); 239 240 /* Work gallery format slider */ 241 $( '.work-entry .flexslider' ).flexslider({ 242 animation: 'slide', 243 slideshow : true, 244 smoothHeight: true, 245 controlNav : true, 246 directionNav: true 247 }); 248 249 /* Post slider */ 250 $( '.post-slider .flexslider, .wolf-custom-slider .flexslider' ).flexslider({ 251 animation: 'slide', 252 slideshow : false, 253 smoothHeight: true, 254 controlNav : true, 255 directionNav: true 256 }); 257 258 } 259 260 261 /** 262 * Trick to customize the embed tweet width 263 */ 264 var tweet = $('.entry-content .twitter-tweet-rendered'); 265 if( tweet.length ){ 266 tweet.removeAttr( 'style' ); 267 tweet.animate({"opacity": 1}); 268 } 269 270});
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.