/**
 * --------------------------------------------------------------------
 * jQuery-Plugin "preloadCssImages"
 * by Scott Jehl, scott@filamentgroup.com
 * http://www.filamentgroup.com
 * reference article: http://www.filamentgroup.com/lab/automated_image_preloading/
 * demo page: http://www.filamentgroup.com/examples/preloadImages/
 *
 * Copyright (c) 2008 Filament Group, Inc
 * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
 *
 * Version: 1.0, 31.05.2007
 * Changelog:
 * 	02.20.2008 initial Version 1.0
 * --------------------------------------------------------------------
 */
 
$.preloadCssImages=function(c){c=jQuery.extend({imgDir:"/images"},c);for(var a=document.styleSheets,d="",b=0;b<a.length;b++)if($.browser.msie)d+=document.styleSheets[b].cssText;else for(var g=document.styleSheets[b].cssRules,e=0;e<g.length;e++)d+=g[e].cssText;var f=[];a=d.match(/[^\/]+\.(gif|jpg|jpeg|png)/g);if(a!=null&&a.length>0&&a!=""){a=jQuery.makeArray(a);$(a).each(function(h){f[h]=new Image;f[h].src=c.imgDir+"/"+this})}return f};