/* LoadLib Designed and built by Zach Wise http://zachwise.com/ Extends LazyLoad */ /* * CodeKit Import * http://incident57.com/codekit/ ================================================== */ // @codekit-prepend "../Library/LazyLoad.js"; LoadLib = (function (doc) { var loaded = []; function isLoaded(url) { var i = 0, has_loaded = false; for (i = 0; i < loaded.length; i++) { if (loaded[i] == url) { has_loaded = true; } } if (has_loaded) { return true; } else { loaded.push(url); return false; } } return { css: function (urls, callback, obj, context) { if (!isLoaded(urls)) { LazyLoad.css(urls, callback, obj, context); } }, js: function (urls, callback, obj, context) { if (!isLoaded(urls)) { LazyLoad.js(urls, callback, obj, context); } } }; })(this.document);