1/*-----------------------------------------------------------------------------------*/ 2/* Responsive menus */ 3/*-----------------------------------------------------------------------------------*/ 4(function(a){var b=0;a.fn.mobileMenu=function(c){function m(a){if(f()&&!g(a)){l(a)}else if(f()&&g(a)){j(a)}else if(!f()&&g(a)){k(a)}}function l(b){if(e(b)){var c='<select id="mobileMenu_'+b.attr("id")+'" class="mobileMenu">';c+='<option value="">'+d.topOptionText+"</option>";b.find("li").each(function(){var b="";var e=a(this).parents("ul, ol").length;for(i=1;i<e;i++){b+=d.indentString}var f=a(this).find("a:first-child").attr("href");var g=b+a(this).clone().children("ul, ol").remove().end().text();c+='<option value="'+f+'">'+g+"</option>"});c+="</select>";b.parent().append(c);a("#mobileMenu_"+b.attr("id")).change(function(){h(a(this))});j(b)}else{alert("mobileMenu will only work with UL or OL elements!")}}function k(b){b.css("display","");a("#mobileMenu_"+b.attr("id")).hide()}function j(b){b.hide("display","none");a("#mobileMenu_"+b.attr("id")).show()}function h(a){if(a.val()!==null){document.location.href=a.val()}}function g(c){if(c.attr("id")){return a("#mobileMenu_"+c.attr("id")).length>0}else{b++;c.attr("id","mm"+b);return a("#mobileMenu_mm"+b).length>0}}function f(){return a(window).width()<d.switchWidth}function e(a){return a.is("ul, ol")}var d={switchWidth:768,topOptionText:"Select a page",indentString:"Â Â Â "};return this.each(function(){if(c){a.extend(d,c)}var b=a(this);a(window).resize(function(){m(b)});m(b)})}})(jQuery); 5 6/*-----------------------------------------------------------------------------------*/ 7/* Double Tap to Go */ 8/*-----------------------------------------------------------------------------------*/ 9 10;(function( $, window, document, undefined ) 11{ 12 $.fn.doubleTapToGo = function( params ) 13 { 14 if( !( 'ontouchstart' in window ) && 15 !window.navigator.msPointerEnabled && 16 !navigator.userAgent.toLowerCase().match( /windows phone/i ) ) return false; 17 18 this.each( function() 19 { 20 var curItem = false; 21 22 $( this ).on( 'click', function( e ) 23 { 24 var item = $( this ); 25 if( item[ 0 ] != curItem[ 0 ] ) 26 { 27 e.preventDefault(); 28 curItem = item; 29 } 30 }); 31 32 $( document ).on( 'click touchstart MSPointerDown', function( e ) 33 { 34 var resetItem = true, 35 parents = $( e.target ).parents(); 36 37 for( var i = 0; i < parents.length; i++ ) 38 if( parents[ i ] == curItem[ 0 ] ) 39 resetItem = false; 40 41 if( resetItem ) 42 curItem = false; 43 }); 44 }); 45 return this; 46 }; 47})( jQuery, window, document ); 48 49/*-----------------------------------------------------------------------------------*/ 50/* FITVIDS.JS - Responsive video embeds */ 51/*-----------------------------------------------------------------------------------*/ 52/*global jQuery */ 53/*jshint browser:true */ 54/*! 55* FitVids 1.1 56* 57* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 58* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 59* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 60* 61*/ 62 63(function( $ ){ 64 65 "use strict"; 66 67 $.fn.fitVids = function( options ) { 68 var settings = { 69 customSelector: null 70 }; 71 72 if(!document.getElementById('fit-vids-style')) { 73 // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 74 var head = document.head || document.getElementsByTagName('head')[0]; 75 var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 76 var div = document.createElement('div'); 77 div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; 78 head.appendChild(div.childNodes[1]); 79 } 80 81 if ( options ) { 82 $.extend( settings, options ); 83 } 84 85 return this.each(function(){ 86 var selectors = [ 87 "iframe[src*='player.vimeo.com']", 88 "iframe[src*='youtube.com']", 89 "iframe[src*='youtube-nocookie.com']", 90 "iframe[src*='kickstarter.com'][src*='video.html']", 91 "object", 92 "embed" 93 ]; 94 95 if (settings.customSelector) { 96 selectors.push(settings.customSelector); 97 } 98 99 var $allVideos = $(this).find(selectors.join(',')); 100 $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 101 102 $allVideos.each(function(){ 103 var $this = $(this); 104 if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 105 var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 106 width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 107 aspectRatio = height / width; 108 if(!$this.attr('id')){ 109 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 110 $this.attr('id', videoID); 111 } 112 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 113 $this.removeAttr('height').removeAttr('width'); 114 }); 115 });
116 }; 117// Works with either jQuery or Zepto 118})( window.jQuery || window.Zepto );
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.