From 93c3f6fafbef538f7ec5240a56d7fb9c33efe581 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Fri, 20 Feb 2015 13:03:25 -0500 Subject: [PATCH] Release Version 1.2.0 --- README.md | 14 +++++++------- bower.json | 2 +- featherlight.jquery.json | 2 +- gallery.html | 4 ++-- index.html | 4 ++-- package.json | 2 +- release/featherlight.gallery.min.css | 4 ++-- release/featherlight.gallery.min.js | 4 ++-- release/featherlight.min.css | 2 +- release/featherlight.min.js | 4 ++-- src/featherlight.css | 2 +- src/featherlight.gallery.css | 2 +- src/featherlight.gallery.js | 2 +- src/featherlight.js | 2 +- src/gallery.html | 2 +- src/index.html | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 34be7daf..e52b6390 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Featherlight - ultra slim jQuery lightbox [![Build Status](https://travis-ci.org * Customizable via configuration object -## [» Download Current Release 1.1.0](https://github.com/noelboss/featherlight/archive/1.1.0.zip) +## [» Download Current Release 1.2.0](https://github.com/noelboss/featherlight/archive/1.2.0.zip) Here you'll find a [list of all the changes](https://github.com/noelboss/featherlight/blob/master/CHANGELOG.md) and you can also download [old releases](https://github.com/noelboss/featherlight/releases) or [the master including all the latest bling](https://github.com/noelboss/featherlight/archive/master.zip). @@ -21,14 +21,14 @@ Here you'll find a [list of all the changes](https://github.com/noelboss/feather All styling is done using CSS so you'll want to include the Featherlight CSS in your head. - + Be aware that Featherlight uses very unspecific CSS selectors to help you overwrite every aspect. This means in turn, that if you're not following a modularized approach to write CSS (which you should! It's terrific!) and have many global and specific definitions (read ID's and such – which you shouldn't), these definitions can break the Featherlight styling. Featherlight requires jQuery version 1.7.0 or higher. It's recommended to include the javascript at the bottom of the page before the closing `` tag. - + # Usage @@ -398,14 +398,14 @@ Instead of navigation buttons it will use swipe events on touch devices, assumin Simply include the extension CSS and JavaScript Files after the regular featherlight files like this: - - + + Add the JavaScript at the bottom of the body: - - + + Check out the example here: [Gallery with Featherlight](http://noelboss.github.io/featherlight/gallery.html) diff --git a/bower.json b/bower.json index 7a5ef430..dfe01024 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "featherlight", - "version": "1.1.0", + "version": "1.2.0", "main": "release/featherlight.min.js", "license": "MIT", "ignore": [ diff --git a/featherlight.jquery.json b/featherlight.jquery.json index 6d2bdc27..be63ab8f 100644 --- a/featherlight.jquery.json +++ b/featherlight.jquery.json @@ -1,6 +1,6 @@ { "name": "featherlight", - "version": "1.1.0", + "version": "1.2.0", "title": "Featherlight – ultra slim jQuery lightbox", "author": { "name": "Noël Raoul Bossart", diff --git a/gallery.html b/gallery.html index 5843328e..3df88901 100644 --- a/gallery.html +++ b/gallery.html @@ -102,9 +102,9 @@

Featherlight.Gallery.js github - + - Download (1.1.0) + Download (1.2.0) diff --git a/index.html b/index.html index 3e325633..a2e0051e 100644 --- a/index.html +++ b/index.html @@ -65,9 +65,9 @@

Featherlight.js The ultra slim lightbox.

github - + - Download (1.1.0) + Download (1.2.0)
diff --git a/package.json b/package.json index 21d0f2a1..38c60f44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "title": "Featherlight \u2013 ultra slim jQuery lightbox", - "version": "1.1.0", + "version": "1.2.0", "author": { "name": "No\u00ebl Raoul Bossart", "url": "http://www.noelboss.com" diff --git a/release/featherlight.gallery.min.css b/release/featherlight.gallery.min.css index dbb5a331..f0f1adce 100644 --- a/release/featherlight.gallery.min.css +++ b/release/featherlight.gallery.min.css @@ -1,8 +1,8 @@ /** * Featherlight Gallery – an extension for the ultra slim jQuery lightbox - * Version 1.1.0 - http://noelboss.github.io/featherlight/ + * Version 1.2.0 - http://noelboss.github.io/featherlight/ * * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) * MIT Licensed. **/ -@media all{.featherlight-next,.featherlight-previous{display:block;position:absolute;top:25px;right:25px;bottom:0;left:80%;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:rgba(0,0,0,0)}.featherlight-previous{left:25px;right:80%}.featherlight-next:hover,.featherlight-previous:hover{background:rgba(255,255,255,.25)}.featherlight-next span,.featherlight-previous span{display:none;position:absolute;top:50%;left:5%;width:82%;text-align:center;font-size:80px;line-height:80px;margin-top:-40px;text-shadow:0 0 5px #fff;color:#fff;font-style:normal;font-weight:400}.featherlight-next span{right:5%;left:auto}.featherlight-next:hover span,.featherlight-previous:hover span{display:inline-block}}@media only screen and (max-device-width:1024px){.featherlight-next:hover,.featherlight-previous:hover{background:0 0}.featherlight-next span,.featherlight-previous span{display:block}}@media only screen and (max-width:1024px){.featherlight-next,.featherlight-previous{top:10px;right:10px;left:85%}.featherlight-previous{left:10px;right:85%}.featherlight-next span,.featherlight-previous span{margin-top:-30px;font-size:40px}} \ No newline at end of file +@media all{.featherlight-next,.featherlight-previous{display:block;position:absolute;top:25px;right:25px;bottom:0;left:80%;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:rgba(0,0,0,0)}.featherlight-previous{left:25px;right:80%}.featherlight-next:hover,.featherlight-previous:hover{background:rgba(255,255,255,.25)}.featherlight-next span,.featherlight-previous span{display:none;position:absolute;top:50%;left:5%;width:82%;text-align:center;font-size:80px;line-height:80px;margin-top:-40px;text-shadow:0 0 5px #fff;color:#fff;font-style:normal;font-weight:400}.featherlight-next span{right:5%;left:auto}.featherlight-next:hover span,.featherlight-previous:hover span{display:inline-block}.featherlight-loading .featherlight-next,.featherlight-loading .featherlight-previous{display:none}}@media only screen and (max-device-width:1024px){.featherlight-next:hover,.featherlight-previous:hover{background:0 0}.featherlight-next span,.featherlight-previous span{display:block}}@media only screen and (max-width:1024px){.featherlight-next,.featherlight-previous{top:10px;right:10px;left:85%}.featherlight-previous{left:10px;right:85%}.featherlight-next span,.featherlight-previous span{margin-top:-30px;font-size:40px}} \ No newline at end of file diff --git a/release/featherlight.gallery.min.js b/release/featherlight.gallery.min.js index da846ac5..882a1603 100644 --- a/release/featherlight.gallery.min.js +++ b/release/featherlight.gallery.min.js @@ -1,7 +1,7 @@ /** * Featherlight Gallery – an extension for the ultra slim jQuery lightbox - * Version 1.1.0 - http://noelboss.github.io/featherlight/ + * Version 1.2.0 - http://noelboss.github.io/featherlight/ * * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) * MIT Licensed. -**/!function(a){"use strict";function b(c,d){if(!(this instanceof b)){var e=new b(a.extend({$source:c,$currentTarget:c.first()},d));return e.open(),e}a.featherlight.apply(this,arguments),this.chainCallbacks(g)}if("undefined"==typeof a)return void("console"in window&&(window.console.info("Too much lightness, Featherlight needs jQuery."),"featherlight"in a||window.console.info("Load the featherlight plugin before the gallery plugin")));var c="ontouchstart"in document.documentElement,d=a.event&&a.event.special.swipeleft&&a,e="Hammer"in window&&function(){new window.Hammer(el[0])},f=c&&(d||e),g={afterClose:function(a,b){var c=this;return c.$instance.off("next."+c.namespace+" previous."+c.namespace),f&&(f(c.$instance).off("swipeleft",c._swipeleft),f(c.$instance).off("swiperight",c._swiperight)),a(b)},beforeOpen:function(a,b){var c=this;return c.$instance.on("next."+c.namespace+" previous."+c.namespace,function(a){var b="next"===a.type?1:-1;c.navigateTo(c.currentNavigation()+b)}),f?f(c.$instance).on("swipeleft",c._swipeleft=function(){c.$instance.trigger("next")}).on("swiperight",c._swiperight=function(){c.$instance.trigger("previous")}):c.$instance.find("."+c.namespace+"-content").append(c.createNavigation("previous")).append(c.createNavigation("next")),a(b)},onKeyUp:function(a,b){var c={37:"previous",39:"next"}[b.keyCode];return c?(this.$instance.trigger(c),!1):a(b)}};a.featherlight.extend(b,{autoBind:"[data-featherlight-gallery]"}),a.extend(b.prototype,{previousIcon:"◀",nextIcon:"▶",galleryFadeIn:100,galleryFadeOut:300,images:function(){return this.filter?this.$source.find(this.filter):this.$source},currentNavigation:function(){return this.images().index(this.$currentTarget)},navigateTo:function(b){var c=this,d=c.images(),e=d.length,f=c.$instance.find("."+c.namespace+"-inner");return b=(b%e+e)%e,c.$currentTarget=d.eq(b),c.beforeContent(),a.when(c.getContent(),f.fadeTo(c.galleryFadeOut,.2)).done(function(a){c.setContent(a),c.afterContent(),a.fadeTo(c.galleryFadeIn,1)})},createNavigation:function(b){var c=this;return a(''+this[b+"Icon"]+"").click(function(){a(this).trigger(b+"."+c.namespace)})}}),a.featherlightGallery=b,a.fn.featherlightGallery=function(a){return b.attach(this,a)},a(document).ready(function(){b._onReady()})}(jQuery); \ No newline at end of file +**/!function(a){"use strict";function b(c,d){if(!(this instanceof b)){var e=new b(a.extend({$source:c,$currentTarget:c.first()},d));return e.open(),e}a.featherlight.apply(this,arguments),this.chainCallbacks(g)}if("undefined"==typeof a)return void("console"in window&&(window.console.info("Too much lightness, Featherlight needs jQuery."),"featherlight"in a||window.console.info("Load the featherlight plugin before the gallery plugin")));var c="ontouchstart"in document.documentElement,d=a.event&&a.event.special.swipeleft&&a,e="Hammer"in window&&function(){new window.Hammer(el[0])},f=c&&(d||e),g={afterClose:function(a,b){var c=this;return c.$instance.off("next."+c.namespace+" previous."+c.namespace),f&&(f(c.$instance).off("swipeleft",c._swipeleft),f(c.$instance).off("swiperight",c._swiperight)),a(b)},beforeOpen:function(a,b){var c=this;return c.$instance.on("next."+c.namespace+" previous."+c.namespace,function(a){var b="next"===a.type?1:-1;c.navigateTo(c.currentNavigation()+b)}),f?f(c.$instance).on("swipeleft",c._swipeleft=function(){c.$instance.trigger("next")}).on("swiperight",c._swiperight=function(){c.$instance.trigger("previous")}):c.$instance.find("."+c.namespace+"-content").append(c.createNavigation("previous")).append(c.createNavigation("next")),a(b)},onKeyUp:function(a,b){var c={37:"previous",39:"next"}[b.keyCode];return c?(this.$instance.trigger(c),!1):a(b)}};a.featherlight.extend(b,{autoBind:"[data-featherlight-gallery]"}),a.extend(b.prototype,{previousIcon:"◀",nextIcon:"▶",galleryFadeIn:100,galleryFadeOut:300,images:function(){return this.filter?this.$source.find(this.filter):this.$source},currentNavigation:function(){return this.images().index(this.$currentTarget)},navigateTo:function(b){var c=this,d=c.images(),e=d.length,f=c.$instance.find("."+c.namespace+"-inner");return b=(b%e+e)%e,c.$currentTarget=d.eq(b),c.beforeContent(),a.when(c.getContent(),f.fadeTo(c.galleryFadeOut,.2)).always(function(a){c.setContent(a),c.afterContent(),a.fadeTo(c.galleryFadeIn,1)})},createNavigation:function(b){var c=this;return a(''+this[b+"Icon"]+"").click(function(){a(this).trigger(b+"."+c.namespace)})}}),a.featherlightGallery=b,a.fn.featherlightGallery=function(a){return b.attach(this,a)},a(document).ready(function(){b._onReady()})}(jQuery); \ No newline at end of file diff --git a/release/featherlight.min.css b/release/featherlight.min.css index d1b6dd94..c13086b4 100644 --- a/release/featherlight.min.css +++ b/release/featherlight.min.css @@ -1,6 +1,6 @@ /** * Featherlight - ultra slim jQuery lightbox - * Version 1.1.0 - http://noelboss.github.io/featherlight/ + * Version 1.2.0 - http://noelboss.github.io/featherlight/ * * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) * MIT Licensed. diff --git a/release/featherlight.min.js b/release/featherlight.min.js index 76c4fa6a..3dffcf50 100644 --- a/release/featherlight.min.js +++ b/release/featherlight.min.js @@ -1,8 +1,8 @@ /** * Featherlight - ultra slim jQuery lightbox - * Version 1.1.0 - http://noelboss.github.io/featherlight/ + * Version 1.2.0 - http://noelboss.github.io/featherlight/ * * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) * MIT Licensed. **/ -!function(a){"use strict";function b(a,c){if(!(this instanceof b)){var d=new b(a,c);return d.open(),d}this.id=b.id++,this.setup(a,c),this.chainCallbacks(b._callbackChain)}if("undefined"==typeof a)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));var c=[],d=function(b){return c=a.grep(c,function(a){return a!==b&&a.$instance.closest("body").length>0})},e={keyup:"onKeyUp",resize:"onResize"},f=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[e[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},g=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(e,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,f)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['
','
','',d.closeIcon,"",'
',"
","
"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(b.preventDefault(),d.close())}),this},getContent:function(){var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){var c=this;return(b.is("iframe")||a("iframe",b).length>0)&&c.$instance.addClass(c.namespace+"-iframe"),c.$content=b.addClass(c.namespace+"-inner"),c.$instance.find("."+c.namespace+"-inner").slice(1).remove().end().replaceWith(c.$content),c},open:function(b){var d=this;if(!(b&&b.isDefaultPrevented()||d.beforeOpen(b)===!1)){b&&b.preventDefault();var e=d.getContent();if(e)return c.push(d),g(!0),d.$instance.appendTo(d.root).fadeIn(d.openSpeed),d.beforeContent(b),a.when(e).done(function(c){d.setContent(c),d.afterContent(b),a.when(d.$instance.promise()).done(function(){d.afterOpen(b)})}),d}return!1},close:function(a){var b=this;return b.beforeClose(a)===!1?!1:(0===d(b).length&&g(!1),void b.$instance.fadeOut(b.closeSpeed,function(){b.$instance.detach(),b.afterClose(a)}))},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image;return e.onload=function(){var f=a('');f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject()},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("
").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},text:{process:function(b){return a("
",{text:b})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(b){var c=this,d={};return b&&b.attributes&&a.each(b.attributes,function(){var b=this.name.match(/^data-featherlight-(.*)/);if(b){var e=this.value,f=a.camelCase(b[1]);if(a.inArray(f,c.functionAttributes)>=0)e=new Function(e);else try{e=a.parseJSON(e)}catch(g){}d[f]=e}}),d},extend:function(b,c){var d=function(){this.constructor=b};return d.prototype=this.prototype,b.prototype=new d,b.__super__=this.prototype,a.extend(b,this,c),b.defaults=b.prototype,b},attach:function(b,c,d){var e=this;"object"!=typeof c||c instanceof a!=!1||d||(d=c,c=void 0),d=a.extend({},d);var f=a.extend({},e.defaults,e.readElementConfig(b[0]),d);return b.on(f.openTrigger+"."+f.namespace,f.filter,function(f){var g=a.extend({$source:b,$currentTarget:a(this)},e.readElementConfig(b[0]),e.readElementConfig(this),d);new e(c,g).open(f)}),b},current:function(){var a=this.opened();return a[a.length-1]||null},opened:function(){var b=this;return d(),a.grep(c,function(a){return a instanceof b})},close:function(){var a=this.current();a&&a.close()},_onReady:function(){var b=this;b.autoBind&&(b.attach(a(document),{filter:b.autoBind}),a(b.autoBind).filter("[data-featherlight-filter]").each(function(){b.attach(a(this))}))},_callbackChain:{onKeyUp:function(a,b){return 27===b.keyCode?(this.closeOnEsc&&this.$instance.find("."+this.namespace+"-close:first").click(),!1):a(b)},onResize:function(a,b){if(this.$content.naturalWidth){var c=this.$content.naturalWidth,d=this.$content.naturalHeight;this.$content.css("width","").css("height","");var e=Math.max(c/parseInt(this.$content.parent().css("width"),10),d/parseInt(this.$content.parent().css("height"),10));e>1&&this.$content.css("width",""+c/e+"px").css("height",""+d/e+"px")}return a(b)},afterContent:function(a,b){var c=a(b);return this.onResize(b),c}}}),a.featherlight=b,a.fn.featherlight=function(a,c){return b.attach(this,a,c)},a(document).ready(function(){b._onReady()})}(jQuery); \ No newline at end of file +!function(a){"use strict";function b(a,c){if(!(this instanceof b)){var d=new b(a,c);return d.open(),d}this.id=b.id++,this.setup(a,c),this.chainCallbacks(b._callbackChain)}if("undefined"==typeof a)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));var c=[],d=function(b){return c=a.grep(c,function(a){return a!==b&&a.$instance.closest("body").length>0})},e=function(a,b){var c={},d=new RegExp("^"+b+"([A-Z])(.*)");for(var e in a){var f=e.match(d);if(f){var g=(f[1]+f[2].replace(/([A-Z])/g,"-$1")).toLowerCase();c[g]=a[e]}}return c},f={keyup:"onKeyUp",resize:"onResize"},g=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[f[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},h=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(f,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,g)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['
','
','',d.closeIcon,"",'
'+d.loading+"
","
","
"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(b.preventDefault(),d.close())}),this},getContent:function(){var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){var c=this;return(b.is("iframe")||a("iframe",b).length>0)&&c.$instance.addClass(c.namespace+"-iframe"),c.$instance.removeClass(c.namespace+"-loading"),c.$instance.find("."+c.namespace+"-inner").slice(1).remove().end().replaceWith(a.contains(c.$instance[0],b[0])?"":b),c.$content=b.addClass(c.namespace+"-inner"),c},open:function(b){var d=this;if(!(b&&b.isDefaultPrevented()||d.beforeOpen(b)===!1)){b&&b.preventDefault();var e=d.getContent();if(e)return c.push(d),h(!0),d.$instance.appendTo(d.root).fadeIn(d.openSpeed),d.beforeContent(b),a.when(e).always(function(c){d.setContent(c),d.afterContent(b),a.when(d.$instance.promise()).done(function(){d.afterOpen(b)})}),d}return!1},close:function(a){var b=this;return b.beforeClose(a)===!1?!1:(0===d(b).length&&h(!1),void b.$instance.fadeOut(b.closeSpeed,function(){b.$instance.detach(),b.afterClose(a)}))},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('');return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("
").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var c=new a.Deferred,d=a("