/*
 * atthattime: a jQuery plugin, version: 0.1.0 (2011-09-16)
 * @requires jQuery v1.2.3 or later
 *
 * atthattime is a jQuery plugin that makes it easy to support automatically
 * updating timestamps referring to calendar units instead of absolute time
 * (e.g. "this minute" or "1 day ago").
 *
 * For usage and examples, visit:
 * http://github.com/knuton/jquery-atthattime
 *
 * Copyright (c) 2011, Johannes Emerich (johannes -[at]- emerich [*dot*] de)
 *
 * Licensed under the MIT:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * atthattime heavily lends ideas and code from timeago by Ryan McGeary, which
 * is a similar plugin for automatically updating fuzzy timestamps (e.g. "4
 * minutes ago" or "about 1 day ago"). Check it out: http://timeago.yarp.com/
 *
 * Copyright for timeago as follows:
 * Copyright (c) 2008-2011, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
 */
(function(a){function c(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d<c;d++)if(a[d]!==b[d])return!1;return!0}function d(){var b=e(this);return isNaN(b.datetime)||a(this).text(f(b.datetime)),this}function e(c){c=a(c);if(!c.data("atthattime")){c.data("atthattime",{datetime:b.datetime(c)});var d=a.trim(c.text());d.length>0&&c.attr("title",d)}return c.data("atthattime")}function f(a){return b.inWords(a)}function g(a){var c=b.settings.smallestGrain||"seconds";switch(a){case"seconds":return c==="seconds";case"minutes":return c==="seconds"||c==="minutes";case"hours":return c==="seconds"||c==="minutes"||c==="hours";case"days":return c==="seconds"||c==="minutes"||c==="hours"||c==="days";case"months":return c==="seconds"||c==="minutes"||c==="hours"||c==="days"||c==="months";case"years":return!0;default:return!1}}function h(a){return a===(b.settings.biggestGrain||"years")}a.atthattime=function(b){return b instanceof Date?f(b):typeof b=="string"?f(a.atthattime.parse(b)):f(a.atthattime.datetime(b))};var b=a.atthattime;a.extend(a.atthattime,{settings:{refreshMillis:6e4,allowFuture:!1,smallestGrain:"seconds",biggestGrain:"days",offset:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",thisSecond:"this second",seconds:"%d second%n",thisMinute:"this minute",minutes:"%d minute%n",thisHour:"this hour",hours:"%d hour%n",thisDay:"today",days:"%d day%n",thisMonth:"this month",months:"%d month%n",thisYear:"this year",years:"%d year%n",numbers:[]}},inWords:function(b){function j(b,c){var e=a.isFunction(b)?b(c,x):b,f=d.numbers&&d.numbers[c]||c,g=c>1?"s":"";return e.replace(/%d/i,f).replace(/%n/i,g)}var d=this.settings.strings,e=d.prefixAgo,f=d.suffixAgo,i=c,k=new Date;k.setMilliseconds(0);var l=k.getFullYear(),m=k.getMonth(),n=k.getDate(),o=k.getHours(),p=k.getMinutes(),q=k.getSeconds(),r=b.getFullYear(),s=b.getMonth(),t=b.getDate(),u=b.getHours(),v=b.getMinutes(),w=b.getSeconds(),x=k-b;this.settings.allowFuture&&(x<0&&(e=d.prefixFromNow,f=d.suffixFromNow),x=Math.abs(x));var y;return g("seconds")&&i([l,m,n,o,p,q],[r,s,t,u,v,w])?(y=j(d.thisSecond),f=e=null):h("seconds")?y=j(d.seconds,x):g("minutes")&&i([l,m,n,o,p],[r,s,t,u,v])?(y=j(d.thisMinute),f=e=null):h("minutes")?(k.setSeconds(0),b.setSeconds(0),y=j(d.minutes,Math.floor(Math.abs(k-b)/6e4))):g("hours")&&i([l,m,n,o],[r,s,t,u])?(y=j(d.thisHour),f=e=null):h("hours")?(k.setSeconds(0),k.setMinutes(0),b.setSeconds(0),b.setMinutes(0),y=j(d.hours,Math.floor(Math.abs(k-b)/36e5))):g("days")&&i([l,m,n],[r,s,t])?(y=j(d.thisDay),f=e=null):h("days")?(k.setSeconds(0),k.setMinutes(0),k.setHours(0),b.setSeconds(0),b.setMinutes(0),b.setHours(0),y=j(d.days,Math.floor(Math.abs(k-b)/864e5))):g("months")&&i([l,m],[r,s])?(y=j(d.thisMonth),f=e=null):h("months")?(k.setSeconds(0),k.setMinutes(0),k.setHours(0),k.setDate(1),b.setSeconds(0),b.setMinutes(0),b.setHours(0),b.setDate(1),y=j(d.months,Math.floor(Math.abs(k-b)/26784e5))):g("years")&&i([l],[r])?(y=j(d.thisYear),f=e=null):(k.setSeconds(0),k.setMinutes(0),k.setHours(0),k.setDate(0),k.setMonths(1),b.setSeconds(0),b.setMinutes(0),b.setHours(0),b.setDate(0),k.setMonths(1),y=j(d.years,Math.floor(Math.abs(k-b)/321408e5))),a.trim([e,y,f].join(" "))},parse:function(c){var d=a.trim(c);d=d.replace(/\.\d\d\d+/,""),d=d.replace(/-/,"/").replace(/-/,"/"),d=d.replace(/T/," ").replace(/Z/," UTC"),d=d.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");var e=new Date(d);return b.settings.offset&&e.setSeconds(e.getSeconds()+b.settings.offset),e},datetime:function(c){var d=a(c).get(0).tagName.toLowerCase()==="time",e=d?a(c).attr("datetime"):a(c).attr("title");return b.parse(e)}}),a.fn.atthattime=function(c){var e=b.settings;a.extend(!0,e,c||{});var f=this;return f.each(d),e.refreshMillis>0&&setInterval(function(){f.each(d)},e.refreshMillis),f},document.createElement("abbr"),document.createElement("time")})(jQuery),function(a){a.support.placeholder="placeholder"in document.createElement("input");var b={withPlaceholderClass:"placeholder"};a.fn.enablePlaceholder=function(c){if(!a.support.placeholder){var d=a.extend({},b,c),e=function(a,b){return a.val(b).addClass(d.withPlaceholderClass).data("hasPlaceholder",!0)},f=function(a,b){if(a.data("hasPlaceholder"))return a.val("").removeClass(d.withPlaceholderClass).data("hasPlaceholder",!1)};return this.each(function(){var b=a(this),c=b.attr("placeholder");c!=""&&((b.val()==""||b.val()==c)&&e(b,c),b.bind("focus keydown paste",function(){f(b,c)}),b.bind("blur",function(){b.val()==""&&e(b,b.attr("placeholder"))}),b.parents("form").first().submit(function(){return f(b,c),!0}))})}}}(jQuery),function(a){function b(a,b){return typeof a=="function"?a.call(b):a}function c(b,c){this.$element=a(b),this.options=c,this.enabled=!0,this.fixTitle()}c.prototype={show:function(){var c=this.getTitle();if(c&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](c),d[0].className="tipsy",d.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var e=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),f=d[0].offsetWidth,g=d[0].offsetHeight,h=b(this.options.gravity,this.$element[0]),i;switch(h.charAt(0)){case"n":i={top:e.top+e.height+this.options.offset,left:e.left+e.width/2-f/2};break;case"s":i={top:e.top-g-this.options.offset,left:e.left+e.width/2-f/2};break;case"e":i={top:e.top+e.height/2-g/2,left:e.left-f-this.options.offset};break;case"w":i={top:e.top+e.height/2-g/2,left:e.left+e.width+this.options.offset}}h.length==2&&(h.charAt(1)=="w"?i.left=e.left+e.width/2-15:i.left=e.left+e.width/2-f+15),d.css(i).addClass("tipsy-"+h),d.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0),this.options.className&&d.addClass(b(this.options.className,this.$element[0])),this.options.fade?d.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):d.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){a(this).remove()}):this.tip().remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("original-title")!="string")&&a.attr("original-title",a.attr("title")||"").removeAttr("title")},getTitle:function(){var a,b=this.$element,c=this.options;this.fixTitle();var a,c=this.options;return typeof c.title=="string"?a=b.attr(c.title=="title"?"original-title":c.title):typeof c.title=="function"&&(a=c.title.call(b[0])),a=(""+a).replace(/(^\s*|\s*$)/,""),a||c.fallback},tip:function(){return this.$tip||(this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}},a.fn.tipsy=function(b){function e(d){var e=a.data(d,"tipsy");return e||(e=new c(d,a.fn.tipsy.elementOptions(d,b)),a.data(d,"tipsy",e)),e}function f(){var a=e(this);a.hoverState="in",b.delayIn==0?a.show():(a.fixTitle(),setTimeout(function(){a.hoverState=="in"&&a.show()},b.delayIn))}function g(){var a=e(this);a.hoverState="out",b.delayOut==0?a.hide():setTimeout(function(){a.hoverState=="out"&&a.hide()},b.delayOut)}if(b===!0)return this.data("tipsy");if(typeof b=="string"){var d=this.data("tipsy");return d&&d[b](),this}b=a.extend({},a.fn.tipsy.defaults,b),b.live||this.each(function(){e(this)});if(b.trigger!="manual"){var h=b.live?"live":"bind",i=b.trigger=="hover"?"mouseenter":"focus",j=b.trigger=="hover"?"mouseleave":"blur";this[h](i,f)[h](j,g)}return this},a.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"},a.fn.tipsy.elementOptions=function(b,c){return a.metadata?a.extend({},c,a(b).metadata()):c},a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"},a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"},a.fn.tipsy.autoBounds=function(b,c){return function(){var d={ns:c[0],ew:c.length>1?c[1]:!1},e=a(document).scrollTop()+b,f=a(document).scrollLeft()+b,g=a(this);return g.offset().top<e&&(d.ns="n"),g.offset().left<f&&(d.ew="w"),a(window).width()+a(document).scrollLeft()-g.offset().left<b&&(d.ew="e"),a(window).height()+a(document).scrollTop()-g.offset().top<b&&(d.ns="s"),d.ns+(d.ew?d.ew:"")}}}(jQuery),function(){function A(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;a._chain&&(a=a._wrapped),b._chain&&(b=b._wrapped);if(a.isEqual&&w.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&w.isFunction(b.isEqual))return b.isEqual(a);var d=i.call(a);if(d!=i.call(b))return!1;switch(d){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if(typeof a!="object"||typeof b!="object")return!1;var e=c.length;while(e--)if(c[e]==a)return!0;c.push(a);var f=0,g=!0;if(d=="[object Array]"){f=a.length,g=f==b.length;if(g)while(f--)if(!(g=f in a==f in b&&A(a[f],b[f],c)))break}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return!1;for(var h in a)if(j.call(a,h)){f++;if(!(g=j.call(b,h)&&A(a[h],b[h],c)))break}if(g){for(h in b)if(j.call(b,h)&&!(f--))break;g=!f}}return c.pop(),g}var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.slice,h=d.unshift,i=e.toString,j=e.hasOwnProperty,k=d.forEach,l=d.map,m=d.reduce,n=d.reduceRight,o=d.filter,p=d.every,q=d.some,r=d.indexOf,s=d.lastIndexOf,t=Array.isArray,u=Object.keys,v=f.bind,w=function(a){return new D(a)};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=w),exports._=w):a._=w,w.VERSION="1.3.0";var x=w.each=w.forEach=function(a,b,d){if(a==null)return;if(k&&a.forEach===k)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;e<f;e++)if(e in a&&b.call(d,a[e],e,a)===c)return}else for(var g in a)if(j.call(a,g)&&b.call(d,a[g],g,a)===c)return};w.map=function(a,b,c){var d=[];return a==null?d:l&&a.map===l?a.map(b,c):(x(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)}),a.length===+a.length&&(d.length=a.length),d)},w.reduce=w.foldl=w.inject=function(a,b,c,d){var e=arguments.length>2;a==null&&(a=[]);if(m&&a.reduce===m)return d&&(b=w.bind(b,d)),e?a.reduce(b,c):a.reduce(b);x(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)});if(!e)throw new TypeError("Reduce of empty array with no initial value");return c},w.reduceRight=w.foldr=function(a,b,c,d){var e=arguments.length>2;a==null&&(a=[]);if(n&&a.reduceRight===n)return d&&(b=w.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=w.toArray(a).reverse();return d&&!e&&(b=w.bind(b,d)),e?w.reduce(f,b,c,d):w.reduce(f,b)},w.find=w.detect=function(a,b,c){var d;return y(a,function(a,e,f){if(b.call(c,a,e,f))return d=a,!0}),d},w.filter=w.select=function(a,b,c){var d=[];return a==null?d:o&&a.filter===o?a.filter(b,c):(x(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)},w.reject=function(a,b,c){var d=[];return a==null?d:(x(a,function(a,e,f){b.call(c,a,e,f)||(d[d.length]=a)}),d)},w.every=w.all=function(a,b,d){var e=!0;return a==null?e:p&&a.every===p?a.every(b,d):(x(a,function(a,f,g){if(!(e=e&&b.call(d,a,f,g)))return c}),e)};var y=w.some=w.any=function(a,b,d){b||(b=w.identity);var e=!1;return a==null?e:q&&a.some===q?a.some(b,d):(x(a,function(a,f,g){if(e||(e=b.call(d,a,f,g)))return c}),!!e)};w.include=w.contains=function(a,b){var c=!1;return a==null?c:r&&a.indexOf===r?a.indexOf(b)!=-1:(c=y(a,function(a){return a===b}),c)},w.invoke=function(a,b){var c=g.call(arguments,2);return w.map(a,function(a){return(w.isFunction(b)?b||a:a[b]).apply(a,c)})},w.pluck=function(a,b){return w.map(a,function(a){return a[b]})},w.max=function(a,b,c){if(!b&&w.isArray(a))return Math.max.apply(Math,a);if(!b&&w.isEmpty(a))return-Infinity;var d={computed:-Infinity};return x(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g>=d.computed&&(d={value:a,computed:g})}),d.value},w.min=function(a,b,c){if(!b&&w.isArray(a))return Math.min.apply(Math,a);if(!b&&w.isEmpty(a))return Infinity;var d={computed:Infinity};return x(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g<d.computed&&(d={value:a,computed:g})}),d.value},w.shuffle=function(a){var b=[],c;return x(a,function(a,d,e){d==0?b[0]=a:(c=Math.floor(Math.random()*(d+1)),b[d]=b[c],b[c]=a)}),b},w.sortBy=function(a,b,c){return w.pluck(w.map(a,function(a,d,e){return{value:a,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")},w.groupBy=function(a,b){var c={},d=w.isFunction(b)?b:function(a){return a[b]};return x(a,function(a,b){var e=d(a,b);(c[e]||(c[e]=[])).push(a)}),c},w.sortedIndex=function(a,b,c){c||(c=w.identity);var d=0,e=a.length;while(d<e){var f=d+e>>1;c(a[f])<c(b)?d=f+1:e=f}return d},w.toArray=function(a){return a?a.toArray?a.toArray():w.isArray(a)?g.call(a):w.isArguments(a)?g.call(a):w.values(a):[]},w.size=function(a){return w.toArray(a).length},w.first=w.head=function(a,b,c){return b!=null&&!c?g.call(a,0,b):a[0]},w.initial=function(a,b,c){return g.call(a,0,a.length-(b==null||c?1:b))},w.last=function(a,b,c){return b!=null&&!c?g.call(a,Math.max(a.length-b,0)):a[a.length-1]},w.rest=w.tail=function(a,b,c){return g.call(a,b==null||c?1:b)},w.compact=function(a){return w.filter(a,function(a){return!!a})},w.flatten=function(a,b){return w.reduce(a,function(a,c){return w.isArray(c)?a.concat(b?c:w.flatten(c)):(a[a.length]=c,a)},[])},w.without=function(a){return w.difference(a,g.call(arguments,1))},w.uniq=w.unique=function(a,b,c){var d=c?w.map(a,c):a,e=[];return w.reduce(d,function(c,d,f){if(0==f||(b===!0?w.last(c)!=d:!w.include(c,d)))c[c.length]=d,e[e.length]=a[f];return c},[]),e},w.union=function(){return w.uniq(w.flatten(arguments,!0))},w.intersection=w.intersect=function(a){var b=g.call(arguments,1);return w.filter(w.uniq(a),function(a){return w.every(b,function(b){return w.indexOf(b,a)>=0})})},w.difference=function(a){var b=w.flatten(g.call(arguments,1));return w.filter(a,function(a){return!w.include(b,a)})},w.zip=function(){var a=g.call(arguments),b=w.max(w.pluck(a,"length")),c=new Array(b);for(var d=0;d<b;d++)c[d]=w.pluck(a,""+d);return c},w.indexOf=function(a,b,c){if(a==null)return-1;var d,e;if(c)return d=w.sortedIndex(a,b),a[d]===b?d:-1;if(r&&a.indexOf===r)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===b)return d;return-1},w.lastIndexOf=function(a,b){if(a==null)return-1;if(s&&a.lastIndexOf===s)return a.lastIndexOf(b);var c=a.length;while(c--)if(c in a&&a[c]===b)return c;return-1},w.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);while(e<d)f[e++]=a,a+=c;return f};var z=function(){};w.bind=function(b,c){var d,e;if(b.bind===v&&v)return v.apply(b,g.call(arguments,1));if(!w.isFunction(b))throw new TypeError;return e=g.call(arguments,2),d=function(){if(this instanceof d){z.prototype=b.prototype;var a=new z,f=b.apply(a,e.concat(g.call(arguments)));return Object(f)===f?f:a}return b.apply(c,e.concat(g.call(arguments)))}},w.bindAll=function(a){var b=g.call(arguments,1);return b.length==0&&(b=w.functions(a)),x(b,function(b){a[b]=w.bind(a[b],a)}),a},w.memoize=function(a,b){var c={};return b||(b=w.identity),function(){var d=b.apply(this,arguments);return j.call(c,d)?c[d]:c[d]=a.apply(this,arguments)}},w.delay=function(a,b){var c=g.call(arguments,2);return setTimeout(function(){return a.apply(a,c)},b)},w.defer=function(a){return w.delay.apply(w,[a,1].concat(g.call(arguments,1)))},w.throttle=function(a,b){var c,d,e,f,g,h=w.debounce(function(){g=f=!1},b);return function(){c=this,d=arguments;var i=function(){e=null,g&&a.apply(c,d),h()};e||(e=setTimeout(i,b)),f?g=!0:a.apply(c,d),h(),f=!0}},w.debounce=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}},w.once=function(a){var b=!1,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments))}},w.wrap=function(a,b){return function(){var c=[a].concat(g.call(arguments,0));return b.apply(this,c)}},w.compose=function(){var a=arguments;return function(){var b=arguments;for(var c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},w.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}},w.keys=u||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)j.call(a,c)&&(b[b.length]=c);return b},w.values=function(a){return w.map(a,w.identity)},w.functions=w.methods=function(a){var b=[];for(var c in a)w.isFunction(a[c])&&b.push(c);return b.sort()},w.extend=function(a){return x(g.call(arguments,1),function(b){for(var c in b)b[c]!==void 0&&(a[c]=b[c])}),a},w.defaults=function(a){return x(g.call(arguments,1),function(b){for(var c in b)a[c]==null&&(a[c]=b[c])}),a},w.clone=function(a){return w.isObject(a)?w.isArray(a)?a.slice():w.extend({},a):a},w.tap=function(a,b){return b(a),a},w.isEqual=function(a,b){return A(a,b,[])},w.isEmpty=function(a){if(w.isArray(a)||w.isString(a))return a.length===0;for(var b in a)if(j.call(a,b))return!1;return!0},w.isElement=function(a){return!!a&&a.nodeType==1},w.isArray=t||function(a){return i.call(a)=="[object Array]"},w.isObject=function(a){return a===Object(a)},w.isArguments=function(a){return i.call(a)=="[object Arguments]"},w.isArguments(arguments)||(w.isArguments=function(a){return!!a&&!!j.call(a,"callee")}),w.isFunction=function(a){return i.call(a)=="[object Function]"},w.isString=function(a){return i.call(a)=="[object String]"},w.isNumber=function(a){return i.call(a)=="[object Number]"},w.isNaN=function(a){return a!==a},w.isBoolean=function(a){return a===!0||a===!1||i.call(a)=="[object Boolean]"},w.isDate=function(a){return i.call(a)=="[object Date]"},w.isRegExp=function(a){return i.call(a)=="[object RegExp]"},w.isNull=function(a){return a===null},w.isUndefined=function(a){return a===void 0},w.noConflict=function(){return a._=b,this},w.identity=function(a){return a},w.times=function(a,b,c){for(var d=0;d<a;d++)b.call(c,d)},w.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},w.mixin=function(a){x(w.functions(a),function(b){F(b,w[b]=a[b])})};var B=0;w.uniqueId=function(a){var b=B++;return a?a+b:b},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var C=/.^/;w.template=function(a,b){var c=w.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(c.escape||C,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(c.interpolate||C,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(c.evaluate||C,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ").replace(/\\\\/g,"\\")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return b?e(b,w):function(a){return e.call(this,a,w)}},w.chain=function(a){return w(a).chain()};var D=function(a){this._wrapped=a};w.prototype=D.prototype;var E=function(a,b){return b?w(a).chain():a},F=function(a,b){D.prototype[a]=function(){var a=g.call(arguments);return h.call(a,this._wrapped),E(b.apply(w,a),this._chain)}};w.mixin(w),x(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];D.prototype[a]=function(){var c=this._wrapped;b.apply(c,arguments);var d=c.length;return(a=="shift"||a=="splice")&&d===0&&delete c[0],E(c,this._chain)}}),x(["concat","join","slice"],function(a){var b=d[a];D.prototype[a]=function(){return E(b.apply(this._wrapped,arguments),this._chain)}}),D.prototype.chain=function(){return this._chain=!0,this},D.prototype.value=function(){return this._wrapped}}.call(this),function(){var a=this,b=a.Backbone,c;typeof exports!="undefined"?c=exports:c=a.Backbone={},c.VERSION="0.5.3";var d=a._;!d&&typeof require!="undefined"&&(d=require("underscore")._);var e=a.jQuery||a.Zepto;c.noConflict=function(){return a.Backbone=b,this},c.emulateHTTP=!1,c.emulateJSON=!1,c.Events={bind:function(a,b,c){var d=this._callbacks||(this._callbacks={}),e=d[a]||(d[a]=[]);return e.push([b,c]),this},unbind:function(a,b){var c;if(!a)this._callbacks={};else if(c=this._callbacks)if(!b)c[a]=[];else{var d=c[a];if(!d)return this;for(var e=0,f=d.length;e<f;e++)if(d[e]&&b===d[e][0]){d[e]=null;break}}return this},trigger:function(a){var b,c,d,e,f,g=2;if(!(c=this._callbacks))return this;while(g--){d=g?a:"all";if(b=c[d])for(var h=0,i=b.length;h<i;h++)(e=b[h])?(f=g?Array.prototype.slice.call(arguments,1):arguments,e[0].apply(e[1]||this,f)):(b.splice(h,1),h--,i--)}return this}},c.Model=function(a,b){var c;a||(a={});if(c=this.defaults)d.isFunction(c)&&(c=c.call(this)),a=d.extend({},c,a);this.attributes={},this._escapedAttributes={},this.cid=d.uniqueId("c"),this.set(a,{silent:!0}),this._changed=!1,this._previousAttributes=d.clone(this.attributes),b&&b.collection&&(this.collection=b.collection),this.initialize(a,b)},d.extend(c.Model.prototype,c.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return d.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;var c=this.attributes[a];return this._escapedAttributes[a]=w(c==null?"":""+c)},has:function(a){return this.attributes[a]!=null},set:function(a,b){b||(b={});if(!a)return this;a.attributes&&(a=a.attributes);var c=this.attributes,e=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return!1;this.idAttribute in a&&(this.id=a[this.idAttribute]);var f=this._changing;this._changing=!0;for(var g in a){var h=a[g];d.isEqual(c[g],h)||(c[g]=h,delete e[g],this._changed=!0,b.silent||this.trigger("change:"+g,this,h,b))}return!f&&!b.silent&&this._changed&&this.change(b),this._changing=!1,this},unset:function(a,b){if(a in this.attributes){b||(b={});var c=this.attributes[a],d={};return d[a]=void 0,!b.silent&&this.validate&&!this._performValidation(d,b)?!1:(delete this.attributes[a],delete this._escapedAttributes[a],a==this.idAttribute&&delete this.id,this._changed=!0,b.silent||(this.trigger("change:"+a,this,void 0,b),this.change(b)),this)}return this},clear:function(a){a||(a={});var b,c=this.attributes,d={};for(b in c)d[b]=void 0;if(!a.silent&&this.validate&&!this._performValidation(d,a))return!1;this.attributes={},this._escapedAttributes={},this._changed=!0;if(!a.silent){for(b in c)this.trigger("change:"+b,this,void 0,a);this.change(a)}return this},fetch:function(a){a||(a={});var b=this,d=a.success;return a.success=function(c,e,f){if(!b.set(b.parse(c,f),a))return!1;d&&d(b,c)},a.error=v(a.error,b,a),(this.sync||c.sync).call(this,"read",this,a)},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return!1;var d=this,e=b.success;b.success=function(a,c,f){if(!d.set(d.parse(a,f),b))return!1;e&&e(d,a,f)},b.error=v(b.error,d,b);var f=this.isNew()?"create":"update";return(this.sync||c.sync).call(this,f,this,b)},destroy:function(a){a||(a={});if(this.isNew())return this.trigger("destroy",this,this.collection,a);var b=this,d=a.success;return a.success=function(c){b.trigger("destroy",b,b.collection,a),d&&d(b,c)},a.error=v(a.error,b,a),(this.sync||c.sync).call(this,"delete",this,a)},url:function(){var a=t(this.collection)||this.urlRoot||u();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)},isNew:function(){return this.id==null},change:function(a){this.trigger("change",this,a),this._previousAttributes=d.clone(this.attributes),this._changed=!1},hasChanged:function(a){return a?this._previousAttributes[a]!=this.attributes[a]:this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=!1;for(var e in a)d.isEqual(b[e],a[e])||(c=c||{},c[e]=a[e]);return c},previous:function(a){return!a||!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return d.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);return c?(b.error?b.error(this,c,b):this.trigger("error",this,c,b),!1):!0}}),c.Collection=function(a,b){b||(b={}),b.comparator&&(this.comparator=b.comparator),d.bindAll(this,"_onModelEvent","_removeReference"),this._reset(),a&&this.reset(a,{silent:!0}),this.initialize.apply(this,arguments)},d.extend(c.Collection.prototype,c.Events,{model:c.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(d.isArray(a))for(var c=0,e=a.length;c<e;c++)this._add(a[c],b);else this._add(a,b);return this},remove:function(a,b){if(d.isArray(a))for(var c=0,e=a.length;c<e;c++)this._remove(a[c],b);else this._remove(a,b);return this},get:function(a){return a==null?null:this._byId[a.id!=null?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return this.models=this.sortBy(this.comparator),a.silent||this.trigger("reset",this,a),this},pluck:function(a){return d.map(this.models,function(b){return b.get(a)})},reset:function(a,b){return a||(a=[]),b||(b={}),this.each(this._removeReference),this._reset(),this.add(a,{silent:!0}),b.silent||this.trigger("reset",this,b),this},fetch:function(a){a||(a={});var b=this,d=a.success;return a.success=function(c,e,f){b[a.add?"add":"reset"](b.parse(c,f),a),d&&d(b,c)},a.error=v(a.error,b,a),(this.sync||c.sync).call(this,"read",this,a)},create:function(a,b){var c=this;b||(b={}),a=this._prepareModel(a,b);if(!a)return!1;var d=b.success;return b.success=function(a,e,f){c.add(a,b),d&&d(a,e,f)},a.save(null,b),a},parse:function(a,b){return a},chain:function(){return d(this.models).chain()},_reset:function(a){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(a,b){if(a instanceof c.Model)a.collection||(a.collection=this);else{var d=a;a=new this.model(d,{collection:this}),a.validate&&!a._performValidation(d,b)&&(a=!1)}return a},_add:function(a,b){b||(b={}),a=this._prepareModel(a,b);if(!a)return!1;var c=this.getByCid(a);if(c)throw new Error(["Can't add the same model to a set twice",c.id]);this._byId[a.id]=a,this._byCid[a.cid]=a;var d=b.at!=null?b.at:this.comparator?this.sortedIndex(a,this.comparator):this.length;return this.models.splice(d,0,a),a.bind("all",this._onModelEvent),this.length++,b.silent||a.trigger("add",a,this,b),a},_remove:function(a,b){return b||(b={}),a=this.getByCid(a)||this.get(a),a?(delete this._byId[a.id],delete this._byCid[a.cid],this.models.splice(this.indexOf(a),1),this.length--,b.silent||a.trigger("remove",a,this,b),this._removeReference(a),a):null},_removeReference:function(a){this==a.collection&&delete a.collection,a.unbind("all",this._onModelEvent)},_onModelEvent:function(a,b,c,d){if((a=="add"||a=="remove")&&c!=this)return;a=="destroy"&&this._remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,arguments)}});var f=["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty","groupBy"];d.each(f,function(a){c.Collection.prototype[a]=function(){return d[a].apply(d,[this.models].concat(d.toArray(arguments)))}}),c.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)};var g=/:([\w\d]+)/g,h=/\*([\w\d]+)/g,i=/[-[\]{}()+?.,\\^$|#\s]/g;d.extend(c.Router.prototype,c.Events,{initialize:function(){},route:function(a,b,e){c.history||(c.history=new c.History),d.isRegExp(a)||(a=this._routeToRegExp(a)),c.history.route(a,d.bind(function(c){var d=this._extractParameters(a,c);e.apply(this,d),this.trigger.apply(this,["route:"+b].concat(d))},this))},navigate:function(a,b){c.history.navigate(a,b)},_bindRoutes:function(){if(!this.routes)return;var a=[];for(var b in this.routes)a.unshift([b,this.routes[b]]);for(var c=0,d=a.length;c<d;c++)this.route(a[c][0],a[c][1],this[a[c][1]])},_routeToRegExp:function(a){return a=a.replace(i,"\\$&").replace(g,"([^/]*)").replace(h,"(.*?)"),new RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}}),c.History=function(){this.handlers=[],d.bindAll(this,"checkUrl")};var j=/^#*/,k=/msie [\w.]+/,l=!1;d.extend(c.History.prototype,{interval:50,getFragment:function(a,b){if(a==null)if(this._hasPushState||b){a=window.location.pathname;var c=window.location.search;c&&(a+=c),a.indexOf(this.options.root)==0&&(a=a.substr(this.options.root.length))}else a=window.location.hash;return decodeURIComponent(a.replace(j,""))},start:function(a){if(l)throw new Error("Backbone.history has already been started");this.options=d.extend({},{root:"/"},this.options,a),this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var b=this.getFragment(),c=document.documentMode,f=k.exec(navigator.userAgent.toLowerCase())&&(!c||c<=7);f&&(this.iframe=e('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(b)),this._hasPushState?e(window).bind("popstate",this.checkUrl):"onhashchange"in window&&!f?e(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval),this.fragment=b,l=!0;var g=window.location,h=g.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!h)return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&h&&g.hash&&(this.fragment=g.hash.replace(j,""),window.history.replaceState({},document.title,g.protocol+"//"+g.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();b==this.fragment&&this.iframe&&(b=this.getFragment(this.iframe.location.hash));if(b==this.fragment||b==decodeURIComponent(this.fragment))return!1;this.iframe&&this.navigate(b),this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var b=this.fragment=this.getFragment(a),c=d.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),!0});return c},navigate:function(a,b){var c=(a||"").replace(j,"");if(this.fragment==c||this.fragment==decodeURIComponent(c))return;if(this._hasPushState){var d=window.location;c.indexOf(this.options.root)!=0&&(c=this.options.root+c),this.fragment=c,window.history.pushState({},document.title,d.protocol+"//"+d.host+c)}else window.location.hash=this.fragment=c,this.iframe&&c!=this.getFragment(this.iframe.location.hash)&&(this.iframe.document.open().close(),this.iframe.location.hash=c);b&&this.loadUrl(a)}}),c.View=function(a){this.cid=d.uniqueId("view"),this._configure(a||{}),this._ensureElement(),this.delegateEvents(),this.initialize.apply(this,arguments)};var m=function(a){return e(a,this.el)},n=/^(\S+)\s*(.*)$/,o=["model","collection","el","id","attributes","className","tagName"];d.extend(c.View.prototype,c.Events,{tagName:"div",$:m,initialize:function(){},render:function(){return this},remove:function(){return e(this.el).remove
(),this},make:function(a,b,c){var d=document.createElement(a);return b&&e(d).attr(b),c&&e(d).html(c),d},delegateEvents:function(a){if(!a&&!(a=this.events))return;d.isFunction(a)&&(a=a.call(this)),e(this.el).unbind(".delegateEvents"+this.cid);for(var b in a){var c=this[a[b]];if(!c)throw new Error('Event "'+a[b]+'" does not exist');var f=b.match(n),g=f[1],h=f[2];c=d.bind(c,this),g+=".delegateEvents"+this.cid,h===""?e(this.el).bind(g,c):e(this.el).delegate(h,g,c)}},_configure:function(a){this.options&&(a=d.extend({},this.options,a));for(var b=0,c=o.length;b<c;b++){var e=o[b];a[e]&&(this[e]=a[e])}this.options=a},_ensureElement:function(){if(!this.el){var a=this.attributes||{};this.id&&(a.id=this.id),this.className&&(a["class"]=this.className),this.el=this.make(this.tagName,a)}else d.isString(this.el)&&(this.el=e(this.el).get(0))}});var p=function(a,b){var c=s(this,a,b);return c.extend=this.extend,c};c.Model.extend=c.Collection.extend=c.Router.extend=c.View.extend=p;var q={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};c.sync=function(a,b,f){var g=q[a],h=d.extend({type:g,dataType:"json"},f);return h.url||(h.url=t(b)||u()),!h.data&&b&&(a=="create"||a=="update")&&(h.contentType="application/json",h.data=JSON.stringify(b.toJSON())),c.emulateJSON&&(h.contentType="application/x-www-form-urlencoded",h.data=h.data?{model:h.data}:{}),c.emulateHTTP&&(g==="PUT"||g==="DELETE")&&(c.emulateJSON&&(h.data._method=g),h.type="POST",h.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",g)}),h.type!=="GET"&&!c.emulateJSON&&(h.processData=!1),e.ajax(h)};var r=function(){},s=function(a,b,c){var e;return b&&b.hasOwnProperty("constructor")?e=b.constructor:e=function(){return a.apply(this,arguments)},d.extend(e,a),r.prototype=a.prototype,e.prototype=new r,b&&d.extend(e.prototype,b),c&&d.extend(e,c),e.prototype.constructor=e,e.__super__=a.prototype,e},t=function(a){return!a||!a.url?null:d.isFunction(a.url)?a.url():a.url},u=function(){throw new Error('A "url" property or function must be specified')},v=function(a,b,c){return function(d){a?a(b,d,c):b.trigger("error",b,d,c)}},w=function(a){return a.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}}.call(this);var Handlebars={};Handlebars.VERSION="1.0.beta.2",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(a,b,c){c&&(b.not=c),this.helpers[a]=b},Handlebars.registerPartial=function(a,b){this.partials[a]=b},Handlebars.registerHelper("helperMissing",function(a){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+a+"'")}),Handlebars.registerHelper("blockHelperMissing",function(a,b){var c=b.inverse||function(){},d=b.fn,e="",f=Object.prototype.toString.call(a);f==="[object Function]"&&(a=a());if(a===!0)return d(this);if(a===!1||a==null)return c(this);if(f==="[object Array]"){if(a.length>0)for(var g=0,h=a.length;g<h;g++)e+=d(a[g]);else e=c(this);return e}return d(a)}),Handlebars.registerHelper("each",function(a,b){var c=b.fn,d=b.inverse,e="";if(a&&a.length>0)for(var f=0,g=a.length;f<g;f++)e+=c(a[f]);else e=d(this);return e}),Handlebars.registerHelper("if",function(a,b){return!a||Handlebars.Utils.isEmpty(a)?b.inverse(this):b.fn(this)}),Handlebars.registerHelper("unless",function(a,b){var c=b.fn,d=b.inverse;return b.fn=d,b.inverse=c,Handlebars.helpers["if"].call(this,a,b)}),Handlebars.registerHelper("with",function(a,b){return b.fn(a)}),Handlebars.registerHelper("log",function(a){Handlebars.log(a)}),Handlebars.Exception=function(a){var b=Error.prototype.constructor.apply(this,arguments);for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c])},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(a){this.string=a},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var a={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},b=/&(?!\w+;)|[<>"'`]/g,c=/[&<>"'`]/,d=function(b){return a[b]||"&amp;"};Handlebars.Utils={escapeExpression:function(a){return a instanceof Handlebars.SafeString?a.toString():a==null||a===!1?"":c.test(a)?a.replace(b,d):a},isEmpty:function(a){return typeof a=="undefined"?!0:a===null?!0:a===!1?!0:Object.prototype.toString.call(a)==="[object Array]"&&a.length===0?!0:!1}}}(),Handlebars.VM={template:function(a){var b={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(a,b,c){var d=this.programs[a];return c?Handlebars.VM.program(b,c):d?d:(d=this.programs[a]=Handlebars.VM.program(b),d)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(c,d){return d=d||{},a.call(b,Handlebars,c,d.helpers,d.partials,d.data)}},programWithDepth:function(a,b,c){var d=Array.prototype.slice.call(arguments,2);return function(c,e){return e=e||{},a.apply(this,[c,e.data||b].concat(d))}},program:function(a,b){return function(c,d){return d=d||{},a(c,d.data||b)}},noop:function(){return""},invokePartial:function(a,b,c,d,e){if(a===undefined)throw new Handlebars.Exception("The partial "+b+" could not be found");if(a instanceof Function)return a(c,{helpers:d,partials:e});if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+b+" could not be compiled when running in vm mode");return e[b]=Handlebars.compile(a),e[b](c,{helpers:d,partials:e})}},Handlebars.template=Handlebars.VM.template,function(){"use strict";var a;a={user:null,applicationView:null,initialize:function(){return _.bindAll(this,"startup"),_(this).extend($.Deferred()),$(document).ready(this.startup)},startup:function(){return this.startupControllers(),this.startupRouter(),this.resolve()},startupControllers:function(){return this.sessionController=new this.SessionController,this.sessionController.startup(),this.streamController=new this.StreamController,this.profileController=new this.ProfileController,this.recommendationsController=new this.RecommendationsController,this.opinionsController=new this.OpinionsController,this.pagesController=new this.PagesController,this.staticPagesController=new this.StaticPagesController,this.discoverylineController=new this.DiscoverylineController,this.applicationController=new this.ApplicationController,this.applicationController.startup(),this.applicationView=this.applicationController.view},startupRouter:function(){return this.router=new this.Router},subscribe:Backbone.Events.bind,unsubscribe:Backbone.Events.unbind,publish:Backbone.Events.trigger},a.initialize(),window.MovieExplorer=a}.call(this),function(){"use strict";var a,b=Object.prototype.hasOwnProperty,c=Array.prototype.slice;a={initialize:function(){return this.createDummyConsole()},hasPushState:window.history&&window.history.pushState,placeholderSupported:"placeholder"in document.createElement("input"),delay:function(a,b){return setTimeout(b,a)},rand:function(a,b){return Math.floor(Math.random()*(b-a+1))+a},shuffle:function(){var a,b;return b=Array.prototype.slice,a=function(){return Math.floor(Math.random()*3)-1},function(c){var d;return d=b.apply(c),d.sort(a)}}(),createDummyConsole:function(){var a,b,c,d,e,f,g,h,i,j;d=function(){},c=!1,b="log debug trace info warn error".split(" "),window.console||(c=!0,window.console={});if(c){i=[];for(e=0,g=b.length;e<g;e++)a=b[e],i.push(console[a]=d);return i}if(console.log){j=[];for(f=0,h=b.length;f<h;f++)a=b[f],j.push(console[a]||(console[a]=console.log));return j}},camelize:function(){var a,b;return b=/-(.)/g,a=function(a,b){return b.toUpperCase()},function(c){return c.replace(b,a)}}(),upcase:function(a){return a.charAt(0).toUpperCase()+a.substring(1)},downcase:function(){var a,b,c;return c=/\w+/g,a=/^[A-Z]+$/,b=function(b){return a.test(b)?b:b.toLowerCase()},function(a){return a.replace(c,b)}}(),chomp:function(a){return a.replace(/(\n|\r)+$/,"")},sentence:function(a,b,c,d){var e;return a=_(a).flatten(),d&&(a=a.slice(0,d)),b&&(a=function(){var c,d,f;f=[];for(c=0,d=a.length;c<d;c++)e=a[c],f.push(e[b]);return f}()),c&&(a=function(){var b,d,f;f=[];for(b=0,d=a.length;b<d;b++)e=a[b],f.push("<"+c+">"+e+"</"+c+">");return f}()),a.length===1?a[0]:""+a.slice(0,-1).join(", ")+" and "+a.slice(-1)},typeInflection:{movie:"movies",person:"people",bucket:"buckets",series:"series"},singularizeType:function(a){var c,d,e;e=this.typeInflection;for(d in e){if(!b.call(e,d))continue;c=e[d];if(a===c)return d}},pluralizeType:function(a){return this.typeInflection[a]},getPagePath:function(b){var c;return b?(c="/"+a.pluralizeType(b.type)+"/"+b.id,b.permalink&&(c+="-"+b.permalink),c):null},getStreamItemPath:function(a){var b;return a?(b="/"+a.id,a.permalink&&(b+="-"+a.permalink),b):null},getSubscribableReason:function(b,c){var d;return c==null&&(c=3),!b||b.type!=="recommendation"?null:(d=_([b.subscriptions_path,b.likes_path]).chain().flatten().compact().value(),d.length?"Suggested because you are interested in "+a.sentence(d,"title","strong",c):null)},beget:function(a){var b;return b=function(){},b.prototype=a,new b},getInternalCategories:function(a){switch(a){case"Movies":return["movie"];case"People":return["person"];case"Topics":return["bucket","genre"];case"TV Shows":return["series"];default:return[a]}},resourceNames:{movies:"Movies",people:"People",buckets:"Topics",series:"TV Shows"},getResourceName:function(a){var c,d,e;e=this.resourceNames;for(d in e){if(!b.call(e,d))continue;c=e[d];if(a===c)return d}},getDisplayName:function(a){return this.resourceNames[a]||displayCategory},months:["January","February","March","April","May","June","July","August","September","October","November","December"],oneDay:864e5,parseDatetime:function(){var a;return a=/^([\d]{4})-([\d]{2})-([\d]{2})T([\d]{2}):([\d]{2}):([\d]{2})([+-])([\d]{2}):([\d]{2})$/,function(b,c){var d,e;return c==null&&(c=0),e=a.exec(b),e?(d=parseInt(e[8],10)*60+parseInt(e[9],10),e[7]==="-"&&(d=-d),new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[4],10)+c,parseInt(e[5],10),parseInt(e[6],10))-d*60*1e3)):null}}(),isYesterday:function(b,c){var d;return d=new Date(b.getTime()-a.oneDay),c.getDate()===d.getDate()&&c.getMonth()===d.getMonth()&&c.getFullYear()===d.getFullYear()},isDifferentDate:function(a,b){return a.getDate()!==b.getDate()||a.getMonth()!==b.getMonth()||a.getFullYear()!==b.getFullYear()},sessionStorage:function(){return window.sessionStorage&&sessionStorage.getItem&&sessionStorage.setItem&&sessionStorage.removeItem?function(a,b){return typeof b=="undefined"?(b=sessionStorage.getItem(a),b!=null&&b.toString?b.toString():b):(sessionStorage.setItem(a,b),b)}:function(b,c){return typeof c=="undefined"?a.getCookie(b):(a.setCookie(b,c),c)}}(),sessionStorageRemove:function(){return window.sessionStorage&&sessionStorage.getItem&&sessionStorage.setItem&&sessionStorage.removeItem?function(a){return sessionStorage.removeItem(a)}:function(b){return a.expireCookie(b)}}(),getCookie:function(a){var b,c,d;return c=document.cookie.indexOf(""+a+"="),c===-1?!1:(d=c+a.length+1,b=document.cookie.indexOf(";",d),b===-1&&(b=document.cookie.length),decodeURIComponent(document.cookie.substring(d,b)))},setCookie:function(a,b){return document.cookie=a+"="+encodeURIComponent(b)},expireCookie:function(a){return document.cookie=""+a+"=nil; expires="+(new Date).toGMTString()},deferMethods:function(c){var d,e,f,g,h,i,j,k,l,m,n;d=c.deferred,g=c.methods,f=c.host||d,k=c.target||f,j=c.onDeferral,h={};if(typeof g=="string")h[g]=f[g];else if(g.length&&g[0])for(l=0,m=g.length;l<m;l++){i=g[l],e=f[i];if(typeof e!="function")throw new TypeError("utils.deferMethods: method "+i+" not found on host "+f);h[i]=e}else h=g;n=[];for(i in h){if(!b.call(h,i))continue;e=h[i];if(typeof e!="function")continue;n.push(k[i]=a.createDeferredFunction(d,e,k,j))}return n},createDeferredFunction:function(a,b,c,d){return c==null&&(c=a),function(){var e;e=arguments;if(a.state()==="resolved")return b.apply(c,e);a.done(function(){return b.apply(c,e)});if(typeof d=="function")return d.apply(c)}},accumulator:{collectedData:{},handles:{},handlers:{},successHandlers:{},errorHandlers:{},interval:2e3},wrapAccumulators:function(b,c){var d,e,f,g,h=this;for(f=0,g=c.length;f<g;f++){e=c[f],d=b[e];if(typeof d!="function")throw new TypeError("utils.wrapAccumulators: method "+e+" not found");b[e]=a.createAccumulator(e,b[e],b)}return $(window).unload(function(){var b,c,d,e;d=a.accumulator.handlers,e=[];for(c in d)b=d[c],e.push(b({async:!1}));return e})},createAccumulator:function(b,d,e){var f,g,h,i,j;return(j=d.__uniqueID)||(j=d.__uniqueID=b+String(Math.random()).replace(".","")),f=a.accumulator,i=function(){return delete f.collectedData[j],delete f.successHandlers[j],delete f.errorHandlers[j]},h=function(){var a,b,c,d;b=f.successHandlers[j];if(b)for(c=0,d=b.length;c<d;c++)a=b[c],a.apply(this,arguments);return i()},g=function(){var a,b,c,d;b=f.errorHandlers[j];if(b)for(c=0,d=b.length;c<d;c++)a=b[c],a.apply(this,arguments);return i()},function(){var a,b,i,k,l;a=arguments[0],l=arguments[1],b=arguments[2],k=4<=arguments.length?c.call(arguments,3):[],a&&(f.collectedData[j]=(f.collectedData[j]||[]).concat(a)),l&&(f.successHandlers[j]=(f.successHandlers[j]||[]).concat(l)),b&&(f.errorHandlers[j]=(f.errorHandlers[j]||[]).concat(b));if(f.handles[j])return;return i=function(a){var b,c;a==null&&(a=a);if(!(c=f.collectedData[j]))return;return b=[c,h,g].concat(k),d.apply(e,b),clearTimeout(f.handles[j]),delete f.handles[j],delete f.handlers[j]},f.handlers[j]=i,f.handles[j]=setTimeout(function(){return i()},f.interval)}},afterLogin:function(){var a,b,d,e,f;return b=arguments[0],e=arguments[1],d=arguments[2],a=4<=arguments.length?c.call(arguments,3):[],d==null&&(d="login"),MovieExplorer.user?e.apply(b,a):(f=function(){return MovieExplorer.unsubscribe(d,f),e.apply(b,a)},MovieExplorer.subscribe(d,f))},ensureLogin:function(){var b,d,e,f,g,h;d=arguments[0],g=arguments[1],h=arguments[2],f=arguments[3],b=5<=arguments.length?c.call(arguments,4):[],f==null&&(f="login"),a.afterLogin.apply(a,[d,g,f].concat(c.call(b)));if(!MovieExplorer.user)return(e=b[0])&&typeof e.preventDefault=="function"&&e.preventDefault(),MovieExplorer.publish("!showAuthPicker",h)},ensureLoginForMethods:function(b,c,d,e){var f,g,h,i,j;e==null&&(e="login"),typeof c=="string"&&(c=[c]),j=[];for(h=0,i=c.length;h<i;h++){g=c[h],f=b[g];if(typeof f!="function")throw new TypeError("utils.ensureLoginForMethods: method "+g+" not found");j.push(b[g]=_(a.ensureLogin).bind(null,b,f,d,e))}return j},userImageURL:function(){var a;return a=MovieExplorer.user&&MovieExplorer.user.get("image_url"),a||"/assets/movie-small.png"},facebookImageURL:function(a,b,c){var d,e;return c==null&&(c="/assets/movie-small.png"),a?(e={type:b},d=MovieExplorer.Facebook.facebookAccessToken,d&&(e.access_token=d),"https://graph.facebook.com/"+a+"/picture?"+$.param(e)):c},loadLib:function(a,b,c){return $.ajax({url:a,dataType:"script",cache:!0,success:b,error:c})},brightcoveLoadStarted:!1,brightcoveDeferred:null,loadBrightcove:function(a){this.brightcoveDeferred||(this.brightcoveDeferred=$.Deferred()),this.brightcoveDeferred.done(a);if(!this.brightcoveLoadStarted)return this.brightcoveLoadStarted=!0,this.loadLib("http://admin.brightcove.com/js/BrightcoveExperiences.js",this.brightcoveDeferred.resolve,this.brightcoveDeferred.reject)},applyBrightcove:function(a,b){return b==null&&(b=".BrightcoveExperience"),this.loadBrightcove(function(){var c;if(!window.brightcove)return;c=$(a);if(c.closest("html").length===0)return;return c.find(b).each(function(){var a,b;return a=this,b=this.parentNode,brightcove.createExperience(a,b,!0)})})},brightcoveEmbedCode:function(a,b){var c;return b==null&&(b={}),c=Math.random().toString().substring(2),_(b).defaults({brightcove_id:a,experience_id:c,width:470,height:270,auto_start:"false"}),Handlebars.partials.brightcove(b)}},a.initialize(),MovieExplorer.utils=a}.call(this),function(){"use strict";var a,b,c=Array.prototype.slice,d=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1},e=Object.prototype.hasOwnProperty;b=MovieExplorer.utils,a=function(){var a,f;return f=function(a){var b,c,d;return d=a.substring(0,4),c=a.substring(5,7)-1,b=a.substring(8,10),Date.UTC(d,c,b)},a=function(){return Handlebars.registerHelper("partial",function(a,b){return new Handlebars.SafeString(Handlebars.VM.invokePartial(Handlebars.partials[a],a,b.hash))}),Handlebars.registerHelper("fb_img_url",function(a,c){return new Handlebars.SafeString(b.facebookImageURL(a,c))}),Handlebars.registerHelper("user_image_url",function(){return new Handlebars.SafeString(b.userImageURL())}),Handlebars.registerHelper("stream_item_path",function(a){return b.getStreamItemPath(a)}),Handlebars.registerHelper("page_path",function(a){return b.getPagePath(a)}),Handlebars.registerHelper("link_to_page",function(a,c){var d,e,f,g,h;return d=Handlebars.Utils.escapeExpression,g=d(b.pluralizeType(a.type)),h=b.getPagePath(a),f=d(a.title||a.name),c=typeof c=="string"?c:f,e='<a href="'+h+'" class="page" data-title="'+f+'">'+c+"</a>",new Handlebars.SafeString(e)}),Handlebars.registerHelper("sentence",function(a,c,d,e){return new Handlebars.SafeString(b.sentence(a,c,d,e))}),Handlebars.registerHelper("embed_brightcove",function(a,c){return a?new Handlebars.SafeString(b.brightcoveEmbedCode(a,c.hash)):""}),Handlebars.registerHelper("if_admin",function(a){var b;return((b=MovieExplorer.user)!=null?b.isAdmin():void 0)?a.fn(this):a.inverse(this)}),Handlebars.registerHelper("if_any",function(){var a,b,d,e;return a=2<=arguments.length?c.call(arguments,0,e=arguments.length-1):(e=0,[]),d=arguments[e++],b=function(a){return a&&!Handlebars.Utils.isEmpty(a)},_(a).some(b)?d.fn(this):d.inverse(this)}),Handlebars.registerHelper("if_before_date",function(a,b,c){return a=f(a),b=f(b),a<b?c.fn(this):c.inverse(this)}),Handlebars.registerHelper("if_within_delta",function(a,c,d){var e,f,g,h;return e=b.parseDatetime(a),h=(new Date).getTime(),g=h-c,f=g<e&&e<h,Handlebars.helpers["if"].call(this,f,d)}),Handlebars.registerHelper("group",function(a,b,c){return parseInt(MovieExplorer.user.get("group"+a),10)===b?c.fn(this):c.inverse(this)}),Handlebars.registerHelper("on_stages",function(){var a,b,e,f;return b=2<=arguments.length?c.call(arguments,0,e=arguments.length-1):(e=0,[]),a=arguments[e++],(f=MovieExplorerConfig.env,d.call(b,f)>=0)?a.fn(this):a.inverse(this)}),Handlebars.registerHelper("with",function(a,b){return!a||Handlebars.Utils.isEmpty(a)?b.inverse(this):b.fn(a)}),Handlebars.registerHelper("without",function(a,b){var c;return c=b.inverse,b.inverse=b.fn,b.fn=c,Handlebars.helpers["with"].call(this,a,b)}),Handlebars.registerHelper("with_user",function(a){var b;return b=MovieExplorer.user?MovieExplorer.user:{},Handlebars.helpers["with"].call(this,b,a)}),Handlebars.registerHelper("_each",Handlebars.helpers.each),Handlebars.registerHelper("each",function(a,b){return Handlebars.Utils.isEmpty(b.hash)||(a=_(a).filter(function(a){var c,d,f;f=b.hash;for(c in f){if(!e.call(f,c))continue;d=f[c];if(a[c]!==d)return!1}return!0})),Handlebars.helpers._each.call(this,a,b)}),Handlebars.registerHelper("pick",function(a,c){var d,e,f,g,h,i,j,k;d=c.fn,e=c.inverse,g=c.hash.max||a.length,h="";if(a&&a.length>0){k=b.shuffle(a).slice(0,g);for(i=0,j=k.length;i<j;i++)f=k[i],h+=d(f)}else h=e(this);return h}),Handlebars.registerHelper("first",function(a,b){var c;return c=a?a[0]:!1,Handlebars.helpers["with"].call(this,c,b)})},a()},a()}.call(this),function(){"use strict",MovieExplorer.Categorizable={categorySelectionHandler:function(a){var b,c;return a.preventDefault(),a.stopPropagation(),b=$(a.target),c=b.data("category")||b.text(),this.showCategory(c)},showCategory:function(a){return a&&(this.displayCategory=a),this.filterCategories=MovieExplorer.utils.getInternalCategories(this.displayCategory),this.filter(this.filterer),this.updateNavigation()},updateNavigation:function(){var a,b,c,d,e,f,g,h;b=this.displayCategory,this.$categoryElements||(this.$categoryElements=this.$(".content-tabs a")),g=this.$categoryElements,h=[];for(c=0,f=g.length;c<f;c++)d=g[c],a=$(d),e=b===a.data("category")||b===a.text(),h.push(a[e?"addClass":"removeClass"]("active"));return h}}}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}};a=MovieExplorer.utils,MovieExplorer.IFrameBridge=function(){function c(c){c==null&&(c={}),this.checkStatus=b(this.checkStatus,this),this.getStatus=b(this.getStatus,this),this.scheduleStatusCheck=b(this.scheduleStatusCheck,this),this.extractXHR=b(this.extractXHR,this),this.defaultConfig=c.defaultConfig||{},this.commonDomain=c.commonDomain,this.bridgeURI=c.bridgeURI,this.el=c.el,c.statusPath&&(this.statusPath=c.statusPath),c.statusCheckInterval&&(this.statusCheckInterval=c.statusCheckInterval),_(this).extend($.Deferred()),a.deferMethods({deferred:this,methods:"send"}),this.statusPath&&this.done(this.scheduleStatusCheck),this.build()}return _(c.prototype).defaults(Backbone.Events),c.prototype.status="online",c.prototype.statusPath=null,c.prototype.statusCheckInterval=6e4,c.prototype.statusCheckHandle=null,c.prototype.build=function(){try{document.domain=this.commonDomain}catch(a){console.error("IFrameBridge#build: setting document.domain failed",a),this.reject();return}if(!this.el)return;return this.el.bridgeLoaded?this.extractXHR():$(this.el).load(this.extractXHR)},c.prototype.extractXHR=function(){var a,b=this;return a=this.el.contentWindow,this.defaultConfig.xhr=function(){return a.ActiveXObject?new a.ActiveXObject("Microsoft.XMLHTTP"):a.XMLHttpRequest?new a.XMLHttpRequest:!1},this.resolve()},c.prototype.send=function(a){var b;if(this.status==="online"){_(a).defaults(this.defaultConfig),(a.type==="POST"||a.type==="PUT")&&typeof a.data=="object"&&(a.data=JSON.stringify(a.data));if((b=MovieExplorer.user)!=null?b.isAdmin():void 0)a.headers["X-Plan"]="gold";return $.ajax(a),!0}return!1},c.prototype.suspend=function(){return this.status="suspended"},c.prototype.enable=function(){return this.status="online"},c.prototype.scheduleStatusCheck=function(){if(this.statusCheckHandle)return;return this.statusCheckHandle=setTimeout(this.getStatus,this.statusCheckInterval)},c.prototype.getStatus=function(){if(!this.statusPath)return;return this.send({url:this.statusPath,cache:!1,success:this.checkStatus,error:this.checkStatus})},c.prototype.checkStatus=function(a){var b;return b=a.overall==="green"?"online":"offline",b!==this.status&&(this.status=b,this.trigger("status",b)),this.statusCheckHandle=null,this.scheduleStatusCheck()},c}()}.call(this),function(){"use strict",MovieExplorer.Refillable={refillAnimationDuration:400,replaceViewFor:function(a){var b,c;return c=this.viewsByCid[a.cid],c?(b=this.findReplacementView(c))?(b.$el.css({opacity:0}).show(),c.$el.css("display","none").after(b.$el),b.$el.animate({opacity:1},this.refillAnimationDuration),!0):!1:!1},findReplacementView:function(a){var b,c,d,e,f,g;d=a.$el.nextAll();if(!d.length)return;g=this.collection.models;for(e=0,f=g.length;e<f;e++){b=g[e];if(!!this.filterCategories&&!_(this.filterCategories).contains(b.get("type")))continue;c=this.viewsByCid[b.cid];if(c.$el.css("display")==="none"&&d.is(c.$el))return c}return null}}}.call(this),function(){"use strict";var a;a=MovieExplorer.utils,MovieExplorer.ServiceProvider=function(){function b(){_(this).extend($.Deferred()),a.deferMethods({deferred:this,methods:["triggerLogin","getLoginStatus"],onDeferral:this.loadSDK})}return b.prototype.loading=!1,b}()}.call(this),function(){"use strict";var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}},d=Object.prototype.hasOwnProperty,e=function(a,b){function e(){this.constructor=a}for(var c in b)d.call(b,c)&&(a[c]=b[c]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};b=MovieExplorer.utils,a=function(a){function f(){this.publishWatch=c(this.publishWatch,this),this.publishSubscribe=c(this.publishSubscribe,this),this.processComment=c(this.processComment,this),this.processLike=c(this.processLike,this),this.facebookLogout=c(this.facebookLogout,this),this.publishAbortionResult=c(this.publishAbortionResult,this),this.loginAbort=c(this.loginAbort,this),this.loginHandler=c(this.loginHandler,this),this.triggerLogin=c(this.triggerLogin,this),this.saveAuthResponse=c(this.saveAuthResponse,this),this.sdkLoadHandler=c(this.sdkLoadHandler,this),f.__super__.constructor.apply(this,arguments),b.deferMethods({deferred:this,methods:["parse","subscribe","postToGraph","getAccumulatedInfo","getInfo"],onDeferral:this.loadSDK}),b.wrapAccumulators(this,["getAccumulatedInfo"]),MovieExplorer.subscribe("loginAbort",this.loginAbort),MovieExplorer.subscribe("logout",this.logout),MovieExplorer.subscribe("topic:subscribe",this.publishSubscribe),MovieExplorer.subscribe("page:watchTrailer",this.publishWatch)}var d;return e(f,a),d="email,user_likes,publish_actions",f.prototype.name="facebook",f.prototype.status=null,f.prototype.accessToken=null,f.prototype.loadSDK=function(){if(this.state()==="resolved"||this.loading)return;return this.loading=!0,window.fbAsyncInit=this.sdkLoadHandler,b.loadLib("https://connect.facebook.net/en_US/all.js",null,this.reject)},f.prototype.sdkLoadHandler=function(){this.loading=!1;try{delete window.fbAsyncInit}catch(a){window.fbAsyncInit=void 0}return FB.init({appId:MovieExplorerConfig.facebookAppId,status:!0,cookie:!0,xfbml:!1}),this.subscribe("auth.logout",this.facebookLogout),this.subscribe("edge.create",this.processLike),this.subscribe("comment.create",this.processComment),this.resolve(),this.getLoginStatus(this.saveAuthResponse)},f.prototype.saveAuthResponse=function(a){var b;return this.status=a.status,b=a.authResponse,b?this.accessToken=b.accessToken:this.accessToken=null},f.prototype.isLoaded=function(){return Boolean(window.FB&&FB.login)},f.prototype.getLoginStatus=function(a,b){return b==null&&(b=!1),FB.getLoginStatus(a,b)},f.prototype.triggerLogin=function(a){return FB.login(_(this.loginHandler).bind(this,a),{scope:d})},f.prototype.loginHandler=function(a,b){var c;return this.saveAuthResponse(b),c=b.authResponse,c?(MovieExplorer.publish("loginSuccessful",a),this.publishSession(c.accessToken)):MovieExplorer.publish("loginAbort",b)},f.prototype.loginAbort=function(){return this.getLoginStatus(this.publishAbortionResult,!0)},f.prototype.publishAbortionResult=function(a){var b;return this.saveAuthResponse(a),b=a.authResponse,b?(MovieExplorer.publish("loginSuccessful",loginContext),MovieExplorer.publish("loginSuccessfulThoughAborted",loginContext),this.publishSession(b.accessToken)):MovieExplorer.publish("loginFail",a)},f.prototype.publishSession=function(a){return MovieExplorer.publish("serviceProviderSession",{provider:this.name,accessToken:a})},f.prototype.facebookLogout=function(a){return this.saveAuthResponse(a)},f.prototype.logout=function(){return this.status=this.accessToken=null},f.prototype.processLike=function(a){var b;MovieExplorer.publish("facebookLike",a),b=this.getStreamItemIdFromUrl(comment.href);if(b)return MovieExplorer.API.postItemFacebookLike(b)},f.prototype.processComment=function(a){var b;MovieExplorer.publish("facebookComment",a.href),b=this.getStreamItemIdFromUrl(a.href);if(b)return MovieExplorer.API.postItemFacebookComment(b,a.commentID)},f.prototype.getStreamItemIdFromUrl=function(a){var b;return(b=a.match(/\/(\d+)$/))!=null?b[1]:void 0},f.prototype.parse=function(a){return FB.XFBML.parse(a)},f.prototype.subscribe=function(a,b){return FB.Event.subscribe(a,b)},f.prototype.postToGraph=function(a,b,c){return FB.api(a,"post",b,function(a){if(c)return c(a)})},f.prototype.postToStream=function(a,b){return this.postToGraph("/me/feed",a,b)},f.prototype.publishSubscribe=function(a){var c;return c="http://moviepilot.com"+b.getPagePath(a.attributes),this.postToGraph("/me/moviepilot-com:subscribe_to",{movie:c})},f.prototype.publishWatch=function(a,c){var d;return d="http://moviepilot.com"+b.getPagePath(a.attributes)+("/trailers/"+c),this.postToGraph("/me/video.watches",{video:d})},f.prototype.getAccumulatedInfo=function(a,b){return typeof a=="string"&&(a=[a]),a=_(a).reduce(function(a,b){return a&&(a+=","),a+=encodeURIComponent(b)},""),FB.api("?ids="+a,b)},f.prototype.getInfo=function(a,b){return FB.api(a,b)},f}(MovieExplorer.ServiceProvider),MovieExplorer.Facebook=new a}.call(this),function(){"use strict";var a,b,c,d=function(a,b){return function(){return a.apply(b,arguments)}},e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};c=MovieExplorer.utils,a=function(a){function g(){this.sdkLoadHandler=d(this.sdkLoadHandler,this),g.__super__.constructor.apply(this,arguments)}var b,e;return f(g,a),b="433412661816.apps.googleusercontent.com",e="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email",g.prototype.name="google",g.prototype.loadSDK=function(){if(this.state()==="resolved"||this.loading)return;return this.loading=!0,c.loadLib("https://apis.google.com/js/client.js?onload=googleClientLoaded",null,this.reject)},g.prototype.sdkLoadHandler=function(){try{delete window.googleClientLoaded}catch(a){window.googleClientLoaded=void 0}return gapi.auth.init(this.resolve)},g.prototype.isLoaded=function(){return Boolean(window.gapi&&gapi.auth&&gapi.auth.authorize)},g.prototype.triggerLogin=function(a){return gapi.auth.authorize({client_id:b,scope:e,immediate:!1},_(this.loginHandler).bind(this,a))},g.prototype.loginHandler=function(a,b){return b?(MovieExplorer.publish("loginSuccessful",a),MovieExplorer.publish("serviceProviderSession",{provider:this.name,accessToken:b.access_token})):MovieExplorer.publish("loginFail")},g.prototype.getLoginStatus=function(a){return gapi.auth.authorize({client_id:b,scope:e,immediate:!0},a)},g.prototype.parsePlusOneButton=function(a){return window.gapi&&gapi.plusone&&gapi.plusone.go?gapi.plusone.go(a):(window.___gcfg={parsetags:"explicit"},c.loadLib("https://apis.google.com/js/plusone.js",function(){try{delete window.___gcfg}catch(b){window.___gcfg=void 0}return gapi.plusone.go(a)}))},g}(MovieExplorer.ServiceProvider),b=new a,MovieExplorer.Google=b,window.googleClientLoaded=b.sdkLoadHandler}.call(this),function(){"use strict";var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}},d=Object.prototype.hasOwnProperty,e=function(a,b){function e(){this.constructor=a}for(var c in b)d.call(b,c)&&(a[c]=b[c]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};b=MovieExplorer.utils,a=function(a){function d(){this.loginHandler=c(this.loginHandler,this),d.__super__.constructor.apply(this,arguments),this.resolve()}return e(d,a),d.prototype.name="twitter",d.prototype.loadSDK=function(){},d.prototype.isLoaded=function(){return this.state()==="resolved"},d.prototype.getLoginStatus=function(a){return a(!1)},d.prototype.loginContext=null,d.prototype.triggerLogin=function(a){return this.loginContext=a,window.open("/auth/twitter","twitter_login","width=675,height=400,location=no,menubar=no,status=no,toolbar=no")},d.prototype.loginHandler=function(a,b){return MovieExplorer.publish("loginSuccessful",this.loginContext),MovieExplorer.publish("serviceProviderSession",{provider:this.name,accessToken:a,accessTokenSecret:b}),this.loginContext=null},d.prototype.parseWidget=function(a){return window.twttr&&twttr.widgets&&twttr.widgets.load?twttr.widgets.load():b.loadLib("https://platform.twitter.com/widgets.js",function(){return twttr.widgets.load()})},d}(MovieExplorer.ServiceProvider),MovieExplorer.Twitter=new a}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty;MovieExplorer.Subscriber={globalSubscriptions:null,subscribeEvent:function(a,b){var c,d;this.globalSubscriptions||(this.globalSubscriptions={}),c=(d=this.globalSubscriptions)[a]||(d[a]=[]);if(_(c).include(b))return;return c.push(b),MovieExplorer.subscribe(a,b)},unsubscribeEvent:function(a,b){var c,d;if(!this.globalSubscriptions)return;return c=this.globalSubscriptions[a],c&&(d=_(c).indexOf(b),d>-1&&c.splice(d,1),c.length===0&&delete this.globalSubscriptions[a]),MovieExplorer.unsubscribe(a,b)},unsubscribeAllEvents:function(){var b,c,d,e,f,g;if(!this.globalSubscriptions)return;g=this.globalSubscriptions;for(d in g){if(!a.call(g,d))continue;c=g[d];for(e=0,f=c.length;e<f;e++)b=c[e],MovieExplorer.unsubscribe(d,b)}return this.globalSubscriptions=null}}}.call(this),function(){"use strict",MovieExplorer.Tabable={visible:!1,show:function(){return this.visible=!0,this.tabableContainer().show()},hide:function(){return this.visible=!1,this.tabableContainer().hide()},tabableContainer:function(){return this.tabableSelector?this.$(this.tabableSelector):this.$el}}}.call(this),function(){"use strict"
;var a,b;b=MovieExplorer.utils,a={status:"online",defaultConfig:{timeout:6e4,dataType:"json",contentType:"application/json",headers:{}},initialize:function(){return this.public=new MovieExplorer.IFrameBridge({commonDomain:MovieExplorerConfig.commonDomain,bridgeURI:"//"+MovieExplorerConfig.moviepilotPublicApi+"/bridge.html",defaultConfig:b.beget(this.defaultConfig),el:document.getElementById("public-api-iframe")}),this.private=new MovieExplorer.IFrameBridge({commonDomain:MovieExplorerConfig.commonDomain,bridgeURI:"//"+MovieExplorerConfig.moviepilotApi+"/bridge.html",defaultConfig:b.beget(this.defaultConfig),el:document.getElementById("api-iframe")}),$(document).ajaxError(_(this.ajaxError).bind(this)),MovieExplorer.subscribe("logout",_(this.resetAuthenticityToken).bind(this)),b.wrapAccumulators(this,["viewedSuggestions"]),this.private.bind("status",_(this.changeStatus).bind(this))},ajaxError:function(a,b,c,d){return console.error("API.ajaxError",c.type,c.url,">",b.status,d),MovieExplorer.publish("ajaxError",c.type,c.url,b.status,d),this.private.getStatus()},extractAuthenticityToken:function(a,b){var c;return((c=this.private.defaultConfig).headers||(c.headers={}))["X-CSRF-Token"]=b.authenticity_token,a(b)},resetAuthenticityToken:function(){var a;return(a=this.private.defaultConfig.headers)!=null?a["X-CSRF-Token"]=null:void 0},changeStatus:function(a){return this.status=a,a==="online"?this.public.enable():this.public.suspend(),MovieExplorer.publish("api:"+a)},retrieve:function(a){return this.public.send(a)||this.private.send(a)},send:function(a){return this.private.send(a)},getSession:function(a,b){return this.send({url:"/v1/session",success:_(this.extractAuthenticityToken).bind(this,a),error:b})},createSession:function(a,b){var c,d,e;return c=(e=MovieExplorerConfig.env)==="production"||e==="pre"||e==="staging"?"https":"http",d=""+c+"://"+MovieExplorerConfig.moviepilotApi+"/v1/session/create",$.ajax({url:d,dataType:"jsonp",success:_(this.extractAuthenticityToken).bind(this,b),data:a})},destroySession:function(a,b){return this.send({type:"DELETE",url:"/v1/session",success:a,error:b})},sendUser:function(a,b,c,d){return this.send({type:"PUT",url:"/v1/users/"+a,success:c,error:d,data:{user:b}})},getItem:function(a,b,c){return this.send({type:"GET",url:"/v1/containers/"+a,success:b,error:c})},getPersonalizedItem:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"GET",url:"/v1/users/"+d+"/containers/"+a,success:b,error:c})},getInitialItems:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"GET",url:"/v1/users/"+d+"/containers/"+a+"/initial_items",success:b,error:c})},dismissItem:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+d+"/containers/"+a+"/dismiss",success:b,error:c})},postItemView:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/containers/"+a+"/open",success:c,error:d,data:{source:b}})},postItemFacebookLike:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+d+"/containers/"+a+"/like",success:b,error:c})},postItemFacebookComment:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/containers/"+a+"/comment",success:c,error:d,data:{comment_id:b}})},getQuestionnaire:function(a,b,c){var d,e;return d={type:"GET",success:b,error:c},MovieExplorer.user?(e=MovieExplorer.user.id,d.url="/v1/users/"+e+"/questionnaires/"+a,this.send(d)):(d.url="/v1/questionnaires/"+a,this.send(d))},answerQuestion:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/actions/answers/"+a,success:c,error:d,data:{source:b}})},getStream:function(a,b,c){var d;return c==null&&(c={}),d=MovieExplorer.user.id,this.send({type:"GET",url:"/v1/users/"+d+"/stream",success:a,error:b,data:c})},getGlobalStream:function(a,b,c){return this.send({type:"GET",url:"/v1/containers",success:b,error:c,data:a})},getSubscriptions:function(a,b,c){var d,e;return e=MovieExplorer.user.id,d=a&&a!=="all"?{show:a}:{},this.send({type:"GET",url:"/v1/users/"+e+"/subscriptions",success:b,error:c,data:d})},getSubscribables:function(a,b,c){var d,e;return d={type:"GET",success:b,error:c,data:a&&a!=="all"?{show:a}:{}},MovieExplorer.user?(e=MovieExplorer.user.id,d.url="/v1/users/"+e+"/subscribables",this.send(d)):(d.url="/v1/subscribables",this.send(d))},addSubscription:function(a,b,c,d){var e,f;return f=MovieExplorer.user.id,e=b?{level:b}:{},{level:b},this.send({type:"PUT",url:"/v1/users/"+f+"/subscriptions/"+a,success:c,error:d,data:e})},removeSubscription:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"DELETE",url:"/v1/users/"+d+"/subscriptions/"+a,success:b,error:c})},dismissSubscribable:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+d+"/subscribables/"+a+"/dismiss",success:b,error:c})},getSuggestions:function(a,b,c,d){var e;return a==null&&(a="all"),a=a.toLowerCase(),e=MovieExplorer.user.id,this.send({type:"GET",url:"/v1/users/"+e+"/suggestions/"+a,success:c,error:d,data:{limit:b}})},getNodeSuggestions:function(a,b,c,d){return this.retrieve({type:"GET",url:"/v1/pages/"+a+"/suggestions",success:c,error:d})},confirmSuggestion:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/suggestions/"+a+"/confirm",success:c,error:d,data:{source:b}})},deleteSuggestion:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/suggestions/"+a+"/delete",success:c,error:d,data:{source:b}})},skipSuggestion:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"POST",url:"/v1/users/"+e+"/suggestions/"+a+"/skip",success:c,error:d,data:{source:b}})},viewedSuggestions:function(a,b,c,d){var e;return d==null&&(d={}),e=MovieExplorer.user.id,this.send(_(d).extend({type:"POST",url:"/v1/users/"+e+"/suggestions/view",success:b,error:c,data:{items:a}}))},getLikes:function(a,b){var c;return c=MovieExplorer.user.id,this.send({type:"GET",url:"/v1/users/"+c+"/likes",success:a,error:b})},unlike:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"DELETE",url:"/v1/users/"+d+"/likes/"+a,success:b,error:c})},subscribe:function(a,b,c,d){var e;return e=MovieExplorer.user.id,this.send({type:"PUT",url:"/v1/users/"+e+"/subscriptions/"+a,success:c,error:d,data:{subscription_level:b}})},unsubscribe:function(a,b,c){var d;return d=MovieExplorer.user.id,this.send({type:"DELETE",url:"/v1/users/"+d+"/subscriptions/"+a,success:b,error:c})},getOpinions:function(a,b,c){return this.send({type:"GET",url:"/v1/answer_feed",success:b,error:c,data:a})},suggestLikes:function(a,b,c,d){return this.send({type:"GET",url:"/v1/search/suggest_likes/"+a,success:c,error:d,data:{limit:b}})},getPage:function(a,b,c){return this.retrieve({type:"GET",url:"/v1/pages/"+a,success:b,error:c})},getPageWithDiscoveryline:function(a,b,c){return this.send({type:"GET",url:"/v1/pages/"+a+"/discoveryline",success:b,error:c})},getPageSubscribables:function(a,b,c){return this.retrieve({type:"GET",url:"/v1/pages/"+a+"/subscribables",success:b,error:c})},getPageItems:function(a,b,c,d,e,f){var g,h;return MovieExplorer.user?(g=MovieExplorer.user.id,h="/v1/users/"+g+"/pages/"+a+"/containers"):h="/v1/pages/"+a+"/containers",this.send({type:"GET",url:h,success:e,error:f,data:{page:b,per_page:c,show:d}})}},a.initialize(),MovieExplorer.API=a}.call(this),function(){"use strict";var a,b,c=Object.prototype.hasOwnProperty;b=MovieExplorer.utils,a={initialize:function(){if(MovieExplorerConfig.disableTracking)return;return this.bindSubscribers()},gaCustomVar:function(a,b,c){return _gaq.push(["_setCustomVar",Number(a),String(b),String(c),2])},gaPageview:function(a){return _gaq.push(a?["_trackPageview",a]:["_trackPageview"])},gaEvent:function(a,b,c,d){return _gaq.push(["_trackEvent",a,b,c,d])},firstShowModule:!0,bindSubscribers:function(){var a,b,d,e;d=this.subscribers,e=[];for(a in d){if(!c.call(d,a))continue;b=d[a],e.push(MovieExplorer.subscribe(a,_(b).bind(this)))}return e},subscribers:{loginStatus:function(a){var c,d;return this.gaCustomVar(1,"logged_in",a?"true":"false"),this.gaCustomVar(2,"group_half",MovieExplorer.sessionController.groupByTime),c=b.sessionStorage("originalURL"),d=c?(b.sessionStorageRemove("originalURL"),c):location.pathname+location.search,this.gaPageview(d)},loginAttempt:function(a){return this.gaPageview("/funnel/signup_start"),this.gaEvent("funnel","signup_start",a.description)},loginSuccessful:function(a){return this.gaPageview("/funnel/signup_extended_dialog"),this.gaEvent("funnel","signup_extended_dialog"),this.gaPageview("/funnel/signup_completed"),this.gaEvent("funnel","signup_completed")},loginSuccessfulThoughAborted:function(a){return this.gaPageview("/funnel/signup_completed"),this.gaEvent("funnel","signup_completed")},loginFail:function(a,b){return this.gaPageview("/funnel/signup_failed"),this.gaEvent("funnel","signup_failed")},login:function(a){return this.gaCustomVar(1,"logged_in","true"),this.gaEvent("session","login")},"authPicker:pick":function(a){return this.gaEvent("authPicker","pick",a)},"authPicker:close":function(){return this.gaEvent("authPicker","close")},"authPicker:decline":function(){return this.gaEvent("authPicker","decline")},"incentive:subscribe":function(a){return this.gaEvent("incentive","subscribe",a.get("name"))},"incentive:close":function(a){return this.gaEvent("incentive","close",a.get("name"))},"incentive:decline":function(a){return this.gaEvent("incentive","decline",a.get("name"))},"showcase:navigate":function(a){return this.gaEvent("showcase",a)},showModule:function(a){var b,c,d;b=MovieExplorer.applicationView,d=b.url+location.search,c=b.getController(a);if(this.firstShowModule){this.firstShowModule=!1;return}return this.gaPageview(d)},"streamItem:view":function(a){var b;if(a.get("openedAutomatically"))return;return b="/"+a.id+"-"+a.get("permalink")+location.search,this.gaPageview(b)},"streamItem:dismiss":function(a){var b,c;return b=(c=a.get("content"))!=null?c.title:void 0,this.gaEvent("stream","dismiss_item",b)},"questionnaire:answerQuestion":function(a,b,c){var d;return d=a.get("question"),this.gaEvent("questionnaire","answer",d)},facebookLike:function(a){return this.gaEvent("facebook","like",a)},facebookComment:function(a){return this.gaEvent("facebook","comment",a)},"opinion:pageActivation":function(a){return this.gaEvent("opinions","opinion to page",a.get("question"))},"opinion:questionnaireActivation":function(a){return this.gaEvent("opinions","opinion to questionnaire",a.get("question"))},"search:new":function(a){return this.gaEvent("search","request",a)},"topic:subscribe":function(a){var b;return b=a.get("name")||a.get("title"),this.gaEvent("subscription","create",b)},"topic:unsubscribe":function(a){var b;return b=a.get("name")||a.get("title"),this.gaEvent("subscription","remove",b)},"topic:dismissAsSubscription":function(a){var b;return b=a.get("name")||a.get("title"),this.gaEvent("subscription","dismiss",b)},"topic:like":function(a,b){return this.gaEvent("topic","like")},"topic:dislike":function(a,b){return this.gaEvent("topic","deleteSuggestion",a.get("title"))},"topic:skip":function(a,b){return this.gaEvent("topic","skipSuggestion",a.get("title"))},"topic:unlike":function(a){return this.gaEvent("topic","unlike",a.get("title"))},"notification:show":function(a){return this.gaEvent("notification","show",a.get("message"))},"notification:click":function(a){var b;return b=a.get("message"),this.gaEvent("notification","click",a.get("message"))},"notification:close":function(a,b){if(!b.userInvoked)return;return this.gaEvent("notification","close",a.get("message"))}}},a.initialize(),MovieExplorer.Analytics=a}.call(this),function(){"use strict";var a,b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};a=MovieExplorer.utils,MovieExplorer.Router=function(b){function d(){d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return this.registerRoutes(),this.startHistory()},d.prototype.registerRoutes=function(){var b,c,d,e,f,g,h,i,j,k;this.match("","stream"),this.match(":id","stream"),this.match("profile","profile"),this.match("profile/:tab","profile"),this.match("recommendations","recommendations"),this.match("recommendations/:category","recommendations"),this.match("opinions","opinions"),this.match("discover/:id","discoveryline"),c="bucket movie series person".split(" ");for(g=0,i=c.length;g<i;g++)f=c[g],e=a.pluralizeType(f),this.match(""+e+"/:id","pages",{type:f}),this.match(""+e+"/:id/trailers/:trailer_id","pages",{type:f}),this.match(""+e+"/:id/containers/:container_id","pages",{type:f});d="about changelog contact facebookconnect faq press publishers termsofservice".split(" "),k=[];for(h=0,j=d.length;h<j;h++)b=d[h],k.push(this.match(b,"staticPages"));return k},d.prototype.match=function(a,b,c){var d,e;return Backbone.history||(Backbone.history=new Backbone.History),d=[],a=a.replace(/:(\w+)/g,function(a,b){return d.push(b),"([\\w-]+)"}),e=new RegExp("^"+a+"(?=\\?|$)"),Backbone.history.route(e,function(a,f){var g,h,i,j,k,l,m;i=e.exec(a),k={},m=i.slice(1);for(g=0,l=m.length;g<l;g++)h=m[g],j=d[g],k[j]=h;return _(k).extend(f,c),_(k).defaults({path:i[0],navigate:!1}),MovieExplorer.publish("!startupModule",b,k)})},d.prototype.follow=function(a,b){var c,d,e,f;b==null&&(b={}),a=a.replace(/^(\/#|\/)/,""),f=Backbone.history.handlers;for(d=0,e=f.length;d<e;d++){c=f[d];if(c.route.test(a))return c.callback(a,b),!0}return!1},d.prototype.startHistory=function(){return $.browser.msie&&$.browser.version<8?this.follow(location.pathname+location.hash):Backbone.history.start({pushState:!0})},d}(Backbone.Router)}.call(this),function(){"use strict";var a;a=MovieExplorer,MovieExplorer.ApplicationController=function(){function b(){}return b.prototype.startup=function(){return this.startupApplication(),this.startupCollections(),this.startupNotifier(),this.startupMaintenanceView(),this.startupEditorView(),this.startupSidebars()},b.prototype.startupApplication=function(){return this.view=new a.ApplicationView},b.prototype.startupCollections=function(){return this.subscribables=new a.Subscribables,this.likes=new a.Likes,this.subscriptions=new a.Subscriptions,this.suggestions=new a.Suggestions},b.prototype.startupNotifier=function(){return this.notifier=new a.Notifier,this.notifierView=new a.NotifierView({model:this.notifier})},b.prototype.startupMaintenanceView=function(){return this.maintenanceView=new a.MaintenanceView},b.prototype.startupEditorView=function(){return this.editorView=new a.EditorView},b.prototype.startupSidebars=function(){return this.search=new a.Search,this.searchView=new a.SearchView({collection:this.search}),this.anonymousDashboardView=new a.AnonymousDashboardView,this.dashboardView=new a.DashboardView,this.activeSubscriptionsView=new a.ActiveSubscriptionsView({collection:this.subscriptions}),this.suggestionsView=new a.SuggestionsView({collection:this.suggestions})},b}()}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}};MovieExplorer.DiscoverylineController=function(){function b(){this.setTitle=a(this.setTitle,this)}return b.prototype.title="",b.prototype.historyURL=function(a){var b;return b=a.permalink?"-"+b:"","discover/"+a.id+b},b.prototype.currentId=null,b.prototype.startup=function(a){var b;return a==null&&(a={}),b=MovieExplorer.PagesController.prototype.getModelData.call(this,a),this.page=new MovieExplorer.PageWithDiscoveryline(b),this.view=new MovieExplorer.PageWithDiscoverylineView({model:this.page}),this.page.done(this.setTitle),this.currentId=this.page.id},b.prototype.setTitle=function(){var a;if(a=this.page.get("name"))return this.title="Upcoming Movies in “"+a+"”"},b.prototype.teardown=function(){return this.page.destroy(),this.title="",this.model=this.view=this.currentId=null},b}()}.call(this),function(){"use strict",MovieExplorer.OpinionsController=function(){function a(){}return a.prototype.title="Opinions",a.prototype.historyURL="opinions",a.prototype.startup=function(){return this.opinions||(this.opinions=new MovieExplorer.Opinions),this.view||(this.view=new MovieExplorer.OpinionsView({collection:this.opinions}))},a.prototype.teardown=function(){return this.opinions.destroy(),this.opinions=this.view=null},a}()}.call(this),function(){"use strict",MovieExplorer.PagesController=function(){function a(){}return a.prototype.title="",a.prototype.historyURL=function(a){var b,c,d;return d=MovieExplorer.utils.pluralizeType(a.type),c=this.model.get("permalink")||a.permalink,c=c?"-"+c:"",b=a.container_id?"/containers/"+a.container_id:"",d+"/"+this.model.id+c+b},a.prototype.currentId=null,a.prototype.startup=function(a){var b;return a==null&&(a={}),b=this.getModelData(a),this.title=b.name,this.createModelAndView(b),MovieExplorer.sessionController.firstVisit&&!MovieExplorer.user&&(this.incentiveView=new MovieExplorer.IncentiveView({model:this.model})),this.insertInitialItem(a)},a.prototype.getModelData=function(a){var b,c,d;return b=MovieExplorerConfig,c=b.initialPage,c&&!c.error?(d=c,delete b.initialPage,d.simple_page==null&&(d.simple_page=!1)):d={id:a.id,type:a.type,permalink:a.permalink,name:a.title,simple_page:a.simplePage!=null?a.simplePage:!1},d.trailer_id=a.trailer_id,d.id=String(parseInt(d.id,10)),d},a.prototype.createModelAndView=function(a){var b,c,d,e,f,g;c=MovieExplorer,e=a.type,d=a.simple_page,d?(b=c.SimplePage,g=c.SimplePageView):(f=e.substring(0,1).toUpperCase()+e.substring(1),b=c[f],g=c[""+f+"View"]);if(typeof b!="function")throw new Error("PagesController#startup: model for "+e+" not found");if(typeof g!="function")throw new Error("PagesController#startup: view for "+e+" not found");return this.model=new b(a),this.view=new g({model:this.model}),this.currentId=a.id},a.prototype.insertInitialItem=function(a){var b,c;if(!this.model.insertInitialItem)return;b=MovieExplorerConfig.initialItem,b&&!b.error?(c=b,delete MovieExplorerConfig.initialItem):a.container_id&&(c={id:a.container_id});if(c)return c.id=String(parseInt(c.id,10)),this.model.insertInitialItem(c)},a.prototype.teardown=function(){return this.model.destroy(),this.incentiveView&&this.incentiveView.destroy(),this.title="",this.model=this.view=this.currentId=this.incentiveView=null},a}()}.call(this),function(){"use strict",MovieExplorer.ProfileController=function(){function a(){}return a.prototype.title="Edit Profile",a.prototype.historyURL=function(a){return _(["profile",a.tab]).compact().join("/")},a.prototype.startup=function(a){this.view||(this.view=new MovieExplorer.ProfileView({model:MovieExplorer.user}));if(a.tab)return this.view.activateTab(a.tab)},a.prototype.teardown=function(){return this.view.destroy(),this.view=null},a}()}.call(this),function(){"use strict",MovieExplorer.RecommendationsController=function(){function a(){}return a.prototype.title="Recommendations",a.prototype.historyURL=function(a){return _(["recommendations",a.category]).compact().join("/")},a.prototype.startup=function(a){this.view||(this.view=new MovieExplorer.RecommendationsView({collection:MovieExplorer.applicationController.subscribables}));if(a.category)return this.view.activateTab(a.category)},a.prototype.teardown=function(){return this.view.destroy(),this.view=null},a}()}.call(this),function(){"use strict";var a,b,c,d=function(a,b){return function(){return a.apply(b,arguments)}};c=MovieExplorer.utils,b=c.sessionStorage,a=c.sessionStorageRemove,MovieExplorer.SessionController=function(){function i(){this.hideLogin=d(this.hideLogin,this),this.showLogin=d(this.showLogin,this),this.logout=d(this.logout,this),this.funnelFinished=d(this.funnelFinished,this),this.apiSession=d(this.apiSession,this),this.sessionCreated=d(this.sessionCreated,this),this.serviceProviderSession=d(this.serviceProviderSession,this),this.loginAttempt=d(this.loginAttempt,this),this.triggerLogin=d(this.triggerLogin,this),this.processSession=d(this.processSession,this);var a;a=MovieExplorer,c.deferMethods({deferred:a,host:this,methods:"showLogin"}),a.subscribe("loginAttempt",this.loginAttempt),a.subscribe("serviceProviderSession",this.serviceProviderSession),a.subscribe("apiSession",this.apiSession),a.subscribe("funnel:finished",this.funnelFinished),a.subscribe("login",this.login),a.subscribe("logout",this.logout),a.subscribe("!login",this.triggerLogin),a.subscribe("!showAuthPicker",this.showAuthPicker),a.subscribe("!showLogin",this.showLogin),a.subscribe("!hideLogin",this.hideLogin)}var a,e,f,g,h;e=["facebook","google","twitter"],f={};for(g=0,h=e.length;g<h;g++)a=e[g],f[a]=MovieExplorer[c.upcase(a)];return i.prototype.loginView=null,i.prototype.authPickerView=null,i.prototype.funnelSuggestionsView=null,i.prototype.serviceProvider=null,i.prototype.serviceProviderName=null,i.prototype.loginContext=null,i.prototype.startup=function(){return this.setGroupByTime(),this.getSession()},i.prototype.groupByTime=null,i.prototype.firstVisit=null,i.prototype.setGroupByTime=function(){var a;return a=b("groupByTime"),a?(this.groupByTime=Number(a),this.firstVisit=!1):(this.groupByTime=(new Date).getSeconds()%4,this.firstVisit=!0,b("groupByTime",this.groupByTime)),MovieExplorer.publish("groupByTime",this.groupByTime)},i.prototype.createUser=function(a){var b;return b=new MovieExplorer.User(a),MovieExplorer.user=b,MovieExplorer.publish("apiSession",b)},i.prototype.getSession=function(){return MovieExplorer.API.getSession(this.processSession,this.logout)},i.prototype.processSession=function(a){return this.createUser(a.user)},i.prototype.showAuthPicker=function(a){var b,c,d;this.authPickerView=new MovieExplorer.AuthPickerView({loginContext:a}),d=[];for(b in f)c=f[b],d.push(c.loadSDK());return d},i.prototype.triggerLogin=function(a,b){var c;c=f[a];if(!c.isLoaded()){MovieExplorer.publish("serviceProviderMissing",a,b);return}return MovieExplorer.publish("loginAttempt",b,a),c.triggerLogin(b)},i.prototype.loginAttempt=function(a){return this.loginContext=a},i.prototype.serviceProviderSession=function(a){var b;return this.serviceProviderName=a.provider,this.serviceProvider=f[this.serviceProviderName],b={provider:a.provider,access_token:a.accessToken},a.accessTokenSecret&&(b.access_token_secret=a.accessTokenSecret),MovieExplorer.API.createSession(b,this.sessionCreated)},i.prototype.sessionCreated=function(a){var b;return b=a.user,b.isNew=a.status===201,this.createUser(b)},i.prototype.apiSession=function(a){return this.hideLogin(),a.get("isNew")?this.showFunnelSuggestions():this.publishLogin()},i.prototype.funnelFinished=function(){return this.hideFunnelSuggestions(),this.publishLogin()},i.prototype.publishLogin=function(){return MovieExplorer.publish("login",MovieExplorer.user)},i.prototype.showFunnelSuggestions=function(){return this.funnelSuggestionsView||(this.funnelSuggestionsView=new MovieExplorer.FunnelSuggestionsView({collection:MovieExplorer.applicationController.subscribables})),this.funnelSuggestionsView.moveIn()},i.prototype.hideFunnelSuggestions=function(){var a=this;return this.funnelSuggestionsView.moveOut(function(){return a.funnelSuggestionsView.destroy(),a.funnelSuggestionsView=null})},i.prototype.login=function(){return MovieExplorer.publish("loginStatus",!0)},i.prototype.logout=function(){return MovieExplorer.user&&(MovieExplorer.user.destroy(),MovieExplorer.user=null,MovieExplorer.API.destroySession()),this.loginContext=this.serviceProvider=this.serviceProviderName=null,MovieExplorer.publish("loginStatus",!1),this.showLogin()},i.prototype.showLogin=function(a){var b;a==null&&(a={}),b=a.force||!MovieExplorer.applicationView.anonymouslyAccessible();if(b)return $(".page-wrapper").hide(),this.loginView||(this.loginView=new MovieExplorer.LoginView)},i.prototype.hideLogin=function(){if(!this.loginView)return;return this.loginView.destroy(),this.loginView=null,$(".page-wrapper").show()},i}()}.call(this),function(){"use strict",MovieExplorer.StaticPagesController=function(){function a(){}return a.prototype.title="",a.prototype.historyURL=function(a){return a.path||a.id},a.prototype.currentId=null,a.prototype.startup=function(a){var b;return a==null&&(a={}),b=this.getModelData(a),this.createModelAndView(b)},a.prototype.getModelData=function(a){var b,c;return c={id:a.path||a.id},b=$("#static-page-accessible"),b.length&&(c.content=b.children(),b.detach()),c},a.prototype.createModelAndView=function(a){if(!a.id||a.id===this.currentId)return;return MovieExplorer.publish("!hideLogin"),this.model=new MovieExplorer.StaticPage(a),this.view=new MovieExplorer.StaticPageView({model:this.model}),this.currentId=a.id},a.prototype.teardown=function(){return this.model.destroy(),this.model=this.view=this.currentId=null},a}()}.call(this),function(){"use strict",MovieExplorer.StreamController=function(){function a(){}return a.prototype.title="News Stream",a.prototype.historyURL=function(a){return this.currentId?String(this.currentId)+(this.initialItem.permalink?"-"+this.initialItem.permalink:""):""},a.prototype.currentId=null,a.prototype.initialItem=null,a.prototype.startup=function(a){return a==null&&(a={}),this.stream||(this.stream=new MovieExplorer.NewsStream),this.view||(this.view=new MovieExplorer.NewsStreamView({collection:this.stream})),this.stream.applyItemBuffer(),this.insertInitialItem(a)},a.prototype.insertInitialItem=function(a){var b,c;return b=MovieExplorerConfig.initialItem,b&&!b.error?(c=b,delete MovieExplorerConfig.initialItem):a.id&&(c=a),c?(c.id=String(parseInt(c.id,10)),this.currentId=c.id,this.initialItem=c,this.stream.insertInitialItem(c)):this.currentId=this.initialItem=null},a.prototype.teardown=function(){return this.view.destroy(),this.view=this.currentId=this.initialItem=null},a}()}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Model=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),_(c.prototype).defaults(MovieExplorer.Subscriber),c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.api=MovieExplorer.API},c.prototype.fetch=function(){throw new Error("MovieExplorer.Model doesn't use Backbone's fetch method")},c.prototype.save=function(){throw new Error("MovieExplorer.Model doesn't use Backbone's save method")},c.prototype.getAttributes=function(){return this.attributes},c.prototype.destroyed=!1,c.prototype.destroy=function(){var a,b,c,d;if(this.destroyed)return;this.trigger("destroy",this),this.unsubscribeAllEvents(),b="collection attributes _escapedAttributes _previousAttributes _callbacks".split(" ");for(c=0,d=b.length;c<d;c++)a=b[c],delete this[a];return this.destroyed=!0},c}(Backbone.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Page=function(b){function d(){this.processPage=a(this.processPage,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),this.get("description")?this.resolve():this.getPage()},d.prototype.getPage=function(){return this.api.getPage(this.id,this.processPage)},d.prototype.processPage=function(a){if(this.destroyed)return;return this.set(a),this.resolve()},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.FullPage=function(b){function d(){this.replaceItems=a(this.replaceItems,this),this.addItems=a(this.addItems,this),this.getAndAddItems=a(this.getAndAddItems,this),this.doInsertInitialItem=a(this.doInsertInitialItem,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialItemId=null,d.prototype.defaults={itemsPage:1,itemsPerPage:5},d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.set({items:new MovieExplorer.PageStream([],{pageId:this.id})}),this.setZoomLevel(),this.getAndAddItems(),this.bind("change:itemsPage",this.getAndAddItems),this.bind("change:itemsPerPage",this.getAndReplaceItems),this.bind("change:zoomLevel",this.getAndReplaceItems)},d.prototype.setZoomLevel=function(){var a,b,c;return c=MovieExplorer.applicationController.subscriptions,c.state()==="resolved"?(b=c.get(this.id),b?a=b.get("subscription_level").replace(/_subscription$/,""):a="featured_stories"):a="featured_stories",this.set({zoomLevel:a})},d.prototype.insertInitialItem=function(a){return this.initialItemId=a.id,a.content?this.doInsertInitialItem(a):this.api.getItem(a.id,this.doInsertInitialItem)},d.prototype.doInsertInitialItem=function(a){var b;return a.isInitialItem=!0,a.open=!0,a.openedAutomatically=!0,b=this.get("items"),b.remove(a.id),b.add(a,{at:0})},d.prototype.getAndAddItems=function(){return this.api.getPageItems(this.id,this.get("itemsPage"),this.get("itemsPerPage"),this.get("zoomLevel"),this.addItems)},d.prototype.addItems=function(a){var b,c,d,e,f,g,h,i;if(this.destroyed)return;if(!a||!a.length){this.trigger("endOfStream");return}f=this.get("items"),b=f.length===0,d=Boolean(this.initialItemId),i=[];for(c=0,h=a.length;c<h;c++)e=a[c],g=c===0&&b&&!d,e.open=g,g&&(e.openedAutomatically=!0),f.get(e)?i.push(void 0):i.push(f.add(e));return i},d.prototype.getAndReplaceItems=function(){return this.set({itemsPage:1},{silent:!0}),this.api.getPageItems(this.id,this.get("itemsPage"),this.get("itemsPerPage"),this.get("zoomLevel"),this.replaceItems)},d.prototype.replaceItems=function(a){var b,c;if(this.destroyed)return;return this.initialItemId=null,c=this.get("items"),!a||a.length===0?c.reset():(b=a[0],b.open=!0,b.openedAutomatically=!0,c.update(a))},d.prototype.subscribe=function(){var a;return a=new MovieExplorer.Topic({id:this.id,type:this.get("type"),name:this.get("name"),facebook_id:this.get("facebook_id"),permalink:this.get("permalink")}),a.subscribe()},d}(MovieExplorer.Page)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Bucket=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c}(MovieExplorer.FullPage)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Collection=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),_(c.prototype).defaults(MovieExplorer.Subscriber),c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.api=MovieExplorer.API},c.prototype.addAtomic=function(a,b){var c,d;b==null&&(b={});if(!a.length)return;b.silent=!0,c=typeof b.at=="number"?"pop":"shift";while(d=a[c]())this.add(d,b);return this.trigger("reset")},c.prototype.update=function(a,b){var c,d,e,f,g,h,i,j,k;b==null&&(b={}),c=this.pluck("id").join(),e=_(a).pluck("id"),g=e.join();if(c!==g){i=_(e),d=this.models.length-1;while(d>=0)f=this.models[d],i.include(f.id)||this.remove(f),d--}if(c!==g||!!b.deep){k=[];for(d=0,j=a.length;d<j;d++){f=a[d],h=this.get(f.id);if(h){if(!b.deep)continue;k.push(h.set(f))}else k.push(this.add(f,{at:d}))}return k}},c.prototype.destroyed=!1,c.prototype.destroy=function(){if(this.destroyed)return;return this.trigger("destroy",this),this.reset([],{silent:!0}),this.destroyed=!0},c}(Backbone.Collection)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.DiscoverylineItem=function(c){function e(){this.processFacebookInfo=b(this.processFacebookInfo,this),this.processReason=b(this.processReason,this),e.__super__.constructor.apply(this,arguments)}return d
(e,c),e.prototype.initialize=function(a){return e.__super__.initialize.apply(this,arguments),this.getReason(),(!this.has("director")||!this.has("starring"))&&this.getFacebookInfo(),this.setProductionSequence(),this.set({activity:new MovieExplorer.DiscoverylineActivity({id:this.id})})},e.prototype.getReason=function(){var a;return a=MovieExplorer.applicationController.subscribables,a.done(this.processReason)},e.prototype.processReason=function(){var b,c,d,e;e=MovieExplorer.applicationController.subscribables,d=e.get(this.id);if(!d)return;b=d.get("reason");if(!b)return;c=a.getSubscribableReason(b);if(!c)return;return this.set({reasonOutput:c})},e.prototype.getFacebookInfo=function(){var a;a=this.get("facebook_id");if(!a)return;return MovieExplorer.Facebook.getAccumulatedInfo(a,this.processFacebookInfo)},e.prototype.processFacebookInfo=function(b){var c,d,e;if(!b)return;c=this.get("facebook_id"),d=b[c];if(!d||!d.link)return;return e=d.starring,e&&(e=a.sentence(e.split(/\s*,\s*/),null,null,3)),this.set({director:d.directed_by,starring:e})},e.prototype.setProductionSequence=function(){var b,c,d,e;return e=this.get("production_stage"),b=MovieExplorer.Movie.productionStageMap,c=a.parseDatetime(this.get("theatrical_release_date"))>new Date,d=e==="rumoured"?[{title:"Rumors",status:"active"},{title:"Planning",status:"pending"},{title:"Filming",status:"pending"},{title:"Post-Production",status:"pending"},{title:"In theaters",status:"pending"}]:e==="planned"||e==="in_development"||e==="pre_production"?[{title:"Rumors",status:"completed"},{title:"Planning",status:"active"},{title:"Filming",status:"pending"},{title:"Post-Production",status:"pending"},{title:"In theaters",status:"pending"}]:e==="not_happening"||e==="canceled"||e==="on_hold"?[{title:"Rumors",status:"completed"},{title:b[e],status:"cancelled"},{title:"Filming",status:"pending"},{title:"Post-Production",status:"pending"},{title:"In theaters",status:"pending"}]:e==="filming"?[{title:"Rumors",status:"completed"},{title:"Planning",status:"completed"},{title:"Filming",status:"active"},{title:"Post-Production",status:"pending"},{title:"In theaters",status:"pending"}]:e==="post_production"||e==="completed"&&!c?[{title:"Rumors",status:"completed"},{title:"Planning",status:"completed"},{title:"Filming",status:"completed"},{title:"Post-Production",status:"active"},{title:"In theaters",status:"pending"}]:e==="completed"&&c?[{title:"Rumors",status:"completed"},{title:"Planning",status:"completed"},{title:"Filming",status:"completed"},{title:"Post-Production",status:"completed"},{title:"In theaters",status:"active"}]:void 0,this.set({production_sequence:d})},e.prototype.getActivity=function(){return this.get("activity").getActivity()},e.prototype.subscribe=function(){return MovieExplorer.FullPage.prototype.subscribe.call(this)},e}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Discoveryline=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.model=MovieExplorer.DiscoverylineItem,c}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.DiscoverylineActivity=function(b){function d(){this.processActivity=a(this.processActivity,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.getActivity=function(){var a;a=this.get("items");if(a&&a.length)return;return this.api.getPageItems(this.id,1,3,"featured_stories",this.processActivity)},d.prototype.processActivity=function(a){return this.set({items:a})},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Topic=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments)},c.prototype.displayTracked=!1,c.prototype.setSubscriptionLevel=function(a){if(this.get("subscription_level")===a)return;return this.subscribe(a)},c.prototype.subscribe=function(a){return this.set({subscription_level:a||"all_stories_subscription"}),this.api.subscribe(this.id,this.get("subscription_level")),a||this.trigger("change:subscription"),MovieExplorer.publish("topic:subscribe",this)},c.prototype.unsubscribe=function(){return this.set({subscription_level:null}),this.api.unsubscribe(this.id),this.trigger("change:subscription"),MovieExplorer.publish("topic:unsubscribe",this)},c.prototype.dismissAsSubscription=function(){return this.collection.remove(this),this.api.dismissSubscribable(this.id),MovieExplorer.publish("topic:dismissAsSubscription",this),this.destroy()},c.prototype.like=function(a){return a==null&&(a=""),this.api.confirmSuggestion(this.id,this.get("source")),MovieExplorer.publish("like",this),MovieExplorer.publish("topic:like",this,a)},c.prototype.dislike=function(a){return a==null&&(a=""),this.api.deleteSuggestion(this.id,this.get("source")),MovieExplorer.publish("topic:dislike",this,a)},c.prototype.skip=function(a){return a==null&&(a=""),this.api.skipSuggestion(this.id,this.get("source")),MovieExplorer.publish("topic:skip",this,a)},c.prototype.unlike=function(){return this.api.unlike(this.id),MovieExplorer.publish("topic:unlike",this)},c.prototype.trackDisplay=function(){if(this.displayTracked)return;if(MovieExplorer.user)return this.displayTracked=!0,this.api.viewedSuggestions([{id:this.id,source:this.get("source")}])},c}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.SelectedTopics=function(b){function d(){this.topicsError=a(this.topicsError,this),this.processTopics=a(this.processTopics,this),this.getTopics=a(this.getTopics,this),this.logout=a(this.logout,this),this.deselect=a(this.deselect,this),this.select=a(this.select,this),this.resetted=a(this.resetted,this),this.topicRemoved=a(this.topicRemoved,this),this.topicAdded=a(this.topicAdded,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.model=MovieExplorer.Topic,d.prototype.loading=!1,d.prototype.loadHandle=null,d.prototype.loadInterval=3e4,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),this.bind("add",this.topicAdded),this.bind("remove",this.topicRemoved),this.bind("reset",this.resetted),MovieExplorer.user&&this.getTopics(),this.subscribeEvent("login",this.getTopics),this.subscribeEvent("logout",this.logout)},d.prototype.topicAdded=function(a){},d.prototype.topicRemoved=function(a){},d.prototype.resetted=function(){},d.prototype.select=function(a){if(!this.get(a))return this.add(a)},d.prototype.deselect=function(a){return this.remove(a.id)},d.prototype.logout=function(){return clearTimeout(this.loadHandle),this.loading=!1,this.reset()},d.prototype.getTopics=function(){if(this.loading)return;return this.loading=!0,clearTimeout(this.loadHandle),this.trigger("loadStart")},d.prototype.processTopics=function(a,b){return b==null&&(b={}),this.loading=!1,this.trigger("load"),this.update(a,b),this.resolve(),clearTimeout(this.loadHandle),this.loadHandle=setTimeout(this.getTopics,this.loadInterval)},d.prototype.topicsError=function(){return this.loading=!1,clearTimeout(this.loadHandle),this.loadHandle=setTimeout(this.getTopics,this.loadInterval)},d.prototype.filterNodes=function(a,b){var c,d=this;return b==null&&(b=null),!a||!a.length?[]:this.length?(c=_(a).filter(function(a){return(!b||b(a))&&!d.get(a.id)}),c):a},d}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Likes=function(b){function d(){this.getTopics=a(this.getTopics,this),this.resetted=a(this.resetted,this),this.topicRemoved=a(this.topicRemoved,this),this.topicAdded=a(this.topicAdded,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("topic:like",this.select),this.subscribeEvent("topic:unlike",this.deselect)},d.prototype.topicAdded=function(a){return d.__super__.topicAdded.apply(this,arguments),MovieExplorer.publish("likes:update",this,this.length)},d.prototype.topicRemoved=function(a){return d.__super__.topicRemoved.apply(this,arguments),MovieExplorer.publish("likes:update",this,this.length)},d.prototype.resetted=function(){return d.__super__.resetted.apply(this,arguments),MovieExplorer.publish("likes:update",this,this.length)},d.prototype.getTopics=function(){if(this.loading)return;return d.__super__.getTopics.apply(this,arguments),this.api.getLikes(this.processTopics,this.topicsError)},d}(MovieExplorer.SelectedTopics)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Movie=function(b){function d(){this.getQuestionnaire=a(this.getQuestionnaire,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.done(this.getQuestionnaire)},d.prototype.getQuestionnaire=function(){var a;if(a=this.get("questionnaire_id"))return this.questionnaire=new MovieExplorer.MovieQuestionnaire({id:a,movie:this})},d.prototype.humanReleaseDate=function(){var a,b,c,d,e,f,g,h;b=this.get("theatrical_release_date");if(typeof b!="string")return!1;g=Number(b.substring(0,4)),d=Number(b.substring(5,7)),c=Number(b.substring(8,10)),a=b.substring(11),f=(new Date).getFullYear();if(g&&a)return a+" "+g;if(g&&d&&d<=12)return e=MovieExplorer.utils.months[d-1].substring(0,3),c&&c<=31?(h=g!==f?", "+g:"",""+e+" "+c+h):(h=g!==f?" "+g:"",""+e+h);if(g)return g},d.productionStageMap={rumoured:"Rumored project",planned:"Planned project",not_happening:"Not happening",in_development:"In development",canceled:"Cancelled",on_hold:"On hold",pre_production:"In pre-production",filming:"Filming",post_production:"In post-production",completed:"Production completed"},d}(MovieExplorer.FullPage)}.call(this),function(){"use strict";var a,b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a},d=Array.prototype.slice;a=MovieExplorer.utils,MovieExplorer.MovieQuestionnaire=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return c(e,b),e.prototype.initialize=function(a){var b=this;return this.movie=a.movie,delete a.movie,this.set({open:!0}),this.questionnaire=MovieExplorer.Questionnaire["for"](a),this.questionnaire.bind("all",function(){var a;return a=1<=arguments.length?d.call(arguments,0):[],b.trigger.apply(b,a)})},e.prototype.get=function(){var a,b;return a=1<=arguments.length?d.call(arguments,0):[],e.__super__.get.apply(this,a)||(b=this.questionnaire).get.apply(b,a)},e.prototype.getAttributes=function(){return this.questionnaire.getAttributes()},e.prototype.preprocess=function(){return this.questionnaire.preprocess()},e.prototype.isBinary=function(){return this.questionnaire.isBinary()},e.prototype.isAnswered=function(){return this.questionnaire.isAnswered()},e.prototype.done=function(){var a,b;return a=1<=arguments.length?d.call(arguments,0):[],(b=this.questionnaire).done.apply(b,a)},e.prototype.state=function(){return this.questionnaire.state()},e.prototype.answer=function(b,c){var d,e,f,g;c==null&&(c=!1),this.questionnaire.answer(b),MovieExplorer.publish("questionnaire:answerQuestion",this,b,c);if(c)return f=this.movie.get("name"),e=this.movie.get("images"),d=e.length?e[0].thumbnail:!1,g="http://moviepilot.com"+a.getPagePath(this.movie),this.questionnaire.postAnswerToFacebook(b,f,g,d)},e.prototype.results=function(){return this.questionnaire.results()},e}(MovieExplorer.Model)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a},e=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};a=MovieExplorer.utils,MovieExplorer.StreamItem=function(c){function f(){this.processCommentCount=b(this.processCommentCount,this),this.processTrackItemView=b(this.processTrackItemView,this),this.trackItemView=b(this.trackItemView,this),this.setPageSuggestion=b(this.setPageSuggestion,this),f.__super__.constructor.apply(this,arguments)}return d(f,c),f.prototype.initialize=function(b){return f.__super__.initialize.apply(this,arguments),this.trackItemView=_(a.afterLogin).bind(null,this,this.trackItemView),this.trackItemView(),this.bind("change:open",this.trackItemView),this.dropDuplicateRelatedNodes(),this.processText(),this.setTopic(),this.setThumbnail(),this.getCommentCount(),this.initQuestionnaire(),MovieExplorer.applicationController.subscriptions.done(this.setPageSuggestion)},f.prototype.processText=function(){var b,c,d,e;b=this.get("content"),b&&b.text&&(d=b.text,d.match(/^<p>/)||(d="<p>"+d+"</p>"),d=d.replace(/(<object [^>]+>)/g,'$1<param name="wmode" value="transparent">'),d=d.replace(/<embed /g,'<embed wmode="transparent" '),d=d.replace(/<iframe[^>]+src="([^"]+)/g,function(a,b){return b.indexOf("wmode")>-1?a:""+a+(b.indexOf("?")>-1?"&":"?")+"wmode=transparent"}),d=d.replace(/\[BC:([^\]]+)\]/ig,function(b,c){return a.brightcoveEmbedCode(c)}),b.text=d),c=this.get("source");if(c&&c.text)return e=c.text,e=e.replace(/(http:\/\/[^\s\)\]>]+)/g,"<a href='$1'>$1</a>").replace(/(?:^|\W)@(\w+)/g,"<a href='http://twitter.com/$1'>@$1</a>"),c.text=e},f.prototype.dropDuplicateRelatedNodes=function(){var a,b,c,d,f,g;c=this.get("related_nodes"),d=[],a=c.length-1,g=[];while(a>=0)b=c[a],(f=b.id,e.call(d,f)>=0)?c.splice(a,1):d.push(b.id),g.push(a--);return g},f.prototype.setTopic=function(){return this.set({topic:this.findTopic({page:!0})})},f.prototype.setPageSuggestion=function(){var b,c,d,e,f,g;if(this.get("pageSuggestion")||this.get("questionnaire_id"))return;f=this.collection,g=MovieExplorer.applicationController.subscriptions,c=this.findTopic({page:!0,filter:function(a){return f.registerPageSuggestion(a.id)&&!g.get(a.id)}});if(!c)return;return d=this.get("reason"),d&&d.type==="friend_answer"?(b=d.path[0].title,e="Your friend <strong>"+b+"</strong> has an opinion on this"):c.reason?e="You like "+a.sentence(c.reason.path,"title","strong",2)+", so you might be interested in":e="",this.set({pageSuggestion:c,pageSuggestionReason:e})},f.prototype.findTopic=function(a){var b,c,d,e;a==null&&(a={}),_(a).defaults({type:null,page:!1,suggested:!1,filter:null}),d=this.get("related_nodes");if(!d.length)return null;for(b=0,e=d.length;b<e;b++){c=d[b];if(a.page&&!c.has_content)continue;if(a.type&&c.type!==a.type)continue;if(a.suggested&&!c.reason)continue;if(a.filter&&!a.filter(c))continue;return c}return null},f.prototype.setThumbnail=function(){var b,c,d;b=this.get("source"),d=this.get("topic"),c=b&&b.original_site_image?b.original_site_image:d&&d.facebook_id?a.facebookImageURL(d.facebook_id,"square"):void 0;if(c)return this.set({thumbnail:c})},f.prototype.trackItemView=function(){var a,b;a=this.get("open");if(!a)return;return this.get("viewCounted")||this.api.postItemView(this.id,(b=this.get("reason"))!=null?b.type:void 0,this.processTrackItemView),MovieExplorer.publish("streamItem:view",this)},f.prototype.processTrackItemView=function(){return this.set({viewCounted:!0})},f.prototype.dismiss=function(){return MovieExplorer.publish("streamItem:dismiss",this),this.api.dismissItem(this.id)},f.prototype.getFormalPermalink=function(){return"http://moviepilot.com/"+this.id},f.prototype.getFriendlyPermalink=function(){return"http://moviepilot.com/"+this.id+"-"+this.get("permalink")},f.prototype.getWWWPermalink=function(){return"http://www.moviepilot.com/"+this.id},f.prototype.getCommentCount=function(){if(this.has("getCommentCount"))return;return MovieExplorer.Facebook.getAccumulatedInfo(this.getWWWPermalink(),this.processCommentCount)},f.prototype.processCommentCount=function(a){var b;if(!a)return;b=a[this.getWWWPermalink()];if(!b)return;return this.set({commentCount:b.comments||0})},f.prototype.initQuestionnaire=function(){var a;if(this.get("pageSuggestion"))return;a=this.get("questionnaire_id");if(!a)return;return this.questionnaire=new MovieExplorer.StreamItemQuestionnaire({id:a,streamItem:this})},f}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b},c=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};MovieExplorer.Stream=function(a){function d(){d.__super__.constructor.apply(this,arguments)}return b(d,a),d.prototype.model=MovieExplorer.StreamItem,d.prototype.itemTypes=["news","tweet"],d.prototype.registerPageSuggestion=function(a){return this.suggestedPages||(this.suggestedPages=[]),a=String(a),c.call(this.suggestedPages,a)>=0?!1:(this.suggestedPages.push(a),!0)},d}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a},e=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};a=MovieExplorer.utils,MovieExplorer.NewsStream=function(c){function f(){this.addItems=b(this.addItems,this),this.append=b(this.append,this),this.processMoreStreamItems=b(this.processMoreStreamItems,this),this.processGlobalStream=b(this.processGlobalStream,this),this.streamError=b(this.streamError,this),this.processStreamItems=b(this.processStreamItems,this),this.getStreamItems=b(this.getStreamItems,this),this.schedulePoll=b(this.schedulePoll,this),this.doInsertInitialItem=b(this.doInsertInitialItem,this),this.logout=b(this.logout,this),this.login=b(this.login,this),f.__super__.constructor.apply(this,arguments)}return d(f,c),f.prototype.initialItemId=null,f.prototype.loading=!1,f.prototype.loadHandle=null,f.prototype.loadInterval=1e4,f.prototype.itemBuffer=null,f.prototype.itemsPage=1,f.prototype.itemsPerPage=5,f.prototype.initialize=function(){f.__super__.initialize.apply(this,arguments),this.subscribeEvent("login",this.login),this.subscribeEvent("logout",this.logout),this.subscribeEvent("topic:subscribe",this.getStreamItems);if(MovieExplorer.user)return this.login()},f.prototype.login=function(){return this.getStreamItems({addImmediately:!0})},f.prototype.logout=function(){return this.unblockLoading()},f.prototype.insertInitialItem=function(a){return this.initialItemId=a.id,a.content?this.doInsertInitialItem(a):this.api.getItem(a.id,this.doInsertInitialItem)},f.prototype.doInsertInitialItem=function(a){return a.isInitialItem=!0,a.open=!0,a.openedAutomatically=!0,this.remove(a.id),this.addItems([a],{prepend:!0})},f.prototype.blockLoading=function(){return this.clearScheduledPoll(),this.loading=!0,this.trigger("loadStart")},f.prototype.unblockLoading=function(){return this.clearScheduledPoll(),this.loading=!1,this.trigger("load")},f.prototype.schedulePoll=function(){if(this.loadHandle)return;return this.loadHandle=setTimeout(this.getStreamItems,this.loadInterval)},f.prototype.clearScheduledPoll=function(){return clearTimeout(this.loadHandle),this.loadHandle=null},f.prototype.getStreamItems=function(a){a==null&&(a={});if(this.loading)return;return this.blockLoading(),this.api.getStream(_(this.processStreamItems).bind(this,a),this.streamError,{per_page:this.itemsPerPage})},f.prototype.processStreamItems=function(a,b){return this.unblockLoading(),a.addImmediately?this.addItems(b,a):this.itemBuffer=b,this.schedulePoll()},f.prototype.streamError=function(){return this.unblockLoading(),this.schedulePoll()},f.prototype.getGlobalStream=function(a,b){return a==null&&(a={}),b==null&&(b={}),_(a).defaults({page:1}),_(b).defaults({open:!0,addImmediately:!0,forceOpenState:!0}),this.api.getGlobalStream(a,_(this.processGlobalStream).bind(this,b))},f.prototype.processGlobalStream=function(a,b){var c,d,e;for(d=0,e=b.length;d<e;d++)c=b[d],c.open=a.open,c.openedAutomatically=a.open,c.viewed=!1;return this.reset(),this.processStreamItems(a,b)},f.prototype.getMoreStreamItems=function(){var a;return this.blockLoading(),this.itemPage=a=Math.floor(this.length/this.itemsPerPage)+1,MovieExplorer.publish("stream:getMoreItems"),this.api.getStream(this.processMoreStreamItems,this.streamError,{page:a,per_page:this.itemsPerPage})},f.prototype.processMoreStreamItems=function(a){return this.unblockLoading(),this.append(a)},f.prototype.append=function(a){this.addItems(a,{append:!0});if(!a.length)return this.trigger("endOfStream")},f.prototype.applyItemBuffer=function(){if(!this.itemBuffer)return;return this.reset([],{silent:!0}),this.suggestedPages=[],this.addItems(this.itemBuffer),this.itemBuffer=null},f.prototype.filterStreamItems=function(a){var b;return a?a.length?(a=_(a).filter(function(a){var b,c;return b=Boolean(this.get(a.id)),!b&&(c=a.content_type,e.call(this.itemTypes,c)>=0)},this),b=[],a=_(a).reduce(function(a,c){var d;return d=c.id,e.call(b,d)<0&&(b.push(d),a.push(c)),a},[]),a):a:[]},f.prototype.addItems=function(a,b){var c,d,e,f,g,h,i;b==null&&(b={}),_(b).defaults({filter:!0}),b.filter&&(a=this.filterStreamItems(a)),g=a.length;if(!g)return;if(!b.forceOpenState)for(h=0,i=a.length;h<i;h++)f=a[h],f.open=!1;return!this.length&&!b.forceOpenState&&(c=a[0],c.open=!0,c.openedAutomatically=!0),e=function(){var a,c,e;if(b.prepend)return 0;if(b.append)return this.length;d=0,e=this.models;for(a=0,c=e.length;a<c;a++){f=e[a];if(!f.get("isInitialItem"))break;d++}return d}.call(this),this.addAtomic(a,{at:e}),this.trigger("newItemsInserted",g,b),MovieExplorer.publish("stream:insertItems",g,b),this.addDaySeparators()},f.prototype.addDaySeparators=function(){var b,c;return b=null,c=new Date,this.each(function(d){var e,f,g,h,i;if(!d.get("isInitialItem")&&d.get("published_at")){e=a.parseDatetime(d.get("published_at"),-7);if(!e)return;f=e.getDate(),g=e.getMonth();if(b&&a.isDifferentDate(b,e)){if(a.isYesterday(c,e))h="YESTERDAY";else{switch(f){case 1:case 21:case 31:i="st";break;case 2:case 22:i="nd";break;case 3:case 23:i="rd";break;default:i="th"}h=""+a.months[g]+" "+f+"<sup>"+i+"</sup>"}d.trigger("setDaySeparator",h)}return b=e}})},f}(MovieExplorer.Stream)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Notifier=function(b){function d(){this["incentive:close"]=a(this["incentive:close"],this),this["incentive:decline"]=a(this["incentive:decline"],this),this["topic:subscribe"]=a(this["topic:subscribe"],this),this.logout=a(this.logout,this),this.login=a(this.login,this),this.loginFail=a(this.loginFail,this),this.apiSession=a(this.apiSession,this),this.loginAttempt=a(this.loginAttempt,this),this.removeNotification=a(this.removeNotification,this),this.notify=a(this.notify,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.removeHandle=null,d.prototype.initialize=function(){var a,b,c,e;d.__super__.initialize.apply(this,arguments),e="loginAttempt apiSession loginFail login logout topic:subscribe incentive:decline incentive:close".split(" ");for(b=0,c=e.length;b<c;b++)a=e[b],this.subscribeEvent(a,this[a]);return this.subscribeEvent("!notify",this.notify),this.subscribeEvent("!closeNotifier",this.removeNotification)},d.prototype.notify=function(a,b){var c,d,e;return b==null&&(b={}),e=b.type,d=b.handler,c=b.duration,typeof e=="string"?this.set({type:e}):this.unset("type"),typeof d=="function"?this.set({handler:d}):this.unset("handler"),this.set({message:a}),clearTimeout(this.removeHandle),typeof c=="number"&&(this.removeHandle=setTimeout(this.removeNotification,c)),MovieExplorer.publish("notification:show",this)},d.prototype.fireHandler=function(){var a;return a=this.get("handler"),a?(a(this),MovieExplorer.publish("notification:click",this),this.removeNotification()):this.removeNotification({userInvoked:!0})},d.prototype.removeNotification=function(a){var b;return a==null&&(a={}),_(a).defaults({userInvoked:!1}),clearTimeout(this.removeHandle),b={silent:a.userInvoked},this.unset("message",b),this.unset("type",b),this.unset("handler",b),MovieExplorer.publish("notification:close",this,a)},d.prototype.loginAttempt=function(a){var b,c,d;return b=a.description,c=b==="subscribe to a movie or bucket"?(d=a.model.get("name"),"Connect to Moviepilot to never miss news on <span class='page-name'>"+d+"</span>."):b==="answer questionnaire"?"Connect to Moviepilot to participate in this poll.":"Sign up with one click. Connect your Facebook, Google or Twitter profile to moviepilot.com.",this.notify(c)},d.prototype.apiSession=function(a){var b,c,d,e,f;e=MovieExplorer.sessionController.loginContext,d=a.get("isNew");if(!d||!e)return;return b=e.description,b==="subscribe to a movie or bucket"?f=e.model.get("name")+" has been added to your subscriptions.":b==="answer questionnaire"?(f="Your vote has been counted.",MovieExplorer.opinionsController&&(f+=' <a href="/opinions">See what others are voting on</a>.',c=function(){return MovieExplorer.publish("!startupModule","opinions")})):f="Welcome to moviepilot.com!",this.notify(f,{type:"checked",handler:c,duration:5e3})},d.prototype.loginFail=function(){return this.notify('Learn more about connecting through Facebook, Google or Twitter <a href="/faq">in our FAQ</a>.',{handler:function(){return MovieExplorer.publish("!startupModule","staticPages",{id:"faq"})}})},d.prototype.login=function(a){var b,c;return b=MovieExplorer.sessionController.loginContext,a.get("isNew")&&b&&(c=b.description)!=="subscribe to a movie or bucket"&&c!=="answer questionnaire"?this.notify('Welcome to moviepilot.com! <a href="/subscriptions">Start discovering new movies</a>.',{type:"checked",handler:function(){return MovieExplorer.publish("!startupModule","subscriptions")}}):this.removeNotification()},d.prototype.logout=function(){return this.removeNotification()},d.prototype["topic:subscribe"]=function(a){if(MovieExplorer.applicationView.currentModule==="recommendations")return;return this.notify(""+a.get("name")+" added to your subscriptions.",{type:"checked",duration:5e3})},d.prototype["incentive:decline"]=function(a){return this.notify("Take a look around! You can still subscribe at any later time.",{duration:5e3})},d.prototype["incentive:close"]=function(a){return this["incentive:decline"](a)},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Opinion=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.setLocalAge(),this.setPage()},c.prototype.setLocalAge=function(){var a,b;return b=new Date,a=this.get("age_in_seconds"),b.setSeconds(-a),this.set({created_at:b}),this.unset("age_in_seconds")},c.prototype.recalculateAge=function(){var a,b,c;return a=new Date-this.get("created_at"),b=a<6e4?"some seconds ago":a<18e5?(c=parseInt(a/6e4,10),""+c+" minute"+(c>1?"s":"")+" ago"):"today",this.set({age_in_words:b})},c.prototype.setPage=function(){var a,b,c,d,e,f;c=this.get("subject"),b=c;if(this.get("type")==="container"){f=c.related_nodes;for(d=0,e=f.length;d<e;d++){a=f[d];if(!a.has_content)continue;b=a;break}}return this.set({page:b})},c}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Opinions=function(b){function d(){this.processOpinions=a(this.processOpinions,this),this.getNewOpinions=a(this.getNewOpinions,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.model=MovieExplorer.Opinion,d.prototype.active=!1,d.prototype.interval=7500,d.prototype.pollHandle=null,d.prototype.limit=10,d.prototype.maxSize=50,d.prototype.comparator=function(a){return-a.get("created_at").valueOf()},d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.poll()},d.prototype.getNewOpinions=function(){return this.pollHandle=null,this.api.getOpinions({limit:this.limit},this.processOpinions)},d.prototype.getOldOpinions=function(){var a;return this.api.getOpinions({limit:this.limit,before:(a=this.last())!=null?a.id:void 0},this.processOpinions)},d.prototype.processOpinions=function(a){var b,c,d,e,f,g,h;for(d=0,f=a.length;d<f;d++){c=a[d];if(this.get(c))continue;this.add(c)}this.active&&!this.pollHandle&&(this.pollHandle=setTimeout(this.getNewOpinions,this.interval)),h=this.models;for(e=0,g=h.length;e<g;e++)b=h[e],b.recalculateAge();return this.trigger("load")},d.prototype.poll=function(){return this.active=!0,this.getNewOpinions()},d.prototype.pause=function(){return clearInterval(this.pollHandle),this.active=!1},d.prototype.purge=function(){var a;a=this.at(this.maxSize);if(a)return this.remove(a)},d.prototype.destroy=function(){return d.__super__.destroy.apply(this,arguments),this.pause()},d}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.PageStream=function(b){function d(){this.registerPageSuggestion=a(this.registerPageSuggestion,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(a,b){return b==null&&(b={}),d.__super__.initialize.apply(this,arguments),this.pageId=b.pageId},d.prototype.registerPageSuggestion=function(a){return a=String(a),a===this.pageId?!1:d.__super__.registerPageSuggestion.apply(this,arguments)},d}(MovieExplorer.Stream)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.PageSubscribables=function(b){function d(){this.processTopics=a(this.processTopics,this),this.getSubscribables=a(this.getSubscribables,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.model=MovieExplorer.Topic,d.prototype.initialize=function(a,b){return b==null&&(b={}),d.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),this.pageId=b.pageId,this.getSubscribables()},d.prototype.getSubscribables=function(){return this.api.getPageSubscribables(this.pageId,this.processTopics)},d.prototype.processTopics=function(a){return this.reset(a),this.resolve()},d}(MovieExplorer.Collection)}.call
(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.PageWithDiscoveryline=function(b){function d(){this.destroy=a(this.destroy,this),this.processPage=a(this.processPage,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),!this.get("description")||!this.get("discoveryline")?this.getPage():(this.createDiscoveryline(),this.resolve())},d.prototype.getPage=function(){return this.api.getPageWithDiscoveryline(this.id,this.processPage)},d.prototype.processPage=function(a){if(this.destroyed)return;return this.set(a),this.createDiscoveryline(),this.resolve()},d.prototype.createDiscoveryline=function(){return this.discoveryline=new MovieExplorer.Discoveryline(this.get("discoveryline")||[])},d.prototype.destroy=function(){if(this.destroyed)return;return this.discoveryline&&(this.discoveryline.destroy(),this.discoveryline=null),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.Questionnaire=function(c){function e(){this.destroy=b(this.destroy,this),this.processQuestionnaire=b(this.processQuestionnaire,this),this.getQuestionnaire=b(this.getQuestionnaire,this),e.__super__.constructor.apply(this,arguments)}return d(e,c),e.instances={},e["for"]=function(a){var b,c;return b=a.id,(c=e.instances)[b]||(c[b]=new MovieExplorer.Questionnaire(a))},e.prototype.initialize=function(a,b){return e.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),_(a).size()===1&&this.id?this.getQuestionnaire():this.resolve(),this.subscribeEvent("login",this.getQuestionnaire)},e.prototype.getAnswer=function(a){return _.detect(this.get("answers"),function(b){return String(b.id)===String(a)})},e.prototype.getQuestionnaire=function(){return this.api.getQuestionnaire(this.id,this.processQuestionnaire,this.destroy)},e.prototype.processQuestionnaire=function(a){var b;this.set(a),b=this.state()==="resolved",this.resolve();if(b)return this.trigger("personalize")},e.prototype.destroy=function(){return e.__super__.destroy.apply(this,arguments)},e.prototype.isBinary=function(){if(!this.has("answers"))throw new Error("Called `isBinary` on unresolved questionnaire");return this.get("answers").length===2},e.prototype.isAnswered=function(){return this.has("answered_question")},e.prototype.answer=function(b,c){var d,e;return d=this.getAnswer(b),d.click_count++,e={name:"You",image_url:a.userImageURL(),currentUser:!0},d.clickers.splice(2,0,e),this.trigger("answer",b),this.api.answerQuestion(b,c)},e.prototype.results=function(){var a,b,c,d;return a=function(a,b){return a[b.id]=b.click_count,a},c=_(this.get("answers")).reduce(a,{}),b=function(a,b){return a+b},d=_(c).reduce(b,0),[c,d]},e.prototype.postAnswerToFacebook=function(a,b,c,d){var e,f,g,h,i;return e=this.getAnswer(a),f=e.text,i=" ",g=i,h=i,MovieExplorer.Facebook.postToStream({message:f,picture:d,name:b,link:c,caption:g,description:h})},e}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Search=function(b){function d(){this.processQueryFailure=a(this.processQueryFailure,this),this.processQueryResults=a(this.processQueryResults,this),this.select=a(this.select,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.model=MovieExplorer.Topic,d.prototype.term=null,d.prototype.previousTerm=null,d.prototype.loading=!1,d.prototype.selected=null,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.bind("select",this.select)},d.prototype.update=function(a){var b,c,d,e;a==null&&(a=[]),c=this.selected&&this.selected.id,this.selected=null;for(d=0,e=a.length;d<e;d++)b=a[d],b.source="search";this.reset(a);if(this.length)return this.select(this.detect(function(a){return a.id===c})||this.at(0))},d.prototype.selectPrev=function(){var a;return this.selected?(a=this.indexOf(this.selected),a===0?this.select(this.last()):this.select(this.at(a-1)),!0):!1},d.prototype.selectNext=function(){var a;return this.selected?(a=this.indexOf(this.selected),this.select(this.at((a+1)%this.size())),!0):!1},d.prototype.select=function(a){if(!a)throw new Error("Expected result to select.");this.selected&&this.selected.set({selected:!1}),this.selected=a;if(this.selected)return this.selected.set({selected:!0})},d.prototype.openSelected=function(){if(this.selected)return this.selected.trigger("open")},d.prototype.processQueryResults=function(a,b){var c;MovieExplorer.publish("search:results",a,b.length),this.previousTerm=a,c=this.term,this.loading=!1;if(b.length&&a!=="")return this.update(b)},d.prototype.processQueryFailure=function(){return this.loading=!1},d.prototype.query=function(a){return this.term=a.replace(/^\s+|\s+$/g,""),this.processQueries()},d.prototype.processQueries=_(function(){var a;a=this.term;if(this.previousTerm===a||this.loading)return;return a?(MovieExplorer.publish("search:new",a),this.loading=!0,this.api.suggestLikes(a,5,_(this.processQueryResults).bind(this,a),this.processQueryFailure)):this.update()}).debounce(300),d}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.Series=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c}(MovieExplorer.FullPage)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.SimplePage=function(b){function d(){this.processFacebookData=a(this.processFacebookData,this),this.processPage=a(this.processPage,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.getPage(),this.subscribables=new MovieExplorer.PageSubscribables([],{pageId:this.id})},d.prototype.getPage=function(){return this.api.getPage(this.id,this.processPage)},d.prototype.processPage=function(a){this.set(a);if(a.facebook_id)return MovieExplorer.Facebook.getInfo(a.facebook_id,this.processFacebookData)},d.prototype.processFacebookData=function(a){return this.set({description:a.description||a.plot_outline,link:a.link})},d.prototype.destroy=function(){if(this.destroyed)return;return this.subscribables.destroy(),this.subscribables=null,d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.StaticPage=function(b){function d(){this.processStaticPage=a(this.processStaticPage,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.initialize=function(a){if(!a.content)return this.getStaticPage()},d.prototype.getStaticPage=function(){return $.get("/"+this.get("id"),this.processStaticPage)},d.prototype.processStaticPage=function(a){return this.set({content:a})},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b},c=Array.prototype.slice;MovieExplorer.StreamItemQuestionnaire=function(a){function d(){d.__super__.constructor.apply(this,arguments)}return b(d,a),d.prototype.initialize=function(a){var b=this;return this.streamItem=a.streamItem,delete a.streamItem,this.set({open:this.streamItem.get("open")}),this.questionnaire=MovieExplorer.Questionnaire["for"](a),this.questionnaire.bind("all",function(){var a;return a=1<=arguments.length?c.call(arguments,0):[],b.trigger.apply(b,a)}),this.streamItem.bind("change:open",function(){return b.set({open:b.streamItem.get("open")})})},d.prototype.get=function(){var a,b;return a=1<=arguments.length?c.call(arguments,0):[],d.__super__.get.apply(this,a)||(b=this.questionnaire).get.apply(b,a)},d.prototype.getAttributes=function(){return this.questionnaire.getAttributes()},d.prototype.preprocess=function(){return this.questionnaire.preprocess()},d.prototype.isBinary=function(){return this.questionnaire.isBinary()},d.prototype.isAnswered=function(){return this.questionnaire.isAnswered()},d.prototype.done=function(){var a,b;return a=1<=arguments.length?c.call(arguments,0):[],(b=this.questionnaire).done.apply(b,a)},d.prototype.state=function(){return this.questionnaire.state()},d.prototype.answer=function(a,b){var c,d,e,f;b==null&&(b=!1),this.questionnaire.answer(a,(f=this.streamItem.get("reason"))!=null?f.type:void 0),MovieExplorer.publish("questionnaire:answerQuestion",this,a,b);if(b)return d=this.streamItem.get("content").title,c=this.streamItem.get("content").image,e=this.streamItem.getFormalPermalink(),this.questionnaire.postAnswerToFacebook(a,d,e,c)},d.prototype.results=function(){return this.questionnaire.results()},d}(MovieExplorer.Model)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a},d=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};MovieExplorer.Subscribables=function(b){function e(){this.filterSubscribables=a(this.filterSubscribables,this),this.processTopics=a(this.processTopics,this),this.getSubscribables=a(this.getSubscribables,this),this.remove=a(this.remove,this),this.add=a(this.add,this),e.__super__.constructor.apply(this,arguments)}return c(e,b),e.prototype.model=MovieExplorer.Topic,e.prototype.initialize=function(){return e.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),this.subscribeEvent("loginAttempt",this.getSubscribables),this.subscribeEvent("login",this.getSubscribables),this.subscribeEvent("topic:subscribe",this.remove),this.subscribeEvent("topic:unsubscribe",this.add)},e.prototype.add=function(a){if(!this.get(a))return e.__super__.add.apply(this,arguments)},e.prototype.remove=function(){return e.__super__.remove.apply(this,arguments)},e.prototype.getSubscribables=function(){return this.trigger("loadStart"),this.api.getSubscribables("all",this.processTopics)},e.prototype.processTopics=function(a){var b;if(!a||!a.length)return;return b=MovieExplorer.applicationController.subscriptions,b.state()==="resolved"?a=b.filterNodes(a,this.bannerImagePresent):b.done(this.filterSubscribables),this.trigger("load"),this.reset(a),this.resolve()},e.prototype.filterSubscribables=function(){var a,b;return b=MovieExplorer.applicationController.subscriptions,a=b.filterNodes(this.models,this.bannerImagePresent),this.update(a)},e.prototype.bannerImagePresent=function(a){var b;return Boolean(a.banner_image||((b=a.attributes)!=null?b.banner_image:void 0))},e.prototype.allWithType=function(a){var b;a==null&&(a=[]);if(!a)throw Error("no type");return b=typeof a=="string"?[a]:a,this.filter(function(a){var c;return c=a.get("type"),d.call(b,c)>=0})},e.prototype.indexByType=function(a,b){return _(this.allWithType(b)).indexOf(a)},e}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Subscriptions=function(b){function d(){this.getTopics=a(this.getTopics,this),this.resetted=a(this.resetted,this),this.topicRemoved=a(this.topicRemoved,this),this.topicAdded=a(this.topicAdded,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.loadInterval=15e3,d.prototype.initialize=function(){var a=this;return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("topic:subscribe",this.select),this.subscribeEvent("topic:unsubscribe",this.deselect),this.bind("change:new_stories_count",function(){return a.trigger("storyCountChange")})},d.prototype.topicAdded=function(a){return d.__super__.topicAdded.apply(this,arguments),MovieExplorer.publish("subscriptions:update",this,this.length)},d.prototype.topicRemoved=function(a){return d.__super__.topicRemoved.apply(this,arguments),MovieExplorer.publish("subscriptions:update",this,this.length)},d.prototype.resetted=function(){return MovieExplorer.publish("subscriptions:update",this,this.length)},d.prototype.getTopics=function(){if(this.loading)return;return d.__super__.getTopics.apply(this,arguments),this.api.getSubscriptions("all",this.processTopics,this.topicsError)},d.prototype.processTopics=function(a){return d.__super__.processTopics.call(this,a,{deep:!0})},d}(MovieExplorer.SelectedTopics)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.Suggestions=function(b){function d(){this.filterSuggestions=a(this.filterSuggestions,this),this.processNodeSuggestions=a(this.processNodeSuggestions,this),this.enqueueNodeRequest=a(this.enqueueNodeRequest,this),this.processCategorySuggestions=a(this.processCategorySuggestions,this),this.getSuggestions=a(this.getSuggestions,this),this.dequeueRequest=a(this.dequeueRequest,this),this.skippedSuggestion=a(this.skippedSuggestion,this),this.deletedSuggestion=a(this.deletedSuggestion,this),this.confirmedSuggestion=a(this.confirmedSuggestion,this),this.comparator=a(this.comparator,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.model=MovieExplorer.Topic,d.prototype.requestStack=null,d.prototype.addedCategoriesCount=0,d.prototype.categories=["movies","people","topics","series"],d.prototype.loading=!1,d.prototype.nodeSuggestionsLimit=10,d.prototype.offset=0,d.prototype.comparator=function(a){var b;return(b=this.indexOf(a))>-1?b:a.get("facebook_id")?this.length:this.length*2},d.prototype.initialize=function(a,b){var c;b==null&&(b={}),d.__super__.initialize.apply(this,arguments),_(this).extend($.Deferred()),this.limit=b.limit||200,this.requestStack=[],c=_(this.getSuggestions).throttle(1e3),this.subscribeEvent("login",c),this.subscribeEvent("showModule",this.enqueueNodeRequest),this.subscribeEvent("topic:like",this.confirmedSuggestion),this.subscribeEvent("topic:dislike",this.deletedSuggestion),this.subscribeEvent("topic:skip",this.skippedSuggestion),this.bind("remove",c);if(MovieExplorer.user)return this.getSuggestions()},d.prototype.likes=function(){return MovieExplorer.applicationController.likes},d.prototype.confirmedSuggestion=function(a){return this.remove(a.id)},d.prototype.deletedSuggestion=function(a){return this.remove(a.id)},d.prototype.skippedSuggestion=function(a){return this.remove(a.id)},d.prototype.dequeueRequest=function(){if(!this.requestStack.length)return this.trigger("load"),this.trigger("complete"),!1;if(this.loading)return;return this.requestStack.shift()(),!0},d.prototype.getSuggestions=function(){var a,b,c,d;if(this.length>10)return;d=this.categories;for(b=0,c=d.length;b<c;b++)a=d[b],this.enqueueCategoryRequest(a);return this.dequeueRequest()},d.prototype.enqueueCategoryRequest=function(a){return this.requestStack.push(_(this.getSuggestionsByCategory).bind(this,a))},d.prototype.getSuggestionsByCategory=function(a){var b;return this.loading=!0,this.trigger("loadStart"),b=parseInt(this.limit/this.categories.length,10),this.api.getSuggestions(a,b,this.processCategorySuggestions,this.dequeueRequest)},d.prototype.processCategorySuggestions=function(a){return this.loading=!1,a&&a.length&&this.likes().done(_(this.addCategorySuggestions).bind(this,a)),this.dequeueRequest()},d.prototype.addCategorySuggestions=function(a){var b,c,d,e,f;b=this.likes().filterNodes(a,this.facebookIdPresent),this.trigger("load"),this.addedCategoriesCount||(this.offset=this.length),c=this.addedCategoriesCount++%this.categories.length+1;for(d=0,f=b.length;d<f;d++)e=b[d],this.add(e,{at:d*c+this.offset});return MovieExplorer.publish("suggestions:load",b.length)},d.prototype.enqueueNodeRequest=function(a){var b,c;if(a!=="stream"&&a!=="pages")return;b=MovieExplorer.applicationView.getController(a),c=b.currentId;if(!c)return;return this.requestStack.push(_(this.getNodeSuggestions).bind(this,c)),this.dequeueRequest()},d.prototype.getNodeSuggestions=function(a){return this.loading=!0,this.trigger("loadStart"),this.api.getNodeSuggestions(a,this.nodeSuggestionsLimit,this.processNodeSuggestions,this.dequeueRequest)},d.prototype.processNodeSuggestions=function(a){var b,c,d,e;this.loading=!1;if(!a||!a.length)return;c=this.likes(),c.state()==="resolved"?a=c.filterNodes(a,this.facebookIdPresent):c.done(this.filterSuggestions),this.trigger("load");for(b=0,e=a.length;b<e;b++)d=a[b],this.add(d,{at:0});return this.resolve(),this.trigger("complete"),this.trigger("topical")},d.prototype.filterSuggestions=function(){var a;return a=this.likes().filterNodes(this.models,this.facebookIdPresent),this.update(a)},d.prototype.facebookIdPresent=function(a){var b;return Boolean(a.facebook_id||((b=a.attributes)!=null?b.facebook_id:void 0))},d}(MovieExplorer.Collection)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.User=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.setGroups()},c.prototype.setGroups=function(){var a;return a=parseInt(this.id,10),this.set({groupHalf:a%2,groupThird:a%3,groupQuarter:a%4})},c.prototype.isAdmin=function(){return Boolean(this.get("admin"))},c.prototype.toggleFlag=function(a){var b;return b={},b[a]=!this.get(a),this.set(b),this.save()},c.prototype.save=function(){return MovieExplorer.API.sendUser(this.id,{newsletter:this.get("newsletter"),notifications:this.get("notifications"),recommendation_emails:this.get("recommendation_emails")})},c}(MovieExplorer.Model)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.View=function(e){function f(){this.destroy=b(this.destroy,this),this.parseFacebookTags=b(this.parseFacebookTags,this),f.__super__.constructor.apply(this,arguments)}return d(f,e),_(f.prototype).defaults(MovieExplorer.Subscriber),f.prototype.initialize=function(){this.$el=$(this.el);if(this.model||this.collection)return this.modelBind("destroy",this.destroy)},f.prototype.delegateEvents=function(){},f.prototype.pass=function(a,b){var c,d=this;return c=this.model||this.collection,this.modelBind(a,function(a,c){return d.$(b).html(c)})},f.prototype.delegate=function(a,b,c){var d,e;if(typeof a!="string")throw new TypeError("View#delegate: first argument must be a string");if(arguments.length===2)d=b;else{if(arguments.length!==3)throw new TypeError("View#delegate: only two or three arguments are allowed");e=b;if(typeof e!="string")throw new TypeError("View#delegate: second argument must be a string");d=c}if(typeof d!="function")throw new TypeError("View#delegate: handler argument must be function");return a+=".delegate"+this.cid,d=_(d).bind(this),e?this.$el.on(a,e,d):this.$el.on(a,d)},f.prototype.modelBind=function(a,b){var c,d,e;if(typeof a!="string")throw new TypeError("View#modelBind: type argument must be string");if(typeof b!="function")throw new TypeError("View#modelBind: handler argument must be function");d=this.model||this.collection;if(!d)return;this.modelBindings||(this.modelBindings={}),c=(e=this.modelBindings)[a]||(e[a]=[]);if(_(c).include(b))return;return c.push(b),d.bind(a,b)},f.prototype.modelUnbind=function(a,b){var c,d,e;if(typeof a!="string")throw new TypeError("View#modelUnbind: type argument must be string");if(typeof b!="function")throw new TypeError("View#modelUnbind: handler argument must be function");if(!this.modelBindings)return;c=this.modelBindings[a],c&&(d=_(c).indexOf(b),d>-1&&c.splice(d,1),c.length===0&&delete this.modelBindings[a]),e=this.model||this.collection;if(!e)return;return e.unbind(a,b)},f.prototype.modelUnbindAll=function(){var a,b,d,e,f,g,h;if(!this.modelBindings)return;d=this.model||this.collection;if(!d)return;h=this.modelBindings;for(e in h){if(!c.call(h,e))continue;b=h[e];for(f=0,g=b.length;f<g;f++)a=b[f],d.unbind(e,a)}return this.modelBindings=null},f.prototype.getTemplateData=function(){var b;return b=this.model&&this.model.getAttributes(),b?a.beget(b):{}},f.prototype.render=function(){var a,b;if(this.destroyed)return;if(typeof this.template=="string"){b=JST[this.template];if(typeof b!="function")throw new Error("View#render: template "+this.template+" not found");a=b(this.getTemplateData()),this.$el.empty().append(a)}return this},f.prototype.parseFacebookTags=function(){var a;a=this.$(".facebook-like").get(0);if(a)return MovieExplorer.Facebook.parse(a)},f.prototype.preventDefault=function(a){if(a&&a.preventDefault)return a.preventDefault()},f.prototype.destroyed=!1,f.prototype.destroy=function(){var a,b,c,d;if(this.destroyed)return;this.modelUnbindAll(),this.unsubscribeAllEvents(),this.$el.remove(),b="el $el options model collection _callbacks".split(" ");for(c=0,d=b.length;c<d;c++)a=b[c],delete this[a];return this.destroyed=!0},f}(Backbone.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.ActiveSubscriptionView=function(b){function d(){this.destroy=a(this.destroy,this),this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="li",d.prototype.template="active_subscription",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.delegate("click",this.goToPage),this.modelBind("change:new_stories_count",this.render)},d.prototype.goToPage=function(a){return a.preventDefault(),a.stopPropagation(),MovieExplorer.publish("!startupModule","pages",{id:this.model.id,type:this.model.get("type"),permalink:this.model.get("permalink"),title:this.model.get("name")})},d.prototype.select=function(){var a,b;b=MovieExplorer.utils.getPagePath(this.model),a=MovieExplorer.applicationView;if(a.url===b)return this.$el.addClass("selected"),this.$("a").tipsy("hide")},d.prototype.isSelected=function(){return this.$el.hasClass("selected")},d.prototype.getTemplateData=function(){var a,b;a=d.__super__.getTemplateData.apply(this,arguments);if(b=a.type)a.pluralType=MovieExplorer.utils.pluralizeType(b);return a},d.prototype.render=function(){var a;return d.__super__.render.apply(this,arguments),a=this.model.get("name"),a.length>18&&this.$("a").attr("title",a).tipsy(),this.select()},d.prototype.destroy=function(){if(this.destroyed)return;return this.$("a").tipsy("hide"),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.CollectionView=function(d){function e(){this.destroy=a(this.destroy,this),this.renderAllItems=a(this.renderAllItems,this),this.itemsResetted=a(this.itemsResetted,this),this.itemRemoved=a(this.itemRemoved,this),this.itemAdded=a(this.itemAdded,this),this.hideLoadingIndicator=a(this.hideLoadingIndicator,this),this.showLoadingIndicator=a(this.showLoadingIndicator,this),e.__super__.constructor.apply(this,arguments)}return c(e,d),e.prototype.animationDuration=500,e.prototype.viewsByCid=null,e.prototype.$listElement=null,e.prototype.itemSelector=null,e.prototype.visibleItems=null,e.prototype.initialize=function(a){a==null&&(a={}),e.__super__.initialize.apply(this,arguments),_(a).defaults({render:!0,renderItems:!0,filterer:null}),this.viewsByCid={},this.visibleItems=[],this.addModelListeners(),a.filterer&&this.filter(a.filterer),a.render&&this.render();if(a.renderItems)return this.renderAllItems()},e.prototype.addModelListeners=function(){return this.modelBind("loadStart",this.showLoadingIndicator),this.modelBind("load",this.hideLoadingIndicator),this.modelBind("add",this.itemAdded),this.modelBind("remove",this.itemRemoved),this.modelBind("reset",this.itemsResetted)},e.prototype.showLoadingIndicator=function(){return this.$(".loading").css("display","block")},e.prototype.hideLoadingIndicator=function(){return this.$(".loading").css("display","none")},e.prototype.itemAdded=function(a,b,c){return c==null&&(c={}),this.renderAndInsertItem(a,c.at)},e.prototype.itemRemoved=function(a){return this.removeViewForItem(a)},e.prototype.itemsResetted=function(){return this.renderAllItems()},e.prototype.renderAllItems=function(a){var c,d,e,f,g,h,i,j,k,l;a==null&&(a={}),f=this.collection.models,a.shuffle&&(f=MovieExplorer.utils.shuffle(this.collection.models)),a.limit&&(f=f.slice(0,a.limit)),this.visibleItems=[],g={};for(i=0,j=f.length;i<j;i++)e=f[i],h=this.viewsByCid[e.cid],h&&(g[e.cid]=h);l=this.viewsByCid;for(c in l){if(!b.call(l,c))continue;h=l[c],c in g||this.removeView(c,h)}for(d=0,k=f.length;d<k;d++)e=f[d],h=this.viewsByCid[e.cid],h?this.insertView(e,h,d,0):this.renderAndInsertItem(e,d);if(!f.length)return this.trigger("visibilityChange",this.visibleItems)},e.prototype.filter=function(a){var b,c,d,e,f,g;this.filterer=a;if(!_(this.viewsByCid).isEmpty()){g=this.collection.models;for(c=0,f=g.length;c<f;c++){d=g[c],b=a?a(d,c):!0,e=this.viewsByCid[d.cid];if(!e)continue;$(e.el).stop(!0,!0)[b?"show":"hide"](),this.updateVisibleItems(d,b,!1)}}return this.trigger("visibilityChange",this.visibleItems)},e.prototype.getView=function(){throw new Error("CollectionView#getView must be overridden")},e.prototype.renderAndInsertItem=function(a,b){var c;return c=this.renderItem(a),this.insertView(a,c,b)},e.prototype.renderItem=function(a){var b;return b=this.viewsByCid[a.cid],b||(b=this.getView(a),this.viewsByCid[a.cid]=b),b.render(),b},e.prototype.insertView=function(a,b,c,d){var e,f,g,h,i;c==null&&(c=null),d==null&&(d=this.animationDuration),i=typeof c=="number"?c:this.collection.indexOf(a),h=this.filterer?this.filterer(a,i):!0,f=$(b.el),h?d&&f.css("opacity",0):f.css("display","none"),e=this.$listElement||this.$el,g=e.children(this.itemSelector),i===0?e.prepend(f):i<g.length?g.eq(i).before(f):e.append(f),b.trigger("addedToDOM"),this.updateVisibleItems(a,h);if(d&&h)return f.animate({opacity:1},d)},e.prototype.removeViewForItem=function(a){var b;return this.updateVisibleItems(a,!1),b=this.viewsByCid[a.cid],this.removeView(a.cid,b)},e.prototype.removeView=function(a,b){if(!b)return;return b.destroy(),delete this.viewsByCid[a]},e.prototype.updateVisibleItems=function(a,b,c){var d,e,f;return c==null&&(c=!0),e=!1,f=_(this.visibleItems).indexOf(a),d=f>-1,b&&!d?(this.visibleItems.push(a),e=!0):!b&&d&&(this.visibleItems.splice(f,1),e=!0),e&&c&&this.trigger("visibilityChange",this.visibleItems),e},e.prototype.destroy=function(){var a,c,d,f,g,h,i;i=this.viewsByCid;for(a in i){if(!b.call(i,a))continue;f=i[a],f.destroy()}d="$listElement viewsByCid visibleItems".split(" ");for(g=0,h=d.length;g<h;g++)c=d[g],delete this[c];return e.__super__.destroy.apply(this,arguments)},e}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.ActiveSubscriptionsView=function(b){function d(){this.render=a(this.render,this),this.isActive=a(this.isActive,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="ol",d.prototype.id="active-subscriptions",d.prototype.className="main-navigation",d.prototype.containerSelector="#active-subscriptions-container",d.prototype.animationDuration=0,d.prototype.initialize=function(){var a=this;return d.__super__.initialize.call(this,{filterer:this.isActive}),this.modelBind("storyCountChange",function(){return a.filter(a.filterer)})},d.prototype.isActive=function(a,b){var c,d;return c=this.viewsByCid[a.cid],d=a.get("new_stories_count"),c.isSelected()||typeof d=="undefined"||d>0},d.prototype.getView=function(a){return new MovieExplorer.ActiveSubscriptionView({model:a})},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el)},d}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.AnonymousDashboardView=function(b){function d(){this.destroy=a(this.destroy,this),this.render=a(this.render,this),this.logout=a(this.logout,this),this.login=a(this.login,this),this.hide=a(this.hide,this),this.updateShowcase=a(this.updateShowcase,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="anonymous-dashboard",d.prototype.template="anonymous_dashboard",d.prototype.containerSelector="#anonymous-dashboard-container",d.prototype.initialize=function(){var a=this;return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("login",this.login),this.subscribeEvent("showModule",this.updateShowcase),this.delegate("click","#sidebar-login",this.loginButtonClick),MovieExplorer.user||this.render(),MovieExplorer.Facebook.subscribe("auth.statusChange",function(b){if(b.status==="not_authorized")return MovieExplorer.Facebook.parse(a.el)})},d.prototype.updateShowcase=function(a){this.showcaseView&&this.destroyShowcaseView();if(a==="pages")return this.showcaseView=new MovieExplorer.ShowcaseView({model:MovieExplorer.pagesController.model}),this.$el.append(this.showcaseView.el)},d.prototype.loginButtonClick=function(a){return a.preventDefault(),MovieExplorer.publish("!showAuthPicker",{description:"sidebar",action:"subscribe to upcoming movies"})},d.prototype.hide=function(){return this.$el.detach().empty()},d.prototype.login=function(){return this.unsubscribeEvent("logout",this.logout),this.subscribeEvent("logout",this.logout),this.hide()},d.prototype.logout=function(){return this.render()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el)},d.prototype.destroyShowcaseView=function(){return this.showcaseView.destroy(),this.showcaseView=null},d.prototype.destroy=function(){if(this.destroyed)return;return this.destroyShowcaseView(),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer
.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}};MovieExplorer.ApplicationView=function(){function b(){this.openLink=a(this.openLink,this),this.removeFallbackContent=a(this.removeFallbackContent,this),this.startupModule=a(this.startupModule,this),this.logout=a(this.logout,this),this.login=a(this.login,this);var b;_.extend($.fn.tipsy.defaults,{gravity:"s",offset:5,opacity:1}),MovieExplorer.user||this.logout(),b=MovieExplorer,b.subscribe("!startupModule",this.startupModule),b.subscribe("login",this.login),b.subscribe("logout",this.logout),b.subscribe("showModule",this.removeFallbackContent),b.subscribe("groupByTime",this.addGroupByTime),this.addGlobalHandlers()}return b.prototype.currentModule=null,b.prototype.currentController=null,b.prototype.currentView=null,b.prototype.currentParams=null,b.prototype.url=null,b.prototype.addGroupByTime=function(){return $(document.body).addClass("groupByTime"+MovieExplorer.sessionController.groupByTime)},b.prototype.login=function(a){return $(document.body).removeClass("logged-out").addClass("logged-in").removeClass(this.userGroupClasses).addClass("groupHalf"+a.get("groupHalf")).addClass("groupThird"+a.get("groupThird")).addClass("groupQuarter"+a.get("groupQuarter"))},b.prototype.logout=function(){return $(document.body).removeClass("logged-in").addClass("logged-out").removeClass(this.userGroupClasses)},b.prototype.userGroupClasses=function(){var a,b,c,d,e,f,g;a=[],g=["half","third","quarter"];for(b=0,f=g.length;b<f;b++){c=g[b],c=c.substring(0,1).toUpperCase()+c.substring(1),d=b+1;for(e=0;0<=d?e<=d:e>=d;0<=d?e++:e--)a.push("group"+c+e)}return a.join(" ")}(),b.prototype.getController=function(a){var b;b=MovieExplorer[""+a+"Controller"];if(!b)throw new Error("startupModule: controller for "+a+" not found");return b},b.prototype.startupModule=function(a,b){var c,d,e,f,g,h;b==null&&(b={}),b.navigate!==!1&&(b.navigate=!0),b.forceStartup!==!0&&(b.forceStartup=!1),g=!b.forceStartup&&this.currentModule===a&&(!this.currentParams||_(b).isEqual(this.currentParams));if(g)return;e=this.currentModule||null,e&&(d=this.getController(e),f=d.view),c=this.getController(a);if(!c)throw new Error("ApplicationView#startupModule: controller for "+a+" not found");scrollTo(0,0),e&&(f=d.view,$(f.containerSelector).css("display","none"),d.teardown&&d.teardown()),c.startup(b,e),h=c.view;if(!h)throw new Error("ApplicationView#startupModule: view for "+a+" not found");return $(h.containerSelector).css({display:"block",opacity:1}),this.previousModule=e,this.currentModule=a,this.currentController=c,this.currentView=h,this.currentParams=b,this.adjustURL(),this.adjustTitle(),this.updateNavigation(),MovieExplorer.publish("showModule",this.currentModule,this.currentParams,this.previousModule)},b.prototype.adjustURL=function(){var a,b,c;a=this.currentController,c=this.currentParams;if(!MovieExplorer.router)return;if(typeof a.historyURL=="function")b=a.historyURL(c);else{if(typeof a.historyURL!="string")throw new Error("ApplicationView#adjustURL: controller for "+currentModule+" does not provide a historyURL");b=a.historyURL}return c.navigate&&MovieExplorer.router.navigate(b),this.url="/"+b},b.prototype.adjustTitle=function(){var a,b;return b="moviepilot.com",a=this.currentParams.title||this.currentController.title,a&&(b+=" – "+a),setTimeout(function(){return document.title=b},50)},b.prototype.updateNavigation=function(){var a=this;return $("#no-stream").hide(),$(".main-navigation li").removeClass("selected"),$(".main-navigation a").filter(function(b,c){var d;return d=c.pathname,d.charAt(0)!=="/"&&(d="/"+d),a.url===d||$(c).data("href")===a.currentModule||a.currentModule===d.replace(/^\//,"")}).parent().addClass("selected")},b.prototype.anonymouslyAccessible=function(){return Boolean(this.currentController.currentId)},b.prototype.removeFallbackContent=function(){return $("#logo").css("display","block"),$("#startup-loading, .accessible-fallback").remove(),MovieExplorer.unsubscribe("showModule",this.removeFallbackContent)},b.prototype.addGlobalHandlers=function(){return $(document).delegate("#logout-button a","click",this.logoutButtonClick).delegate("#logo a","click",this.logoClick).delegate("a.page","click",this.goToPage).delegate("a.static-page","click",this.goToStaticPage).delegate(".go-to-stream","click",this.goToStream).delegate(".go-to","click",this.goToHandler).delegate("a","click",this.openLink)},b.prototype.openLink=function(a){var b,c,d,e,f;b=a.currentTarget,e=b.href,f=b.getAttribute("href");if(f===""||/^#/.test(f))return;d=b.hostname,c=Boolean(e&&d&&!/moviepilot\.com$/i.test(d));if(c){a.preventDefault(),window.open(e);return}return this.openInternalLink(a)},b.prototype.openInternalLink=function(a){var b,c,d;b=a.currentTarget,c=b.pathname;if(!c)return;d=MovieExplorer.router.follow(c,{navigate:!0});if(d)return a.preventDefault()},b.prototype.goToHandler=function(a){var b,c,d;b=a.currentTarget;if(a.nodeName==="A")return;c=$(b).data("href"),d=MovieExplorer.router.follow(c,{navigate:!0});if(d)return a.preventDefault()},b.prototype.goToStream=function(a){return a.preventDefault(),a.stopImmediatePropagation(),MovieExplorer.publish("!startupModule","stream",{forceStartup:!0})},b.prototype.goToPage=function(a){var b,c,d,e,f,g,h,i;e=a.currentTarget.pathname,d=e.match(/^\/([\w-]+)\/(\d+)-([\w-]+)/);if(!d)return;return c=d[0],g=d[1],b=d[2],f=d[3],i=MovieExplorer.utils.singularizeType(g),h=$(a.currentTarget).data("title"),a.preventDefault(),a.stopImmediatePropagation(),MovieExplorer.publish("!startupModule","pages",{id:b,type:i,title:h,permalink:f})},b.prototype.goToStaticPage=function(a){var b,c;b=a.target.pathname.replace(/^\//,"");if(!b)return;return c=$(a.currentTarget).text(),a.preventDefault(),a.stopImmediatePropagation(),MovieExplorer.publish("!startupModule","staticPages",{id:b,title:c})},b.prototype.logoClick=function(a){var b;return a.preventDefault(),a.stopImmediatePropagation(),b=function(){return MovieExplorer.publish("!startupModule","stream",{forceStartup:!0})},MovieExplorer.utils.ensureLogin(this,b,{description:"logo",action:"subscribe to upcoming movies"})},b.prototype.logoutButtonClick=function(a){return a.preventDefault(),a.stopImmediatePropagation(),MovieExplorer.publish("logout")},b}()}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.StreamItemView=function(b){function d(){this.destroy=a(this.destroy,this),this.render=a(this.render,this),this.updateComments=a(this.updateComments,this),this.insertPageSuggestion=a(this.insertPageSuggestion,this),this.setDaySeparator=a(this.setDaySeparator,this),this.dismiss=a(this.dismiss,this),this.hideDismissButton=a(this.hideDismissButton,this),this.showDismissButton=a(this.showDismissButton,this),this.initPlayer=a(this.initPlayer,this),this.openChanged=a(this.openChanged,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.openedView=null,d.prototype.closedView=null,d.prototype.mouseOverItem=!1,d.prototype.animationDuration=800,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("login",this.render),this.modelBind("change:open",this.openChanged),this.modelBind("setDaySeparator",this.setDaySeparator),this.modelBind("change:commentCount",this.updateComments),this.modelBind("change:pageSuggestion",this.insertPageSuggestion),this.delegate("click",".si-heading, .comment-count, .si-read-on",this.open),this.delegate("click",".si-kicker .timestamp, .si-kicker .source",this.close),this.delegate("click",".opened-item .si-heading",this.preventDefault),this.delegate("click",".page-suggestion",this.openPageSuggestion),this.delegate("click",".close",this.dismiss),this.delegate("mouseenter",this.showDismissButton),this.delegate("mouseleave",this.hideDismissButton),this.addOptions(),this.initQuestionnaire()},d.prototype.addOptions=function(){var a,b;this.el.id="si-id-"+this.model.id,b=this.model.get("source"),b&&b.tweet_id&&this.$el.addClass("si-with-source"),a=this.model.get("custom_options"),a&&this.$el.addClass(a);if(this.model.get("viewed"))return this.$el.addClass("viewed")},d.prototype.initQuestionnaire=function(){if(!this.model.questionnaire)return;return this.questionnaireView=new MovieExplorer.QuestionnaireView({model:this.model.questionnaire,streamItemView:this})},d.prototype.initOpenCloseState=function(){this.openedView=this.$(".si-opened"),this.closedView=this.$(".si-closed"),this.openable=Boolean(this.openStatePartial);if(this.openable)return this.openChanged(!1,this.model.get("open"))},d.prototype.open=function(a){return a.preventDefault(),a.stopImmediatePropagation(),this.model.set({open:!0})},d.prototype.close=function(a){return a.preventDefault(),a.stopImmediatePropagation(),this.model.set({open:!1})},d.prototype.openChanged=function(a,b){var c;c=a===!1;if(!this.openable)return;b&&this.openedView.children().length===0&&this.renderOpenedView(),b?(this.$el.removeClass("closed-item").addClass("opened-item"),this.animateOpening(c),this.$currentView=this.openedView):(this.$el.removeClass("opened-item").addClass("closed-item"),this.animateClosing(c),this.$currentView=this.closedView);if(this.questionnaireView)return this.questionnaireView.trigger(b?"open":"close")},d.prototype.renderOpenedView=function(){var a;return a=Handlebars.partials[this.openStatePartial](this.getTemplateData()),this.openedView.html(a)},d.prototype.animateOpening=function(a){var b,c,d,e,f=this;b=function(){return f.showSharingButtons(),f.showComments(),f.initPlayer()};if(a){this.closedView.css("display","none"),this.openedView.css("display","block"),b();return}return e=this.closedView.height(),this.closedView.css("display","none"),this.openedView.css("display","block"),d=this.openedView.height(),c=function(){return f.openedView.css({height:"",overflow:""}),b()},this.closedView.stop(!0,!0),this.openedView.stop(!0,!0).css({height:e,overflow:"hidden"}).animate({height:d},this.animationDuration,c)},d.prototype.animateClosing=function(a){var b,c,d,e=this;if(a){this.openedView.css("display","none"),this.closedView.css("display","block");return}return d=this.openedView.height(),this.openedView.css("display","none"),this.closedView.css("display","block"),c=this.closedView.height(),b=function(){return e.closedView.css("height","")},this.openedView.stop(!0,!0),this.closedView.stop(!0,!0).css("height",d).animate({height:c},this.animationDuration,b)},d.prototype.replaceDates=function(){return this.$(".timestamp").atthattime({smallestGrain:"days",biggestGrain:"days",offset:-25200})},d.prototype.initPlayer=function(){return MovieExplorer.utils.applyBrightcove(this.$el)},d.prototype.parseTwitterWidget=function(a){return MovieExplorer.Twitter.parseWidget(a)},d.prototype.parseGoogleWidget=function(a){return MovieExplorer.Google.parsePlusOneButton(a)},d.prototype.showComments=function(){return MovieExplorer.Facebook.parse(this.$(".comments-list").get(0))},d.prototype.showSharingButtons=function(){var a;return a=this.$(".si-sharing").get(0),MovieExplorer.Facebook.parse(a),this.parseTwitterWidget(a),this.parseGoogleWidget(this.$(".g-plusone").get(0))},d.prototype.showDismissButton=function(){var a=this;return this.mouseOverItem=!0,setTimeout(function(){if(a.mouseOverItem)return a.$(".close").fadeIn(150)},300)},d.prototype.hideDismissButton=function(){this.mouseOverItem=!1;if(this.$(".close").is(":visible"))return this.$(".close").fadeOut(150)},d.prototype.dismiss=function(a){return a.preventDefault(),$(this.$el).animate({opacity:0},function(){return $(this).slideUp(function(){return $(this).remove()})}),this.model.dismiss()},d.prototype.openPageSuggestion=function(a){var b,c;return a.preventDefault(),a.stopPropagation(),b=this.model.get("pageSuggestion"),((c=this.model.get("reason"))!=null?c.type:void 0)==="friend_answer"&&(b.container_id=this.model.id),MovieExplorer.publish("!startupModule","pages",b)},d.prototype.setDaySeparator=function(a){var b,c;return b=this.$el.prev(".day-separator"),c=$('<li class="day-separator">'+a+"</li>"),b.length?b.replaceWith(c):c.insertBefore(this.$el)},d.prototype.insertPageSuggestion=function(a,b){var c,d;if(!b)return;return d=this.$(".page-suggestion"),c=$(Handlebars.partials.page_suggestion(b)).css("display","none"),d.length?d.replaceWith(c):this.$el.append(c),c.fadeIn()},d.prototype.updateComments=function(a,b){var c,d;return c=this.$(".comment-count"),d=this.$(".si-sharing-comments .count"),b?c.show().html(""+b):c.hide(),d.show().html(""+b)},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.replaceDates(),this.initOpenCloseState(),this.questionnaireView&&(this.$el.append(this.questionnaireView.$el),this.questionnaireView.render()),this.$(".close").tipsy(),this},d.prototype.destroy=function(){if(this.destroyed)return;return $(".close").tipsy("hide"),this.questionnaireView&&this.questionnaireView.destroy(),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.ArticleView=function(c){function e(){this.openChanged=b(this.openChanged,this),e.__super__.constructor.apply(this,arguments)}return d(e,c),e.prototype.tagName="li",e.prototype.className="stream-item article",e.prototype.template="stream/article",e.prototype.openStatePartial="opened_article",e.prototype.markSourceParagraph=function(){var b,c=this;return b=this.$(".si-article-text > *").toArray().reverse(),_(b).some(function(b,d){var e,f,g,h,i,j;e=$(b);if(e.hasClass("source"))return!0;if(e.hasClass("find-more")||e.hasClass("si-sharing"))return;f=e.find("a");if(!f.length)return;h=f.prop("hostname"),g=Boolean(h&&!/moviepilot\.com$/i.test(h));if(g)return j=c.model.get("topic"),j&&(i=e.html(),/Read the full story/.test(i)&&(i+=' <b>or find more news about <a href="'+a.getPagePath(j)+'">'+j.title+"</a></b>"),e.html(i)),e.addClass("source"),!0})},e.prototype.openChanged=function(a,b){e.__super__.openChanged.apply(this,arguments);if(b)return this.markSourceParagraph()},e}(MovieExplorer.StreamItemView)}.call(this),function(){"use strict";var a,b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};a=MovieExplorer.utils,MovieExplorer.AuthPickerView=function(b){function d(){d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="auth-picker",d.prototype.template="funnel/auth_picker",d.prototype.containerSelector="#auth-picker-container",d.prototype.initialize=function(b){var c,e,f,g,h,i;d.__super__.initialize.apply(this,arguments),this.loginContext=b.loginContext,this.action=this.loginContext.action,this.delegate("click",".decline",this.decline),this.delegate("click",".close",this.close),this.delegate("click","a.static-page",this.close),this.delegate("hover",".body",this.toggleCloseButton),this.render(),h="twitter facebook google".split(" "),i=[];for(f=0,g=h.length;f<g;f++)e=h[f],c=MovieExplorer[a.upcase(e)],this.delegate("click","."+e,_(this.loginWith).bind(this,e,c)),c.done(_(this.serviceProviderLoaded).bind(this,e,c)),i.push(c.fail(_(this.serviceProviderFailed).bind(this,e,c)));return i},d.prototype.loginWith=function(a,b,c){c.preventDefault();if(!b.isLoaded())return;return MovieExplorer.publish("authPicker:pick",a,this.loginContext),MovieExplorer.publish("!login",a,this.loginContext),this.destroy()},d.prototype.chooseUnsupported=function(a){var b;return a.preventDefault(),b=$(a.target).data("name")||$(a.target).text(),this.$(".not-available").animate({opacity:0},function(){return $(this).html("<p>Sorry, we are still working on the "+b+" login. It will be available shortly. Please pick one of the other options or check back later.</p>").animate({opacity:1})}),MovieExplorer.publish("authPicker:pick",b)},d.prototype.serviceProviderLoaded=function(a){return this.$("."+a).removeClass("service-loading")},d.prototype.serviceProviderFailed=function(a){return this.$("."+a).remove()},d.prototype.hideLoadingSpinner=function(a){},d.prototype.close=function(a){return a.preventDefault(),MovieExplorer.publish("authPicker:close",this.model),this.destroy()},d.prototype.decline=function(a){return a.preventDefault(),MovieExplorer.publish("authPicker:decline",this.model),this.destroy()},d.prototype.toggleCloseButton=function(){return this.$(".close").fadeToggle()},d.prototype.getTemplateData=function(){return{action:this.action}},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.QuestionnaireView=function(b){function d(){this.render=a(this.render,this),this.showResults=a(this.showResults,this),this.destroy=a(this.destroy,this),this.openStateChange=a(this.openStateChange,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.className="questionnaire",d.prototype.template="stream/questionnaire",d.prototype.animationDuration=300,d.prototype.initialize=function(a){return d.__super__.initialize.apply(this,arguments),this.modelBind("answer",this.showResults),this.modelBind("change:open",this.openStateChange),this.modelBind("personalize",this.render),MovieExplorer.utils.ensureLoginForMethods(this,"answer",{description:"answer questionnaire",action:"participate in polls",model:this.model}),this.registerEventHandlers(),this.model.state()==="resolved"?this.render():(this.$el.css("display","none"),this.model.done(this.render))},d.prototype.registerEventHandlers=function(){var a;return a="click",this.$el.off(a,".vote-button"),this.delegate(a,".vote-button",this.expand),this.$el.off(a,".options a"),this.delegate(a,".options a",this.answer),this.$el.off(a,".results a"),this.delegate(a,".results a",this.ignore)},d.prototype.expand=function(a){return a.preventDefault(),this.model.set({open:!0})},d.prototype.openStateChange=function(){return this.model.get("open")?this.$el.removeClass("closed").addClass("opened"):this.$el.removeClass("opened").addClass("closed")},d.prototype.destroy=function(){return d.__super__.destroy.apply(this,arguments)},d.prototype.answer=function(a){var b,c;return a.preventDefault(),b=$(a.target).data("answer-id"),c=this.$(".post-to-facebook :checkbox").prop("checked"),this.model.answer(b,c)},d.prototype.showResults=function(a,b){return b==null&&(b=this.animationDuration),this.model.isBinary()?this.showBinaryResults(a,b):this.showMultipleResults(a,b),this.$el.addClass("answered")},d.prototype.showBinaryResults=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q=this;return this.setAnsweredBinaryOption(a),h=this.$el.find(".you"),e=h.find("img"),f=this.$el.find(".options .picked .friends"),c=f.find("img"),m=e.offset(),c.length>5?(g=c.eq(4),c.eq(5).fadeOut(300)):g=c.last(),f.parent().next("li").length?j="left":j="right",g.length?(p=g.width()+parseInt(g.css("margin-left"),10)+parseInt(g.css("margin-right"),10)+2,l=g.offset()):(p=0,l=f.offset(),l.left+=j==="left"?3:f.width()-3-28),l.left+=(p+60)*(j==="left"?1:-1),b&&e.addClass("image-frame").css({left:m.left+"px",position:"absolute",top:m.top+"px",zIndex:9999}).appendTo("body"),i=this.$el.find(".options li"),k=i.eq(0),o=i.eq(1),k.css({position:"relative"}).animate({marginLeft:"60px"},b).find(".answer").animate({opacity:j==="right"?.3:1}),o.css({position:"relative"}).animate({marginRight:"60px"},b).find(".answer").animate({opacity:j==="left"?.3:1},b),h.fadeOut(),n=function(){return q.$(".answer").each(function(){return $(this).replaceWith('<span class="'+$(this).attr("class")+'">'+$(this).text()+"</span>")})},b?(d=f.closest("li").find(".click-count"),d.text((parseInt(d.text())||0)+1),e.animate({height:"28px",left:l.left+"px",top:l.top+"px"},b,function(){return g.length?g.after(e):f.prepend(e),e.css({position:"static"}),n()})):n()},d.prototype.setAnsweredBinaryOption=function(a){return this.$(".questionnaire-opened .options li").each(function(){if(String($(this).data("answer-id"))===String(a))return $(this).addClass("picked"),$(this).siblings().addClass("rejected")})},d.prototype.showMultipleResults=function(a,b){var c,d,e,f,g=this;return f=this.model.results(),d=f[0],e=f[1],c=this.$(".options"),c.fadeOut(b,function(){var f;return f=JST["stream/questionnaire_results"],c.replaceWith(f(g.getTemplateData())),c.fadeIn(b,function(){return g.$(".results li").each(function(){var c,f;return c=$(this),a=c.data("answer-id"),f=parseInt(d[a]/e*100),c.children(".bar").animate({width:f+"%"},b,"swing")}),g.$(".results [title]").tipsy()})})},d.prototype.ignore=function(a){return a.preventDefault()},d.prototype.getTemplateData=function(){var a,b,c,e,f,g,h,i,j,k;c=d.__super__.getTemplateData.apply(this,arguments);if(!(c.answers&&c.answers.length>0))return c;e=function(){return""+this.click_count+" answered this"},b=[],g=0,k=c.answers;for(i=0,j=k.length;i<j;i++)a=k[i],a.info=e,g+=a.click_count,b=b.concat((a.clickers||[]).slice(0,3));c.clickers=_(b).chain().uniq().compact().sortBy(function(a){return a.friend}).value(),h=c.total_click_count;switch(h){case 0:c.text="Be the first to vote!";break;default:f=_(c.clickers.slice(0,2)).pluck("name"),h>2&&f.push(""+(h-2)+" other"+(h===3?"":"s")),c.text=MovieExplorer.utils.sentence(f)+" voted."}return c.binary=this.model.isBinary(),c},d.prototype.render=function(){if(this.destroyed||this.model.state()!=="resolved")return;return d.__super__.render.apply(this,arguments),this.$el.css("display","block"),this.$el.removeClass("binary multiple"),this.$el.addClass(this.model.isBinary()?"binary":"multiple"),this.$(".friends img, .info img").tipsy(),this.registerEventHandlers(),this.model.isAnswered()&&this.showResults(this.model.get("answered_question"),0),this.openStateChange(),this},d.prototype.destroy=function(){if(this.destroyed)return;return this.$(".results [title], .friends img, .info img").tipsy("hide"),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.GalleryView=function(b){function d(){this.showNextImage=a(this.showNextImage,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.className="gallery",d.prototype.template="gallery",d.prototype.showNavigation=!0,d.prototype.randomizeStart=!1,d.prototype.animationDuration=800,d.prototype.cycleInterval=3e3,d.prototype.thumbnails=!1,d.prototype.images=null,d.prototype.currentIndex=null,d.prototype.figureElements=null,d.prototype.navigationLis=null,d.prototype.initialize=function(a){return d.__super__.initialize.apply(this,arguments),_(this).extend(a),this.$el.addClass(this.thumbnails?"with-thumbnails":"without-thumbnails"),this.delegate("click",".gallery-navigation li",this.navigationClick),this.render(),this.showNextImage()},d.prototype.showNextImage=function(){var a,b,c;return b=this.figureElements.length,c={},this.currentIndex===null?(a=this.randomizeStart?MovieExplorer.utils.rand(0,b):0,c.animate=!1):a=this.currentIndex+1,a===b&&(a=0),this.showImage(a,c)},d.prototype.showImage=function(a,b){var c,d,e;b==null&&(b={});if(a===this.currentIndex)return;return _(b).defaults({animate:!0}),this.currentIndex=a,c=this.figureElements.eq(a).find("img"),c.attr("src")?this.imageLoaded(c,a,b):(e=c.data("src"),e.substring(0,7)!=="http://"&&MovieExplorerConfig.assetHost&&(e=MovieExplorerConfig.assetHost+e),d=_(this.imageLoaded).bind(this,c,a,b),c.load(d).attr("src",e))},d.prototype.imageLoaded=function(a,b,c){var d,e,f,g;if(b!==this.currentIndex)return;this.figureElements.stop(!0,!0).css("z-index",""),this.stopCycling(),d=a.parent(),e=c.animate?this.animationDuration:0,f=_(this.imageShown).bind(this,d),d.css("z-index","1").fadeIn(e,f);if(this.navigationLis)return g=this.navigationLis.eq(b),g.addClass("active").siblings().removeClass("active")},d.prototype.imageShown=function(a){return a.siblings().css("display",""),this.startCycling()},d.prototype.startCycling=function(){return clearInterval(this.cycleHandle),this.cycleHandle=setInterval(this.showNextImage,this.cycleInterval)},d.prototype.stopCycling=function(){return clearInterval(this.cycleHandle)},d.prototype.navigationClick=function(a){var b;return a.preventDefault(),a.stopPropagation(),b=this.$(".gallery-navigation li").index($(a.target).closest("li")),this.showImage(b)},d.prototype.getTemplateData=function(){return{images:this.images,thumbnails:this.thumbnails,navigation:this.showNavigation}},d.prototype.render=function(){d.__super__.render.apply(this,arguments),this.figureElements=this.$("figure");if(this.showNavigation)return this.navigationLis=this.$(".gallery-navigation li")},d.prototype.destroy=function(){return this.stopCycling(),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.StreamView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.animationDuration=0,c.prototype.getView=function(a){var b,c;return b=null,c=a.get("content_type"),b=function(){switch(c){case"news":return MovieExplorer.ArticleView;case"tweet":return MovieExplorer.TweetView}}(),b?new b({model:a}):(console.error("StreamView#getView: no constructor found for content type "+c),!1)},c}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.PageView=function(c){function e(){this.destroy=b(this.destroy,this),this.render=b(this.render,this),this.getMoreItems=b(this.getMoreItems,this),this.hideMoreButton=b(this.hideMoreButton,this),this.showMoreButton=b(this.showMoreButton,this),this.displayZoomLevel=b(this.displayZoomLevel,this),this.renderPageStream=b(this.renderPageStream,this),this.initSubscribeButton=b(this.initSubscribeButton,this),this.scrollHandler=b(this.scrollHandler,this),this.showOrHideEditButton=b(this.showOrHideEditButton,this),e.__super__.constructor.apply(this,arguments)}return d(e,c),e.prototype.className="page",e.prototype.containerSelector="#page-container",e.prototype.animationDuration=800,e.prototype.initialize=function(){e.__super__.initialize.apply(this,arguments),this.pass("change:name",".section-title"),this.initPageStream(),this.render();if(this.model.state()!=="resolved")return this.model.done(this.render)},e.prototype.scrollToInitialItem=function(b){if(b.get("isInitialItem"))return a.delay(250,function(){return scrollTo(0,357)})},e.prototype.initEditButton=function(){return this.showOrHideEditButton(),this.subscribeEvent("login",this.showOrHideEditButton)},e.prototype.showOrHideEditButton=function(){var a;return this.$(".header .page-edit")[((a=MovieExplorer.user)!=null?a.isAdmin():void 0)?"show":"hide"]()},e.prototype.initStickyHeadline=function(){return this.$headline=this.$(".headline"),this.$window=$(window),this.headlineOffset=this.$headline.offset().top,this.scrolled=!1,this.$window.off("scroll",this.scrollHandler),this.$window.on("scroll",this.scrollHandler)},e.prototype.destroyStickyHeadline=function(){return this.$window&&this.$window.off("scroll",this.scrollHandler),this.$headline=this.$window=null},e.prototype.scrollHandler=function(){var a;a=this.$window.scrollTop()>this.headlineOffset;if(a!==this.scrolled)return this.scrolled=a,this.$headline[a?"addClass":"removeClass"]("scrolled")},e.prototype.initSubscribeButton=function(){var a,b;return a={description:"subscribe to a movie or bucket",action:"subscribe",model:this.model},MovieExplorer.utils.ensureLoginForMethods(this,"subscribe",a,"apiSession"),this.delegate("click",".header .subscribe-button",this.subscribe),b=MovieExplorer.applicationController.subscriptions,b.state()==="resolved"?this.updateSubscribeButton():b.done(this.updateSubscribeButton)},e.prototype.updateSubscribeButton=function(){var a;a=MovieExplorer.applicationController.subscriptions;if(a.get(this.model.id))return this.subscribed=!0,this.activateSubscribeButton()},e.prototype.activateSubscribeButton=function(){return this.$(".header .subscribe-button").text("Subscribed").addClass("pushed")},e.prototype.subscribe=function(a){var b;a.preventDefault();if(this.subscribed)return;return this.subscribed=!0,this.model.subscribe(),this.activateSubscribeButton(),b=this.$(".header .subscribers"),b.text(Number(b.text())+1)},e.prototype.initPageStream=function(){var a;return this.modelBind("change:zoomLevel",this.displayZoomLevel),this.modelBind("endOfStream",this.hideMoreButton),this.delegate("click",".column-heading .zoom-level a",this.setZoomLevel),this.delegate("click",".more a",this.getMoreItems),a=this.model.get("items"),a.bind("add",this.showMoreButton),a.bind("add",this.scrollToInitialItem)},e.prototype.renderPageStream=function(){return this.itemsView=new MovieExplorer.StreamView({collection:this.model.get("items"),el:this.$(".stream-items").get(0)})},e.prototype.destroyPageStream=function(){var a;return this.itemsView.destroy(),a=this.model.get("items"),a.unbind("add",this.showMoreButton),a.unbind("add",this.scrollToInitialItem),a.destroy()},e.prototype.setZoomLevel=function(a){var b,c;return a.preventDefault(),b=$(a.target),c=b.data("zoomLevel"),this.model.set({zoomLevel:c})},e.prototype.displayZoomLevel=function(){var a;return a=this.model.get("zoomLevel"),this.$(".zoom-level a").removeClass("active"),this.$(".zoom-level a[data-zoom-level="+a+"]").addClass("active")},e.prototype.showMoreButton=function(){return this.$("> .more").removeClass("busy").show()},e.prototype.hideMoreButton=function(){return this.$("> .more").hide()},e.prototype.getMoreItems=function(a){return a&&a.preventDefault(),this.$("> .more").addClass("busy"),this.model.set({itemsPage:this.model.get("itemsPage")+1})},e.prototype.initVideo=function(){var a;a=this.model.get("brightcove_id");if(!a)return;return this.model.get("trailer_id")===a&&this.playVideo(),this.delegate("click",".header .play-video",this.playVideo)},e.prototype.playVideo=function(b){return b&&b.preventDefault&&b.preventDefault(),this.$(".header").find(".gallery-container, .play-video, .containing-buckets, .page-edit, .fresh-badge").css("display","none").end().find(".video").css("display","block"),this.destroyGallery(),MovieExplorer.publish("page:watchTrailer",this.model,this.model.get("brightcove_id")),a.applyBrightcove(this.$(".header"))},e.prototype.initQuestionnaire=function(){if(!this.model.has("questionnaire_id")||this.model.id==="36632")return;return this.questionnaireView=new MovieExplorer.QuestionnaireView({model:this.model.questionnaire,el:this.$(".questionnaire").get(0)})},e.prototype.destroyQuestionnaire=function(){if(this.questionnaireView)return this.questionnaireView.destroy()},e.prototype.initGallery=function(){var a;a=this.model.get("images");if(!a||!a.length)return;return this.galleryView=new MovieExplorer.GalleryView({images:a,el:this.$(".gallery")})},e.prototype.destroyGallery=function(){return this.galleryView&&this.galleryView.destroy(),this.galleryView=null},e.prototype.getTemplateData=function(){var a,b;return a=e.__super__.getTemplateData.apply(this,arguments),b=a.description,typeof b=="string"&&!b.match(/^<p>/)&&(a.description="<p>"+b+"</p>"),a.loaded=this.model.state()==="resolved",a},e.prototype.render=function(){e.__super__.render.apply(this,arguments);if(this.destroyed)return;this.container||(this.container=$(this.containerSelector
)),this.container.append(this.el),this.initEditButton();if(this.model.state()==="resolved")return this.initStickyHeadline(),this.initSubscribeButton(),this.initGallery(),this.initVideo(),this.model.id==="36632"&&this.$(".questionnaire").addClass("twitter").append('<h3>Don\'t miss a thing about Skyfall&hellip; Follow it on Twitter!</h3>\n<a href="https://twitter.com/mpcom_skyfall" class="twitter-follow-button" data-show-count="false" data-size="large" data-width="200px" data-show-screen-name="true">Follow @mpcom_skyfall</a>\n<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}else{twttr.widgets.load();}}(document,"script","twitter-wjs");</script>'),setTimeout(this.renderPageStream,100),this.displayZoomLevel(),this.showMoreButton(),setTimeout(this.parseFacebookTags,2e3)},e.prototype.destroy=function(){if(this.destroyed)return;return this.destroyStickyHeadline(),this.destroyGallery(),this.destroyQuestionnaire(),this.destroyPageStream(),e.__super__.destroy.apply(this,arguments)},e}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.BucketView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="div",c.prototype.id="bucket",c.prototype.template="bucket",c}(MovieExplorer.PageView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.DashboardView=function(b){function d(){this.render=a(this.render,this),this.hide=a(this.hide,this),this.updateSubscriptionCount=a(this.updateSubscriptionCount,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="dashboard",d.prototype.template="dashboard",d.prototype.containerSelector="#dashboard-container",d.prototype.initialize=function(){var a=this;return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("subscriptions:update",this.updateSubscriptionCount),this.subscribeEvent("logout",this.hide),this.pass("change:name","#user-name"),MovieExplorer.user&&this.render(),MovieExplorer.subscribe("login",function(){return a.model=MovieExplorer.user,a.render()})},d.prototype.updateSubscriptionCount=function(){return this.$("#subscription-count").text(MovieExplorer.applicationController.subscriptions.length)},d.prototype.hide=function(){return this.$el.detach().empty()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el),this.updateSubscriptionCount(),MovieExplorer.applicationView.updateNavigation()},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.DiscoverylineActivityView=function(b){function d(){this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="ol",d.prototype.className="activity",d.prototype.template="discoveryline_activity",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.modelBind("change:items",this.render),this.render()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.$(".timestamp").atthattime({smallestGrain:"days",biggestGrain:"days",offset:-25200})},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.DiscoverylineItemView=function(b){function d(){this.initSubscribeButton=a(this.initSubscribeButton,this),this.parseLikeButton=a(this.parseLikeButton,this),this.reasonOutputChange=a(this.reasonOutputChange,this),this.starringChange=a(this.starringChange,this),this.directorChange=a(this.directorChange,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="li",d.prototype.className="discoveryline-item",d.prototype.template="discoveryline_item",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.modelBind("change:starring",this.starringChange),this.modelBind("change:director",this.directorChange),this.modelBind("change:reasonOutput",this.reasonOutputChange),this.delegate("click",".play-video",this.playVideo),this.delegate("mouseenter",this.showActivity),this.delegate("mouseleave",this.hideActivity)},d.prototype.directorChange=function(a,b){return this.$("dd.director").text(b).add(this.$("dt.director")).css("display","block")},d.prototype.starringChange=function(a,b){return this.$("dd.starring").text(b).add(this.$("dt.starring")).css("display","block")},d.prototype.reasonOutputChange=function(a,b){return this.$(".box").addClass("with-reason"),this.$(".reason").html(b).css("display","block")},d.prototype.parseLikeButton=function(a,b){if(this.model.get("facebook_url"))return MovieExplorer.Facebook.parse(this.$(".facebook-like").get(0))},d.prototype.initSubscribeButton=function(){var a,b;return a={description:"subscribe to a movie or bucket",action:"subscribe",model:this.model},MovieExplorer.utils.ensureLoginForMethods(this,"subscribe",a,"apiSession"),this.delegate("click",".header .subscribe-button",this.subscribe),b=MovieExplorer.applicationController.subscriptions,b.state()==="resolved"?this.updateSubscribeButton():b.done(this.updateSubscribeButton)},d.prototype.updateSubscribeButton=function(){var a;a=MovieExplorer.applicationController.subscriptions;if(a.get(this.model.id))return this.subscribed=!0,this.activateSubscribeButton()},d.prototype.activateSubscribeButton=function(){return this.$(".header .subscribe-button").text("Subscribed").addClass("pushed")},d.prototype.subscribe=function(a){var b;a.preventDefault();if(this.subscribed)return;return this.subscribed=!0,this.model.subscribe(),this.activateSubscribeButton(),b=this.$(".header .subscribers"),b.text(Number(b.text())+1)},d.prototype.playVideo=function(a){var b;return a.preventDefault(),this.$(".banner img, .play-video").css("display","none"),b=this.$(".video-player"),b.css("display","block"),MovieExplorer.utils.applyBrightcove(b)},d.prototype.activityHandle=null,d.prototype.showActivity=function(){return this.activityView||(this.activityView=new MovieExplorer.DiscoverylineActivityView({model:this.model.get("activity"),el:this.$(".activity").get(0)})),this.model.getActivity(),clearTimeout(this.activityHandle),this.activityView.$el.stop(!0,!0).fadeIn()},d.prototype.hideActivity=function(){var a=this;return clearTimeout(this.activityHandle),this.activityHandle=MovieExplorer.utils.delay(2e3,function(){return a.activityView.$el.stop(!0,!0).fadeOut(1e3)})},d.prototype.getTemplateData=function(){var a,b,c,e,f,g,h,i,j,k,l,m;c=d.__super__.getTemplateData.apply(this,arguments),c.description.length>300&&(h=c.description.substring(0,300),h=h.substring(0,h.lastIndexOf(" ")),h+="…",c.short_description=h),c.release_date=MovieExplorer.Movie.prototype.humanReleaseDate.call(this.model),c.images=(l=c.images)!=null?l.splice(0,4):void 0,g=c.questionnaire;if(g){a=g.replies,i=g.total_click_count;if(a.length===2&&i){m=["hot","notHot"];for(e=0,k=m.length;e<k;e++)j=m[e],b=a[e].click_count,c[""+j+"Count"]=b,f=b/i,f=Math[e?"floor":"ceil"](f*100),c[""+j+"Percent"]=f}}return c},d.prototype.render=function(){d.__super__.render.apply(this,arguments),this.initSubscribeButton(),this.parseLikeButton(),this.model.get("director")&&this.$(".director").css("display","block");if(this.model.get("starring"))return this.$(".starring").css("display","block")},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.DiscoverylineView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.animationDuration=0,c.prototype.getView=function(a){return new MovieExplorer.DiscoverylineItemView({model:a})},c}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.EditorView=function(b){function d(){this.toggle=a(this.toggle,this),this.initialize=a(this.initialize,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="editor",d.prototype.template="editor",d.prototype.containerSelector="#editor-container",d.prototype.pagination={globalStream:1,globalStreamOpen:!0},d.prototype.initialize=function(){if(!MovieExplorer.user){this.subscribeEvent("login",this.initialize);return}if(!MovieExplorer.user.isAdmin())return;return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("showModule",this.toggle),this.toggle(),this.delegate("click",".open-menu",this.openMenu),this.delegate("click",".logout",this.logout),this.delegate("click",".global-stream",this.globalStream),this.delegate("click",".global-stream-prev",this.globalStreamPrev),this.delegate("click",".global-stream-next",this.globalStreamNext),this.delegate("click",".global-stream-open, .global-stream-close",this.globalStreamToggle),this.render()},d.prototype.openMenu=function(a){return a&&a.preventDefault(),this.$("ul").toggle()},d.prototype.logout=function(a){return a&&a.preventDefault(),FB.logout(function(){return location.reload()})},d.prototype.globalStream=function(a){return a&&a.preventDefault(),MovieExplorer.streamController.stream.getGlobalStream({page:this.pagination.globalStream},{open:this.pagination.globalStreamOpen}),this.updatePagination()},d.prototype.globalStreamPrev=function(a){return a&&a.preventDefault(),this.pagination.globalStream-=1,this.globalStream()},d.prototype.globalStreamNext=function(a){return a&&a.preventDefault(),this.pagination.globalStream+=1,this.globalStream()},d.prototype.globalStreamToggle=function(a){return a&&a.preventDefault(),this.pagination.globalStreamOpen=!this.pagination.globalStreamOpen,this.globalStream()},d.prototype.updatePagination=function(){return this.$(".global-stream-prev").toggle(this.pagination.globalStream>1),this.$(".global-stream-next").toggle(this.pagination.globalStream>=1),this.$(".global-stream-open").toggle(!this.pagination.globalStreamOpen),this.$(".global-stream-close").toggle(this.pagination.globalStreamOpen)},d.prototype.toggle=function(){return this.$el.css("display",MovieExplorer.applicationView.currentModule==="stream"?"block":"none")},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.SubscribablesView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.animationDuration=0,c.prototype.itemRemoved=function(a){return this.replaceViewFor(a),c.__super__.itemRemoved.apply(this,arguments)},c.prototype.getView=function(a){return new MovieExplorer.SubscribableView({model:a})},c.prototype.render=function(){return c.__super__.render.apply(this,arguments),this.$listElement=this.$(".subscribables-list")},c}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.FilteredSubscribablesView=function(b){function d(){this.moreSuggestions=a(this.moreSuggestions,this),this.filterer=a(this.filterer,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),_(d.prototype).defaults(MovieExplorer.Refillable,MovieExplorer.Categorizable),d.prototype.template="filtered_subscribables",d.prototype.offset=0,d.prototype.limit=6,d.prototype.initialize=function(a){return a==null&&(a={}),d.__super__.initialize.call(this,{renderItems:!1}),this.delegate("click",".more a",this.moreSuggestions),this.bind("visibilityChange",this.visibilityChangeHandler),this.showCategory(a.displayCategory||this.displayCategory),this.renderAllItems()},d.prototype.filterer=function(a,b){var c;return this.offset<=(c=this.collection.indexByType(a,this.filterCategories))&&c<this.offset+this.limit},d.prototype.moreSuggestions=function(a){a.preventDefault(),this.offset=this.offset+this.limit>=this.collection.allWithType(this.filterCategories).length?0:this.offset+this.limit,this.filter(this.filterer);if(this.collection.length<this.limit)return this.$(".more").fadeOut()},d.prototype.showCategory=function(a){return this.displayCategory!==a&&(this.offset=0),MovieExplorer.Categorizable.showCategory.apply(this,arguments),this.updateHeadline()},d.prototype.updateHeadline=function(){var a,b;return b=this.displayCategory==="Movies"?"to upcoming movies":this.displayCategory==="Topics"?"to selected topics":this.displayCategory==="TV Shows"?"to current TV shows":void 0,a="Subscribe "+b+" to get personalized news",this.$("h3").text(a)},d.prototype.visibilityChangeHandler=function(a){return a.length===0?(this.$fallbackGenre.text(MovieExplorer.utils.downcase(this.displayCategory)),this.$fallback.css("display","block")):this.$fallback.css("display","none")},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.$fallback=this.$(".fallback"),this.$fallbackGenre=this.$fallback.find("span")},d}(MovieExplorer.SubscribablesView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.FunnelSuggestionsView=function(b){function d(){this.render=a(this.render,this),this.setSubscriptionCount=a(this.setSubscriptionCount,this),this.updateHeading=a(this.updateHeading,this),this.moveOut=a(this.moveOut,this),this.moveIn=a(this.moveIn,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="funnel-suggestions",d.prototype.template="funnel/funnel_suggestions",d.prototype.containerSelector="#funnel-suggestions-container",d.prototype.displayCategory="Movies",d.prototype.limit=4,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("subscriptions:update",this.setSubscriptionCount),this.delegate("click",".finish",this.finish),MovieExplorer.applicationController.subscriptions.done(this.updateHeading)},d.prototype.moveIn=function(a){return this.$el.css({left:"150%"}),this.$el.animate({left:"50%"},this.animationDuration,a)},d.prototype.moveOut=function(a){return this.$el.animate({left:"-50%"},this.animationDuration,a)},d.prototype.updateHeading=function(){var a;a=MovieExplorer.sessionController.loginContext;if(a&&a.description==="subscribe to a movie or bucket")return this.$("h2").text("People who subscribed to "+a.model.get("name")+" were also interested in").add(this.$(".subscription-count")).addClass("personalized")},d.prototype.finish=function(a){return a.preventDefault(),MovieExplorer.publish("funnel:finished")},d.prototype.setSubscriptionCount=function(a,b){return this.$(".subscription-count strong").text(b)},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el)},d}(MovieExplorer.FilteredSubscribablesView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.IncentiveView=function(b){function d(){this.destroy=a(this.destroy,this),this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.template="funnel/incentive",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.subscribeEvent("loginSession",this.destroy),this.delegate("click",".subscribe-button",this.subscribe),this.delegate("click",".decline-button",this.decline),this.delegate("click",".close",this.close),this.delegate("hover",".body",this.toggleCloseButton),this.model.done(this.render)},d.prototype.subscribe=function(a){return console.debug("IncentiveView#subscribe"),a.preventDefault(),MovieExplorer.utils.ensureLogin(this,_(this.doSubscribe).bind(this,this.model),{description:"subscribe from an incentive overlay",action:"subscribe",model:this.model}),this.destroy()},d.prototype.doSubscribe=function(a){return console.debug("IncentiveView#doSubscribe",a),MovieExplorer.publish("incentive:subscribe",a),a.subscribe()},d.prototype.close=function(a){return a.preventDefault(),MovieExplorer.publish("incentive:close",this.model),this.destroy()},d.prototype.decline=function(a){return a.preventDefault(),MovieExplorer.publish("incentive:decline",this.model),this.destroy()},d.prototype.toggleCloseButton=function(){return this.$(".close").fadeToggle()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$("#incentive-container").append(this.el)},d.prototype.destroy=function(){if(this.destroyed)return;return MovieExplorer.sessionController.firstVisit=!1,d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.LikeGeneratorItemView=function(b){function d(){this.destroy=a(this.destroy,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="li",d.prototype.template="like_generator_item",d.prototype.animationDuration=500,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.delegate("click",".like-button",this.like),this.delegate("click",".close",this.skip)},d.prototype.like=function(a){var b=this;return a.preventDefault(),this.$el.animate({opacity:0},this.animationDuration,"linear",function(){return b.model.like("Like Generator")})},d.prototype.skip=function(a){var b=this;return a.preventDefault(),this.$el.animate({opacity:0},this.animationDuration,"linear",function(){return b.model.skip("Like Generator")})},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(".close").tipsy()},d.prototype.destroy=function(){if(this.destroyed)return;return $(".close").tipsy("hide"),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.LikeGeneratorView=function(b){function d(){this.visibilityChangeHandler=a(this.visibilityChangeHandler,this),this.filterer=a(this.filterer,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),_(d.prototype).defaults(MovieExplorer.Refillable,MovieExplorer.Categorizable,MovieExplorer.Tabable),d.prototype.template="like_generator",d.prototype.displayCategory="Movies",d.prototype.limit=18,d.prototype.limitCounter=0,d.prototype.initialize=function(){return d.__super__.initialize.call(this,{renderItems:!1}),this.delegate("click",".content-tabs a",this.categorySelectionHandler),this.bind("visibilityChange",this.visibilityChangeHandler),this.showCategory(),this.renderAllItems()},d.prototype.filterer=function(a){return _(this.filterCategories).contains(a.get("type"))&&this.limitCounter++<this.limit},d.prototype.showCategory=function(){return this.limitCounter=0,MovieExplorer.Categorizable.showCategory.apply(this,arguments)},d.prototype.itemsResetted=function(){return this.limitCounter=0,d.__super__.itemsResetted.apply(this,arguments)},d.prototype.visibilityChangeHandler=function(a){return this.visible&&this.trackViewedItems(),a.length===0&&this.collection.state()==="resolved"?this.$fallback.css("display","block"):this.$fallback.css("display","none")},d.prototype.trackViewedItems=function(){var a,b,c,d,e;d=this.visibleItems,e=[];for(b=0,c=d.length;b<c;b++)a=d[b],e.push(a.trackDisplay());return e},d.prototype.itemRemoved=function(a){return this.replaceViewFor(a),d.__super__.itemRemoved.apply(this,arguments)},d.prototype.getView=function(a){return new MovieExplorer.LikeGeneratorItemView({model:a})},d.prototype.show=function(){return MovieExplorer.Tabable.show.apply(this),this.trackViewedItems()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.$listElement=this.$(".like-generator-list"),this.$fallback=this.$(".fallback"),this},d}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.LikeView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="li",c.prototype.className="like",c.prototype.template="like",c.prototype.animationDuration=500,c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.delegate("click",".unlike-button",this.unlike)},c.prototype.unlike=function(a){var b=this;return a.preventDefault(),this.$el.fadeOut(this.animationDuration,function(){return b.$el.remove(),b.model.unlike()})},c}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.LoginView=function(b){function d(){this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="login",d.prototype.template="funnel/login",d.prototype.containerSelector="#login-container",d.images=[{image:"/assets/login/superman.jpg",caption:"Man of Steel, In theaters June 14, 2013 © Warner Bros."},{image:"/assets/login/the-dark-knight-rises.jpg",caption:"The Dark Knight Rises, In theaters July 20, 2012 © Warner Bros."},{image:"/assets/login/the-avengers.jpg",caption:"The Avengers, In theaters, May 4 2012 © Paramount Pictures"},{image:"/assets/login/american-reunion.jpg",caption:"American Reunion, In theaters April 6, 2012 © Universal Studios"},{image:"/assets/login/the-hunger-games.jpg",caption:"The Hunger Games, In theaters March 23, 2012 © Lionsgate"},{image:"/assets/login/mission-impossible.jpg",caption:"Mission: Impossible - Ghost Protocol, In theaters December 21, 2011 © Paramount Pictures"},{image:"/assets/login/tintin.jpg",caption:"The Adventures of Tintin, In theaters December 21, 2011 © Paramount Pictures"},{image:"/assets/login/the-girl-with-the-dragon-tattoo.jpg",caption:"The Girl with the Dragon Tattoo, In theaters December 21, 2011 © Columbia Pictures"},{image:"/assets/login/sherlock-holmes.jpg",caption:"Sherlock Holmes: A Game of Shadows, In theaters December 16, 2011 © Warner Bros."},{image:"/assets/login/muppets.jpg",caption:"The Muppets, In theaters November 23, 2011 © Disney"},{image:"/assets/login/hugo.jpg",caption:"Hugo, In theaters November 23, 2011 © Paramount Pictures"},{image:"/assets/login/twilight.jpg",caption:"The Twilight Saga: Breaking Dawn (Part One), In theaters November 18, 2011 © Summit Entertainment"},{image:"/assets/login/melancholia.jpg",caption:"Melancholia, In theaters November 11, 2011 © Magnolia Pictures"},{image:"/assets/login/immortals.jpg",caption:"Immortals, In theaters November 11, 2011 © Relativity Media"}],d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.delegate("click",".login-button",this.attemptLogin),this.render()},d.prototype.attemptLogin=function(a){return a.preventDefault(),MovieExplorer.publish("!showAuthPicker",{description:"home page",action:"check out the database of upcoming movies"})},d.prototype.initGallery=function(){return this.galleryView=new MovieExplorer.GalleryView({images:d.images,el:this.$(".gallery"),showNavigation:!1,randomizeStart:!0})},d.prototype.initFacepile=function(){var a,b;b=MovieExplorer.Facebook.status,a=b===null||b==="notConnected"||b==="not_authorized";if(a)return this.$(".connect").addClass("notConnected")},d.prototype.initVideo=function(){return MovieExplorer.utils.applyBrightcove(this.el)},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el),this.initGallery(),this.initFacepile(),this.initVideo(),this},d.prototype.destroy=function(){if(this.destroyed)return;return this.galleryView.destroy(),this.galleryView=null,d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.MaintenanceView=function(a){function c(){this.hide=b(this.hide,this),this.show=b(this.show,this),c.__super__.constructor.apply(this,arguments)}return d(c,a),c.prototype.id="maintenance",c.prototype.template="maintenance",c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),MovieExplorer.API.status!=="online"&&this.show(),this.subscribeEvent("api:offline",this.show),this.subscribeEvent("api:online",this.hide)},c.prototype.show=function(){return this.el.children.length===0&&(this.render(),this.$el.appendTo("body")),this.$el.hide().fadeIn()},c.prototype.hide=function(){return this.$el.hide()},c}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.MovieView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="div",c.prototype.id="movie",c.prototype.template="movie",c.prototype.getTemplateData=function(){var a;return a=c.__super__.getTemplateData.apply(this,arguments),a.theatrical_release_date=this.model.humanReleaseDate(),a.production_stage&&(a.production_stage=this.model.constructor.productionStageMap[a.production_stage]),a},c.prototype.render=function(){c.__super__.render.apply(this,arguments);if(this.model.state()==="resolved")return this.initQuestionnaire()},c}(MovieExplorer.PageView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.NewsStreamView=function(b){function d(){this.getMoreStreamItems=a(this.getMoreStreamItems,this),this.hideMoreButton=a(this.hideMoreButton,this),this.showMoreButton=a(this.showMoreButton,this),this.showHideEmptyStreamInfo=a(this.showHideEmptyStreamInfo,this),this.showLoadingIndicator=a(this.showLoadingIndicator,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="stream",d.prototype.template="stream/stream",d.prototype.containerSelector="#stream-container",d.prototype.itemSelector=".stream-item",d.prototype.animationDuration=0,d.prototype.initialize=function(){return this.container=$(this.containerSelector),d.__super__.initialize.apply(this,arguments),this.modelBind("newItemsInserted",this.showMoreButton),this.modelBind("newItemsInserted",this.showHideEmptyStreamInfo),this.modelBind("endOfStream",this.hideMoreButton),this.delegate("click",".more a",this.getMoreStreamItems)},d.prototype.itemAdded=function(){return this.hideLoadingIndicator(),d.__super__.itemAdded.apply(this,arguments)},d.prototype.itemsResetted=function(){return d.__super__.itemsResetted.apply(this,arguments),this.$(".day-separator + .day-separator").remove(),this.$(".day-separator:last-child").remove()},d.prototype.showLoadingIndicator=function(){this.$("#no-stream").hide();if(!this.collection.length)return d.__super__.showLoadingIndicator.apply(this,arguments)},d.prototype.hideLoadingIndicator=function(){return this.showHideEmptyStreamInfo(),d.__super__.hideLoadingIndicator.apply(this,arguments)},d.prototype.showHideEmptyStreamInfo=function(){var a;if(MovieExplorer.applicationView.currentModule!=="stream")return;return a=this.collection.length===0,$("#no-stream")[a?"fadeIn":"hide"]()},d.prototype.showMoreButton=function(){if(this.collection.length)return this.$(".more").removeClass("busy").show()},d.prototype.hideMoreButton=function(){return this.$(".more").hide()},d.prototype.getMoreStreamItems=function(a){return a&&a.preventDefault(),this.$(".more").addClass("busy"),this.collection.getMoreStreamItems()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.container.append(this.el),this.$listElement=$("#stream-list"),this},d}(MovieExplorer.StreamView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.NotifierView=function(b){function d(){this.messageChange=a(this.messageChange,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="notifier",d.prototype.template="notifier",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.modelBind("change:message",this.messageChange),this.delegate("click",".message",this.fireHandler),this.delegate("click",".close-button",this.close)},d.prototype.messageChange=function(a,b){return b?this.show():this.close()},d.prototype.fireHandler=function(a){return a.preventDefault(),a.stopPropagation(),this.model.fireHandler()},d.prototype.show=function(){var a,b;return this.$el.css("display","none").stop(!0,!0),this.render(),b=this.model.get("type"),b&&this.$(".message > span").attr("class",b),a=this.$el.css("display","block").appendTo(document.body).height(),this.$el.css({bottom:""+ -a+"px"}).animate({bottom:0},"slow")},d.prototype.close=function(a){var b;return a&&a.preventDefault&&(a.preventDefault(),MovieExplorer.publish("closeNotifier",this.model.get("message")),this.model.removeNotification({userInvoked:!0})),b=this.$el.height(),this.$el.animate({bottom:""+ -b+"px"},"slow")},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.OpinionView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="li",
c.prototype.className="opinion",c.prototype.template="opinion",c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.delegate("click",".subject",this.goToPage),this.delegate("click",".answer-container",this.goToSubject),this.pass("change:age_in_words",".age")},c.prototype.goToPage=function(a){return a.preventDefault(),a.stopPropagation(),MovieExplorer.publish("opinion:pageActivation",this.model),MovieExplorer.publish("!startupModule","pages",this.model.get("page"))},c.prototype.goToSubject=function(a){var b,c;return a.preventDefault(),a.stopPropagation(),c=this.model.get("subject"),b=this.model.get("type")==="container"?"stream":"pages",MovieExplorer.publish("opinion:questionnaireActivation",this.model),MovieExplorer.publish("!startupModule",b,c)},c.prototype.getTemplateData=function(){var a,b;return a=c.__super__.getTemplateData.apply(this,arguments),b=a.subject,a.type==="container"?a.subjectPath=MovieExplorer.utils.getStreamItemPath(b):a.subjectPath=MovieExplorer.utils.getPagePath(b),a},c}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.OpinionsView=function(b){function d(){this.showMoreButton=a(this.showMoreButton,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="opinions",d.prototype.template="opinions",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.delegate("click",".more",this.getMoreOpinions),this.modelBind("load",this.showMoreButton)},d.prototype.showMoreButton=function(){if(this.collection.length)return this.$(".more").removeClass("busy").show()},d.prototype.getMoreOpinions=function(a){return a.preventDefault(),this.$(".more").addClass("busy"),this.collection.getOldOpinions()},d.prototype.getView=function(a){return new MovieExplorer.OpinionView({model:a})},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$("#opinions-container").append(this.$el),this.$listElement=this.$("#opinions-list")},d}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.PageWithDiscoverylineView=function(a){function c(){this.destroy=b(this.destroy,this),this.render=b(this.render,this),this.initDiscoveryline=b(this.initDiscoveryline,this),c.__super__.constructor.apply(this,arguments)}return d(c,a),c.prototype.id="page-with-discoveryline",c.prototype.template="page_with_discoveryline",c.prototype.containerSelector="#page-container",c.prototype.initialize=function(){c.__super__.initialize.apply(this,arguments),this.render();if(this.model.state()!=="resolved")return this.model.done(this.render)},c.prototype.initDiscoveryline=function(){if(!this.model.discoveryline)return;return this.discoverylineView=new MovieExplorer.DiscoverylineView({collection:this.model.discoveryline,el:$("#discoveryline").get(0)})},c.prototype.destroyDiscoveryline=function(){return this.discoverylineView.destroy()},c.prototype.render=function(){c.__super__.render.apply(this,arguments);if(this.destroyed)return;this.container||(this.container=$(this.containerSelector)),this.container.append(this.el);if(this.model.state()==="resolved")return this.initDiscoveryline()},c.prototype.destroy=function(){if(this.destroyed)return;return this.destroyDiscoveryline(),c.__super__.destroy.apply(this,arguments)},c}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.ProfileLikesView=function(b){function d(){this.likesUpdate=a(this.likesUpdate,this),this.filterer=a(this.filterer,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),_(d.prototype).defaults(MovieExplorer.Categorizable,MovieExplorer.Tabable),d.prototype.template="profile_likes",d.prototype.animationDuration=0,d.prototype.displayCategory="Movies",d.prototype.initialize=function(){return d.__super__.initialize.call(this,{renderItems:!1}),this.subscribeEvent("likes:update",this.likesUpdate),this.delegate("click","ul.content-tabs a",this.categorySelectionHandler),this.bind("visibilityChange",this.visibilityChangeHandler),this.showCategory(),this.renderAllItems()},d.prototype.filterer=function(a,b){return _(this.filterCategories).contains(a.get("type"))},d.prototype.likesUpdate=function(a,b){return this.$(".like-count").text(b)},d.prototype.visibilityChangeHandler=function(a){return a.length===0&&this.collection.state()==="resolved"?this.$fallback.css("display","block"):this.$fallback.css("display","none")},d.prototype.getView=function(a){return new MovieExplorer.LikeView({model:a})},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.$listElement=this.$(".profile-likes-list"),this.likesUpdate(this.collection,this.collection.length),this.$fallback=this.$(".fallback"),this},d}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.ProfileView=function(b){function d(){this.destroy=a(this.destroy,this),this.updateUserSettingsForm=a(this.updateUserSettingsForm,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),_(d.prototype).defaults(MovieExplorer.Tabable),d.prototype.tagName="div",d.prototype.id="profile",d.prototype.template="profile",d.prototype.containerSelector="#profile-container",d.prototype.tabableSelector="#profile-settings-container",d.prototype.animationDuration=0,d.prototype.initialize=function(a,b){return d.__super__.initialize.apply(this,arguments),this.modelBind("change",this.updateUserSettingsForm),this.delegate("click",".tabs a",this.switchTab),this.delegate("click","#user-settings input",this.toggleUserFlag),this.render(),this.subscriptionsView=new MovieExplorer.SubscriptionsView({collection:MovieExplorer.applicationController.subscriptions,el:this.$(".subscriptions")}),this.likesView=new MovieExplorer.ProfileLikesView({collection:MovieExplorer.applicationController.likes,el:this.$(".profile-likes")}),this.likeGeneratorView=new MovieExplorer.LikeGeneratorView({collection:MovieExplorer.applicationController.suggestions,el:this.$(".like-generator")}),this.tabs={subscriptions:this.subscriptionsView,likes:this.likesView,suggestions:this.likeGeneratorView,settings:this},this.activateTab("subscriptions")},d.prototype.toggleUserFlag=function(a){var b;return b=a.target.name,this.model.toggleFlag(b)},d.prototype.updateUserSettingsForm=function(a){var b,c,d,e,f;e=this.$("#user-settings input"),f=[];for(c=0,d=e.length;c<d;c++)b=e[c],f.push(b.checked=a.get(b.name));return f},d.prototype.switchTab=function(a){var b,c;a.preventDefault(),a.stopPropagation(),b=(c=a.target.pathname)!=null?c.match(/[\w-]+$/)[0]:void 0;if(!b)return;return MovieExplorer.publish("!startupModule","profile",{tab:b})},d.prototype.activateTab=function(a){var b,c,d;this.$(".tabs li").removeClass("active"),this.$('.tabs a[href$="'+a+'"]').closest("li").addClass("active"),d=this.tabs;for(b in d)c=d[b],c.hide();return this.tabs[a].show()},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el),this},d.prototype.destroy=function(){if(this.destroyed)return;return this.subscriptionsView.destroy(),this.likesView.destroy(),this.likeGeneratorView.destroy(),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.RecommendationsView=function(c){function e(){this.toggleMoreButton=b(this.toggleMoreButton,this),e.__super__.constructor.apply(this,arguments)}return d(e,c),_(e.prototype).defaults(MovieExplorer.Categorizable),e.prototype.tagName="div",e.prototype.id="recommendations",e.prototype.template="recommendations",e.prototype.containerSelector="#recommendations-container",e.prototype.displayCategory="Movies",e.prototype.initialize=function(){return e.__super__.initialize.apply(this,arguments),this.modelBind("reset",this.toggleMoreButton),this.delegate("click",".tabs a",this.categorySelectionHandler)},e.prototype.activateTab=function(b){return this.showCategory(a.getDisplayName(b))},e.prototype.categorySelectionHandler=function(b){var c,d;return b.preventDefault(),b.stopPropagation(),c=$(b.target).text(),d=a.getResourceName(c),MovieExplorer.publish("!startupModule","recommendations",{category:d})},e.prototype.toggleMoreButton=function(){return this.$(".more").toggle(this.collection.length>0)},e.prototype.render=function(){return e.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el),this.$categoryElements||(this.$categoryElements=this.$(".tabs li")),this.updateNavigation(),this.toggleMoreButton()},e}(MovieExplorer.FilteredSubscribablesView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.SearchResultView=function(b){function d(){this.open=a(this.open,this),this.toggleSelected=a(this.toggleSelected,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="li",d.prototype.template="search_result",d.prototype.animationDuration=0,d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.modelBind("change:selected",this.toggleSelected),this.modelBind("open",this.open),this.delegate("click",this.open),this.delegate("mouseover",this.select)},d.prototype.select=function(a){return this.model.trigger("select",this.model)},d.prototype.toggleSelected=function(a){return this.$el.toggleClass("selected",a)},d.prototype.open=function(a){return a&&(a.preventDefault(),a.stopPropagation()),$("#search input").blur(),MovieExplorer.publish("!startupModule","pages",{id:this.model.get("id"),title:this.model.get("name"),permalink:this.model.get("permalink"),type:this.model.get("type"),simplePage:!this.model.get("page")})},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}},d=Object.prototype.hasOwnProperty,e=function(a,b){function e(){this.constructor=a}for(var c in b)d.call(b,c)&&(a[c]=b[c]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};b=MovieExplorer.utils,a=b.placeholderSupported,MovieExplorer.SearchView=function(d){function f(){this.toggleResults=c(this.toggleResults,this),f.__super__.constructor.apply(this,arguments)}return e(f,d),f.prototype.tagName="div",f.prototype.id="search",f.prototype.template="search",f.prototype.initialize=function(){return f.__super__.initialize.apply(this,arguments),this.modelBind("reset",this.toggleResults),this.delegate("focus","input",this.focus),this.delegate("blur","input",this.blur),this.delegate("keyup","input",this.keyup),this.delegate("keydown","input",this.keydown),this.focussed=!1},f.prototype.focus=function(){var b;if(this.focussed)return;this.focussed=!0,b=this.$input.val(),!a&&b===this.placeholder&&(b="",this.$input.val(b));if(b)return this.showResults()},f.prototype.blur=function(){var c,d=this;return this.focussed=!1,c=this.$input.val(),!a&&c===""&&this.$input.val(this.placeholder),b.delay(500,function(){if(d.focussed)return;return d.hideResults()})},f.prototype.keyup=function(a){var b;b=this.$input.val(),this.search(b);if(!b)return this.collection.reset()},f.prototype.keydown=function(a){if(!(a.altKey||a.shiftKey||a.ctrlKey))switch(a.keyCode){case 13:return a.preventDefault(),this.open();case 27:return this.hideResults();case 38:return a.preventDefault(),this.selectPrev();case 40:return a.preventDefault(),this.selectNext()}},f.prototype.showResults=function(){return this.$listElement.fadeIn(400)},f.prototype.hideResults=function(){return this.$listElement.fadeOut(200)},f.prototype.toggleResults=function(){return this.collection.length?this.showResults():this.hideResults()},f.prototype.open=function(){return this.collection.openSelected()},f.prototype.selectPrev=function(){return this.collection.selectPrev()},f.prototype.selectNext=function(){return this.collection.selectNext()},f.prototype.search=function(a){return this.collection.query(a)},f.prototype.getView=function(a){return new MovieExplorer.SearchResultView({model:a})},f.prototype.render=function(){return f.__super__.render.apply(this,arguments),this.$listElement=this.$(".results"),this.$input=this.$("input"),this.placeholder=this.$input.attr("placeholder"),a||this.$input.val(this.placeholder),$("#search-container").append(this.el)},f}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.SeriesView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="div",c.prototype.id="series",c.prototype.template="series",c}(MovieExplorer.PageView)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.ShowcaseView=function(b){function d(){this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.className="showcase",d.prototype.template="showcase",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.modelBind("change:related_pages",this.render),this.delegate("click","a",this.trackNavigation),this.render()},d.prototype.trackNavigation=function(a){var b;return b=$(a.currentTarget).attr("title"),MovieExplorer.publish("showcase:navigate",b)},d.prototype.render=function(){var a;if((a=this.model.get("related_pages"))!=null?!a.length:!void 0)return;return d.__super__.render.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.SimplePageView=function(b){function d(){this.renderSubscribables=a(this.renderSubscribables,this),this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="simple-page",d.prototype.className="page",d.prototype.template="simple_page",d.prototype.containerSelector="#simple-page-container",d.prototype.initialize=function(){return d.__super__.initialize.apply(this,arguments),this.pass("change:name",".section-title"),this.render(),this.modelBind("change",this.render),this.model.subscribables.done(this.renderSubscribables)},d.prototype.getTemplateData=function(){var a;return a=d.__super__.getTemplateData.apply(this,arguments),a.hasSubscribables=this.model.subscribables.length>0,a.isWikipediaText=a.description&&a.description.indexOf("wikipedia.org")>-1,a},d.prototype.render=function(){d.__super__.render.apply(this,arguments),this.container||(this.container=$(this.containerSelector)),this.container.append(this.el),this.model.get("link")&&this.parseFacebookTags();if(this.model.subscribables.state()==="resolved")return this.renderSubscribables()},d.prototype.renderSubscribables=function(){return this.subscribablesView=new MovieExplorer.SubscribablesView({collection:this.model.subscribables,el:this.$(".subscribables")})},d.prototype.destroy=function(){if(this.destroyed)return;return this.subscribablesView&&(this.subscribablesView.destroy(),this.subscribablesView=null),d.__super__.destroy.apply(this,arguments)},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.StaticPageView=function(b){function d(){this.render=a(this.render,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),d.prototype.tagName="div",d.prototype.id="static-pages",d.prototype.template=null,d.prototype.containerSelector="#static-pages-container",d.prototype.initialize=function(){d.__super__.initialize.apply(this,arguments),this.modelBind("change:content",this.render),this.delegate("click","a.home",this.goHome);if(this.model.has("content"))return this.render()},d.prototype.goHome=function(a){MovieExplorer.applicationView.goToStream(a);if(!MovieExplorer.user)return MovieExplorer.publish("!showLogin")},d.prototype.render=function(){var a;return d.__super__.render.apply(this,arguments),a=this.model.get("content"),this.$el.empty().append(a),$(this.containerSelector).append(this.el),MovieExplorer.utils.applyBrightcove(this.el),this},d}(MovieExplorer.View)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a};a=MovieExplorer.utils,MovieExplorer.SubscribableView=function(a){function c(){this.render=b(this.render,this),c.__super__.constructor.apply(this,arguments)}return d(c,a),c.prototype.tagName="li",c.prototype.className="subscribable",c.prototype.template="subscribable",c.prototype.animationDuration=500,c.prototype.initialize=function(){return c.__super__.initialize.apply(this,arguments),this.modelBind("change:subscription",this.render),this.delegate("click",".level a",this.setLevel),this.delegate("click",".dismiss",this.dismiss),this.delegate("click",".subscribe a",this.subscribe),this.delegate("click",".unsubscribe",this.unsubscribe)},c.prototype.setLevel=function(a){var b;return b=!a||typeof a=="string"?this.$("."+a):(a.preventDefault(),$(a.target)),b.closest("ul").find("a").removeClass("active"),b.addClass("active"),this.model.setSubscriptionLevel(b.data("level"))},c.prototype.dismiss=function(a){return a.preventDefault(),this.model.dismissAsSubscription()},c.prototype.subscribe=function(a){return a.preventDefault(),this.model.subscribe()},c.prototype.unsubscribe=function(a){return a.preventDefault(),this.model.unsubscribe()},c.prototype.render=function(){return c.__super__.render.apply(this,arguments),this.$(".dismiss, .unsubscribe").tipsy(),this.model.get("subscription_level")&&(this.setLevel(this.model.get("subscription_level")),this.$el.addClass("subscribed")),this.modelUnbind("change:subscription",this.render)},c.prototype.destroy=function(){if(this.destroyed)return;return this.$(".dismiss, .unsubscribe").tipsy("hide"),c.__super__.destroy.apply(this,arguments)},c}(MovieExplorer.View)}.call(this),function(){"use strict";var a=function(a,b){return function(){return a.apply(b,arguments)}},b=Object.prototype.hasOwnProperty,c=function(a,c){function e(){this.constructor=a}for(var d in c)b.call(c,d)&&(a[d]=c[d]);return e.prototype=c.prototype,a.prototype=new e,a.__super__=c.prototype,a};MovieExplorer.SubscriptionsView=function(b){function d(){this.filterer=a(this.filterer,this),d.__super__.constructor.apply(this,arguments)}return c(d,b),_(d.prototype).defaults(MovieExplorer.Categorizable,MovieExplorer.Tabable),d.prototype.tagName="div",d.prototype.className="subscriptions",d.prototype.template="subscriptions",d.prototype.animationDuration=0,d.prototype.displayCategory="Movies",d.prototype.initialize=function(a){return d.__super__.initialize.call(this,{renderItems:!1}),this.bind("visibilityChange",this.visibilityChangeHandler),this.delegate("click",".content-tabs a",this.categorySelectionHandler),this.showCategory(a.displayCategory||this.displayCategory),this.renderAllItems()},d.prototype.filterer=function(a,b){return _(this.filterCategories).contains(a.get("type"))},d.prototype.visibilityChangeHandler=function(a){return a.length===0&&this.collection.state()==="resolved"?(this.$fallbackGenre.text(MovieExplorer.utils.downcase(this.displayCategory)),this.$fallback.css("display","block")):this.$fallback.css("display","none")},d.prototype.showCategory=function(a){return MovieExplorer.Categorizable.showCategory.apply(this,arguments),this.updateHeadline()},d.prototype.updateHeadline=function(){return this.$(".subscription-type").text(this.displayCategory.replace(/s$/,""))},d.prototype.getView=function(a){return new MovieExplorer.SubscribableView({model:a})},d.prototype.render=function(){return d.__super__.render.apply(this,arguments),this.$listElement=$(".subscriptions-list"),this.$fallback=this.$(".fallback"),this.$fallbackGenre=this.$fallback.find("span")},d}(MovieExplorer.CollectionView)}.call(this),function(){"use strict";var a,b=function(a,b){return function(){return a.apply(b,arguments)}},c=Object.prototype.hasOwnProperty,d=function(a,b){function e(){this.constructor=a}for(var d in b)c.call(b,d)&&(a[d]=b[d]);return e.prototype=b.prototype,a.prototype=new e,a.__super__=b.prototype,a},e=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};a=MovieExplorer.utils,MovieExplorer.SuggestionsView=function(c){function f(){this.cleanup=b(this.cleanup,this),this.updateSlots=b(this.updateSlots,this),this.fillSlots=b(this.fillSlots,this),this.logout=b(this.logout,this),this.login=b(this.login,this),this.showModule=b(this.showModule,this),f.__super__.constructor.apply(this,arguments)}return d(f,c),f.prototype.tagName="div",f.prototype.id="suggestions",f.prototype.template="suggestions",f.prototype.containerSelector="#suggestions-container",f.prototype.animationDuration=0,f.prototype.currentSuggestion=null,f.prototype.nextSuggestion=null,f.prototype.initialize=function(){return f.__super__.initialize.apply(this,arguments),this.subscribeEvent("showModule",this.showModule),this.subscribeEvent("login",this.login),this.subscribeEvent("logout",this.logout),this.modelBind("add",this.fillSlots),this.modelBind("remove",this.cleanup),this.modelBind("topical",this.updateSlots),this.delegate("click",".like-button",this.like),this.delegate("click",".dislike-button",this.dislike),this.delegate("click",".skip-button",this.skip),this.render(),this.toggleStandby()},f.prototype.showModule=function(a,b){return this.updateVisibility(a)},f.prototype.login=function(){return this.updateVisibility(MovieExplorer.applicationView.currentModule)},f.prototype.logout=function(){return this.updateVisibility(MovieExplorer.applicationView.currentModule)},f.prototype.fillSlots=function(a){if(!this.currentSuggestion){this.currentSuggestion=a,this.display(this.currentSuggestion);return}return this.nextSuggestion||(this.nextSuggestion=a,this.display(this.nextSuggestion,{hidden:!0})),this.toggleStandby()},f.prototype.updateSlots=function(){var a;return a=this.collection.models.slice(0,2),this.currentSuggestion=a[0],this.nextSuggestion=a[1],this.$(".suggestions").empty(),this.currentSuggestion&&this.display(this.currentSuggestion),this.nextSuggestion&&this.display(this.nextSuggestion,{hidden:!0}),this.toggleStandby()},f.prototype.dequeue=function(){var a;return a=[this.currentSuggestion&&this.currentSuggestion.id,this.nextSuggestion&&this.nextSuggestion.id],this.currentSuggestion=this.nextSuggestion,this.getElForNextSuggestion().css("display","block"),this.currentSuggestion&&this.currentSuggestion.trackDisplay(),this.nextSuggestion=this.collection.find(function(b){var c;return!(c=b.id,e.call(a,c)>=0)}),this.nextSuggestion&&this.display(this.nextSuggestion,{hidden:!0}),this.toggleStandby()},f.prototype.display=function(a,b){var c;return b==null&&(b={}),c=$(JST.suggestion(this.getTemplateDataForTopic(a))),b.hidden?c.css("display","none"):a.trackDisplay(),this.$(".suggestions").prepend(c)},f.prototype.like=function(a){return this.judge(a,"like",{top:-402.5})},f.prototype.dislike=function(a){return this.judge(a,"dislike",{top:402.5})},f.prototype.skip=function(a){return this.judge(a,"skip",{left:281.75})},f.prototype.getElForCurrentSuggestion=function(){return this.$(".suggestions").children().last()},f.prototype.getElForNextSuggestion=function(){return this.$(".suggestions").children().first()},f.prototype.getTemplateDataForTopic=function(b){var c,d;return c=a.beget(b.getAttributes()),d=a.getSubscribableReason(c.reason),d&&(c.reasonOutput=d),c},f.prototype.judge=function(a,b,c){var d,e,f=this;return a.preventDefault(),a.stopPropagation(),e=this.currentSuggestion,d=this.getElForCurrentSuggestion(),this.dequeue(),d.animate(c,300,"swing",function(){return d.remove()}),e[b]("Sidebar")},f.prototype.cleanup=function(a){if(a===this.currentSuggestion||a===this.nextSuggestion)return this.updateSlots()},f.prototype.toggleStandby=function(){return this.$(".ratebox a").toggleClass("disabled",!this.currentSuggestion)},f.prototype.updateVisibility=function(a){var b,c,d,e;return c=a==="stream",b=a==="pages"&&((e=MovieExplorer.pagesController.model)!=null?!e.get("simple_page"):!void 0),d=MovieExplorer.user&&(c||b),d?this.$el.fadeIn(this.animationDuration):this.$el.css("display","none")},f.prototype.render=function(){return f.__super__.render.apply(this,arguments),$(this.containerSelector).append(this.el),this},f}(MovieExplorer.View)}.call(this),function(){"use strict";var a=Object.prototype.hasOwnProperty,b=function(b,c){function e(){this.constructor=b}for(var d in c)a.call(c,d)&&(b[d]=c[d]);return e.prototype=c.prototype,b.prototype=new e,b.__super__=c.prototype,b};MovieExplorer.TweetView=function(a){function c(){c.__super__.constructor.apply(this,arguments)}return b(c,a),c.prototype.tagName="li",c.prototype.className="stream-item tweet",c.prototype.template="stream/tweet",c.prototype.open=function(a){},c.prototype.close=function(a){},c}(MovieExplorer.StreamItemView)}.call(this),function(){this.JST||(this.JST={}),this.JST.active_subscription=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.active_subscription=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n    <span class="count">',e=c.new_stories_count||a.new_stories_count,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"new_stories_count",{hash:{}})),d+=n(e)+"</span>\n  ",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<a href="/',g=c.pluralType||b.pluralType,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"pluralType",{hash:{}})),f+=n(g)+"/",g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+"-",g=c.permalink||b.permalink,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"permalink",{hash:{}})),f+=n(g)+'">\n  <span class="name">',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+"</span>\n  ",g=c.new_stories_count||b.new_stories_count,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n</a>\n",f}),HandlebarsTemplates.active_subscription}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.anonymous_dashboard=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.anonymous_dashboard=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<p class="facepile">\n  <fb:facepile width="165" max_rows="2" size="small" colorscheme="light"></fb:facepile>\n</p>\n\n<p><a id="sidebar-login">Login with Facebook, Google or Twitter</a></p>\n'}),HandlebarsTemplates.anonymous_dashboard}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.bucket=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.bucket=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n    <p class="facebook-like">\n      <fb:like ref="like" href="',e=c.facebook_url||a.facebook_url,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"facebook_url",{hash:{}})),d+=n(e)+'" width="590" send="false" show_faces="false"></fb:like>\n    </p>\n  ',d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<h1 class="section-title">',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+'</h1>\n\n<div class="header">\n  \n  ',g=b,g=j.invokePartial(d.positioned_page_elements,"positioned_page_elements",g,c,d);if(g||g===0)f+=g;f+='\n  \n  <div class="gallery"></div>\n\n  ',g=b,g=j.invokePartial(d.headline,"headline",g,c,d);if(g||g===0)f+=g;f+='\n\n  <div class="description">',g=c.description||b.description,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"description",{hash:{}}));if(g||g===0)f+=g;f+="</div>\n\n  ",g=c.facebook_url||b.facebook_url,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  \n</div>\n\n",g=b,g=j.invokePartial(d.zoom_level,"zoom_level",g,c,d);if(g||g===0)f+=g;f+='\n\n<ul class="stream-items"></ul>\n\n',g=b,g=j.invokePartial(d.more_button,"more_button",g,c,d);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.bucket}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.dashboard=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.dashboard=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h=this,i="function",j=c.helperMissing,k=void 0,l=this.escapeExpression;return f+='<ul class="main-navigation">\n  <li id="user-card">\n    <a href="/profile">\n      <img id="user-picture" src="',g=c.image_url||b.image_url,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"image_url",{hash:{}})),f+=l(g)+'" alt="">\n      <span id="user-card-text">\n        <strong id="user-name">',g=c.name||b.name,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"name",{hash:{}})),f+=l(g)+'</strong>\n        <span class="edit-profile">Edit Profile</span>\n      </span>\n    </a>\n  </li>\n  <li><a class="go-to-stream" href="/">News Stream</a></li>\n  <li>\n    <div id="no-stream"></div>\n    <a href="/recommendations">Recommendations</a>\n  </li>\n  <li><a  href="/opinions">Opinions</a></li>\n</ul>\n\n<p id="subscriptions-counter">\n  <a href="/profile/subscriptions">\n    <span id="subscription-count"></span>\n    Subscriptions\n  </a>\n</p>\n',f}),HandlebarsTemplates.dashboard}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.discoveryline_activity=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.discoveryline_activity=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;d+='\n  <li>\n    <a href="',e=a,f=c.stream_item_path||a.stream_item_path,typeof f===k?e=f.call(a,e,{hash:{}}):f===m?e=l.call(a,"stream_item_path",e,{hash:{}}):e=f,d+=n(e)+'">\n      <p class="timestamp" title="',e=c.published_at||a.published_at,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"published_at",{hash:{}})),d+=n(e)+'"></p>\n      ',e=c.comment_count||a.comment_count,f=c["if"],i=j.program(2,p,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+='\n      <h3 class="title">',e=c.content||a.content,e=e===null||e===undefined||e===!1?e:e.title,typeof e===k?e=e.call(a,{hash
:{}}):e===m&&(e=l.call(a,"content.title",{hash:{}})),d+=n(e)+"</h3>\n    </a>\n  </li>\n",d}function p(a,b){var d="",e;return d+='\n        <p class="comments">',e=c.comment_count||a.comment_count,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"comment_count",{hash:{}})),d+=n(e)+" comments\n      ",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=c.items||b.items,h=c.each,i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.discoveryline_activity}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.discoveryline_item=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.discoveryline_item=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n    <p class="release-date">',e=c.release_date||a.release_date,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"release_date",{hash:{}})),d+=n(e)+"</p>\n  ",d}function p(a,b){return'\n    <p class="release-date">TBA</p>\n  '}function q(a,b){var d="",e;return d+='\n        <span class="subscriber-count">',e=c.subscriber_count||a.subscriber_count,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"subscriber_count",{hash:{}})),d+=n(e)+"</span>\n      ",d}function r(a,b){var d="",e;return d+='\n      <li class="',e=c.status||a.status,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"status",{hash:{}})),d+=n(e)+'"><span>',e=c.title||a.title,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"title",{hash:{}})),d+=n(e)+"</span></li>\n    ",d}function s(a,b){var d="",e,f,g;return d+='\n      <a href="#" class="play-video" title="Watch the trailer">Watch the trailer</a>\n      <p class="video-player">\n        ',e=c.brightcove_id||a.brightcove_id,f={},g=608,f.width=g,g=254,f.height=g,g="true",f.auto_start=g,g=c.embed_brightcove||a.embed_brightcove,i={},i.hash=f,typeof g===k?e=g.call(a,e,i):g===m?e=l.call(a,"embed_brightcove",e,i):e=g,d+=n(e)+"\n      </p>\n    ",d}function t(a,b){var d="",e;return d+='\n    <p class="hot-o-meter">\n      <span class="hot-label">HOT</span>\n      <span class="bar">\n        <span class="hot" style="width: ',e=c.hotPercent||a.hotPercent,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"hotPercent",{hash:{}})),d+=n(e)+'%" title="',e=c.hotPercent||a.hotPercent,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"hotPercent",{hash:{}})),d+=n(e)+"% can't wait for ",e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'">\n          ',e=c.hotPercent||a.hotPercent,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"hotPercent",{hash:{}})),d+=n(e)+"% can't wait for ",e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'\n        </span>\n        <span class="not" style="width: ',e=c.notHotPercent||a.notHotPercent,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"notHotPercent",{hash:{}})),d+=n(e)+'%" title="',e=c.notHotPercent||a.notHotPercent,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"notHotPercent",{hash:{}})),d+=n(e)+'%"></span>\n      </span>\n      <span class="not-label">NOT</span>\n    </p>\n  ',d}function u(a,b){var d="",e,f;d+='\n      <ul class="images">\n      ',e=c.images||a.images,f=c.each,i=j.programWithDepth(v,b,a),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n      </ul>\n    ",d}function v(a,b,d){var e="",f,g;return e+='\n        <li><a href="',f=d,g=c.page_path||a.page_path,typeof g===k?f=g.call(a,f,{hash:{}}):g===m?f=l.call(a,"page_path",f,{hash:{}}):f=g,e+=n(f)+'"><img src="',f=c.thumbnail||a.thumbnail,typeof f===k?f=f.call(a,{hash:{}}):f===m&&(f=l.call(a,"thumbnail",{hash:{}})),e+=n(f)+'" alt=""></a></li>\n      ',e}function w(a,b){var d="",e,f,g;d+="\n        ",e=c.short_description||a.short_description,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"short_description",{hash:{}}));if(e||e===0)d+=e;return d+="\n        ",e="More",f=a,g=c.link_to_page||a.link_to_page,typeof g===k?e=g.call(a,f,e,{hash:{}}):g===m?e=l.call(a,"link_to_page",f,e,{hash:{}}):e=g,d+=n(e)+"\n      ",d}function x(a,b){var d="",e;d+="\n        ",e=c.description||a.description,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"description",{hash:{}}));if(e||e===0)d+=e;return d+="\n      ",d}function y(a,b){var d="",e;return d+='\n      <p class="facebook-like">\n        <fb:like ref="like" href="',e=c.facebook_url||a.facebook_url,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"facebook_url",{hash:{}})),d+=n(e)+'" width="424" send="false" show_faces="false"></fb:like>\n      </p>\n    ',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<p class="reason"></p>\n\n\n<div class="box">\n\n  ',g=c.release_date||b.release_date,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.program(3,p,e),g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n  <div class="header">\n\n    <h2 title="Jump to movie page">',g=b,h=c.link_to_page||b.link_to_page,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"link_to_page",g,{hash:{}}):g=h,f+=n(g)+'</h2>\n\n    <p class="subscribe">\n      ',g=c.subscriber_count||b.subscriber_count,h=c["if"],i=j.program(5,q,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n      <a href="#" class="subscribe-button">Subscribe</a>\n    </p>\n\n  </div>\n\n  <ol class="stages">\n    ',g=c.production_sequence||b.production_sequence,h=c.each,i=j.program(7,r,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n  </ol>\n\n  <div class="banner">\n    <img src="',g=c.banner_image||b.banner_image,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"banner_image",{hash:{}})),f+=n(g)+'" alt="">\n    ',g=c.brightcove_id||b.brightcove_id,h=c["if"],i=j.program(9,s,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  </div>\n\n  ",g=c.hotPercent||b.hotPercent,h=c["if"],i=j.program(11,t,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n  <div class="body">\n\n    <dl>\n      <dt class="director">Director:</dt>\n      <dd class="director"></dd>\n      <dt class="starring">Starring:</dt>\n      <dd class="starring"></dd>\n    </dl>\n\n    ',g=c.images||b.images,h=c["if"],i=j.program(13,u,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n    <p class="description">\n      ',g=c.short_description||b.short_description,h=c["if"],i=j.program(16,w,e),i.hash={},i.fn=i,i.inverse=j.program(18,x,e),g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n    </p>\n\n    ",g=c.facebook_url||b.facebook_url,h=c["if"],i=j.program(20,y,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+='\n\n  </div>\n\n  <ol class="activity"></ol>\n\n</div>\n',f}),HandlebarsTemplates.discoveryline_item}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.editor=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.editor=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<a href="#" class="open-menu" title="Open editor menu">&hearts;</a>\n<ul>\n  <li>\n    <a href="" class="global-stream" title="Show all containers by date">Global Stream</a>\n    <a href="" class="global-stream-prev" title="Previous page">&laquo;</a>\n    <a href="" class="global-stream-open" title="Open all">&darr;</a>\n    <a href="" class="global-stream-close" title="Close all">&uarr;</a>\n    <a href="" class="global-stream-next" title="NeXT page">&raquo;</a>\n  </li>\n  <li><a href="" class="logout">Logout</a></li>\n</ul>\n\n'}),HandlebarsTemplates.editor}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.filtered_subscribables=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.filtered_subscribables=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<div class="inner">\n  <h3>Subscribe to get personalized news</h3>\n  <ul class="subscribables-list"></ul>\n  <p class="more"><a href="#">Show more suggestions</a></p>\n</div>\n'}),HandlebarsTemplates.filtered_subscribables}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["funnel/auth_picker"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["funnel/auth_picker"]=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h=this,i="function",j=c.helperMissing,k=void 0,l=this.escapeExpression;return f+='<div class="overlay"></div>\n<div class="modal content">\n  <div class="body">\n    <h1>Please log in to access moviepilot.com</h1>\n\n    <p>Logging in means you can ',g=c.action||b.action,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"action",{hash:{}})),f+=l(g)+'.</p>\n\n    <p>It’s free and just takes one click. Use your existing Facebook, Google or Twitter account:</p>\n\n    <ul class="services">\n      <li class="facebook service-loading">\n        <a href="#" title="Log in with Facebook">Facebook</a>\n      </li>\n      <li class="google service-loading">\n        <a href="#" title="Log in with Google">Google</a>\n      </li>\n      <li class="twitter service-loading">\n        <a href="#" title="Log in with Twitter">Twitter</a>\n      </li>\n      ',f+='\n    </ul>\n\n    <div class="not-available"></div>\n\n    <div class="faq">\n\n      <h2>Why do I have to log in?</h2>\n\n      <p>Logging in means you can:</p>\n\n      <ul>\n        <li>Subscribe to upcoming movies to build your personal news stream.</li>\n        <li>Discover new movie projects recommended for you based on your likes.</li>\n        <li>Join the discussion and connect with other movie buffs.</li>\n      </ul>\n\n      <h2>Is this safe?</h2>\n\n      <p>By logging in you:</p>\n\n      <ul>\n        <li>Only disclose basic information like your name and your e-mail address.</li>\n        <li>Show us your Facebook likes so we know what you want to see in your stream.</li>\n      </ul>\n\n      <p>Still worried? For more information, see our <a href="/faq" class="static-page">FAQ</a> and our <a href="/termsofservice" class="static-page">Privacy Policy</a>.</p>\n\n    </div>\n\n    <p class="decline"><a href="#">Cancel Login</a></p>\n\n    <a href="#" class="close">Close</a>\n\n  </div>\n</div>\n',f}),HandlebarsTemplates["funnel/auth_picker"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["funnel/funnel_suggestions"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["funnel/funnel_suggestions"]=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<div class="overlay"></div>\n<div class="modal content">\n  <div class="body">\n    <h2>Subscribe to Upcoming Movie Projects</h2>\n    <p class="subscription-count"><small>Subscribed movies:</small> <strong>0</strong></p>\n    <ul class="subscribables-list"></ul>\n    <p class="more"><a href="#">More Projects</a></p>\n    <p class="finish"><a href="#">Finish</a></p>\n  </div>\n</div>\n'}),HandlebarsTemplates["funnel/funnel_suggestions"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["funnel/incentive"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["funnel/incentive"]=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='<img src="',e=c.banner_image||a.banner_image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"banner_image",{hash:{}})),d+=n(e)+'" title="',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'">',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="overlay"></div>\n<div class="modal content">\n  <div class="body">\n    <p class="close">Close</p>\n    ',g=c.banner_image||b.banner_image,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n    <p>Interested in <cite>",g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+'?</cite></p>\n    <p>Subscribe now and don&rsquo;t miss a scrap of news anymore.</p>\n    <a href="#" class="decline-button">No, thanks</a>\n    <a href="#" class="subscribe-button">Subscribe!</a>\n  </div>\n</div>\n',f}),HandlebarsTemplates["funnel/incentive"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["funnel/login"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["funnel/login"]=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h1>\n  <img alt="moviepilot.com" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/mp-logo-94185ebe03583cb3f0efe53dc11805c9.png" />\n  <span>Discover upcoming movies first.</span>\n</h1>\n\n<div class="head">\n  \n  <div class="gallery"></div>\n  \n  <div class="teaser">\n    <p>\n      <strong>Discover</strong><br>\n      Get wise to the hottest upcoming movies and TV shows.\n    </p>\n    <p>\n      <strong>Subscribe</strong><br>\n      Don’t miss a scrap of news about your subscribed movies.\n    </p>\n    <p>\n      <strong>Engage</strong><br>\n      Connect with others and shape the future of your movies.\n    </p>\n  </div>\n</div>\n\n<div class="bottom">\n  <div class="login">\n    <a href="#" class="login-button">\n      <img alt="Discover movies now" height="39" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/discover_movies_button-9d7c480b4650d14b8668196e41f19e11.png" width="286" />\n    </a>\n    <iframe src="//www.facebook.com/plugins/facepile.php?href=https%3A%2F%2Fwww.facebook.com%2Fmoviepilotdotcom&amp;size=small&amp;width=400&amp;max_rows=1&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency></iframe>\n  </div>\n  <div class="intro-video">\n    <h2>What is moviepilot.com?</h2>\n    <p>\n      <object id="myExperience1232713879001" class="BrightcoveExperience">\n        <param name="bgcolor" value="#FFFFFF">\n        <param name="width" value="240">\n        <param name="height" value="135">\n        <param name="playerID" value="1229793651001">\n        <param name="playerKey" value="AQ~~,AAAACMzGMJk~,RYQzCEk5IfJM48UiMubYfDKklxoQppAZ">\n        <param name="isVid" value="true">\n        <param name="isUI" value="true">\n        <param name="videoSmoothing" value="true">\n        <param name="dynamicStreaming" value="true">\n        <param name="autoStart" value="false">\n        <param name="wmode" value="transparent">\n        <param name="@videoPlayer" value="1232713879001">\n      </object>\n    </p>\n  </div>\n</div>\n'}),HandlebarsTemplates["funnel/login"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.gallery=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.gallery=Handlebars.template(function(a,b,c,d,e){function p(a,b){var d="",e,f,g;d+='\n  <figure>\n    <img data-src="',e=c.image||a.image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image",{hash:{}})),d+=n(e)+'" alt="">\n    ',e=c.image_link_text||a.image_link_text,f=c.caption||a.caption,g=c.if_any||a.if_any,i=j.program(2,q,b),i.hash={},i.fn=i,i.inverse=j.noop,typeof g===k?e=g.call(a,f,e,i):e=o.call(a,g,f,e,i);if(e||e===0)d+=e;return d+="\n  </figure>\n",d}function q(a,b){var d="",e,f;d+="\n      <figcaption>\n        ",e=c.caption||a.caption,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"caption",{hash:{}}));if(e||e===0)d+=e;d+="\n        ",e=c.image_link||a.image_link,f=c["if"],i=j.program(3,r,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n      </figcaption>\n    ",d}function r(a,b){var d="",e;return d+='\n          <a href="',e=c.image_link||a.image_link,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image_link",{hash:{}})),d+=n(e)+'">',e=c.image_link_text||a.image_link_text,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image_link_text",{hash:{}})),d+=n(e)+"</a>\n        ",d}function s(a,b){var d="",e,f;d+='\n<ul class="gallery-navigation">\n',e=c.thumbnails||a.thumbnails,f=c["if"],i=j.program(6,t,b),i.hash={},i.fn=i,i.inverse=j.program(10,w,b),e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n</ul>\n",d}function t(a,b){var d="",e,f;d+="\n",e=c.images||a.images,f=c.each,i=j.program(7,u,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n",d}function u(a,b){var d="",e,f;d+='\n  <li title="',e=c.caption||a.caption,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"caption",{hash:{}})),d+=n(e)+'">\n    <a href="',e=c.image||a.image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image",{hash:{}})),d+=n(e)+'">',e=c.thumbnail||a.thumbnail,f=c["if"],i=j.program(8,v,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="</a>\n  </li>\n",d}function v(a,b){var d="",e;return d+='<img src="',e=c.thumbnail||a.thumbnail,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"thumbnail",{hash:{}})),d+=n(e)+'" alt="',e=c.image_title||a.image_title,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image_title",{hash:{}})),d+=n(e)+'">',d}function w(a,b){var d="",e,f;d+="\n",e=c.images||a.images,f=c.each,i=j.program(11,x,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n",d}function x(a,b){var d="",e;return d+='\n  <li title="',e=c.caption||a.caption,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"caption",{hash:{}})),d+=n(e)+'"></li>\n',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression,o=c.blockHelperMissing;g=c.images||b.images,h=c.each,i=j.program(1,p,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n",g=c.navigation||b.navigation,h=c["if"],i=j.program(5,s,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.gallery}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.like=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.like=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f,g;return d+=" style=\"background-image: url('",e="normal",f=c.facebook_id||a.facebook_id,g=c.fb_img_url||a.fb_img_url,typeof g===k?e=g.call(a,f,e,{hash:{}}):g===m?e=l.call(a,"fb_img_url",f,e,{hash:{}}):e=g,d+=n(e)+"'); background-image: url('",e="large",f=c.facebook_id||a.facebook_id,g=c.fb_img_url||a.fb_img_url,typeof g===k?e=g.call(a,f,e,{hash:{}}):g===m?e=l.call(a,"fb_img_url",f,e,{hash:{}}):e=g,d+=n(e)+"'), none;\"",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<p class="image"',g=c.facebook_id||b.facebook_id,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='></p>\n\n<p class="title">',g=c.title||b.title,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"title",{hash:{}}));if(g||g===0)f+=g;return f+='</p>\n\n<p class="unlike-button"><a href="#">Unlike</a></p>\n',f}),HandlebarsTemplates.like}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.like_generator=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.like_generator=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h3>More likes lead to better subscription recommendations</h3>\n\n<ul class="content-tabs">\n  <li>\n    <a href="#">Movies</a>\n  </li><li>\n    <a href="#">People</a>\n  </li><li>\n    <a href="#">Topics</a>\n  </li><li>\n    <a href="#">TV Shows</a>\n  </li>\n</ul>\n\n<ul class="like-generator-list topics selection">\n  <li class="loading"></li>\n</ul>\n\n<div class="fallback">\n  Currently we don&rsquo;t have any recommendations for you in this category.\n</div>\n'}),HandlebarsTemplates.like_generator}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.like_generator_item=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.like_generator_item=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f,g;return d+=" style=\"background-image: url('",e="normal",f=c.facebook_id||a.facebook_id,g=c.fb_img_url||a.fb_img_url,typeof g===k?e=g.call(a,f,e,{hash:{}}):g===m?e=l.call(a,"fb_img_url",f,e,{hash:{}}):e=g,d+=n(e)+"'); background-image: url('",e="large",f=c.facebook_id||a.facebook_id,g=c.fb_img_url||a.fb_img_url,typeof g===k?e=g.call(a,f,e,{hash:{}}):g===m?e=l.call(a,"fb_img_url",f,e,{hash:{}}):e=g,d+=n(e)+"'), none;\"",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<p class="image"',g=c.facebook_id||b.facebook_id,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='></p>\n\n<p class="title">',g=c.title||b.title,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"title",{hash:{}}));if(g||g===0)f+=g;return f+='</p>\n\n<p class="like-button"><a href="#"><span>Like</span></a></p>\n<a class="close" href="#" title="Don’t show again">Don’t show again</a>\n',f}),HandlebarsTemplates.like_generator_item}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.maintenance=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.maintenance=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<div class="overlay"></div>\n<div class="modal content maintenance">\n  <div class="body">\n    <img alt="Maintenance" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/maintenance-8b04fd4e1cf1a63c7d7a39bb462d8f9e.gif" />\n    <h2>Sorry but we’re currently unavailable.</h2>\n    <p>Please come back soon.</p>\n  </div>\n</div>\n'}),HandlebarsTemplates.maintenance}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.movie=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.movie=Handlebars.template(function(a,b,c,d,e){function q(a,b){var d="",e,f;d+="\n      ",e=c.images||a.images,f=c.unless,j=k.program(2,r,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;return d+="\n    ",d}function r(a,b){return'\n        <figure style="display: block"><img alt="" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/movie-placeholder-807bbe0585ba1eff197d335714a0c085.jpg" /></figure>\n      '}function s(a,b){var d="",e,f,g;return d+='\n    <a href="#" class="play-video" title="Watch the trailer">Watch the trailer</a>\n    <p class="video">',e=c.brightcove_id||a.brightcove_id,f={},g=608,f.width=g,g=339,f.height=g,g="true",f.auto_start=g,g=c.embed_brightcove||a.embed_brightcove,j={},j.hash=f,typeof g===l?e=g.call(a,e,j):g===n?e=m.call(a,"embed_brightcove",e,j):e=g,d+=o(e)+"</p>\n  ",d}function t(a,b){var d="",e,f;d+='\n    <div class="status">\n      ',e=c.production_stage||a.production_stage,f=c["if"],j=k.program(7,u,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;d+="\n      ",e=c.theatrical_release_date||a.theatrical_release_date,f=c["if"],j=k.program(9,v,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;return d+="\n    </div>\n  ",d}function u(a,b){var d="",e;return d+='\n        <p class="production-stage">',e=c.production_stage||a.production_stage,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"production_stage",{hash:{}})),d+=o(e)+"</p>\n      ",d}function v(a,b){var d="",e;return d+='\n        <p class="release-date">In theaters: ',e=c.theatrical_release_date||a.theatrical_release_date,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"theatrical_release_date",{hash:{}})),d+=o(e)+"</p>\n      ",d}function w(a,b){var d="",e;d+='\n    <div class="description">',e=c.description||a.description,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"description",{hash:{}}));if(e||e===0)d+=e;return d+="</div>\n  ",d}function x(a,b){var d="",e;return d+='\n    <p class="facebook-like">\n      <fb:like ref="like" href="',e=c.facebook_url||a.facebook_url,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"facebook_url",{hash:{}})),d+=o(e)+'" width="590" send="false" show_faces="false"></fb:like>\n    </p>\n  ',d}function y(a,b){return'\n    <div class="questionnaire"></div>\n  '}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression,p=c.blockHelperMissing;f+='<h1 class="section-title">',g=c.name||b.name,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"name",{hash:{}})),f+=o(g)+'</h1>\n\n<div class="header">\n\n  ',g=b,g=k.invokePartial(d.positioned_page_elements,"positioned_page_elements",g,c,d);if(g||g===0)f+=g;f+="\n  ",g=b,g=k.invokePartial(d.containing_buckets,"containing_buckets",g,c,d);if(g||g===0)f+=g;f+='\n  \n  <div class="gallery">\n    ',g=c.loaded||b.loaded,h=c["if"],j=k.program(1,q,e),j.hash={},j.fn=j,j.inverse=k.noop,g=h.call(b,g,j);if(g||g===0)f+=g;f+="\n  </div>\n\n  ",g=c.brightcove_id||b.brightcove_id,h=c["if"],j=k.program(4,s,e),j.hash={},j.fn=j,j.inverse=k.noop,g=h.call(b,g,j);if(g||g===0)f+=g;f+="\n\n  ",g=b,g=k.invokePartial(d.headline,"headline",g,c,d);if(g||g===0)f+=g;f+="\n\n  ",g=c.theatrical_release_date||b.theatrical_release_date,h=c.production_stage||b.production_stage,i=c.if_any||b.if_any,j=k.program(6,t,e),j.hash={},j.fn=j,j.inverse=k.noop,typeof i===l?g=i.call(b,h,g,j):g=p.call(b,i,h,g,j);if(g||g===0)f+=g;f+="\n\n  ",g=c.description||b.description,h=c["if"],j=k.program(11,w,e),j.hash={},j.fn=j,j.inverse=k.noop,g=h.call(b,g,j);if(g||g===0)f+=g;f+="\n  \n  ",g=c.facebook_url||b.facebook_url,h=c["if"],j=k.program(13,x,e),j.hash={},j.fn=j,j.inverse=k.noop,g=h.call(b,g,j);if(g||g===0)f+=g;f+="\n\n  ",g=c.questionnaire_id||b.questionnaire_id,h=c["if"],j=k.program(15,y,e),j.hash={},j.fn=j,j.inverse=k.noop,g=h.call(b,g,j);if(g||g===0)f+=g;f+="\n  \n</div>\n\n",g=b,g=k.invokePartial(d.zoom_level,"zoom_level",g,c,d);if(g||g===0)f+=g;f+='\n\n<ul class="stream-items"></ul>\n\n',g=b,g=k.invokePartial(d.more_button,"more_button",g,c,d);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.movie}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.notifier=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.notifier=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h=this,i="function",j=c.helperMissing,k=void 0;f+='<p class="message"><span>',g=c.message||b.message,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"message",{hash:{}}));if(g||g===0)f+=g;return f+='</span></p>\n<p class="close-button"><a href="#">× Close</a></p>\n',f}),HandlebarsTemplates.notifier}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.opinion=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.opinion=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d;return d=c.page||a.page,d=d===null||d===undefined||d===!1?d:d.title,typeof d===k?d=d.call(a,{hash:{}}):d===m&&(d=l.call(a,"page.title",{hash:{}})),n(d)}function p(a,b){var d;return d=c.page||a.page,d=d===null||d===undefined||d===!1?d:d.name,typeof d===k?d=d.call(a,{hash:{}}):d===m&&(d=l.call(a,"page.name",{hash:{}})),n(d)}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="user-image" style="background-image: url(\'',g=c.user||b.user,g=g===null||g===undefined||g===!1?g:g.image_url,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"user.image_url",{hash:{}})),f+=n(g)+'\')"></div>\n<p class="authorship">\n  <span class="contributor">',g=c.user||b.user,g=g===null||g===undefined||g===!1?g:g.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"user.name",{hash:{}})),f+=n(g)+'</span>\n  <span class="age">',g=c.age_in_words||b.age_in_words,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"age_in_words",{hash:{}})),f+=n(g)+'</span>\n  on\n  <a href="',g=c.page||b.page,h=c.page_path||b.page_path,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"page_path",g,{hash:{}}):g=h,f+=n(g)+'" class="subject">',g=c.page||b.page,g=g===null||g===undefined||g===!1?g:g.title,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.program(3,p,e),g=h.call(b,g,i);if(g||g===0)f+=g;return f+='</a>\n</p>\n<p class="question"><q><a href="',g=c.subjectPath||b.subjectPath,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"subjectPath",{hash:{}})),f+=n(g)+'">',g=c.question||b.question,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"question",{hash:{}})),f+=n(g)+'</a></q></p>\n<p class="answer-container">\n  <a href="',g=c.subjectPath||b.subjectPath,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"subjectPath",{hash:{}})),f+=n(g)+'" class="answer">',g=c.answer||b.answer,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"answer",{hash:{}})),f+=n(g)+'</a>\n  <span class="participation">Do you agree?</span>\n</p>\n',f}),HandlebarsTemplates.opinion}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.opinions=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.opinions=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression;return f+='<h1 class="section-title">Opinions</h1>\n\n<h3 class="explanation">Browse other opinions, then make your own.</h3>\n<ol id="opinions-list"></ol>\n\n',g="more_button",h={},i="Previous opinions",h.text=i,i=c.partial||b.partial,j={},j.hash=h,typeof i===l?g=i.call(b,g,j):i===n?g=m.call(b,"partial",g,j):g=i,f+=o(g)+"\n",f}),HandlebarsTemplates.opinions}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.page_with_discoveryline=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.page_with_discoveryline=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h=this,i="function",j=c.helperMissing,k=void 0,l=this.escapeExpression;return f+='<h2 class="section-title">',g=c.name||b.name,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"name",{hash:{}})),f+=l(g)+'</h2>\n\n<div class="loading"></div>\n\n<ul id="discoveryline"></ul>\n',f}),HandlebarsTemplates.page_with_discoveryline}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.profile=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.profile=Handlebars.template(function(a,b,c,d,e){function k(a,b){return"checked"}function l(a,b){return"checked"}function m(a,b){return"checked"}c=c||a.helpers;var f="",g,h,i,j=this;f+='<h1 class="section-title">Edit Profile</h1>\n  \n<ol class="tabs">\n  <li><a href="/profile/subscriptions">Your Subscriptions</a></li>\n  <li><a href="/profile/likes">Your Likes</a></li>\n  <li><a href="/profile/suggestions">Likes Suggestions</a></li>\n  <li><a href="/profile/settings">Your Settings</a></li>\n</ol>\n\n<div class="main-column-body">\n\n  <div class="subscriptions"></div>\n\n  <div class="profile-likes topics-collection"></div>\n  \n  <div class="like-generator topics-collection"></div>\n  \n  <div id="profile-settings-container">\n    <h3>Adjust your messaging settings</h3>\n    <form id="user-settings">\n      <dl>\n        <dt>\n          <label>\n            <input type="checkbox" name="newsletter" value="1" ',g=c.newsletter||b.newsletter,h=c["if"],i=j.program(1,k,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='>\n            Receive the newsletter\n          </label>\n        </dt>\n        <dd>We&rsquo;ll send you a regular e-mail digest with new stories about the topics you’ve subscribed to.</dd>\n        <dt>\n          <label>\n            <input type="checkbox" name="notifications" value="1" ',g=c.notifications||b.notifications,h=c["if"],i=j.program(3,l,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='>\n            Receive notifications\n          </label>\n        </dt>\n        <dd>We&rsquo;ll send you an email when a friend of yours that is also using the site answers a question.</dd>\n        <dt>\n          <label>\n            <input type="checkbox" name="recommendation_emails" value="1" ',g=c.recommendation_emails||b.recommendation_emails,h=c["if"],i=j.program(5,m,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+=">\n            Receive recommendations\n          </label>\n        </dt>\n        <dd>When new movies or TV series you might like are announced, we’ll send you a short e-mail notification. For example, if you like an actress, you will receive a notification when she stars in a new movie.</dd>\n      </dl>\n    </form>\n  </div>\n  \n</div>\n"
,f}),HandlebarsTemplates.profile}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.profile_likes=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.profile_likes=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h3>You currently like <span class="like-count"></span> stars, movies and other topics</h3>\n\n<ul class="content-tabs">\n  <li>\n    <a href="#">Movies</a>\n  </li><li>\n    <a href="#">People</a>\n  </li><li>\n    <a href="#">Topics</a>\n  </li><li>\n    <a href="#">TV Shows</a>\n  </li>\n</ul>\n\n<ul class="profile-likes-list topics selection">\n  <li class="loading"></li>\n</ul>\n\n<div class="fallback">\n  We don&rsquo;t know about any of your interests in this category yet.\n  <a href="/profile/suggestions">Want to tell us?</a>\n</div>\n'}),HandlebarsTemplates.profile_likes}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.recommendations=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.recommendations=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h1 class="section-title">Recommendations</h1>\n\n<ul class="tabs">\n  <li><a href="/recommendations/movies">Movies</a></li>\n  <li><a href="/recommendations/series">TV Shows</a></li>\n  <li><a href="/recommendations/buckets">Topics</a></li>\n</ul>\n\n<div class="recommendations-body">\n  \n  <p class="more"><a href="#">More</a></p>\n  <h3>Subscribe to get personalized news</h3>\n  <ul class="subscribables-list">\n    <li class="loading"></li>\n  </ul>\n  <p class="more"><a href="#">More</a></p>\n\n</div>\n'}),HandlebarsTemplates.recommendations}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.search=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.search=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<form>\n  <input class="search-field" type="search" placeholder="Search movies or actors">\n</form>\n\n<ul class="results"></ul>\n'}),HandlebarsTemplates.search}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.search_result=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.search_result=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i=this,j="function",k=c.helperMissing,l=void 0,m=this.escapeExpression;return f+='<div class="image" data-facebook_id="',g=c.facebook_id||b.facebook_id,typeof g===j?g=g.call(b,{hash:{}}):g===l&&(g=k.call(b,"facebook_id",{hash:{}})),f+=m(g)+'" style="background-image: url(\'',g=c.facebook_id||b.facebook_id,h=c.fb_img_url||b.fb_img_url,typeof h===j?g=h.call(b,g,{hash:{}}):h===l?g=k.call(b,"fb_img_url",g,{hash:{}}):g=h,f+=m(g)+'\')"></div>\n<p class="title">',g=c.name||b.name,typeof g===j?g=g.call(b,{hash:{}}):g===l&&(g=k.call(b,"name",{hash:{}})),f+=m(g)+'</p>\n<p class="additional-info">',g=c.additional_info||b.additional_info,typeof g===j?g=g.call(b,{hash:{}}):g===l&&(g=k.call(b,"additional_info",{hash:{}})),f+=m(g)+"</p>\n",f}),HandlebarsTemplates.search_result}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.series=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.series=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;d+="\n      ",e=c.images||a.images,f=c.unless,i=j.program(2,p,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n    ",d}function p(a,b){return'\n        <figure><img alt="" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/movie-placeholder-807bbe0585ba1eff197d335714a0c085.jpg" /></figure>\n      '}function q(a,b){var d="",e,f,g;return d+='\n    <a href="#" class="play-video" title="Watch the trailer">Watch the trailer</a>\n    <p class="video">',e=c.brightcove_id||a.brightcove_id,f={},g=608,f.width=g,g=339,f.height=g,g="true",f.auto_start=g,g=c.embed_brightcove||a.embed_brightcove,i={},i.hash=f,typeof g===k?e=g.call(a,e,i):g===m?e=l.call(a,"embed_brightcove",e,i):e=g,d+=n(e)+"</p>\n  ",d}function r(a,b){var d="",e;d+='\n    <div class="description">',e=c.description||a.description,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"description",{hash:{}}));if(e||e===0)d+=e;return d+="</div>\n  ",d}function s(a,b){var d="",e;return d+='\n    <p class="facebook-like">\n      <fb:like ref="like" href="',e=c.facebook_url||a.facebook_url,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"facebook_url",{hash:{}})),d+=n(e)+'" width="590" send="false" show_faces="false"></fb:like>\n    </p>\n  ',d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<h1 class="section-title">',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+'</h1>\n\n<div class="header">\n\n  ',g=b,g=j.invokePartial(d.positioned_page_elements,"positioned_page_elements",g,c,d);if(g||g===0)f+=g;f+="\n  ",g=b,g=j.invokePartial(d.containing_buckets,"containing_buckets",g,c,d);if(g||g===0)f+=g;f+='\n  \n  <div class="gallery">\n    ',g=c.loaded||b.loaded,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  </div>\n\n  ",g=c.brightcove_id||b.brightcove_id,h=c["if"],i=j.program(4,q,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n\n  ",g=b,g=j.invokePartial(d.headline,"headline",g,c,d);if(g||g===0)f+=g;f+="\n\n  ",g=c.description||b.description,h=c["if"],i=j.program(6,r,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  \n  ",g=c.facebook_url||b.facebook_url,h=c["if"],i=j.program(8,s,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n\n</div>\n\n",g=b,g=j.invokePartial(d.zoom_level,"zoom_level",g,c,d);if(g||g===0)f+=g;f+='\n\n<ul class="stream-items"></ul>\n\n',g=b,g=j.invokePartial(d.more_button,"more_button",g,c,d);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.series}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/_brightcove"]=function(){Handlebars.registerPartial("brightcove",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n    <param name="linkBaseURL" value="http://moviepilot.com/',e=c.id||a.id,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"id",{hash:{}})),d+=n(e)+'">\n  ',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<object id="brightcove-',g=c.experience_id||b.experience_id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"experience_id",{hash:{}})),f+=n(g)+'" class="BrightcoveExperience">\n  <param name="bgcolor" value="#FFFFFF">\n  <param name="width" value="',g=c.width||b.width,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"width",{hash:{}})),f+=n(g)+'">\n  <param name="height" value="',g=c.height||b.height,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"height",{hash:{}})),f+=n(g)+'">\n  <param name="playerID" value="935471787001">\n  <param name="playerKey" value="AQ~~,AAAACMzGMJk~,RYQzCEk5IfKnEyfo5dmHK5cF207hcFae">\n  <param name="isVid" value="true">\n  <param name="isUI" value="true">\n  <param name="videoSmoothing" value="true">\n  <param name="@videoPlayer" value="',g=c.brightcove_id||b.brightcove_id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"brightcove_id",{hash:{}})),f+=n(g)+'">\n  <param name="dynamicStreaming" value="true">\n  <param name="autoStart" value="',g=c.auto_start||b.auto_start,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"auto_start",{hash:{}})),f+=n(g)+'">\n  <param name="wmode" value="transparent">\n  ',g=c.id||b.id,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n</object>\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/_fresh_badge"]=function(){Handlebars.registerPartial("fresh_badge",Handlebars.template(function(a,b,c,d,e){function n(a,b){return'\n  <p class="fresh-badge">Fresh</p>\n'}c=c||a.helpers;var f="",g,h,i,j,k=this,l="function",m=c.blockHelperMissing;g=12096e5,h=c.published_at||b.published_at,i=c.if_within_delta||b.if_within_delta,j=k.program(1,n,e),j.hash={},j.fn=j,j.inverse=k.noop,typeof i===l?g=i.call(b,h,g,j):g=m.call(b,i,h,g,j);if(g||g===0)f+=g;return f+="\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/_more_button"]=function(){Handlebars.registerPartial("more_button",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d;return d=c.text||a.text,typeof d===k?d=d.call(a,{hash:{}}):d===m&&(d=l.call(a,"text",{hash:{}})),n(d)}function p(a,b){return"Load more stories"}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<p class="more">\n  <a href="#">&#9660; ',g=c.text||b.text,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.program(3,p,e),g=h.call(b,g,i);if(g||g===0)f+=g;return f+=" &#9660;</a>\n</p>\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/pages/_containing_buckets"]=function(){Handlebars.registerPartial("containing_buckets",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f,g;d+='\n  <ul class="containing-buckets">\n    ',e=c.related_pages||a.related_pages,f={},g="bucket",f.type=g,g=c.each,i=j.program(2,p,b),i.hash=f,i.fn=i,i.inverse=j.noop,e=g.call(a,e,i);if(e||e===0)d+=e;return d+="\n  </ul>\n",d}function p(a,b){var d="",e,f;return d+="\n      <li>",e=a,f=c.link_to_page||a.link_to_page,typeof f===k?e=f.call(a,e,{hash:{}}):f===m?e=l.call(a,"link_to_page",e,{hash:{}}):e=f,d+=n(e)+"</li>\n    ",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=c.related_pages||b.related_pages,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/pages/_headline"]=function(){Handlebars.registerPartial("headline",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n      <span class="subscriber-count">',e=c.subscriber_count||a.subscriber_count,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"subscriber_count",{hash:{}})),d+=n(e)+"</span>\n    ",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="headline">\n  <p class="subscribe">\n    ',g=c.subscriber_count||b.subscriber_count,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+='\n    <a href="#" class="subscribe-button">Subscribe</a>\n  </p>\n\n  <h1>',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+"</h1>\n</div>\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/pages/_positioned_page_elements"]=function(){Handlebars.registerPartial("positioned_page_elements",Handlebars.template(function(a,b,c,d,e){c=c||a.helpers,d=d||a.partials;var f="",g,h=this,i="function",j=c.helperMissing,k=void 0,l=this.escapeExpression;g=b,g=h.invokePartial(d.fresh_badge,"fresh_badge",g,c,d);if(g||g===0)f+=g;return f+='\n\n<a href="http://api.moviepilot.com/v1/pages/',g=c.id||b.id,typeof g===i?g=g.call(b,{hash:{}}):g===k&&(g=j.call(b,"id",{hash:{}})),f+=l(g)+'/edit" class="page-edit" target="_blank">Edit</a>\n',f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/pages/_zoom_level"]=function(){Handlebars.registerPartial("zoom_level",Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<div class="column-heading">\n  <ul class="content-tabs zoom-level">\n    <li>\n      <a href="#" data-zoom-level="featured_stories" class="active">Featured Stories</a>\n    </li><li>\n      <a href="#" data-zoom-level="all_stories">All Stories</a>\n    </li>\n  </ul>\n</div>\n'}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_closed_item"]=function(){Handlebars.registerPartial("closed_item",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n    <div class="si-teaser-image"><img src="',e=c.content||a.content,e=e===null||e===undefined||e===!1?e:e.teaser_image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"content.teaser_image",{hash:{}})),d+=n(e)+'" alt=""></div>\n  ',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<span class="comment-count"></span>\n\n<div class="si-body">\n\n  ',g=c.content||b.content,g=g===null||g===undefined||g===!1?g:g.teaser_image,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n  <div class="si-teaser">\n    ',g=c.content||b.content,g=g===null||g===undefined||g===!1?g:g.teaser,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"content.teaser",{hash:{}}));if(g||g===0)f+=g;return f+='\n  </div>\n\n  <p class="si-read-on">\n    <a href="/',g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+"-",g=c.permalink||b.permalink,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"permalink",{hash:{}})),f+=n(g)+'">Continue</a>\n  </p>\n\n</div>\n',f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_facebook_plugins"]=function(){Handlebars.registerPartial("facebook_plugins",Handlebars.template(function(a,b,c,d,e){function q(a,b){return"www.beta."}c=c||a.helpers;var f="",g,h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression,p=c.blockHelperMissing;f+='<div class="comments-list" id="fb-comments-',g=c.id||b.id,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"id",{hash:{}})),f+=o(g)+'">\n  <fb:comments href="http://',g="2011-11-07",h=c.published_at||b.published_at,i=c.if_before_date||b.if_before_date,j=k.program(1,q,e),j.hash={},j.fn=j,j.inverse=k.noop,typeof i===l?g=i.call(b,h,g,j):g=p.call(b,i,h,g,j);if(g||g===0)f+=g;return f+="moviepilot.com/",g=c.id||b.id,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"id",{hash:{}})),f+=o(g)+'" num_posts="2" width="470"></fb:comments>\n</div>\n',f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_header"]=function(){Handlebars.registerPartial("header",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;d+="\n    ",e=c.tweet_id||a.tweet_id,f=c["if"],i=j.program(2,p,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n  ",d}function p(a,b){var d="",e;d+='\n      <div class="si-source">\n        <div class="icon"><img alt="Twitter-icon" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/twitter-icon-e6c8bfdc17d9b910c2eab29f0b9e0c38.png" /></div>\n        <div class="profile-image"><img src="',e=c.profile_image_url||a.profile_image_url,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"profile_image_url",{hash:{}})),d+=n(e)+'" alt=""></div>\n        <p class="meta">\n          <a href="http://twitter.com/',e=c.author_screen_name||a.author_screen_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_screen_name",{hash:{}})),d+=n(e)+'" class="name">',e=c.author_name||a.author_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_name",{hash:{}})),d+=n(e)+'</a>\n          <a href="http://twitter.com/',e=c.author_screen_name||a.author_screen_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_screen_name",{hash:{}})),d+=n(e)+"/status/",e=c.tweet_id||a.tweet_id,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"tweet_id",{hash:{}})),d+=n(e)+'" class="time"><span class="timestamp" title="',e=c.created_at||a.created_at,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"created_at",{hash:{}})),d+=n(e)+'"></span> on ',e=c.type||a.type,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"type",{hash:{}})),d+=n(e)+'</a>\n        </p>\n        <blockquote cite="http://twitter.com/',e=c.author_name||a.author_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_name",{hash:{}})),d+=n(e)+"/status/",e=c.tweet_id||a.tweet_id,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"tweet_id",{hash:{}})),d+=n(e)+'">\n          <p class="text">',e=c.text||a.text,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"text",{hash:{}}));if(e||e===0)d+=e;return d+="</p>\n        </blockquote>\n      </div>\n    ",d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="si-header">\n  \n  ',g=b,g=j.invokePartial(d.reason_and_kicker,"reason_and_kicker",g,c,d);if(g||g===0)f+=g;f+="\n  \n  ",g=c.source||b.source,h=c["with"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n\n</div>\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_page_suggestion"]=function(){Handlebars.registerPartial("page_suggestion",Handlebars.template(function(a,b,c,d,e,f){function p(a,b,d){var e;return e=c.pageSuggestionReason||d.pageSuggestionReason,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"...pageSuggestionReason",{hash:{}})),e||e===0?e:""}function q(a,b){return"Find out more about"}c=c||a.helpers,d=d||a.partials;var g="",h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression;g+='<div class="page-suggestion">\n  <div style="background-image: url(\'',h=c.banner_image||b.banner_image,typeof h===l?h=h.call(b,{hash:{}}):h===n&&(h=m.call(b,"banner_image",{hash:{}})),g+=o(h)+"')\">\n    ",h=b,h=k.invokePartial(d.fresh_badge,"fresh_badge",h,c,d);if(h||h===0)g+=h;g+='\n    <p class="title"><small>',h=f,i=c["if"],j=k.programWithDepth(p,e,b),j.hash={},j.fn=j,j.inverse=k.program(3,q,e),h=i.call(b,h,j);if(h||h===0)g+=h;return g+="</small>",h=c.title||b.title,typeof h===l?h=h.call(b,{hash:{}}):h===n&&(h=m.call(b,"title",{hash:{}})),g+=o(h)+'</p>\n    <a class="open-page-suggestion">Check it out</a>\n  </div>\n</div>\n',g}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_positioned_stream_elements"]=function(){Handlebars.registerPartial("positioned_stream_elements",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n<a href="http://api.moviepilot.com/v1/containers/',e=c.id||a.id,typeof e===j?e=e.call(a,{hash:{}}):e===l&&(e=k.call(a,"id",{hash:{}})),d+=m(e)+'/edit" class="si-edit" target="_blank">Edit</a>\n',d}c=c||a.helpers;var f="",g,h,i=this,j="function",k=c.helperMissing,l=void 0,m=this.escapeExpression,n=c.blockHelperMissing;f+='<span class="close" title="Hide this story for good">Hide this story for good</span>\n\n',g=c.if_admin||b.if_admin,h=i.program(1,o,e),h.hash={},h.fn=h,h.inverse=i.noop,typeof g===j?g=g.call(b,h):g=n.call(b,g,h);if(g||g===0)f+=g;return f+="\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_reason_and_kicker"]=function(){Handlebars.registerPartial("reason_and_kicker",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;return d+='\n  <span class="si-thumb">\n    <img src="',e=c.thumbnail||a.thumbnail,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"thumbnail",{hash:{}})),d+=n(e)+'" alt="">\n  </span>\n',d}function p(a,b){var d="",e,f;d+="\n      ",e=c.has_content||a.has_content,f=c["if"],i=j.program(4,q,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n    ",d}function q(a,b){var d="",e,f;return d+="\n        ",e=a,f=c.link_to_page||a.link_to_page,typeof f===k?e=f.call(a,e,{hash:{}}):f===m?e=l.call(a,"link_to_page",e,{hash:{}}):e=f,d+=n(e)+" &middot;\n      ",d}function r(a,b){var d="",e,f;d+="\n    ",e=c.source||a.source,e=e===null||e===undefined||e===!1?e:e.original_site_name,f=c["if"],i=j.program(7,s,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n  ",d}function s(a,b){var d="",e;return d+='\n      <strong class="source">',e=c.source||a.source,e=e===null||e===undefined||e===!1?e:e.original_site_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"source.original_site_name",{hash:{}})),d+=n(e)+"</strong> &ndash;\n    ",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=c.thumbnail||b.thumbnail,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n<p class="si-kicker">\n  <span class="topic-title">\n    ',g=c.related_nodes||b.related_nodes,h=c.each,i=j.program(3,p,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  </span>\n  \n  ",g=c.source||b.source,h=c["if"],i=j.program(6,r,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+='\n  \n  <span class="timestamp" title="',g=c.published_at||b.published_at,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"published_at",{hash:{}})),f+=n(g)+'"></span>\n</p>\n',f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_related_pages"]=function(){Handlebars.registerPartial("related_pages",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;d+='\n<div class="si-related-pages">\n<div class="box">\n  <h3>Related Pages</h3>\n  <ul class="si-related-pages-list">\n    ',e=c.related_nodes||a.related_nodes,f=c.each,i=j.program(2,p,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n    </ul>\n  </div>\n</div>\n",d}function p(a,b){var d="",e,f;d+="\n      ",e=c.has_content||a.has_content,f=c["if"],i=j.program(3,q,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n    ",d}function q(a,b){var d="",e,f;return d+="<li>",e=a,f=c.link_to_page||a.link_to_page,typeof f===k?e=f.call(a,e,{hash:{}}):f===m?e=l.call(a,"link_to_page",e,{hash:{}}):e=f,d+=n(e)+"</li>",d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=c.related_nodes||b.related_nodes,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["shared/stream_items/_sharing"]=function(){Handlebars.registerPartial("sharing",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d;return d=c.commentCount||a.commentCount,typeof d===k?d=d.call(a,{hash:{}}):d===m&&(d=l.call(a,"commentCount",{hash:{}})),n(d)}function p(a,b){return"0"}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<ul class="si-sharing">\n  \n  ',f+='\n  <li class="si-sharing-comments">\n    <span class="label">Comments</span>\n    <span class="count">',g=c.commentCount||b.commentCount,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.program(3,p,e),g=h.call(b,g,i);if(g||g===0)f+=g;return f+="</span>\n  </li>\n    \n  ",f+='\n  <li class="si-sharing-facebook">\n    <fb:like href="http://moviepilot.com/',g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+'" send="false" width="90" show_faces="false" layout="button_count" font="tahoma"></fb:like>\n  </li>\n  \n  ',f+='\n  <li class="si-sharing-twitter">\n    <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://moviepilot.com/',g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+"-",g=c.permalink||b.permalink,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"permalink",{hash:{}})),f+=n(g)+'" data-text="',g=c.content||b.content,g=g===null||g===undefined||g===!1?g:g.title,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"content.title",{hash:{}})),f+=n(g)+'">Tweet</a>\n  </li>\n  \n  ',f+='\n  <li class="si-sharing-reddit">\n    <a href="http://www.reddit.com/submit?url=http://moviepilot.com',g=b,h=c.stream_item_path||b.stream_item_path,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"stream_item_path",g,{hash:{}}):g=h,f+=n(g)+'" title="Submit to reddit">\n      reddit\n    </a>\n  </li>\n  \n  ',f+='\n  <li class="si-sharing-copy">\n    <span class="clippy-button">\n      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="72" height="14" id="clippy-',g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+'">\n      <param name="movie" value="http://d1rfm9v1yq7vrj.cloudfront.net/assets/clippy-dfed080c2aac482699af71d166fe704d.swf">\n      <param name="allowScriptAccess" value="always">\n      <param name="quality" value="high">\n      <param name="scale" value="noscale">\n      <param NAME="FlashVars" value="text=http://moviepilot.com',g=b,h=c.stream_item_path||b.stream_item_path,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"stream_item_path",g,{hash:{}}):g=h,f+=n(g)+'">\n      <param name="wmode" value="transparent">\n      <embed src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/clippy-dfed080c2aac482699af71d166fe704d.swf"\n           width="72"\n           height="14"\n           name="clippy"\n           quality="high"\n           allowScriptAccess="always"\n           type="application/x-shockwave-flash"\n           pluginspage="http://www.macromedia.com/go/getflashplayer"\n           FlashVars="text=http://moviepilot.com',g=b,h=c.stream_item_path||b.stream_item_path,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"stream_item_path",g,{hash:{}}):g=h,f+=n(g)+'"\n           wmode="transparent"\n      >\n      </object>\n    </span>\n  </li>\n  \n</ul>\n',f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.showcase=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.showcase=Handlebars.template(function(a,b,c,d,e){function q(a,b){var d="",e,f;return d+='\n  <li>\n    <a href="',e=a,f=c.page_path||a.page_path,typeof f===l?e=f.call(a,e,{hash:{}}):f===n?e=m.call(a,"page_path",e,{hash:{}}):e=f,d+=o(e)+'" title="News about ',e=c.title||a.title,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"title",{hash:{}})),d+=o(e)+'">\n      <img src="',e=c.banner_image||a.banner_image,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"banner_image",{hash:{}})),d+=o(e)+'" alt="">\n      <cite>',e=c.title||a.title,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"title",{hash:{}})),d+=o(e)+"</cite>\n    </a>\n  </li>\n  ",d}c=c||a.helpers;var f="",g,h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression,p=c.blockHelperMissing;f+="<h4>Related Topics</h4>\n<ul>\n  ",g=c.related_pages||b.related_pages,h={},i=5,h.max=i,i=c.pick||b.pick,j=k.program(1,q,e),j.hash=h,j.fn=j,j.inverse=k.noop,typeof i===l?g=i.call(b,g,j):g=p.call(b,i,g,j);if(g||g===0)f+=g;return f+="\n</ul>\n",f}),HandlebarsTemplates.showcase}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.simple_page=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.simple_page=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;return d+='\n      <img src="',e=c.facebook_id||a.facebook_id,f=c.fb_img_url||a.fb_img_url,typeof f===k?e=f.call(a,e,{hash:{}}):f===m?e=l.call(a,"fb_img_url",e,{hash:{}}):e=f,d+=n(e)+'" alt="',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'" class="avatar">\n    ',d}function p(a,b){return'\n        <p class="wikipedia-link">From <a href="http://www.wikipedia.org/">Wikipedia</a>, the free encyclopedia</p>\n      '}function q(a,b){var d="",e;return d+='\n        <p class="wikipedia-copyright">Description above from the Wikipedia article <a href="http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;search=',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'">',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'</a>, licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>. See there for a full list of contributors.</p>\n      ',d}function r(a,b){var d="",e;return d+='\n      <p class="facebook-like">\n        <fb:like ref="like" href="',e=c.link||a.link,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"link",{hash:{}})),d+=n(e)+'" width="775" send="false" show_faces="false"></fb:like>\n      </p>\n      <p class="facebook-like-info">\n        Like ',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+" and get automatic recommendations as soon as a new project is announced.\n      </p>\n    ",d}function s(a,b){var d="",e;return d+='\n    <div class="attached subscribables">\n    <h3>',e=c.name||a.name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"name",{hash:{}})),d+=n(e)+'&rsquo;s upcoming movies and TV shows</h3>\n      <ul class="subscribables-list"></ul>\n    </div>\n  ',d}c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<h1 class="section-title">',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+'</h1>\n\n<div class="header">\n\n  <div class="headline">\n    <h1>',g=c.name||b.name,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"name",{hash:{}})),f+=n(g)+'</h1>\n  </div>\n\n  <div class="content">\n    \n    ',g=c.facebook_id||b.facebook_id,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n\n    <div class="description">\n      ',g=c.isWikipediaText||b.isWikipediaText,h=c["if"],i=j.program(3,p,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n      ",g=c.description||b.description,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"description",{hash:{}}));if(g||g===0)f+=g;f+="\n      ",g=c.isWikipediaText||b.isWikipediaText,h=c["if"],i=j.program(5,q,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n    </div>\n\n    ",g=c.link||b.link,h=c["if"],i=j.program(7,r,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  </div>\n\n  ",g=c.hasSubscribables||b.hasSubscribables,h=c["if"],i=j.program(9,s,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n\n</div>\n",f}),HandlebarsTemplates.simple_page}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["static_pages/about"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["static_pages/about"]=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h2 class="section-title">About us</h2>\n<a id="homepage-link" href="/">Back to homepage</a>\n\n<p>\n  <object id="intro-aboutus" class="BrightcoveExperience">\n    <param name="bgcolor" value="#FFFFFF">\n    <param name="width" value="470">\n    <param name="height" value="264">\n    <param name="playerID" value="1229793651001">\n    <param name="playerKey" value="AQ~~,AAAACMzGMJk~,RYQzCEk5IfJM48UiMubYfDKklxoQppAZ">\n    <param name="isVid" value="true">\n    <param name="isUI" value="true">\n    <param name="videoSmoothing" value="true">\n    <param name="dynamicStreaming" value="true">\n    <param name="autoStart" value="false">\n    <param name="wmode" value="transparent">\n    <param name="@videoPlayer" value="1232713879001">\n  </object>\n</p>\n<p>\n  <strong>moviepilot</strong> is a new home for upcoming movies – and a home for the movie fans around the globe who care about them.\n  As Q said to Bond, “I’ll have you know all of our top cutting-edge technology is designed here.”\n  At <a href="http://moviepilotlabs.tumblr.com">moviepilot laboratories</a> we’re working day and night on new features,\n  tools and gadgets for fans to discover upcoming movies and engage with them.\n</p>\n<p>\n  What you see here on this service today is just the beginning &hellip;\n</p>\n<p>\n  <strong>moviepilot.com</strong> is brought to you from Berlin, the coolest city in the world.\n</p>\n\n<figure>\n  <img alt="Team" class="image-frame" src="http://d1rfm9v1yq7vrj.cloudfront.net/assets/team-4ae78232d6025140a5eaf89e43b327bd.jpg" />\n  <figcaption>Our Team</figcaption>\n</figure>\n\n'}),HandlebarsTemplates["static_pages/about"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/_opened_article"]=function(){Handlebars.registerPartial("opened_article",Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f;d+="\n    \n    ",e=c.abstract||a.abstract,f=c["if"],i=j.program(2,p,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;d+="\n    \n    ",e=c.image||a.image,f=c["if"],i=j.program
(4,q,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n\n  ",d}function p(a,b){var d="",e;d+='\n      <p class="si-abstract">',e=c.abstract||a.abstract,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"abstract",{hash:{}}));if(e||e===0)d+=e;return d+="</p>\n    ",d}function q(a,b){var d="",e,f;d+='\n      <figure class="si-image">\n    \n        ',e=c.image_link||a.image_link,f=c["if"],i=j.program(5,r,b),i.hash={},i.fn=i,i.inverse=j.program(7,s,b),e=f.call(a,e,i);if(e||e===0)d+=e;d+="\n    \n        ",e=c.copyright||a.copyright,f=c["if"],i=j.program(9,t,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;return d+="\n  \n      </figure>\n    ",d}function r(a,b){var d="",e;return d+='\n          <a href="',e=c.image_link||a.image_link,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image_link",{hash:{}})),d+=n(e)+'"><img src="',e=c.image||a.image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image",{hash:{}})),d+=n(e)+'" alt=""></a>\n        ',d}function s(a,b){var d="",e;return d+='\n          <img src="',e=c.image||a.image,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"image",{hash:{}})),d+=n(e)+'" alt="">\n        ',d}function t(a,b){var d="",e;return d+='\n          <p class="copyright">',e=c.copyright||a.copyright,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"copyright",{hash:{}})),d+=n(e)+"</p>\n        ",d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="si-body">\n  \n  ',g=c.content||b.content,h=c["with"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+='\n  \n  <div class="si-article-text">\n    \n    ',g=c.content||b.content,g=g===null||g===undefined||g===!1?g:g.text,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"content.text",{hash:{}}));if(g||g===0)f+=g;f+="\n    \n  </div>\n\n</div>\n\n",g=b,g=j.invokePartial(d.related_pages,"related_pages",g,c,d);if(g||g===0)f+=g;f+="\n\n",g=b,g=j.invokePartial(d.sharing,"sharing",g,c,d);if(g||g===0)f+=g;f+="\n\n",g=b,g=j.invokePartial(d.facebook_plugins,"facebook_plugins",g,c,d);if(g||g===0)f+=g;return f+="\n",f}))}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/article"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["stream/article"]=Handlebars.template(function(a,b,c,d,e){function o(a,b){var e;return e=a,e=j.invokePartial(d.opened_article,"opened_article",e,c,d),e||e===0?e:""}function p(a,b){var e="",f;e+="\n",f=a,f=j.invokePartial(d.page_suggestion,"page_suggestion",f,c,d);if(f||f===0)e+=f;return e+="\n",e}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=b,g=j.invokePartial(d.positioned_stream_elements,"positioned_stream_elements",g,c,d);if(g||g===0)f+=g;f+="\n\n",g=b,g=j.invokePartial(d.header,"header",g,c,d);if(g||g===0)f+=g;f+='\n\n<div class="si-main">\n\n  <h2 class="si-heading">\n    <a href="/',g=c.id||b.id,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"id",{hash:{}})),f+=n(g)+"-",g=c.permalink||b.permalink,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"permalink",{hash:{}})),f+=n(g)+'">',g=c.content||b.content,g=g===null||g===undefined||g===!1?g:g.title,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"content.title",{hash:{}})),f+=n(g)+'</a>\n  </h2>\n\n  <div class="si-closed si-wrapper">\n    ',g=b,g=j.invokePartial(d.closed_item,"closed_item",g,c,d);if(g||g===0)f+=g;f+='\n  </div>\n\n  <div class="si-opened si-wrapper">\n    ',g=c.open||b.open,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n  </div>\n\n</div>\n\n",g=c.pageSuggestion||b.pageSuggestion,h=c["with"],i=j.program(3,p,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates["stream/article"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/questionnaire"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["stream/questionnaire"]=Handlebars.template(function(a,b,c,d,e){function q(a,b){var d="",e,f;d+='\n\n  \n  \n  <div class="questionnaire-opened">\n    \n    <h3>',e=c.question||a.question,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"question",{hash:{}}));if(e||e===0)d+=e;d+='</h3>\n    \n    <div class="you">\n      <img src="',e=c.user_image_url||a.user_image_url,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"user_image_url",{hash:{}})),d+=o(e)+'">\n      <p class="call-to-action">What about you?</p>\n      <p class="post-to-facebook">\n        <label>\n          <input type="checkbox" checked>\n          Post to Facebook\n        </label>\n      </p>\n    </div>\n    \n    <ul class="options">\n      ',e=c.answers||a.answers,f=c.each,j=k.program(2,r,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;return d+="\n    </ul>\n    \n  </div>\n\n",d}function r(a,b){var d="",e,f;d+='\n      <li data-answer-id="',e=c.id||a.id,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"id",{hash:{}})),d+=o(e)+'">\n        <a href="#" class="answer" title="',e=c.text||a.text,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"text",{hash:{}})),d+=o(e)+'" data-answer-id="',e=c.id||a.id,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"id",{hash:{}})),d+=o(e)+'">',e=c.text||a.text,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"text",{hash:{}})),d+=o(e)+'</a>\n        <div class="friends">\n          ',e=c.clickers||a.clickers,f=c.each,j=k.program(3,s,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;d+='\n        </div>\n        <p class="info"><span class="click-count">',e=c.click_count||a.click_count,f=c["if"],j=k.program(5,t,b),j.hash={},j.fn=j,j.inverse=k.program(7,u,b),e=f.call(a,e,j);if(e||e===0)d+=e;return d+="</span> picked this</p>\n      </li>\n      ",d}function s(a,b){var d="",e;return d+='\n            \n            <a><img title="',e=c.name||a.name,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"name",{hash:{}})),d+=o(e)+'" src="',e=c.image_url||a.image_url,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"image_url",{hash:{}})),d+=o(e)+'"></a>\n          ',d}function t(a,b){var d;return d=c.click_count||a.click_count,typeof d===l?d=d.call(a,{hash:{}}):d===n&&(d=m.call(a,"click_count",{hash:{}})),o(d)}function u(a,b){return"Nobody"}function v(a,b){var d="",e,f;d+='\n\n  \n\n  <div class="questionnaire-opened">\n    \n    <h3>',e=c.question||a.question,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"question",{hash:{}})),d+=o(e)+'</h3>\n    \n    \n    <p class="options">',e=c.answers||a.answers,f=c.each,j=k.program(10,w,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;d+='</p>\n    \n    <p class="post-to-facebook">\n      <label>\n        <input type="checkbox" checked>\n        Post to Facebook\n      </label>\n    </p>\n    \n    ',e=c.total_click_count||a.total_click_count,f=c["if"],j=k.program(12,x,b),j.hash={},j.fn=j,j.inverse=k.noop,e=f.call(a,e,j);if(e||e===0)d+=e;return d+="\n  </div>\n\n",d}function w(a,b){var d="",e;return d+='<a href="#" title="',e=c.text||a.text,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"text",{hash:{}})),d+=o(e)+'" data-answer-id="',e=c.id||a.id,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"id",{hash:{}})),d+=o(e)+'">',e=c.text||a.text,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"text",{hash:{}})),d+=o(e)+"</a>",d}function x(a,b){var d="",e,f,g;d+='\n      <div class="info">\n        ',e=c.clickers||a.clickers,f={},g=5,f.max=g,g=c.pick||a.pick,j=k.program(13,y,b),j.hash=f,j.fn=j,j.inverse=k.noop,typeof g===l?e=g.call(a,e,j):e=p.call(a,g,e,j);if(e||e===0)d+=e;return d+="\n        ",e=c.text||a.text,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"text",{hash:{}})),d+=o(e)+"\n      </div>\n    ",d}function y(a,b){var d="",e,f;d+='\n          \n          <a><img title="',e=c.currentUser||a.currentUser,f=c["if"],j=k.program(14,z,b),j.hash={},j.fn=j,j.inverse=k.program(16,A,b),e=f.call(a,e,j);if(e||e===0)d+=e;return d+='" src="',e=c.image_url||a.image_url,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"image_url",{hash:{}})),d+=o(e)+'"></a>\n        ',d}function z(a,b){return"You"}function A(a,b){var d;return d=c.name||a.name,typeof d===l?d=d.call(a,{hash:{}}):d===n&&(d=m.call(a,"name",{hash:{}})),o(d)}function B(a,b){return"Show results"}function C(a,b){return"Participate"}function D(a,b){var d="",e;return d+='\n      \n      <a><img title="',e=c.name||a.name,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"name",{hash:{}})),d+=o(e)+'" src="',e=c.image_url||a.image_url,typeof e===l?e=e.call(a,{hash:{}}):e===n&&(e=m.call(a,"image_url",{hash:{}})),d+=o(e)+'"></a>\n    ',d}c=c||a.helpers;var f="",g,h,i,j,k=this,l="function",m=c.helperMissing,n=void 0,o=this.escapeExpression,p=c.blockHelperMissing;g=c.binary||b.binary,h=c["if"],j=k.program(1,q,e),j.hash={},j.fn=j,j.inverse=k.program(9,v,e),g=h.call(b,g,j);if(g||g===0)f+=g;f+='\n\n<div class="questionnaire-closed">\n  \n  <h3>',g=c.question||b.question,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"question",{hash:{}})),f+=o(g)+'</h3>\n  \n  <p class="vote-button"><a href="#" title="',g=c.text||b.text,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"text",{hash:{}})),f+=o(g)+'">',g=c.answered_question||b.answered_question,h=c["if"],j=k.program(18,B,e),j.hash={},j.fn=j,j.inverse=k.program(20,C,e),g=h.call(b,g,j);if(g||g===0)f+=g;f+='</a></p>\n  \n  <div class="info">\n    ',g=c.clickers||b.clickers,h={},i=3,h.max=i,i=c.pick||b.pick,j=k.program(22,D,e),j.hash=h,j.fn=j,j.inverse=k.noop,typeof i===l?g=i.call(b,g,j):g=p.call(b,i,g,j);if(g||g===0)f+=g;return f+="\n    ",g=c.text||b.text,typeof g===l?g=g.call(b,{hash:{}}):g===n&&(g=m.call(b,"text",{hash:{}})),f+=o(g)+"\n  </div>\n  \n</div>\n",f}),HandlebarsTemplates["stream/questionnaire"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/questionnaire_results"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["stream/questionnaire_results"]=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e,f,g;d+='\n    <li data-answer-id="',e=c.id||a.id,typeof e===j?e=e.call(a,{hash:{}}):e===l&&(e=k.call(a,"id",{hash:{}})),d+=m(e)+'">\n      <span class="text">',e=c.text||a.text,typeof e===j?e=e.call(a,{hash:{}}):e===l&&(e=k.call(a,"text",{hash:{}})),d+=m(e)+'</span>\n      <span class="info">',e=c.info||a.info,typeof e===j?e=e.call(a,{hash:{}}):e===l&&(e=k.call(a,"info",{hash:{}})),d+=m(e)+'</span>\n      <span class="friends">\n        ',e=c.clickers||a.clickers,f={},g=3,f.max=g,g=c.pick||a.pick,h=i.program(2,p,b),h.hash=f,h.fn=h,h.inverse=i.noop,typeof g===j?e=g.call(a,e,h):e=n.call(a,g,e,h);if(e||e===0)d+=e;return d+='\n      </span>\n      <span class="bar"></span>\n    </li>\n  ',d}function p(a,b){var d="",e,f;d+='\n          \n          <a><img title="',e=c.currentUser||a.currentUser,f=c["if"],h=i.program(3,q,b),h.hash={},h.fn=h,h.inverse=i.program(5,r,b),e=f.call(a,e,h);if(e||e===0)d+=e;return d+='" src="',e=c.image_url||a.image_url,typeof e===j?e=e.call(a,{hash:{}}):e===l&&(e=k.call(a,"image_url",{hash:{}})),d+=m(e)+'"></a>\n        ',d}function q(a,b){return"You"}function r(a,b){var d;return d=c.name||a.name,typeof d===j?d=d.call(a,{hash:{}}):d===l&&(d=k.call(a,"name",{hash:{}})),m(d)}c=c||a.helpers;var f="",g,h,i=this,j="function",k=c.helperMissing,l=void 0,m=this.escapeExpression,n=c.blockHelperMissing;f+='<ul class="results">\n  ',g=c.answers||b.answers,h=i.program(1,o,e),h.hash={},h.fn=h,h.inverse=i.noop,typeof g===j?g=g.call(b,h):g=n.call(b,g,h);if(g||g===0)f+=g;return f+="\n</ul>\n",f}),HandlebarsTemplates["stream/questionnaire_results"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/stream"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["stream/stream"]=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers,d=d||a.partials;var f="",g,h=this;f+='<h1 class="section-title">News Stream</h1>\n\n<div id="stream-loading" class="loading"></div>\n\n<ul id="stream-list"></ul>\n\n',g=b,g=h.invokePartial(d.more_button,"more_button",g,c,d);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates["stream/stream"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["stream/tweet"]=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates["stream/tweet"]=Handlebars.template(function(a,b,c,d,e){function o(a,b){var d="",e;d+='\n  \n    <span class="si-thumb">\n      <img src="',e=c.profile_image_url||a.profile_image_url,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"profile_image_url",{hash:{}})),d+=n(e)+'" alt="">\n    </span>\n  \n    <p class="si-tweet-header">\n      ',e=c.author_name||a.author_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_name",{hash:{}})),d+=n(e)+' (<a href="http://twitter.com/',e=c.author_screen_name||a.author_screen_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_screen_name",{hash:{}})),d+=n(e)+'" class="name">@',e=c.author_screen_name||a.author_screen_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_screen_name",{hash:{}})),d+=n(e)+'</a>):\n      <a href="http://twitter.com/',e=c.author_screen_name||a.author_screen_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_screen_name",{hash:{}})),d+=n(e)+"/status/",e=c.tweet_id||a.tweet_id,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"tweet_id",{hash:{}})),d+=n(e)+'" class="time"><span class="timestamp" title="',e=c.created_at||a.created_at,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"created_at",{hash:{}})),d+=n(e)+'"></span> on ',e=c.type||a.type,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"type",{hash:{}})),d+=n(e)+'</a>\n    </p>\n  \n    <blockquote cite="http://twitter.com/',e=c.author_name||a.author_name,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"author_name",{hash:{}})),d+=n(e)+"/status/",e=c.tweet_id||a.tweet_id,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"tweet_id",{hash:{}})),d+=n(e)+'">\n      ',e=c.text||a.text,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"text",{hash:{}}));if(e||e===0)d+=e;return d+="\n    </blockquote>\n    \n  ",d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;g=b,g=j.invokePartial(d.positioned_stream_elements,"positioned_stream_elements",g,c,d);if(g||g===0)f+=g;f+='\n\n<div class="si-wrapper">\n\n  ',g=c.source||b.source,h=c["with"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n\n</div>\n",f}),HandlebarsTemplates["stream/tweet"]}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.subscribable=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.subscribable=Handlebars.template(function(a,b,c,d,e){function o(a,b){return'\n  <a href="#unsubscribe" class="unsubscribe" title="unsubscribe">unsubscribe</a>\n  <ul class="level">\n    <li><a href="#featured_stories" data-level="featured_stories_subscription" class="featured_stories_subscription">Featured</a></li>\n    <li><a href="#all_stories" data-level="all_stories_subscription" class="all_stories_subscription">All Stories</a></li>\n  </ul>\n  '}function p(a,b){return'\n  <a href="#dismiss" class="dismiss" title="not interested">not interested</a>\n  <ul class="subscribe">\n    <li><a href="#subscribe" data-level="featured_stories_subscription">Subscribe</a></li>\n  </ul>\n  '}function q(a,b){var d="",e,f;d+="\n",e=c.reasonOutput||a.reasonOutput,f=c["if"],i=j.program(6,r,b),i.hash={},i.fn=i,i.inverse=j.noop,e=f.call(a,e,i);if(e||e===0)d+=e;d+='\n<p class="description">',e=c.description||a.description,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"description",{hash:{}}));if(e||e===0)d+=e;return d+="</p>\n",d}function r(a,b){var d="",e;d+='<p class="reason">',e=c.reasonOutput||a.reasonOutput,typeof e===k?e=e.call(a,{hash:{}}):e===m&&(e=l.call(a,"reasonOutput",{hash:{}}));if(e||e===0)d+=e;return d+="</p>",d}c=c||a.helpers,d=d||a.partials;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;f+='<div class="inner">\n  ',g=b,g=j.invokePartial(d.fresh_badge,"fresh_badge",g,c,d);if(g||g===0)f+=g;f+="\n  <h4>",g=b,h=c.link_to_page||b.link_to_page,typeof h===k?g=h.call(b,g,{hash:{}}):h===m?g=l.call(b,"link_to_page",g,{hash:{}}):g=h,f+=n(g)+'</h4>\n  <img src="',g=c.banner_image||b.banner_image,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"banner_image",{hash:{}})),f+=n(g)+'">\n  ',g=c.subscription_level||b.subscription_level,h=c["if"],i=j.program(1,o,e),i.hash={},i.fn=i,i.inverse=j.program(3,p,e),g=h.call(b,g,i);if(g||g===0)f+=g;f+="\n</div>\n",g=c.subscription_level||b.subscription_level,h=c.unless,i=j.program(5,q,e),i.hash={},i.fn=i,i.inverse=j.noop,g=h.call(b,g,i);if(g||g===0)f+=g;return f+="\n",f}),HandlebarsTemplates.subscribable}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.subscriptions=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.subscriptions=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h3>Control the volume of news with the Featured and All Stories buttons</h3>\n\n<ul class="content-tabs">\n  <li>\n    <a href="#">Movies</a>\n  </li><li>\n    <a href="#">Topics</a>\n  </li><li>\n    <a href="#">TV Shows</a>\n  </li>\n</ul>\n\n<ul class="subscriptions-list selection">\n  <li class="loading"></li>\n</ul>\n\n<div class="fallback">\n  You haven&rsquo;t subscribed to <span></span> yet.\n  Have a look at <a href="/recommendations">our recommendations</a>!\n</div>\n'}),HandlebarsTemplates.subscriptions}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.suggestion=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.suggestion=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f="",g,h,i,j=this,k="function",l=c.helperMissing,m=void 0,n=this.escapeExpression;return f+='<p class="question" style="background-image: url(\'',g="large",h=c.facebook_id||b.facebook_id,i=c.fb_img_url||b.fb_img_url,typeof i===k?g=i.call(b,h,g,{hash:{}}):i===m?g=l.call(b,"fb_img_url",h,g,{hash:{}}):g=i,f+=n(g)+'\')">\n  <strong class="name">',g=c.title||b.title,typeof g===k?g=g.call(b,{hash:{}}):g===m&&(g=l.call(b,"title",{hash:{}})),f+=n(g)+"</strong>\n</p>\n",f}),HandlebarsTemplates.suggestion}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST.suggestions=function(){return this.HandlebarsTemplates||(this.HandlebarsTemplates={}),this.HandlebarsTemplates.suggestions=Handlebars.template(function(a,b,c,d,e){c=c||a.helpers;var f=this;return'<h3>Do you like &hellip;</h3>\n<p class="loading"></p>\n<div class="suggestions"></div>\n\n<ul class="ratebox">\n  <li><a href="#" class="like-button"><span>like</span></a></li>\n  <li><a href="#" class="dislike-button"><span>dislike</span></a></li>\n  <li><a class="skip-button" href="#"><span>next</span></a></li>\n</ul>\n'}),HandlebarsTemplates.suggestions}.call(this)}.call(this)
