diff -r 10233337f6da -r 6a04bd37da0a src/js/utils.js --- a/src/js/utils.js Mon May 07 15:25:52 2012 +0200 +++ b/src/js/utils.js Thu May 10 18:48:09 2012 +0200 @@ -16,10 +16,21 @@ } } +IriSP._cssCache = []; + IriSP.loadCss = function(_cssFile) { - IriSP.jQuery("", { - rel : "stylesheet", - type : "text/css", - href : _cssFile - }).appendTo('head'); -} \ No newline at end of file + if (IriSP._(IriSP._cssCache).indexOf(_cssFile) === -1) { + IriSP.jQuery("", { + rel : "stylesheet", + type : "text/css", + href : _cssFile + }).appendTo('head'); + IriSP._cssCache.push(_cssFile); + } +} + +IriSP.log = function() { + if (typeof console !== "undefined" && typeof IriSP.logging !== "undefined" && IriSP.logging) { + console.log.apply(console, arguments); + } +}