/**
 * Ce module permet d'ajouter dynamiquement des règles CSS en Javascript. 
 */


/* inspired by http://code.google.com/p/doctype/wiki/ArticleInstallStyles */


var cssrule = (function($, document, undefined) {
	var stylesheet;
	
	var possibleprops = "cssText,innerText,innerHTML".split(",");
	var propToSet;
	
	var init = function() {
		if (document.createStyleSheet) {
			// in IE
			stylesheet = document.createStyleSheet();
		} else {
			stylesheet = $("<style type='text/css' id='cssrule'></style>").get(0);
			$("head").append(stylesheet);
		}

		var i, cur;
		for (i = 0; i < possibleprops.length; i++) {
			cur = possibleprops[i];
			if (stylesheet[cur] !== undefined) {
				propToSet = cur;
				break;
			}
		}
	};
	
	var add = function(style) {
		stylesheet[propToSet] += style;
		return cssrule;
	};
	
	return {
		init: init,
		add: add
	};
})(jQuery, document);
@@ -1,91 +1,389 @@
 /*
-*
+!
 %0A * C
-e module permet d'ajouter dynamiquement des r%C3%A8gles CSS en Javascript. %0A */%0A%0A%0A/*
+opyright 2011 France T%C3%A9l%C3%A9com%0A * This software is distributed under the terms of either the MIT%0A * License or the GNU General Public License (GPL) Version 2 or later.%0A * See licence.txt file for more details.%0A */%0A %0A/* cssrule.js%0A * Version : 1%0A * %0A * Authors: Julien Wajsberg %3Cjulien.wajsberg@orange.com%3E%0A * %0A * This module can insert CSS rules in a cross-browser way.%0A * It was
  ins
@@ -449,17 +449,20 @@
 llStyles
- 
+%0A *%0A
 */%0A%0A%0Avar
@@ -1170,8 +1170,9 @@
 cument);
+%0A

add licence text at the beginning of the file