jQuery.preloadCssImages=function(h){function l(){clearTimeout(n);if(c&&c.length&&c[g]){g++;if(h.statusTextEl){var a=c[g]?"Now Loading: <span>"+c[g].split("/")[c[g].split("/").length-1]:"Loading complete";jQuery(h.statusTextEl).html('<span class="numLoaded">'+g+'</span> of <span class="numTotal">'+c.length+'</span> loaded (<span class="percentLoaded">'+(g/c.length*100).toFixed(0)+'%</span>) <span class="currentImg">'+a+"</span></span>")}if(h.statusBarEl){a=jQuery(h.statusBarEl).width();jQuery(h.statusBarEl).css("background-position",
-(a-(a*g/c.length).toFixed(0))+"px 50%")}o()}}function o(){if(c&&c.length&&c[g]){var a=new Image;a.src=c[g];a.complete?l():jQuery(a).bind("error load onreadystatechange",l);n=setTimeout(l,h.errorDelay)}}function p(a,m){for(var q=false,k=[],r=[],i,d=a.length;d--;){var f="";if(m&&m[d])i=m[d];else{i=(a[d].href?a[d].href:"window.location.href").split("/");i.pop();if(i=i.join("/"))i+="/"}if(a[d].cssRules||a[d].rules){j=a[d].cssRules?a[d].cssRules:a[d].rules;for(var e=j.length;e--;)if(j[e].style&&j[e].style.cssText){var b=
j[e].style.cssText;if(b.toLowerCase().indexOf("url")!=-1)f+=b}else if(j[e].styleSheet){k.push(j[e].styleSheet);q=true}}if(f=f.match(/[^\("]+\.(gif|jpg|jpeg|png)/g))for(e=f.length;e--;){b=f[e].charAt(0)=="/"||f[e].match("://")?f[e]:i+f[e];jQuery.inArray(b,c)==-1&&c.push(b)}if(!q&&a[d].imports&&a[d].imports.length){f=0;for(e=a[d].imports.length;f<e;f++){b=a[d].imports[f].href;b=b.split("/");b.pop();if(b=b.join("/"))b+="/";b=b.charAt(0)=="/"||b.match("://")?b:i+b;r.push(b);k.push(a[d].imports[f])}}}if(k.length){p(k,
r);return false}for(a=h.simultaneousCacheLoading;a--;)setTimeout(o,a)}h=jQuery.extend({statusTextEl:null,statusBarEl:null,errorDelay:999,simultaneousCacheLoading:2},h);var g=0,c=[],j,n;p(document.styleSheets);return c};

