jQuery.preloadCssImages = function(){var sheets = document.styleSheets,styles = [],imgs   = [],hrefs  = [],url    = '/';if (!sheets) return;jQuery(sheets).each(function(){var mediaText = typeof this.media.mediaText !== 'undefined' ? this.media.mediaText : this.media;if( mediaText.indexOf('screen') == -1 ) return 0;feedStylesArray( this );});if(hrefs.length){hrefs = removeDuplicates(hrefs);url = hrefs[0].split('/');url.pop();url = url.join('/') || window.location.href;if ( url.charAt(url.length - 1) !== '/' ) url += '/';}if(styles.length){imgs = jQuery.grep( styles, function (rule) { return rule.match(/(gif|jpg|jpeg|png)/g); });imgs = imgs.join(',');imgs = imgs.match(/[^\(("|')?]+\.(gif|jpg|jpeg|png)/g);imgs = jQuery.makeArray(imgs);imgs = removeDuplicates(imgs);}if(imgs.length){createImgObjects(imgs);}return;function feedStylesArray( styleSheet ){if ( styleSheet.href ) hrefs.push( styleSheet.href );if(typeof styleSheet.cssRules !== 'undefined' ){jQuery.each( styleSheet.cssRules,function(){if (this.type === 1) {styles.push( this.cssText );}else if (this.type === 3){feedStylesArray( this.styleSheet );}})}else{jQuery(styleSheet.rules).each(function(){if (this.style)styles.push( this.style.cssText.toLowerCase());});if(styleSheet.imports){jQuery(styleSheet.imports).each(function(){feedStylesArray(this);});}}}function removeDuplicates( array ) {var ret = [],done = {};try {for(var i = 0,length = array.length; i < length; i++){var id = array[i];if (!done[id]) {done[id] = true;ret.push(array[i]);}}}catch(e){ret = array;}return ret;}function createImgObjects( array ){jQuery(array).each(function(){var img = new Image();$(img).attr('src', (this=='/' || !!this.match('http://')) ? this : url+this );});}};
