(function(){function n(e){function r(){i(),t=JSON.parse(JSON.stringify(e))}function i(){_.each(n.generic,function(n){n(e,t)})}function s(e,t){_.each(n.create,function(n){n(e,t)})}function o(e,t,r){_.each(n.update,function(n){n(e,t,r)})}function u(e,t){_.each(n["delete"],function(n){n(e,t)})}function a(){var n=t.length,i=e.length;if(n!=i||JSON.stringify(t)!=JSON.stringify(e)){var a=Math.max(i,n)-1;for(var f=a;f>=0;f--){var l=t[f],c=e[f];f>n-1?s(c,f):f>i-1?u(l,f):_.isEqual(c,l)||o(c,l,f)}r()}}var t=[],n={generic:[],create:[],update:[],"delete":[]};return e.pop=function(){a();var e=Array.prototype.pop.apply(this,arguments),t=this.length;return u(e,t),r(),e},e.push=function(){a();var e=arguments[0],t=Array.prototype.push.apply(this,arguments);return s(e,t-1),r(),t},e.reverse=function(){a();for(var e=this.length-1;e>=0;e--)u(this[e],e);var t=Array.prototype.reverse.apply(this,arguments);return _.each(this,s),r(),t},e.shift=function(){a();var e=Array.prototype.shift.apply(this,arguments);return u(e,0),r(),e},e.sort=function(){a();for(var e=this.length-1;e>=0;e--)u(this[e],e);var t=Array.prototype.sort.apply(this,arguments);return _.each(this,s),r(),t},e.splice=function(e,t){a();var n=Array.prototype.slice.call(arguments,2),i=Array.prototype.splice.apply(this,arguments);for(var o=i.length-1;o>=0;o--)u(i[o],e+o);return _.each(n,function(t,n){s(t,e+n)}),r(),i},e.unshift=function(){a();var e=arguments[0],t=Array.prototype.unshift.apply(this,arguments);return s(e,0),r(),t},setInterval(a,250),{unbind:function(e,t){},bind:function(r,i){n[r].push(i),r=="generic"?i(e,t):r=="create"&&_.each(e,i),t=JSON.parse(JSON.stringify(e))}}}var e=[],t=[];_.mixin({observe:function(r,i,s){if(!_.isArray(r))throw"subject should be a array";_.isFunction(i)&&(s=i,i="generic");var o=_.indexOf(e,r);if(o==-1){o=e.length,e.push(r);var u=new n(r);t.push(u)}return t[o].bind(i,s),r},unobserve:function(e,t,n){return e}}),typeof jQuery!="undefined"&&typeof jQuery.fn.insertAt=="undefined"&&(jQuery.fn.insertAt=function(t,n){return t===0?this.prepend(n):t100;e.lastScanned=t-1&&t.splice(n,1)},f.listeners=function(){return t},f.queueUpdate=function(e,t,n,r){this.queueUpdates([{type:n,object:e,name:t,oldValue:r}])},f.queueUpdates=function(e){var t=this,r=0,i=e.length||0,s;for(r=0;r-1?l[t]:!1;return n||(t=c.length,c[t]=e,n=l[t]=new f(e)),n},e.observe=function(e,t){return new a(e,t)},e.unobserve=function(t,n){u(t,n),e.getNotifier(t).removeListener(n)}}(Object,this);var Shibari=function(){};Shibari.converters={},Shibari.BINDING_DIRECTION_TWO_WAY=0,Shibari.BINDING_DIRECTION_ONE_WAY=1,Shibari.BIND_ATTRIBUTES_PREFIX="data-bind-",Shibari.addConverter=function(e,t){Shibari.converters[e]=t},Shibari.getAttribute=function(e,t){return $(e).attr(t)},Shibari.setAttribute=function(e,t,n){$(e).attr(t,n)},Shibari.getInputValue=function(e){return $(e).val()},Shibari.setInputValue=function(e,t){$(e).val(t)},Shibari.getChildren=function(e){return $(e).children()},Shibari.setHTML=function(e,t){$(e).html(t)},Shibari.onChange=function(e,t){$(e).change(t)},Shibari.triggerEvent=function(e,t){$(e).trigger(t)},Shibari.getFirstChild=function(e){return $(e).children(0)},Shibari.clone=function(e){return $(e).clone()},Shibari.append=function(e,t){$(e).append(t)},Shibari.bind=function(e,t){if(!t)throw"Context does not exist";e.shibariContext=t;var n=e.attributes;if(n)for(var r=0;r0&&Shibari.bind(n[r],s):Shibari.getChildren(n[r]).length>0&&Shibari.bindChildren(n[r],s)}},Shibari.parseBindingData=function(e){if(e.indexOf(":")!=-1){var t=e.split(","),n={};for(var r=0;r