var RevealAnything = window.RevealAnything || (function(){
	function parseJSON(str) {
	    var json;
	    try {
        	json = JSON.parse(str);
	    } catch (e) {
        	return null;
    		}
            return json;
	}

	/*
	* Recursively merge properties of two objects without overwriting the first
	*/
	function mergeRecursive(obj1, obj2) {

	  for (var p in obj2) {
	    try {
	      // Property in destination object set; update its value.
	      if ( obj2[p].constructor==Object ) {
	        obj1[p] = mergeRecursive(obj1[p], obj2[p]);
	
	      } else {
	        if ( !obj1[p] ) obj1[p] = obj2[p];
	
	      }
	
	    } catch(e) {
	      // Property in destination object not set; create it and set its value.
	      if ( !obj1[p] ) obj1[p] = obj2[p];
	
	    }
	  }
	
	  return obj1;
	}


	var config = Reveal.getConfig().anything;


	Reveal.addEventListener( 'ready', function( event ) {
		for (var i = 0; i < config.length; i++ ){
			// Get all elements of the class
			var elements = document.getElementsByClassName(config[i].className);
			var f = config[i].f;
			for (var j = 0; j < elements.length; j++ ){
				var comments = elements[j].innerHTML.trim().match(/<!--[\s\S]*?-->/g);
				if ( comments !== null ) for (var k = 0; k < comments.length; k++ ){
					comments[k] = comments[k].replace(/<!--/,'');
					comments[k] = comments[k].replace(/-->/,'');
					var options = parseJSON(comments[k]);
					if ( options ) {
						mergeRecursive( options, config[i].defaults);
//console.log(JSON.stringify(options))
						f(elements[j], options);
					}

				}
			} 
		}


	} );


})();



@@ -340,17 +340,16 @@
 obj2) %7B%0A
-%0A
 %09  for (
@@ -832,17 +832,16 @@
 thing;%0A%0A
-%0A
 %09Reveal.
@@ -1106,24 +1106,62 @@
 gth; j++ )%7B%0A
+%09%09%09%09var options = config%5Bi%5D.defaults;%0A
 %09%09%09%09var comm
@@ -1398,28 +1398,75 @@
 /,'');%0A%09%09%09%09%09
-var 
+mergeRecursive( options, config%5Bi%5D.defaults);%0A%09%09%09%09%09
 options = pa
@@ -1561,18 +1561,45 @@
 aults);%0A
+%09%09%09%09%09%09break;%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A
 //
+ 
 console.
@@ -1602,16 +1602,30 @@
 ole.log(
+%22Options: %22 + 
 JSON.str
@@ -1641,18 +1641,16 @@
 tions))%0A
-%09%09
 %09%09%09%09f(el
@@ -1674,21 +1674,45 @@
 s);%0A
-%09%09%09%09%09%7D%0A%0A%09%09%09%09%7D
+// console.log(elements%5Bj%5D.outerHTML)
 %0A%09%09%09

Allow empty JSON string