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/* FITVIDS.JS - Responsive video embeds */ 8/*-----------------------------------------------------------------------------------*/ 9/*global jQuery */ 10/*jshint browser:true */ 11/*! 12* FitVids 1.1 13* 14* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 15* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 16* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 17* 18*/ 19 20(function( $ ){ 21 22 "use strict"; 23 24 $.fn.fitVids = function( options ) { 25 var settings = { 26 customSelector: null 27 }; 28 29 if(!document.getElementById('fit-vids-style')) { 30 // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 31 var head = document.head || document.getElementsByTagName('head')[0]; 32 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%;}'; 33 var div = document.createElement('div'); 34 div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; 35 head.appendChild(div.childNodes[1]); 36 } 37 38 if ( options ) { 39 $.extend( settings, options ); 40 } 41 42 return this.each(function(){ 43 var selectors = [ 44 "iframe[src*='player.vimeo.com']", 45 "iframe[src*='youtube.com']", 46 "iframe[src*='youtube-nocookie.com']", 47 "iframe[src*='kickstarter.com'][src*='video.html']", 48 "object", 49 "embed" 50 ]; 51 52 if (settings.customSelector) { 53 selectors.push(settings.customSelector); 54 } 55 56 var $allVideos = $(this).find(selectors.join(',')); 57 $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 58 59 $allVideos.each(function(){ 60 var $this = $(this); 61 if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 62 var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 63 width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 64 aspectRatio = height / width; 65 if(!$this.attr('id')){ 66 var videoID = 'fitvid' + Math.floor(Math.random()*999999); 67 $this.attr('id', videoID); 68 } 69 $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 70 $this.removeAttr('height').removeAttr('width'); 71 }); 72 });
73 }; 74// Works with either jQuery or Zepto 75})( 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.