/*! cover-img - v1.0.0 - 2014-07-23
* https://github.com/johannesjo/cover-img
* Copyright (c) 2014 Johannes Millan; Licensed MIT */
!function(a){a||(a=jQuery),function(a,b){var c=function(a,b,c){var d;return function(){function e(){c||a.apply(f,g),d=null}var f=this,g=arguments;d?clearTimeout(d):c&&a.apply(f,g),d=setTimeout(e,b||100)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}}(jQuery,"smartresize"),function(a){var b=function(b,c){var d=this;this.$el=a(b),this.options=c,this.$parent=this.$el.parent(),this.setStyles(),this.setParentStyles(),a("").attr("src",this.$el.attr("src")).load(function(){d.real_width=this.width,d.real_height=this.height,a(window).trigger("resize")}),a(window).smartresize(function(){d.resizeToCover()})};b.prototype.setStyles=function(){var a=this.$el.css("position"),b=this.$el.css("max-width"),c=this.$el.css("max-height");"relative"!==a&&"absolute"!==a&&this.$el.css("position","relative"),"none"!==b&&this.$el.css("max-width","none"),"none"!==c&&this.$el.css("max-height","none")},b.prototype.handleTableCells=function(){this.$parent.css("position","relative"),this.$el.wrap('