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/*! 11* FitVids 1.0 12* 13* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 14* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 15* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 16* 17* Date: Thu Sept 01 18:00:00 2011 -0500 18*/ 19 20(function( $ ){ 21 22 $.fn.fitVids = function( options ) { 23 var settings = { 24 customSelector: null 25 } 26 27 var div = document.createElement('div'), 28 ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; 29 30 div.className = 'fit-vids-style'; 31 div.innerHTML = '­<style> \ 32 .fluid-width-video-wrapper { \ 33 width: 100%; \ 34 position: relative; \ 35 padding: 0; \ 36 } \ 37 \ 38 .fluid-width-video-wrapper iframe, \ 39 .fluid-width-video-wrapper object, \ 40 .fluid-width-video-wrapper embed { \ 41 position: absolute; \ 42 top: 0; \ 43 left: 0; \ 44 width: 100%; \ 45 height: 100%; \ 46 } \ 47 </style>'; 48 49 ref.parentNode.insertBefore(div,ref); 50 51 if ( options ) { 52 $.extend( settings, options ); 53 } 54 55 return this.each(function(){ 56 var selectors = [ 57 "iframe[src^='http://player.vimeo.com']", 58 "iframe[src^='http://www.youtube.com']", 59 "iframe[src^='http://www.kickstarter.com']", 60 "object", 61 "embed" 62 ]; 63 64 if (settings.customSelector) { 65 selectors.push(settings.customSelector); 66 } 67 68 var $allVideos = $(this).find(selectors.join(',')); 69 70 $allVideos.each(function(){ 71 var $this = $(this); 72 if (this.tagName.toLowerCase() == 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 73 var height = this.tagName.toLowerCase() == 'object' ? $this.attr('height') : $this.height(), 74 aspectRatio = height / $this.width(); 75 $this.wrap('<div class="fluid-width-video-wrapper" />').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 76 $this.removeAttr('height').removeAttr('width'); 77 }); 78 });
79 80 } 81})( 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.