/* 
 * jSonComments
 * Author:  Christoph Stickel <mixer2@gmail.com>
 * License: Released under MIT License
 * 
 */
 
(function(a){a.fn.jSonComments=function(c){var b=a.extend({},a.fn.jSonComments.defaults,c);if(!this.data(b.dataAttribute)||!b.cache)if(c=a(this).html().match(new RegExp("<!-- *"+b.keyword+"((.|\n|\r)*?)--\>","i"))){try{var d=a.parseJSON(c[1])}catch(e){throw{type:1,toString:function(){return e}};}a(this).data(b.dataAttribute,d)}else{var f=a(this).selector;throw{type:2,toString:function(){return"No JSON Comment found. Please check if "+f+" contains <!-- "+b.keyword+" --\>."}};}return this.data(b.dataAttribute)};
a.fn.jSonComments.defaults={dataAttribute:"jSonCommentsData",keyword:"Metadata",cache:"true"}})(jQuery);
