Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ /** * jQuery Picture * http://jquerypicture.com * http://github.com/Abban/jQuery-Picture * * May 2012 * * @version 0.8 * @author Abban Dunne http://abandon.ie * @license MIT * * jQuery Picture is a plugin to add support for responsive images to your layouts. * It supports both figure elements with some custom data attributes and the new * proposed picture format. This plugin will be made redundant when the format is * approved and implemented by browsers. Lets hope that happens soon. In the meantime * this plugin will be kept up to date with latest developments. * */(function(a){a.fn.picture=function(b){this.each(function(){function g(f){if(f)if(e.get(0).tagName.toLowerCase()=="figure"){var g=e.data();a.each(g,function(a){var c;c=a.replace(/[^\d.]/g,"");c&&b.push(c)})}else e.find("source").each(function(){var c,d;c=a(this).attr("media");if(c){d=c.replace(/[^\d.]/g,"");b.push(d)}});var j=0;c=a(window).width();a.each(b,function(a,b){c>b&&j'):e.find("img").attr("src",b[d])}function i(){var b=new Object,c=e.data();a.each(c,function(a,c){var d;d=a.replace(/[^\d.]/g,"");d||(d=0);b[d]=c});e.find("img").length==0?e.prepend(''+e.attr('):e.find("img").attr("src",b[d])}var b=new Array,c,d,e,f;e=a(this);g(!0);f=!1;a(window).resize(function(){f!==!1&&clearTimeout(f);f=setTimeout(g,200)})})}})(jQuery);