(function(){function q(k,a,b){if(k===a)return 0!==k||1/k==1/a;if(null==k||null==a)return k===a;k._chain&&(k=k._wrapped);a._chain&&(a=a._wrapped);if(k.isEqual&&d.isFunction(k.isEqual))return k.isEqual(a);if(a.isEqual&&d.isFunction(a.isEqual))return a.isEqual(k);var c=m.call(k);if(c!=m.call(a))return!1;switch(c){case "[object String]":return k==String(a);case "[object Number]":return k!=+k?a!=+a:0==k?1/k==1/a:k==+a;case "[object Date]":case "[object Boolean]":return+k==+a;case "[object RegExp]":return k.source== a.source&&k.global==a.global&&k.multiline==a.multiline&&k.ignoreCase==a.ignoreCase}if("object"!=typeof k||"object"!=typeof a)return!1;for(var g=b.length;g--;)if(b[g]==k)return!0;b.push(k);var g=0,e=!0;if("[object Array]"==c){if(g=k.length,e=g==a.length)for(;g--&&(e=g in k==g in a&&q(k[g],a[g],b)););}else{if("constructor"in k!="constructor"in a||k.constructor!=a.constructor)return!1;for(var f in k)if(d.has(k,f)&&(g++,!(e=d.has(a,f)&&q(k[f],a[f],b))))break;if(e){for(f in a)if(d.has(a,f)&&!g--)break; e=!g}}b.pop();return e}var B=this,K=B._,w={},h=Array.prototype,f=Object.prototype,l=h.slice,C=h.unshift,m=f.toString,u=f.hasOwnProperty,x=h.forEach,D=h.map,F=h.reduce,G=h.reduceRight,H=h.filter,r=h.every,y=h.some,z=h.indexOf,E=h.lastIndexOf,f=Array.isArray,L=Object.keys,A=Function.prototype.bind,d=function(a){return new v(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=d),exports._=d):B._=d;d.VERSION="1.3.3";var n=d.each=d.forEach=function(a, b,c){if(null!=a)if(x&&a.forEach===x)a.forEach(b,c);else if(a.length===+a.length)for(var s=0,g=a.length;s=g.computed&&(g={value:a,computed:k})});return g.value};d.min=function(a,b,c){if(!b&&d.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!b&&d.isEmpty(a))return Infinity;var g={computed:Infinity};n(a,function(a,k,d){k=b?b.call(c,a,k,d):a;kc?1:0}),"value")};d.groupBy=function(a,b){var c={},g=d.isFunction(b)?b:function(a){return a[b]};n(a,function(a,b){var k=g(a,b);(c[k]||(c[k]=[])).push(a)}); return c};d.sortedIndex=function(a,b,c){c||(c=d.identity);for(var g=0,e=a.length;g>1;c(a[f])a.length&&(b=!0);d.reduce(c,function(c,e, N){if(b?d.last(c)!==e||!c.length:!d.include(c,e))c.push(e),g.push(a[N]);return c},[]);return g};d.union=function(){return d.uniq(d.flatten(arguments,!0))};d.intersection=d.intersect=function(a){var b=l.call(arguments,1);return d.filter(d.uniq(a),function(a){return d.every(b,function(b){return 0<=d.indexOf(b,a)})})};d.difference=function(a){var b=d.flatten(l.call(arguments,1),!0);return d.filter(a,function(a){return!d.include(b,a)})};d.zip=function(){for(var a=l.call(arguments),b=d.max(d.pluck(a,"length")), c=Array(b),g=0;g=arguments.length&&(b=a||0,a=0);c=arguments[2]||1;for(var d= Math.max(Math.ceil((b-a)/c),0),g=0,e=Array(d);g=a?b():function(){if(1>--a)return b.apply(this,arguments)}};d.keys=L||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)d.has(a,c)&&(b[b.length]=c);return b};d.values=function(a){return d.map(a,d.identity)};d.functions=d.methods=function(a){var b=[],c;for(c in a)d.isFunction(a[c])&&b.push(c);return b.sort()};d.extend=function(a){n(l.call(arguments, 1),function(b){for(var c in b)a[c]=b[c]});return a};d.pick=function(a){var b={};n(d.flatten(l.call(arguments,1)),function(c){c in a&&(b[c]=a[c])});return b};d.defaults=function(a){n(l.call(arguments,1),function(b){for(var c in b)null==a[c]&&(a[c]=b[c])});return a};d.clone=function(a){return!d.isObject(a)?a:d.isArray(a)?a.slice():d.extend({},a)};d.tap=function(a,b){b(a);return a};d.isEqual=function(a,b){return q(a,b,[])};d.isEmpty=function(a){if(null==a)return!0;if(d.isArray(a)||d.isString(a))return 0=== a.length;for(var b in a)if(d.has(a,b))return!1;return!0};d.isElement=function(a){return!!(a&&1==a.nodeType)};d.isArray=f||function(a){return"[object Array]"==m.call(a)};d.isObject=function(a){return a===Object(a)};d.isArguments=function(a){return"[object Arguments]"==m.call(a)};d.isArguments(arguments)||(d.isArguments=function(a){return!(!a||!d.has(a,"callee"))});d.isFunction=function(a){return"[object Function]"==m.call(a)};d.isString=function(a){return"[object String]"==m.call(a)};d.isNumber=function(a){return"[object Number]"== m.call(a)};d.isFinite=function(a){return d.isNumber(a)&&isFinite(a)};d.isNaN=function(a){return a!==a};d.isBoolean=function(a){return!0===a||!1===a||"[object Boolean]"==m.call(a)};d.isDate=function(a){return"[object Date]"==m.call(a)};d.isRegExp=function(a){return"[object RegExp]"==m.call(a)};d.isNull=function(a){return null===a};d.isUndefined=function(a){return void 0===a};d.has=function(a,b){return u.call(a,b)};d.noConflict=function(){B._=K;return this};d.identity=function(a){return a};d.times= function(a,b,c){for(var d=0;d/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};d.result=function(a,b){if(null==a)return null;var c=a[b];return d.isFunction(c)?c.call(a):c};d.mixin=function(a){n(d.functions(a),function(b){O(b,d[b]=a[b])})};var J=0;d.uniqueId=function(a){var b=J++;return a?a+b:b};d.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g, escape:/<%-([\s\S]+?)%>/g};var a=/.^/,b={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},c;for(c in b)b[b[c]]=c;var g=/\\|'|\r|\n|\t|\u2028|\u2029/g,e=/\\(\\|'|r|n|t|u2028|u2029)/g,p=function(a){return a.replace(e,function(a,c){return b[c]})};d.template=function(c,e,f){f=d.defaults(f||{},d.templateSettings);c="__p+='"+c.replace(g,function(a){return"\\"+b[a]}).replace(f.escape||a,function(a,b){return"'+\n_.escape("+p(b)+")+\n'"}).replace(f.interpolate||a,function(a,b){return"'+\n("+ p(b)+")+\n'"}).replace(f.evaluate||a,function(a,b){return"';\n"+p(b)+"\n;__p+='"})+"';\n";f.variable||(c="with(obj||{}){\n"+c+"}\n");c="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+c+"return __p;\n";var h=new Function(f.variable||"obj","_",c);if(e)return h(e,d);e=function(a){return h.call(this,a,d)};e.source="function("+(f.variable||"obj")+"){\n"+c+"}";return e};d.chain=function(a){return d(a).chain()};var v=function(a){this._wrapped=a};d.prototype=v.prototype; var M=function(a,b){return b?d(a).chain():a},O=function(a,b){v.prototype[a]=function(){var a=l.call(arguments);C.call(a,this._wrapped);return M(b.apply(d,a),this._chain)}};d.mixin(d);n("pop push reverse shift sort splice unshift".split(" "),function(a){var b=h[a];v.prototype[a]=function(){var c=this._wrapped;b.apply(c,arguments);var d=c.length;("shift"==a||"splice"==a)&&0===d&&delete c[0];return M(c,this._chain)}});n(["concat","join","slice"],function(a){var b=h[a];v.prototype[a]=function(){return M(b.apply(this._wrapped, arguments),this._chain)}});v.prototype.chain=function(){this._chain=!0;return this};v.prototype.value=function(){return this._wrapped}}).call(this); (function(){var q=this,B=q.Backbone,K=Array.prototype.slice,w=Array.prototype.splice,h;h="undefined"!==typeof exports?exports:q.Backbone={};h.VERSION="0.9.2";var f=q._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var l=q.jQuery||q.Zepto||q.ender;h.setDomLibrary=function(a){l=a};h.noConflict=function(){q.Backbone=B;return this};h.emulateHTTP=!1;h.emulateJSON=!1;var C=/\s+/,m=h.Events={on:function(a,b,c){var d,e,f,h,l;if(!b)return this;a=a.split(C);for(d=this._callbacks||(this._callbacks= {});e=a.shift();)f=(l=d[e])?l.tail:{},f.next=h={},f.context=c,f.callback=b,d[e]={tail:h,next:l?l.next:f};return this},off:function(a,b,c){var d,e,p,h,l,m;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(C):f.keys(e);d=a.shift();)if(p=e[d],delete e[d],p&&(b||c))for(h=p.tail;(p=p.next)!==h;)if(l=p.callback,m=p.context,b&&l!==b||c&&m!==c)this.on(d,l,m);return this}},trigger:function(a){var b,c,d,e,f,h;if(!(d=this._callbacks))return this;f=d.all;a=a.split(C);for(h= K.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,h);if(c=f){e=c.tail;for(b=[b].concat(h);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};m.bind=m.on;m.unbind=m.off;var u=h.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=t(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent= {};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(u.prototype,m,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(a){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null== b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof u&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);b=c.changes={};var h=this.attributes,l=this._escapedAttributes,m=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete l[e],(c.silent?this._silent: b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(m[e],a)||f.has(h,e)!=f.has(m,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){a=a?f.clone(a):{};var b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)}; a.error=h.wrapError(a.error,b,a);return(this.sync||h.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var l=this,m=c.success;c.success=function(a,b,e){b=l.parse(a,e);c.wait&&(delete c.wait,b=f.extend(d||{},b));if(!l.set(b,c))return!1;m?m(l,a):l.trigger("sync",l,a,c)};c.error=h.wrapError(c.error, l,c);b=this.isNew()?"create":"update";b=(this.sync||h.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){a=a?f.clone(a):{};var b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=h.wrapError(a.error,b,a);var e=(this.sync||h.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=t(this,"urlRoot")||t(this.collection,"url")||J(); return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a,b){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending= {};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length|| !this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;a=f.extend({},this.attributes,a);var c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var x=h.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator); this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(x.prototype,m,{model:u,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,h,l,m={},n={},k=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c=b))this.iframe=l('