Skip to content

Instantly share code, notes, and snippets.

@cdl
Created September 19, 2013 14:57
Show Gist options
  • Save cdl/6624747 to your computer and use it in GitHub Desktop.
Save cdl/6624747 to your computer and use it in GitHub Desktop.
Reverse engineering the Mashable Velocity graph. Pasting their JS here for archival purposes.
function google_ad_request_done(t) {
var e, n = "";
if (0 !== t.length) {
if ("flash" == t[0].type) n += '<a href="' + google_info.feedback_url + '">Ads by Google</a><br>' + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + google_ad.image_width + '" HEIGHT="' + google_ad.image_height + '"> <PARAM NAME="movie" VALUE="' + google_ad.image_url + '">' + '<PARAM NAME="quality" VALUE="high">' + '<PARAM NAME="AllowScriptAccess" VALUE="never">' + '<EMBED src="' + google_ad.image_url + '" WIDTH="' + google_ad.image_width + '" HEIGHT="' + google_ad.image_height + '" TYPE="application/x-shockwave-flash"' + ' AllowScriptAccess="never" ' + ' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
else if ("image" == t[0].type) n += '<a href="' + google_info.feedback_url + '">Ads by Google</a><br> <a href="' + t[0].url + '" target="_top" title="go to ' + t[0].visible_url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' + t[0].visible_url + '\';return true"><img border="0" src="' + t[0].image_url + '"width="' + t[0].image_width + '"height="' + t[0].image_height + '"></a>';
else if ("html" == t[0].type) n += t[0].snippet;
else {
for (n += '<p><a href="' + google_info.feedback_url + '" style="text-decoration:none; font-size:11px; color: #333" >Ads by Google</a>', e = 0; e < t.length; ++e) n += '<br><a style="text-decoration:none" href="' + t[e].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' + t[e].visible_url + '\';return true"> <span style="text-decoration:underline; font-size: 14px"> <b>' + t[e].line1 + "</b></span></a> - <span>" + t[e].line2 + "&nbsp;" + t[e].line3 + '<br></span> <span><a style="text-decoration:none; font-size:11px" href="' + t[e].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' + t[e].visible_url + "';return true\">" + t[e].visible_url + "</span></a>";
n += "</p>"
}
n = "<div class=adsense-wrapper>" + n + "</div>", $(".adsense").last().html(n)
}
}
function s_gi(t, e, n) {
var i, r, s, a, o, l = "s.version='H.24.4';s.an=s_an;s.logDebug=function(m){var s=this,tcf=new Function('var e;try{console.log(\"'+s.rep(s.rep(m,\"\\n\",\"\\\\n\"),\"\\\"\",\"\\\\\\\"\")+'\");}catch(e){}');tcf()};s.cls=function(x,c){var i,y='';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=function(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toUpperCase():'';if(x){x=''+x;if(s.em==3)x=encodeURIComponent(x);else if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}x=y}else x=escape(''+x);x=s.rep(x,'+','%2B');if(c&&c!='AUTO'&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}return x};s.epa=function(x){var s=this;if(x){x=s.rep(''+x,'+',' ');return s.em==3?decodeURIComponent(x):unescape(x)}return x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);c=a.indexOf('=');if(c>=0)a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.mpc=function(m,a){var s=this,c,l,n,v;v=s.d.visibilityState;if(!v)v=s.d.webkitVisibilityState;if(v&&v=='prerender'){if(!s.mpq){s.mpq=new Array;l=s.sp('webkitvisibilitychange,visibilitychange',',');for(n=0;n<l.length;n++){s.d.addEventListener(l[n],new Function('var s=s_c_il['+s._in+'],c,v;v=s.d.visibilityState;if(!v)v=s.d.webkitVisibilityState;if(s.mpq&&v==\"visible\"){while(s.mpq.length>0){c=s.mpq.shift();s[c.m].apply(s,c.a)}s.mpq=0}'),false)}}c=new Object;c.m=m;c.a=a;s.mpq.push(c);return 1}return 0};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va_g[i];v=s[k];if(v!=undefined){if(typeof(v)!='number')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';\";return c};s.c_d='';s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?parseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,r.t,r.u)}};s.flushBufferedRequests=function(){};s.mr=function(sess,q,rs,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBase,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Object,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc='d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/'+s.version+(s.tcn?'T':'')+'/'+sess+'?AQB=1&ndh=1'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac)rs=s.fl(rs,2047)}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;if(s.debugTracking){var d='AppMeasurement Debug: '+rs,dl=s.sp(rs,'&'),dln;for(dln=0;dln<dl.length;dln++)d+=\"\\n\\t\"+s.epa(dl[dln]);s.logDebug(d)}im.src=rs;if((!ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.name))&&rs.indexOf('&pe=')>=0){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg=function(v){var s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,p,l=0,q,a,b='',c='',t;if(x&&x.length>255){y=''+x;i=y.indexOf('?');if(i>0){q=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase();j=0;if(h.substring(0,7)=='http://')j+=7;else if(h.substring(0,8)=='https://')j+=8;i=h.indexOf(\"/\",j);if(i>0){h=h.substring(j,i);p=y.substring(i);y=y.substring(0,i);if(h.indexOf('google')>=0)l=',q,ie,start,search_key,word,kw,cd,';else if(h.indexOf('yahoo.co')>=0)l=',p,ei,';if(l&&q){a=s.sp(q,'&');if(a&&a.length>1){for(j=0;j<a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c)q=b+'&'+c;else c=''}i=253-(q.length-c.length)-y.length;x=y+(i>0?p.substring(0,i):'')+'?'+q}}}}return x};s.s2q=function(k,v,vf,vfp,f){var s=this,qs='',sk,sv,sp,ss,nke,nk,nf,nfl=0,nfn,nfm;if(k==\"contextData\")k=\"c\";if(v){for(sk in v)if((!f||sk.substring(0,f.length)==f)&&v[sk]&&(!vf||vf.indexOf(','+(vfp?vfp+'.':'')+sk+',')>=0)&&(!Object||!Object.prototype||!Object.prototype[sk])){nfm=0;if(nfl)for(nfn=0;nfn<nfl.length;nfn++)if(sk.substring(0,nfl[nfn].length)==nfl[nfn])nfm=1;if(!nfm){if(qs=='')qs+='&'+k+'.';sv=v[sk];if(f)sk=sk.substring(f.length);if(sk.length>0){nke=sk.indexOf('.');if(nke>0){nk=sk.substring(0,nke);nf=(f?f:'')+nk+'.';if(!nfl)nfl=new Array;nfl[nfl.length]=nf;qs+=s.s2q(nk,v,vf,vfp,nf)}else{if(typeof(sv)=='boolean'){if(sv)sv='true';else sv='false'}if(sv){if(vfp=='retrieveLightData'&&f.indexOf('.contextData.')<0){sp=sk.substring(0,4);ss=sk.substring(4);if(sk=='transactionID')sk='xact';else if(sk=='channel')sk='ch';else if(sk=='campaign')sk='v0';else if(s.num(ss)){if(sp=='prop')sk='c'+ss;else if(sp=='eVar')sk='v'+ss;else if(sp=='list')sk='l'+ss;else if(sp=='hier'){sk='h'+ss;sv=sv.substring(0,255)}}}qs+='&'+s.ape(sk)+'='+s.ape(sv)}}}}}if(qs!='')qs+='&.'+k}return qs};s.hav=function(){var s=this,qs='',l,fv='',fe='',mn,i,e;if(s.lightProfileID){l=s.va_m;fv=s.lightTrackVars;if(fv)fv=','+fv+','+s.vl_mr+','}else{l=s.va_t;if(s.pe||s.linkType){fv=s.linkTrackVars;fe=s.linkTrackEvents;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}}if(fv)fv=','+fv+','+s.vl_l+','+s.vl_l2;if(fe){fe=','+fe+',';if(fv)fv+=',events,'}if (s.events2)e=(e?',':'')+s.events2}for(i=0;i<l.length;i++){var k=l[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(!v)if(k=='events'&&e){v=e;e=''}if(v&&(!fv||fv.indexOf(','+k+',')>=0)&&k!='linkName'&&k!='linkType'){if(k=='timestamp')q='ts';else if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL'){q='g';v=s.fl(v,255)}else if(k=='referrer'){q='r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationServerSecure)v=''}else if(k=='visitorMigrationServerSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2||s.em==3)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='cc';else if(k=='channel')q='ch';else if(k=='transactionID')q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';else if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q='k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else if(k=='plugins')q='p';else if(k=='events'){if(e)v+=(v?',':'')+e;if(fe)v=s.fs(v,fe)}else if(k=='events2')v='';else if(k=='contextData'){qs+=s.s2q('c',s[k],fv,k,0);v=''}else if(k=='lightProfileID')q='mtp';else if(k=='lightStoreForSeconds'){q='mtss';if(!s.lightProfileID)v=''}else if(k=='lightIncrementBy'){q='mti';if(!s.lightProfileID)v=''}else if(k=='retrieveLightProfiles')q='mtsr';else if(k=='deleteLightProfiles')q='mtsd';else if(k=='retrieveLightData'){if(s.retrieveLightProfiles)qs+=s.s2q('mts',s[k],fv,k,0);v=''}else if(s.num(x)){if(b=='prop')q='c'+n;else if(b=='eVar')q='v'+n;else if(b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+s.ape(q)+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}return qs};s.ltdf=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Function('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catch(e){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;if(o.tagUrn||(o.scopeName&&o.scopeName.toUpperCase()!='HTML'))return '';t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.type&&o.type.toUpperCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o.value)n=o.value;else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>=0?t.substring(0,e):'',q=e>=0?s.epa(t.substring(e+1)):'';if(u&&q&&(','+u+',').indexOf(','+un+',')>=0){if(u!=s.un&&s.un.indexOf(',')>=0)q='&u='+u+q+'&u=0';return q}return ''};s.rq=function(un){if(!un)un=this.un;var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s=this;if(s.un&&s.mpc('sa',arguments))return;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(s.mpc(\"m_a\",arguments))return;if(!c)c=s.wd[\"s_\"+g+\"_c\"];if(c&&s_d)s[g]=new Function(\"s\",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\'s_\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!=\"m_\"+n)){m._i=f=1;if((\"\"+x).indexOf(\"function\")>=0)x(s);else s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i];if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o.e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.substring(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o.defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}return m};s.voa=function(vo,r){var s=this,l=s.va_g,i,k,v,x;for(i=0;i<l.length;i++){k=l[i];v=vo[k];if(v||vo['!'+k]){if(!r&&(k==\"contextData\"||k==\"retrieveLightData\")&&s[k])for(x in s[k])if(!v[x])v[x]=s[k][x];s[k]=v}}};s.vob=function(vo){var s=this,l=s.va_g,i,k;for(i=0;i<l.length;i++){k=l[i];vo[k]=s[k];if(!vo[k])vo['!'+k]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.dll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.vob(vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.track=s.t=function(vo){var s=this,trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta=-1,q='',qs='',code='',vb=new Object;if(s.mpc('t',arguments))return;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;s.td=1}if(vo){s.vob(vb);s.voa(vo)}if((vo&&vo._t)||!s.m_m('d')){if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s._1_referrer){s.referrer=r;s._1_referrer=1}s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk,p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.parentElement:o.parentNode;if(o){t=s.ot(o);n=s.oid(o);x=o.s_oidt}}if(!n||t=='BODY')o='';if(o){oc=o.onclick?''+o.onclick:'';if((oc.indexOf('s_gs(')>=0&&oc.indexOf('.s_oc(')<0)||oc.indexOf('.tl(')>=0)o=0}}if(o){if(n)ta=o.target;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l)){s.pe='lnk_'+(t=='d'||t=='e'?t:'o');s.pev1=(h?s.ape(h):'');s.pev2=(l?s.ape(l):'')}else trk=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}else trk=0}if(trk||qs){s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq()),0,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=s.lightProfileID=s.retrieveLightProfiles=s.deleteLightProfiles=''}s.sq(qs)}}else s.dl(vo);if(vo)s.voa(vb,1);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';return code};s.trackLink=s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t(vo)};s.trackLight=function(p,ss,i,vo){var s=this;s.lightProfileID=p;s.lightStoreForSeconds=ss;s.lightIncrementBy=i;s.t(vo)};s.setTagContainer=function(n){var s=this,l=s.wd.s_c_il,i,t,x,y;s.tcn=n;if(l)for(i=0;i<l.length;i++){t=l[i];if(t&&t._c=='s_l'&&t.tagContainerName==n){s.voa(t);if(t.lmq)for(i=0;i<t.lmq.length;i++){x=t.lmq[i];y='m_'+x.n;if(!s[y]&&!s[y+'_c']){s[y]=t[y];s[y+'_c']=t[y+'_c']}s.loadModule(x.n,x.u,x.d)}if(t.ml)for(x in t.ml)if(s[x]){y=s[x];x=t.ml[x];for(i in x)if(!Object.prototype[i]){if(typeof(x[i])!='function'||(''+x[i]).indexOf('s_c_il')<0)y[i]=x[i]}}if(t.mmq)for(i=0;i<t.mmq.length;i++){x=t.mmq[i];if(s[x.m]){y=s[x.m];if(y[x.f]&&typeof(y[x.f])=='function'){if(x.a)y[x.f].apply(y,x.a);else y[x.f].apply(y)}}}if(t.tq)for(i=0;i<t.tq.length;i++)s.t(t.tq[i]);t.s=s;return}}};s.wd=window;s.ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(s.em.toPrecision)s.em=3;else if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}if(s.oun)s.sa(s.oun);s.sa(un);s.vl_l='timestamp,dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,pageName,pageURL,referrer,contextData,currencyCode,lightProfileID,lightStoreForSeconds,lightIncrementBy,retrieveLightProfiles,deleteLightProfiles,retrieveLightData';s.va_l=s.sp(s.vl_l,',');s.vl_mr=s.vl_m='timestamp,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,contextData,lightProfileID,lightStoreForSeconds,lightIncrementBy';s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,events2,products,linkName,linkType';var n;for(n=1;n<=75;n++){s.vl_t+=',prop'+n+',eVar'+n;s.vl_m+=',prop'+n+',eVar'+n}for(n=1;n<=5;n++)s.vl_t+=',hier'+n;for(n=1;n<=3;n++)s.vl_t+=',list'+n;s.va_m=s.sp(s.vl_m,',');s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,browserHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBufferedRequests,mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkDownloadFileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,lightTrackVars,_1_referrer,un';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);s.contextData=new Object;s.retrieveLightData=new Object;if(!ss)s.wds();if(pg){s.wd.s_co=function(o){s_gi(\"_\",1,1).co(o)};s.wd.s_gs=function(un){s_gi(un,1,1).t()};s.wd.s_dc=function(un){s_gi(un,1).t()}}",
c = window,
u = c.s_c_il,
d = navigator,
h = d.userAgent,
p = d.appVersion,
f = p.indexOf("MSIE "),
m = h.indexOf("Netscape6/");
if (t && (t = t.toLowerCase(), u))
for (s = 0; 2 > s; s++)
for (r = 0; r < u.length; r++)
if (o = u[r], a = o._c, (!a || "s_c" == a || s > 0 && "s_l" == a) && (o.oun == t || o.fs && o.sa && o.fs(o.oun, t))) {
if (o.sa && o.sa(t), "s_c" == a) return o
} else o = 0;
return c.s_an = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", c.s_sp = new Function("x", "d", "var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.substring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a"), c.s_jn = new Function("a", "d", "var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x"), c.s_rep = new Function("x", "o", "n", "return s_jn(s_sp(x,o),n)"), c.s_d = new Function("x", "var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn(x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x"), c.s_fe = new Function("c", "return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")"), c.s_fa = new Function("f", "var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':a"), c.s_ft = new Function("c", "c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){if(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")'+c.substring(e+1);s=c.indexOf('=function(')}return c;"), l = s_d(l), f > 0 ? (i = parseInt(r = p.substring(f + 5)), i > 3 && (i = parseFloat(r))) : i = m > 0 ? parseFloat(h.substring(m + 10)) : parseFloat(p), (5 > i || p.indexOf("Opera") >= 0 || h.indexOf("Opera") >= 0) && (l = s_ft(l)), o || (o = new Object, c.s_c_in || (c.s_c_il = new Array, c.s_c_in = 0), o._il = c.s_c_il, o._in = c.s_c_in, o._il[o._in] = o, c.s_c_in++), o._c = "s_c", new Function("s", "un", "pg", "ss", l)(o, t, e, n), o
}
function s_giqf() {
var t, e, n, i = window,
r = i.s_giq;
if (r)
for (t = 0; t < r.length; t++) e = r[t], n = s_gi(e.oun), n.sa(e.un), n.setTagContainer(e.tagContainerName);
i.s_giq = 0
}! function (t, e) {
function n(t) {
var e = t.length,
n = ue.type(t);
return ue.isWindow(t) ? !1 : 1 === t.nodeType && e ? !0 : "array" === n || "function" !== n && (0 === e || "number" == typeof e && e > 0 && e - 1 in t)
}
function i(t) {
var e = Se[t] = {};
return ue.each(t.match(he) || [], function (t, n) {
e[n] = !0
}), e
}
function r(t, n, i, r) {
if (ue.acceptData(t)) {
var s, a, o = ue.expando,
l = t.nodeType,
c = l ? ue.cache : t,
u = l ? t[o] : t[o] && o;
if (u && c[u] && (r || c[u].data) || i !== e || "string" != typeof n) return u || (u = l ? t[o] = ee.pop() || ue.guid++ : o), c[u] || (c[u] = l ? {} : {
toJSON: ue.noop
}), ("object" == typeof n || "function" == typeof n) && (r ? c[u] = ue.extend(c[u], n) : c[u].data = ue.extend(c[u].data, n)), a = c[u], r || (a.data || (a.data = {}), a = a.data), i !== e && (a[ue.camelCase(n)] = i), "string" == typeof n ? (s = a[n], null == s && (s = a[ue.camelCase(n)])) : s = a, s
}
}
function s(t, e, n) {
if (ue.acceptData(t)) {
var i, r, s = t.nodeType,
a = s ? ue.cache : t,
l = s ? t[ue.expando] : ue.expando;
if (a[l]) {
if (e && (i = n ? a[l] : a[l].data)) {
ue.isArray(e) ? e = e.concat(ue.map(e, ue.camelCase)) : e in i ? e = [e] : (e = ue.camelCase(e), e = e in i ? [e] : e.split(" ")), r = e.length;
for (; r--;) delete i[e[r]];
if (n ? !o(i) : !ue.isEmptyObject(i)) return
}(n || (delete a[l].data, o(a[l]))) && (s ? ue.cleanData([t], !0) : ue.support.deleteExpando || a != a.window ? delete a[l] : a[l] = null)
}
}
}
function a(t, n, i) {
if (i === e && 1 === t.nodeType) {
var r = "data-" + n.replace($e, "-$1").toLowerCase();
if (i = t.getAttribute(r), "string" == typeof i) {
try {
i = "true" === i ? !0 : "false" === i ? !1 : "null" === i ? null : +i + "" === i ? +i : Te.test(i) ? ue.parseJSON(i) : i
} catch (s) {}
ue.data(t, n, i)
} else i = e
}
return i
}
function o(t) {
var e;
for (e in t)
if (("data" !== e || !ue.isEmptyObject(t[e])) && "toJSON" !== e) return !1;
return !0
}
function l() {
return !0
}
function c() {
return !1
}
function u() {
try {
return G.activeElement
} catch (t) {}
}
function d(t, e) {
do t = t[e]; while (t && 1 !== t.nodeType);
return t
}
function h(t, e, n) {
if (ue.isFunction(e)) return ue.grep(t, function (t, i) {
return !!e.call(t, i, t) !== n
});
if (e.nodeType) return ue.grep(t, function (t) {
return t === e !== n
});
if ("string" == typeof e) {
if (Fe.test(e)) return ue.filter(e, t, n);
e = ue.filter(e, t)
}
return ue.grep(t, function (t) {
return ue.inArray(t, e) >= 0 !== n
})
}
function p(t) {
var e = We.split("|"),
n = t.createDocumentFragment();
if (n.createElement)
for (; e.length;) n.createElement(e.pop());
return n
}
function f(t, e) {
return ue.nodeName(t, "table") && ue.nodeName(1 === e.nodeType ? e : e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
}
function m(t) {
return t.type = (null !== ue.find.attr(t, "type")) + "/" + t.type, t
}
function g(t) {
var e = sn.exec(t.type);
return e ? t.type = e[1] : t.removeAttribute("type"), t
}
function v(t, e) {
for (var n, i = 0; null != (n = t[i]); i++) ue._data(n, "globalEval", !e || ue._data(e[i], "globalEval"))
}
function y(t, e) {
if (1 === e.nodeType && ue.hasData(t)) {
var n, i, r, s = ue._data(t),
a = ue._data(e, s),
o = s.events;
if (o) {
delete a.handle, a.events = {};
for (n in o)
for (i = 0, r = o[n].length; r > i; i++) ue.event.add(e, n, o[n][i])
}
a.data && (a.data = ue.extend({}, a.data))
}
}
function w(t, e) {
var n, i, r;
if (1 === e.nodeType) {
if (n = e.nodeName.toLowerCase(), !ue.support.noCloneEvent && e[ue.expando]) {
r = ue._data(e);
for (i in r.events) ue.removeEvent(e, i, r.handle);
e.removeAttribute(ue.expando)
}
"script" === n && e.text !== t.text ? (m(e).text = t.text, g(e)) : "object" === n ? (e.parentNode && (e.outerHTML = t.outerHTML), ue.support.html5Clone && t.innerHTML && !ue.trim(e.innerHTML) && (e.innerHTML = t.innerHTML)) : "input" === n && en.test(t.type) ? (e.defaultChecked = e.checked = t.checked, e.value !== t.value && (e.value = t.value)) : "option" === n ? e.defaultSelected = e.selected = t.defaultSelected : ("input" === n || "textarea" === n) && (e.defaultValue = t.defaultValue)
}
}
function b(t, n) {
var i, r, s = 0,
a = typeof t.getElementsByTagName !== Y ? t.getElementsByTagName(n || "*") : typeof t.querySelectorAll !== Y ? t.querySelectorAll(n || "*") : e;
if (!a)
for (a = [], i = t.childNodes || t; null != (r = i[s]); s++)!n || ue.nodeName(r, n) ? a.push(r) : ue.merge(a, b(r, n));
return n === e || n && ue.nodeName(t, n) ? ue.merge([t], a) : a
}
function _(t) {
en.test(t.type) && (t.defaultChecked = t.checked)
}
function x(t, e) {
if (e in t) return e;
for (var n = e.charAt(0).toUpperCase() + e.slice(1), i = e, r = Sn.length; r--;)
if (e = Sn[r] + n, e in t) return e;
return i
}
function k(t, e) {
return t = e || t, "none" === ue.css(t, "display") || !ue.contains(t.ownerDocument, t)
}
function C(t, e) {
for (var n, i, r, s = [], a = 0, o = t.length; o > a; a++) i = t[a], i.style && (s[a] = ue._data(i, "olddisplay"), n = i.style.display, e ? (s[a] || "none" !== n || (i.style.display = ""), "" === i.style.display && k(i) && (s[a] = ue._data(i, "olddisplay", E(i.nodeName)))) : s[a] || (r = k(i), (n && "none" !== n || !r) && ue._data(i, "olddisplay", r ? n : ue.css(i, "display"))));
for (a = 0; o > a; a++) i = t[a], i.style && (e && "none" !== i.style.display && "" !== i.style.display || (i.style.display = e ? s[a] || "" : "none"));
return t
}
function S(t, e, n) {
var i = yn.exec(e);
return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : e
}
function T(t, e, n, i, r) {
for (var s = n === (i ? "border" : "content") ? 4 : "width" === e ? 1 : 0, a = 0; 4 > s; s += 2) "margin" === n && (a += ue.css(t, n + Cn[s], !0, r)), i ? ("content" === n && (a -= ue.css(t, "padding" + Cn[s], !0, r)), "margin" !== n && (a -= ue.css(t, "border" + Cn[s] + "Width", !0, r))) : (a += ue.css(t, "padding" + Cn[s], !0, r), "padding" !== n && (a += ue.css(t, "border" + Cn[s] + "Width", !0, r)));
return a
}
function $(t, e, n) {
var i = !0,
r = "width" === e ? t.offsetWidth : t.offsetHeight,
s = dn(t),
a = ue.support.boxSizing && "border-box" === ue.css(t, "boxSizing", !1, s);
if (0 >= r || null == r) {
if (r = hn(t, e, s), (0 > r || null == r) && (r = t.style[e]), wn.test(r)) return r;
i = a && (ue.support.boxSizingReliable || r === t.style[e]), r = parseFloat(r) || 0
}
return r + T(t, e, n || (a ? "border" : "content"), i, s) + "px"
}
function E(t) {
var e = G,
n = _n[t];
return n || (n = A(t, e), "none" !== n && n || (un = (un || ue("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(e.documentElement), e = (un[0].contentWindow || un[0].contentDocument).document, e.write("<!doctype html><html><body>"), e.close(), n = A(t, e), un.detach()), _n[t] = n), n
}
function A(t, e) {
var n = ue(e.createElement(t)).appendTo(e.body),
i = ue.css(n[0], "display");
return n.remove(), i
}
function j(t, e, n, i) {
var r;
if (ue.isArray(e)) ue.each(e, function (e, r) {
n || $n.test(t) ? i(t, r) : j(t + "[" + ("object" == typeof r ? e : "") + "]", r, n, i)
});
else if (n || "object" !== ue.type(e)) i(t, e);
else
for (r in e) j(t + "[" + r + "]", e[r], n, i)
}
function O(t) {
return function (e, n) {
"string" != typeof e && (n = e, e = "*");
var i, r = 0,
s = e.toLowerCase().match(he) || [];
if (ue.isFunction(n))
for (; i = s[r++];) "+" === i[0] ? (i = i.slice(1) || "*", (t[i] = t[i] || []).unshift(n)) : (t[i] = t[i] || []).push(n)
}
}
function N(t, n, i, r) {
function s(l) {
var c;
return a[l] = !0, ue.each(t[l] || [], function (t, l) {
var u = l(n, i, r);
return "string" != typeof u || o || a[u] ? o ? !(c = u) : e : (n.dataTypes.unshift(u), s(u), !1)
}), c
}
var a = {}, o = t === Rn;
return s(n.dataTypes[0]) || !a["*"] && s("*")
}
function I(t, n) {
var i, r, s = ue.ajaxSettings.flatOptions || {};
for (r in n) n[r] !== e && ((s[r] ? t : i || (i = {}))[r] = n[r]);
return i && ue.extend(!0, t, i), t
}
function M(t, n, i) {
for (var r, s, a, o, l = t.contents, c = t.dataTypes;
"*" === c[0];) c.shift(), s === e && (s = t.mimeType || n.getResponseHeader("Content-Type"));
if (s)
for (o in l)
if (l[o] && l[o].test(s)) {
c.unshift(o);
break
}
if (c[0] in i) a = c[0];
else {
for (o in i) {
if (!c[0] || t.converters[o + " " + c[0]]) {
a = o;
break
}
r || (r = o)
}
a = a || r
}
return a ? (a !== c[0] && c.unshift(a), i[a]) : e
}
function L(t, e, n, i) {
var r, s, a, o, l, c = {}, u = t.dataTypes.slice();
if (u[1])
for (a in t.converters) c[a.toLowerCase()] = t.converters[a];
for (s = u.shift(); s;)
if (t.responseFields[s] && (n[t.responseFields[s]] = e), !l && i && t.dataFilter && (e = t.dataFilter(e, t.dataType)), l = s, s = u.shift())
if ("*" === s) s = l;
else if ("*" !== l && l !== s) {
if (a = c[l + " " + s] || c["* " + s], !a)
for (r in c)
if (o = r.split(" "), o[1] === s && (a = c[l + " " + o[0]] || c["* " + o[0]])) {
a === !0 ? a = c[r] : c[r] !== !0 && (s = o[0], u.unshift(o[1]));
break
}
if (a !== !0)
if (a && t["throws"]) e = a(e);
else try {
e = a(e)
} catch (d) {
return {
state: "parsererror",
error: a ? d : "No conversion from " + l + " to " + s
}
}
}
return {
state: "success",
data: e
}
}
function P() {
try {
return new t.XMLHttpRequest
} catch (e) {}
}
function D() {
try {
return new t.ActiveXObject("Microsoft.XMLHTTP")
} catch (e) {}
}
function H() {
return setTimeout(function () {
Zn = e
}), Zn = ue.now()
}
function q(t, e, n) {
for (var i, r = (si[e] || []).concat(si["*"]), s = 0, a = r.length; a > s; s++)
if (i = r[s].call(n, e, t)) return i
}
function U(t, e, n) {
var i, r, s = 0,
a = ri.length,
o = ue.Deferred().always(function () {
delete l.elem
}),
l = function () {
if (r) return !1;
for (var e = Zn || H(), n = Math.max(0, c.startTime + c.duration - e), i = n / c.duration || 0, s = 1 - i, a = 0, l = c.tweens.length; l > a; a++) c.tweens[a].run(s);
return o.notifyWith(t, [c, s, n]), 1 > s && l ? n : (o.resolveWith(t, [c]), !1)
}, c = o.promise({
elem: t,
props: ue.extend({}, e),
opts: ue.extend(!0, {
specialEasing: {}
}, n),
originalProperties: e,
originalOptions: n,
startTime: Zn || H(),
duration: n.duration,
tweens: [],
createTween: function (e, n) {
var i = ue.Tween(t, c.opts, e, n, c.opts.specialEasing[e] || c.opts.easing);
return c.tweens.push(i), i
},
stop: function (e) {
var n = 0,
i = e ? c.tweens.length : 0;
if (r) return this;
for (r = !0; i > n; n++) c.tweens[n].run(1);
return e ? o.resolveWith(t, [c, e]) : o.rejectWith(t, [c, e]), this
}
}),
u = c.props;
for (B(u, c.opts.specialEasing); a > s; s++)
if (i = ri[s].call(c, t, u, c.opts)) return i;
return ue.map(u, q, c), ue.isFunction(c.opts.start) && c.opts.start.call(t, c), ue.fx.timer(ue.extend(l, {
elem: t,
anim: c,
queue: c.opts.queue
})), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always)
}
function B(t, e) {
var n, i, r, s, a;
for (n in t)
if (i = ue.camelCase(n), r = e[i], s = t[n], ue.isArray(s) && (r = s[1], s = t[n] = s[0]), n !== i && (t[i] = s, delete t[n]), a = ue.cssHooks[i], a && "expand" in a) {
s = a.expand(s), delete t[i];
for (n in s) n in t || (t[n] = s[n], e[n] = r)
} else e[i] = r
}
function F(t, e, n) {
var i, r, s, a, o, l, c = this,
u = {}, d = t.style,
h = t.nodeType && k(t),
p = ue._data(t, "fxshow");
n.queue || (o = ue._queueHooks(t, "fx"), null == o.unqueued && (o.unqueued = 0, l = o.empty.fire, o.empty.fire = function () {
o.unqueued || l()
}), o.unqueued++, c.always(function () {
c.always(function () {
o.unqueued--, ue.queue(t, "fx").length || o.empty.fire()
})
})), 1 === t.nodeType && ("height" in e || "width" in e) && (n.overflow = [d.overflow, d.overflowX, d.overflowY], "inline" === ue.css(t, "display") && "none" === ue.css(t, "float") && (ue.support.inlineBlockNeedsLayout && "inline" !== E(t.nodeName) ? d.zoom = 1 : d.display = "inline-block")), n.overflow && (d.overflow = "hidden", ue.support.shrinkWrapBlocks || c.always(function () {
d.overflow = n.overflow[0], d.overflowX = n.overflow[1], d.overflowY = n.overflow[2]
}));
for (i in e)
if (r = e[i], ei.exec(r)) {
if (delete e[i], s = s || "toggle" === r, r === (h ? "hide" : "show")) continue;
u[i] = p && p[i] || ue.style(t, i)
}
if (!ue.isEmptyObject(u)) {
p ? "hidden" in p && (h = p.hidden) : p = ue._data(t, "fxshow", {}), s && (p.hidden = !h), h ? ue(t).show() : c.done(function () {
ue(t).hide()
}), c.done(function () {
var e;
ue._removeData(t, "fxshow");
for (e in u) ue.style(t, e, u[e])
});
for (i in u) a = q(h ? p[i] : 0, i, c), i in p || (p[i] = a.start, h && (a.end = a.start, a.start = "width" === i || "height" === i ? 1 : 0))
}
}
function V(t, e, n, i, r) {
return new V.prototype.init(t, e, n, i, r)
}
function R(t, e) {
var n, i = {
height: t
}, r = 0;
for (e = e ? 1 : 0; 4 > r; r += 2 - e) n = Cn[r], i["margin" + n] = i["padding" + n] = t;
return e && (i.opacity = i.width = t), i
}
function z(t) {
return ue.isWindow(t) ? t : 9 === t.nodeType ? t.defaultView || t.parentWindow : !1
}
var W, X, Y = typeof e,
Q = t.location,
G = t.document,
J = G.documentElement,
K = t.jQuery,
Z = t.$,
te = {}, ee = [],
ne = "1.10.2",
ie = ee.concat,
re = ee.push,
se = ee.slice,
ae = ee.indexOf,
oe = te.toString,
le = te.hasOwnProperty,
ce = ne.trim,
ue = function (t, e) {
return new ue.fn.init(t, e, X)
}, de = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
he = /\S+/g,
pe = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
fe = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
me = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
ge = /^[\],:{}\s]*$/,
ve = /(?:^|:|,)(?:\s*\[)+/g,
ye = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
we = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
be = /^-ms-/,
_e = /-([\da-z])/gi,
xe = function (t, e) {
return e.toUpperCase()
}, ke = function (t) {
(G.addEventListener || "load" === t.type || "complete" === G.readyState) && (Ce(), ue.ready())
}, Ce = function () {
G.addEventListener ? (G.removeEventListener("DOMContentLoaded", ke, !1), t.removeEventListener("load", ke, !1)) : (G.detachEvent("onreadystatechange", ke), t.detachEvent("onload", ke))
};
ue.fn = ue.prototype = {
jquery: ne,
constructor: ue,
init: function (t, n, i) {
var r, s;
if (!t) return this;
if ("string" == typeof t) {
if (r = "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 ? [null, t, null] : fe.exec(t), !r || !r[1] && n) return !n || n.jquery ? (n || i).find(t) : this.constructor(n).find(t);
if (r[1]) {
if (n = n instanceof ue ? n[0] : n, ue.merge(this, ue.parseHTML(r[1], n && n.nodeType ? n.ownerDocument || n : G, !0)), me.test(r[1]) && ue.isPlainObject(n))
for (r in n) ue.isFunction(this[r]) ? this[r](n[r]) : this.attr(r, n[r]);
return this
}
if (s = G.getElementById(r[2]), s && s.parentNode) {
if (s.id !== r[2]) return i.find(t);
this.length = 1, this[0] = s
}
return this.context = G, this.selector = t, this
}
return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : ue.isFunction(t) ? i.ready(t) : (t.selector !== e && (this.selector = t.selector, this.context = t.context), ue.makeArray(t, this))
},
selector: "",
length: 0,
toArray: function () {
return se.call(this)
},
get: function (t) {
return null == t ? this.toArray() : 0 > t ? this[this.length + t] : this[t]
},
pushStack: function (t) {
var e = ue.merge(this.constructor(), t);
return e.prevObject = this, e.context = this.context, e
},
each: function (t, e) {
return ue.each(this, t, e)
},
ready: function (t) {
return ue.ready.promise().done(t), this
},
slice: function () {
return this.pushStack(se.apply(this, arguments))
},
first: function () {
return this.eq(0)
},
last: function () {
return this.eq(-1)
},
eq: function (t) {
var e = this.length,
n = +t + (0 > t ? e : 0);
return this.pushStack(n >= 0 && e > n ? [this[n]] : [])
},
map: function (t) {
return this.pushStack(ue.map(this, function (e, n) {
return t.call(e, n, e)
}))
},
end: function () {
return this.prevObject || this.constructor(null)
},
push: re,
sort: [].sort,
splice: [].splice
}, ue.fn.init.prototype = ue.fn, ue.extend = ue.fn.extend = function () {
var t, n, i, r, s, a, o = arguments[0] || {}, l = 1,
c = arguments.length,
u = !1;
for ("boolean" == typeof o && (u = o, o = arguments[1] || {}, l = 2), "object" == typeof o || ue.isFunction(o) || (o = {}), c === l && (o = this, --l); c > l; l++)
if (null != (s = arguments[l]))
for (r in s) t = o[r], i = s[r], o !== i && (u && i && (ue.isPlainObject(i) || (n = ue.isArray(i))) ? (n ? (n = !1, a = t && ue.isArray(t) ? t : []) : a = t && ue.isPlainObject(t) ? t : {}, o[r] = ue.extend(u, a, i)) : i !== e && (o[r] = i));
return o
}, ue.extend({
expando: "jQuery" + (ne + Math.random()).replace(/\D/g, ""),
noConflict: function (e) {
return t.$ === ue && (t.$ = Z), e && t.jQuery === ue && (t.jQuery = K), ue
},
isReady: !1,
readyWait: 1,
holdReady: function (t) {
t ? ue.readyWait++ : ue.ready(!0)
},
ready: function (t) {
if (t === !0 ? !--ue.readyWait : !ue.isReady) {
if (!G.body) return setTimeout(ue.ready);
ue.isReady = !0, t !== !0 && --ue.readyWait > 0 || (W.resolveWith(G, [ue]), ue.fn.trigger && ue(G).trigger("ready").off("ready"))
}
},
isFunction: function (t) {
return "function" === ue.type(t)
},
isArray: Array.isArray || function (t) {
return "array" === ue.type(t)
},
isWindow: function (t) {
return null != t && t == t.window
},
isNumeric: function (t) {
return !isNaN(parseFloat(t)) && isFinite(t)
},
type: function (t) {
return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? te[oe.call(t)] || "object" : typeof t
},
isPlainObject: function (t) {
var n;
if (!t || "object" !== ue.type(t) || t.nodeType || ue.isWindow(t)) return !1;
try {
if (t.constructor && !le.call(t, "constructor") && !le.call(t.constructor.prototype, "isPrototypeOf")) return !1
} catch (i) {
return !1
}
if (ue.support.ownLast)
for (n in t) return le.call(t, n);
for (n in t);
return n === e || le.call(t, n)
},
isEmptyObject: function (t) {
var e;
for (e in t) return !1;
return !0
},
error: function (t) {
throw Error(t)
},
parseHTML: function (t, e, n) {
if (!t || "string" != typeof t) return null;
"boolean" == typeof e && (n = e, e = !1), e = e || G;
var i = me.exec(t),
r = !n && [];
return i ? [e.createElement(i[1])] : (i = ue.buildFragment([t], e, r), r && ue(r).remove(), ue.merge([], i.childNodes))
},
parseJSON: function (n) {
return t.JSON && t.JSON.parse ? t.JSON.parse(n) : null === n ? n : "string" == typeof n && (n = ue.trim(n), n && ge.test(n.replace(ye, "@").replace(we, "]").replace(ve, ""))) ? Function("return " + n)() : (ue.error("Invalid JSON: " + n), e)
},
parseXML: function (n) {
var i, r;
if (!n || "string" != typeof n) return null;
try {
t.DOMParser ? (r = new DOMParser, i = r.parseFromString(n, "text/xml")) : (i = new ActiveXObject("Microsoft.XMLDOM"), i.async = "false", i.loadXML(n))
} catch (s) {
i = e
}
return i && i.documentElement && !i.getElementsByTagName("parsererror").length || ue.error("Invalid XML: " + n), i
},
noop: function () {},
globalEval: function (e) {
e && ue.trim(e) && (t.execScript || function (e) {
t.eval.call(t, e)
})(e)
},
camelCase: function (t) {
return t.replace(be, "ms-").replace(_e, xe)
},
nodeName: function (t, e) {
return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase()
},
each: function (t, e, i) {
var r, s = 0,
a = t.length,
o = n(t);
if (i) {
if (o)
for (; a > s && (r = e.apply(t[s], i), r !== !1); s++);
else
for (s in t)
if (r = e.apply(t[s], i), r === !1) break
} else if (o)
for (; a > s && (r = e.call(t[s], s, t[s]), r !== !1); s++);
else
for (s in t)
if (r = e.call(t[s], s, t[s]), r === !1) break; return t
},
trim: ce && !ce.call(" ") ? function (t) {
return null == t ? "" : ce.call(t)
} : function (t) {
return null == t ? "" : (t + "").replace(pe, "")
},
makeArray: function (t, e) {
var i = e || [];
return null != t && (n(Object(t)) ? ue.merge(i, "string" == typeof t ? [t] : t) : re.call(i, t)), i
},
inArray: function (t, e, n) {
var i;
if (e) {
if (ae) return ae.call(e, t, n);
for (i = e.length, n = n ? 0 > n ? Math.max(0, i + n) : n : 0; i > n; n++)
if (n in e && e[n] === t) return n
}
return -1
},
merge: function (t, n) {
var i = n.length,
r = t.length,
s = 0;
if ("number" == typeof i)
for (; i > s; s++) t[r++] = n[s];
else
for (; n[s] !== e;) t[r++] = n[s++];
return t.length = r, t
},
grep: function (t, e, n) {
var i, r = [],
s = 0,
a = t.length;
for (n = !! n; a > s; s++) i = !! e(t[s], s), n !== i && r.push(t[s]);
return r
},
map: function (t, e, i) {
var r, s = 0,
a = t.length,
o = n(t),
l = [];
if (o)
for (; a > s; s++) r = e(t[s], s, i), null != r && (l[l.length] = r);
else
for (s in t) r = e(t[s], s, i), null != r && (l[l.length] = r);
return ie.apply([], l)
},
guid: 1,
proxy: function (t, n) {
var i, r, s;
return "string" == typeof n && (s = t[n], n = t, t = s), ue.isFunction(t) ? (i = se.call(arguments, 2), r = function () {
return t.apply(n || this, i.concat(se.call(arguments)))
}, r.guid = t.guid = t.guid || ue.guid++, r) : e
},
access: function (t, n, i, r, s, a, o) {
var l = 0,
c = t.length,
u = null == i;
if ("object" === ue.type(i)) {
s = !0;
for (l in i) ue.access(t, n, l, i[l], !0, a, o)
} else if (r !== e && (s = !0, ue.isFunction(r) || (o = !0), u && (o ? (n.call(t, r), n = null) : (u = n, n = function (t, e, n) {
return u.call(ue(t), n)
})), n))
for (; c > l; l++) n(t[l], i, o ? r : r.call(t[l], l, n(t[l], i)));
return s ? t : u ? n.call(t) : c ? n(t[0], i) : a
},
now: function () {
return (new Date).getTime()
},
swap: function (t, e, n, i) {
var r, s, a = {};
for (s in e) a[s] = t.style[s], t.style[s] = e[s];
r = n.apply(t, i || []);
for (s in e) t.style[s] = a[s];
return r
}
}), ue.ready.promise = function (e) {
if (!W)
if (W = ue.Deferred(), "complete" === G.readyState) setTimeout(ue.ready);
else if (G.addEventListener) G.addEventListener("DOMContentLoaded", ke, !1), t.addEventListener("load", ke, !1);
else {
G.attachEvent("onreadystatechange", ke), t.attachEvent("onload", ke);
var n = !1;
try {
n = null == t.frameElement && G.documentElement
} catch (i) {}
n && n.doScroll && function r() {
if (!ue.isReady) {
try {
n.doScroll("left")
} catch (t) {
return setTimeout(r, 50)
}
Ce(), ue.ready()
}
}()
}
return W.promise(e)
}, ue.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (t, e) {
te["[object " + e + "]"] = e.toLowerCase()
}), X = ue(G),
function (t, e) {
function n(t, e, n, i) {
var r, s, a, o, l, c, u, d, f, m;
if ((e ? e.ownerDocument || e : U) !== N && O(e), e = e || N, n = n || [], !t || "string" != typeof t) return n;
if (1 !== (o = e.nodeType) && 9 !== o) return [];
if (M && !i) {
if (r = we.exec(t))
if (a = r[1]) {
if (9 === o) {
if (s = e.getElementById(a), !s || !s.parentNode) return n;
if (s.id === a) return n.push(s), n
} else if (e.ownerDocument && (s = e.ownerDocument.getElementById(a)) && H(e, s) && s.id === a) return n.push(s), n
} else {
if (r[2]) return te.apply(n, e.getElementsByTagName(t)), n;
if ((a = r[3]) && k.getElementsByClassName && e.getElementsByClassName) return te.apply(n, e.getElementsByClassName(a)), n
}
if (k.qsa && (!L || !L.test(t))) {
if (d = u = q, f = e, m = 9 === o && t, 1 === o && "object" !== e.nodeName.toLowerCase()) {
for (c = h(t), (u = e.getAttribute("id")) ? d = u.replace(xe, "\\$&") : e.setAttribute("id", d), d = "[id='" + d + "'] ", l = c.length; l--;) c[l] = d + p(c[l]);
f = pe.test(t) && e.parentNode || e, m = c.join(",")
}
if (m) try {
return te.apply(n, f.querySelectorAll(m)), n
} catch (g) {} finally {
u || e.removeAttribute("id")
}
}
}
return _(t.replace(ce, "$1"), e, n, i)
}
function i() {
function t(n, i) {
return e.push(n += " ") > S.cacheLength && delete t[e.shift()], t[n] = i
}
var e = [];
return t
}
function r(t) {
return t[q] = !0, t
}
function s(t) {
var e = N.createElement("div");
try {
return !!t(e)
} catch (n) {
return !1
} finally {
e.parentNode && e.parentNode.removeChild(e), e = null
}
}
function a(t, e) {
for (var n = t.split("|"), i = t.length; i--;) S.attrHandle[n[i]] = e
}
function o(t, e) {
var n = e && t,
i = n && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || Q) - (~t.sourceIndex || Q);
if (i) return i;
if (n)
for (; n = n.nextSibling;)
if (n === e) return -1;
return t ? 1 : -1
}
function l(t) {
return function (e) {
var n = e.nodeName.toLowerCase();
return "input" === n && e.type === t
}
}
function c(t) {
return function (e) {
var n = e.nodeName.toLowerCase();
return ("input" === n || "button" === n) && e.type === t
}
}
function u(t) {
return r(function (e) {
return e = +e, r(function (n, i) {
for (var r, s = t([], n.length, e), a = s.length; a--;) n[r = s[a]] && (n[r] = !(i[r] = n[r]))
})
})
}
function d() {}
function h(t, e) {
var i, r, s, a, o, l, c, u = R[t + " "];
if (u) return e ? 0 : u.slice(0);
for (o = t, l = [], c = S.preFilter; o;) {
(!i || (r = de.exec(o))) && (r && (o = o.slice(r[0].length) || o), l.push(s = [])), i = !1, (r = he.exec(o)) && (i = r.shift(), s.push({
value: i,
type: r[0].replace(ce, " ")
}), o = o.slice(i.length));
for (a in S.filter)!(r = ve[a].exec(o)) || c[a] && !(r = c[a](r)) || (i = r.shift(), s.push({
value: i,
type: a,
matches: r
}), o = o.slice(i.length));
if (!i) break
}
return e ? o.length : o ? n.error(t) : R(t, l).slice(0)
}
function p(t) {
for (var e = 0, n = t.length, i = ""; n > e; e++) i += t[e].value;
return i
}
function f(t, e, n) {
var i = e.dir,
r = n && "parentNode" === i,
s = F++;
return e.first ? function (e, n, s) {
for (; e = e[i];)
if (1 === e.nodeType || r) return t(e, n, s)
} : function (e, n, a) {
var o, l, c, u = B + " " + s;
if (a) {
for (; e = e[i];)
if ((1 === e.nodeType || r) && t(e, n, a)) return !0
} else
for (; e = e[i];)
if (1 === e.nodeType || r)
if (c = e[q] || (e[q] = {}), (l = c[i]) && l[0] === u) {
if ((o = l[1]) === !0 || o === C) return o === !0
} else if (l = c[i] = [u], l[1] = t(e, n, a) || C, l[1] === !0) return !0
}
}
function m(t) {
return t.length > 1 ? function (e, n, i) {
for (var r = t.length; r--;)
if (!t[r](e, n, i)) return !1;
return !0
} : t[0]
}
function g(t, e, n, i, r) {
for (var s, a = [], o = 0, l = t.length, c = null != e; l > o; o++)(s = t[o]) && (!n || n(s, i, r)) && (a.push(s), c && e.push(o));
return a
}
function v(t, e, n, i, s, a) {
return i && !i[q] && (i = v(i)), s && !s[q] && (s = v(s, a)), r(function (r, a, o, l) {
var c, u, d, h = [],
p = [],
f = a.length,
m = r || b(e || "*", o.nodeType ? [o] : o, []),
v = !t || !r && e ? m : g(m, h, t, o, l),
y = n ? s || (r ? t : f || i) ? [] : a : v;
if (n && n(v, y, o, l), i)
for (c = g(y, p), i(c, [], o, l), u = c.length; u--;)(d = c[u]) && (y[p[u]] = !(v[p[u]] = d));
if (r) {
if (s || t) {
if (s) {
for (c = [], u = y.length; u--;)(d = y[u]) && c.push(v[u] = d);
s(null, y = [], c, l)
}
for (u = y.length; u--;)(d = y[u]) && (c = s ? ne.call(r, d) : h[u]) > -1 && (r[c] = !(a[c] = d))
}
} else y = g(y === a ? y.splice(f, y.length) : y), s ? s(null, a, y, l) : te.apply(a, y)
})
}
function y(t) {
for (var e, n, i, r = t.length, s = S.relative[t[0].type], a = s || S.relative[" "], o = s ? 1 : 0, l = f(function (t) {
return t === e
}, a, !0), c = f(function (t) {
return ne.call(e, t) > -1
}, a, !0), u = [
function (t, n, i) {
return !s && (i || n !== A) || ((e = n).nodeType ? l(t, n, i) : c(t, n, i))
}
]; r > o; o++)
if (n = S.relative[t[o].type]) u = [f(m(u), n)];
else {
if (n = S.filter[t[o].type].apply(null, t[o].matches), n[q]) {
for (i = ++o; r > i && !S.relative[t[i].type]; i++);
return v(o > 1 && m(u), o > 1 && p(t.slice(0, o - 1).concat({
value: " " === t[o - 2].type ? "*" : ""
})).replace(ce, "$1"), n, i > o && y(t.slice(o, i)), r > i && y(t = t.slice(i)), r > i && p(t))
}
u.push(n)
}
return m(u)
}
function w(t, e) {
var i = 0,
s = e.length > 0,
a = t.length > 0,
o = function (r, o, l, c, u) {
var d, h, p, f = [],
m = 0,
v = "0",
y = r && [],
w = null != u,
b = A,
_ = r || a && S.find.TAG("*", u && o.parentNode || o),
x = B += null == b ? 1 : Math.random() || .1;
for (w && (A = o !== N && o, C = i); null != (d = _[v]); v++) {
if (a && d) {
for (h = 0; p = t[h++];)
if (p(d, o, l)) {
c.push(d);
break
}
w && (B = x, C = ++i)
}
s && ((d = !p && d) && m--, r && y.push(d))
}
if (m += v, s && v !== m) {
for (h = 0; p = e[h++];) p(y, f, o, l);
if (r) {
if (m > 0)
for (; v--;) y[v] || f[v] || (f[v] = K.call(c));
f = g(f)
}
te.apply(c, f), w && !r && f.length > 0 && m + e.length > 1 && n.uniqueSort(c)
}
return w && (B = x, A = b), y
};
return s ? r(o) : o
}
function b(t, e, i) {
for (var r = 0, s = e.length; s > r; r++) n(t, e[r], i);
return i
}
function _(t, e, n, i) {
var r, s, a, o, l, c = h(t);
if (!i && 1 === c.length) {
if (s = c[0] = c[0].slice(0), s.length > 2 && "ID" === (a = s[0]).type && k.getById && 9 === e.nodeType && M && S.relative[s[1].type]) {
if (e = (S.find.ID(a.matches[0].replace(ke, Ce), e) || [])[0], !e) return n;
t = t.slice(s.shift().value.length)
}
for (r = ve.needsContext.test(t) ? 0 : s.length; r-- && (a = s[r], !S.relative[o = a.type]);)
if ((l = S.find[o]) && (i = l(a.matches[0].replace(ke, Ce), pe.test(s[0].type) && e.parentNode || e))) {
if (s.splice(r, 1), t = i.length && p(s), !t) return te.apply(n, i), n;
break
}
}
return E(t, c)(i, e, !M, n, pe.test(t)), n
}
var x, k, C, S, T, $, E, A, j, O, N, I, M, L, P, D, H, q = "sizzle" + -new Date,
U = t.document,
B = 0,
F = 0,
V = i(),
R = i(),
z = i(),
W = !1,
X = function (t, e) {
return t === e ? (W = !0, 0) : 0
}, Y = typeof e,
Q = 1 << 31,
G = {}.hasOwnProperty,
J = [],
K = J.pop,
Z = J.push,
te = J.push,
ee = J.slice,
ne = J.indexOf || function (t) {
for (var e = 0, n = this.length; n > e; e++)
if (this[e] === t) return e;
return -1
}, ie = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
re = "[\\x20\\t\\r\\n\\f]",
se = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
ae = se.replace("w", "w#"),
oe = "\\[" + re + "*(" + se + ")" + re + "*(?:([*^$|!~]?=)" + re + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + ae + ")|)|)" + re + "*\\]",
le = ":(" + se + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + oe.replace(3, 8) + ")*)|.*)\\)|)",
ce = RegExp("^" + re + "+|((?:^|[^\\\\])(?:\\\\.)*)" + re + "+$", "g"),
de = RegExp("^" + re + "*," + re + "*"),
he = RegExp("^" + re + "*([>+~]|" + re + ")" + re + "*"),
pe = RegExp(re + "*[+~]"),
fe = RegExp("=" + re + "*([^\\]'\"]*)" + re + "*\\]", "g"),
me = RegExp(le),
ge = RegExp("^" + ae + "$"),
ve = {
ID: RegExp("^#(" + se + ")"),
CLASS: RegExp("^\\.(" + se + ")"),
TAG: RegExp("^(" + se.replace("w", "w*") + ")"),
ATTR: RegExp("^" + oe),
PSEUDO: RegExp("^" + le),
CHILD: RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + re + "*(even|odd|(([+-]|)(\\d*)n|)" + re + "*(?:([+-]|)" + re + "*(\\d+)|))" + re + "*\\)|)", "i"),
bool: RegExp("^(?:" + ie + ")$", "i"),
needsContext: RegExp("^" + re + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + re + "*((?:-\\d)?\\d*)" + re + "*\\)|)(?=[^-]|$)", "i")
}, ye = /^[^{]+\{\s*\[native \w/,
we = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
be = /^(?:input|select|textarea|button)$/i,
_e = /^h\d$/i,
xe = /'|\\/g,
ke = RegExp("\\\\([\\da-f]{1,6}" + re + "?|(" + re + ")|.)", "ig"),
Ce = function (t, e, n) {
var i = "0x" + e - 65536;
return i !== i || n ? e : 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(55296 | i >> 10, 56320 | 1023 & i)
};
try {
te.apply(J = ee.call(U.childNodes), U.childNodes), J[U.childNodes.length].nodeType
} catch (Se) {
te = {
apply: J.length ? function (t, e) {
Z.apply(t, ee.call(e))
} : function (t, e) {
for (var n = t.length, i = 0; t[n++] = e[i++];);
t.length = n - 1
}
}
}
$ = n.isXML = function (t) {
var e = t && (t.ownerDocument || t).documentElement;
return e ? "HTML" !== e.nodeName : !1
}, k = n.support = {}, O = n.setDocument = function (t) {
var n = t ? t.ownerDocument || t : U,
i = n.defaultView;
return n !== N && 9 === n.nodeType && n.documentElement ? (N = n, I = n.documentElement, M = !$(n), i && i.attachEvent && i !== i.top && i.attachEvent("onbeforeunload", function () {
O()
}), k.attributes = s(function (t) {
return t.className = "i", !t.getAttribute("className")
}), k.getElementsByTagName = s(function (t) {
return t.appendChild(n.createComment("")), !t.getElementsByTagName("*").length
}), k.getElementsByClassName = s(function (t) {
return t.innerHTML = "<div class='a'></div><div class='a i'></div>", t.firstChild.className = "i", 2 === t.getElementsByClassName("i").length
}), k.getById = s(function (t) {
return I.appendChild(t).id = q, !n.getElementsByName || !n.getElementsByName(q).length
}), k.getById ? (S.find.ID = function (t, e) {
if (typeof e.getElementById !== Y && M) {
var n = e.getElementById(t);
return n && n.parentNode ? [n] : []
}
}, S.filter.ID = function (t) {
var e = t.replace(ke, Ce);
return function (t) {
return t.getAttribute("id") === e
}
}) : (delete S.find.ID, S.filter.ID = function (t) {
var e = t.replace(ke, Ce);
return function (t) {
var n = typeof t.getAttributeNode !== Y && t.getAttributeNode("id");
return n && n.value === e
}
}), S.find.TAG = k.getElementsByTagName ? function (t, n) {
return typeof n.getElementsByTagName !== Y ? n.getElementsByTagName(t) : e
} : function (t, e) {
var n, i = [],
r = 0,
s = e.getElementsByTagName(t);
if ("*" === t) {
for (; n = s[r++];) 1 === n.nodeType && i.push(n);
return i
}
return s
}, S.find.CLASS = k.getElementsByClassName && function (t, n) {
return typeof n.getElementsByClassName !== Y && M ? n.getElementsByClassName(t) : e
}, P = [], L = [], (k.qsa = ye.test(n.querySelectorAll)) && (s(function (t) {
t.innerHTML = "<select><option selected=''></option></select>", t.querySelectorAll("[selected]").length || L.push("\\[" + re + "*(?:value|" + ie + ")"), t.querySelectorAll(":checked").length || L.push(":checked")
}), s(function (t) {
var e = n.createElement("input");
e.setAttribute("type", "hidden"), t.appendChild(e).setAttribute("t", ""), t.querySelectorAll("[t^='']").length && L.push("[*^$]=" + re + "*(?:''|\"\")"), t.querySelectorAll(":enabled").length || L.push(":enabled", ":disabled"), t.querySelectorAll("*,:x"), L.push(",.*:")
})), (k.matchesSelector = ye.test(D = I.webkitMatchesSelector || I.mozMatchesSelector || I.oMatchesSelector || I.msMatchesSelector)) && s(function (t) {
k.disconnectedMatch = D.call(t, "div"), D.call(t, "[s!='']:x"), P.push("!=", le)
}), L = L.length && RegExp(L.join("|")), P = P.length && RegExp(P.join("|")), H = ye.test(I.contains) || I.compareDocumentPosition ? function (t, e) {
var n = 9 === t.nodeType ? t.documentElement : t,
i = e && e.parentNode;
return t === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(i)))
} : function (t, e) {
if (e)
for (; e = e.parentNode;)
if (e === t) return !0;
return !1
}, X = I.compareDocumentPosition ? function (t, e) {
if (t === e) return W = !0, 0;
var i = e.compareDocumentPosition && t.compareDocumentPosition && t.compareDocumentPosition(e);
return i ? 1 & i || !k.sortDetached && e.compareDocumentPosition(t) === i ? t === n || H(U, t) ? -1 : e === n || H(U, e) ? 1 : j ? ne.call(j, t) - ne.call(j, e) : 0 : 4 & i ? -1 : 1 : t.compareDocumentPosition ? -1 : 1
} : function (t, e) {
var i, r = 0,
s = t.parentNode,
a = e.parentNode,
l = [t],
c = [e];
if (t === e) return W = !0, 0;
if (!s || !a) return t === n ? -1 : e === n ? 1 : s ? -1 : a ? 1 : j ? ne.call(j, t) - ne.call(j, e) : 0;
if (s === a) return o(t, e);
for (i = t; i = i.parentNode;) l.unshift(i);
for (i = e; i = i.parentNode;) c.unshift(i);
for (; l[r] === c[r];) r++;
return r ? o(l[r], c[r]) : l[r] === U ? -1 : c[r] === U ? 1 : 0
}, n) : N
}, n.matches = function (t, e) {
return n(t, null, null, e)
}, n.matchesSelector = function (t, e) {
if ((t.ownerDocument || t) !== N && O(t), e = e.replace(fe, "='$1']"), !(!k.matchesSelector || !M || P && P.test(e) || L && L.test(e))) try {
var i = D.call(t, e);
if (i || k.disconnectedMatch || t.document && 11 !== t.document.nodeType) return i
} catch (r) {}
return n(e, N, null, [t]).length > 0
}, n.contains = function (t, e) {
return (t.ownerDocument || t) !== N && O(t), H(t, e)
}, n.attr = function (t, n) {
(t.ownerDocument || t) !== N && O(t);
var i = S.attrHandle[n.toLowerCase()],
r = i && G.call(S.attrHandle, n.toLowerCase()) ? i(t, n, !M) : e;
return r === e ? k.attributes || !M ? t.getAttribute(n) : (r = t.getAttributeNode(n)) && r.specified ? r.value : null : r
}, n.error = function (t) {
throw Error("Syntax error, unrecognized expression: " + t)
}, n.uniqueSort = function (t) {
var e, n = [],
i = 0,
r = 0;
if (W = !k.detectDuplicates, j = !k.sortStable && t.slice(0), t.sort(X), W) {
for (; e = t[r++];) e === t[r] && (i = n.push(r));
for (; i--;) t.splice(n[i], 1)
}
return t
}, T = n.getText = function (t) {
var e, n = "",
i = 0,
r = t.nodeType;
if (r) {
if (1 === r || 9 === r || 11 === r) {
if ("string" == typeof t.textContent) return t.textContent;
for (t = t.firstChild; t; t = t.nextSibling) n += T(t)
} else if (3 === r || 4 === r) return t.nodeValue
} else
for (; e = t[i]; i++) n += T(e);
return n
}, S = n.selectors = {
cacheLength: 50,
createPseudo: r,
match: ve,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: !0
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: !0
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function (t) {
return t[1] = t[1].replace(ke, Ce), t[3] = (t[4] || t[5] || "").replace(ke, Ce), "~=" === t[2] && (t[3] = " " + t[3] + " "), t.slice(0, 4)
},
CHILD: function (t) {
return t[1] = t[1].toLowerCase(), "nth" === t[1].slice(0, 3) ? (t[3] || n.error(t[0]), t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && n.error(t[0]), t
},
PSEUDO: function (t) {
var n, i = !t[5] && t[2];
return ve.CHILD.test(t[0]) ? null : (t[3] && t[4] !== e ? t[2] = t[4] : i && me.test(i) && (n = h(i, !0)) && (n = i.indexOf(")", i.length - n) - i.length) && (t[0] = t[0].slice(0, n), t[2] = i.slice(0, n)), t.slice(0, 3))
}
},
filter: {
TAG: function (t) {
var e = t.replace(ke, Ce).toLowerCase();
return "*" === t ? function () {
return !0
} : function (t) {
return t.nodeName && t.nodeName.toLowerCase() === e
}
},
CLASS: function (t) {
var e = V[t + " "];
return e || (e = RegExp("(^|" + re + ")" + t + "(" + re + "|$)")) && V(t, function (t) {
return e.test("string" == typeof t.className && t.className || typeof t.getAttribute !== Y && t.getAttribute("class") || "")
})
},
ATTR: function (t, e, i) {
return function (r) {
var s = n.attr(r, t);
return null == s ? "!=" === e : e ? (s += "", "=" === e ? s === i : "!=" === e ? s !== i : "^=" === e ? i && 0 === s.indexOf(i) : "*=" === e ? i && s.indexOf(i) > -1 : "$=" === e ? i && s.slice(-i.length) === i : "~=" === e ? (" " + s + " ").indexOf(i) > -1 : "|=" === e ? s === i || s.slice(0, i.length + 1) === i + "-" : !1) : !0
}
},
CHILD: function (t, e, n, i, r) {
var s = "nth" !== t.slice(0, 3),
a = "last" !== t.slice(-4),
o = "of-type" === e;
return 1 === i && 0 === r ? function (t) {
return !!t.parentNode
} : function (e, n, l) {
var c, u, d, h, p, f, m = s !== a ? "nextSibling" : "previousSibling",
g = e.parentNode,
v = o && e.nodeName.toLowerCase(),
y = !l && !o;
if (g) {
if (s) {
for (; m;) {
for (d = e; d = d[m];)
if (o ? d.nodeName.toLowerCase() === v : 1 === d.nodeType) return !1;
f = m = "only" === t && !f && "nextSibling"
}
return !0
}
if (f = [a ? g.firstChild : g.lastChild], a && y) {
for (u = g[q] || (g[q] = {}), c = u[t] || [], p = c[0] === B && c[1], h = c[0] === B && c[2], d = p && g.childNodes[p]; d = ++p && d && d[m] || (h = p = 0) || f.pop();)
if (1 === d.nodeType && ++h && d === e) {
u[t] = [B, p, h];
break
}
} else if (y && (c = (e[q] || (e[q] = {}))[t]) && c[0] === B) h = c[1];
else
for (;
(d = ++p && d && d[m] || (h = p = 0) || f.pop()) && ((o ? d.nodeName.toLowerCase() !== v : 1 !== d.nodeType) || !++h || (y && ((d[q] || (d[q] = {}))[t] = [B, h]), d !== e)););
return h -= r, h === i || 0 === h % i && h / i >= 0
}
}
},
PSEUDO: function (t, e) {
var i, s = S.pseudos[t] || S.setFilters[t.toLowerCase()] || n.error("unsupported pseudo: " + t);
return s[q] ? s(e) : s.length > 1 ? (i = [t, t, "", e], S.setFilters.hasOwnProperty(t.toLowerCase()) ? r(function (t, n) {
for (var i, r = s(t, e), a = r.length; a--;) i = ne.call(t, r[a]), t[i] = !(n[i] = r[a])
}) : function (t) {
return s(t, 0, i)
}) : s
}
},
pseudos: {
not: r(function (t) {
var e = [],
n = [],
i = E(t.replace(ce, "$1"));
return i[q] ? r(function (t, e, n, r) {
for (var s, a = i(t, null, r, []), o = t.length; o--;)(s = a[o]) && (t[o] = !(e[o] = s))
}) : function (t, r, s) {
return e[0] = t, i(e, null, s, n), !n.pop()
}
}),
has: r(function (t) {
return function (e) {
return n(t, e).length > 0
}
}),
contains: r(function (t) {
return function (e) {
return (e.textContent || e.innerText || T(e)).indexOf(t) > -1
}
}),
lang: r(function (t) {
return ge.test(t || "") || n.error("unsupported lang: " + t), t = t.replace(ke, Ce).toLowerCase(),
function (e) {
var n;
do
if (n = M ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return n = n.toLowerCase(), n === t || 0 === n.indexOf(t + "-"); while ((e = e.parentNode) && 1 === e.nodeType);
return !1
}
}),
target: function (e) {
var n = t.location && t.location.hash;
return n && n.slice(1) === e.id
},
root: function (t) {
return t === I
},
focus: function (t) {
return t === N.activeElement && (!N.hasFocus || N.hasFocus()) && !! (t.type || t.href || ~t.tabIndex)
},
enabled: function (t) {
return t.disabled === !1
},
disabled: function (t) {
return t.disabled === !0
},
checked: function (t) {
var e = t.nodeName.toLowerCase();
return "input" === e && !! t.checked || "option" === e && !! t.selected
},
selected: function (t) {
return t.parentNode && t.parentNode.selectedIndex, t.selected === !0
},
empty: function (t) {
for (t = t.firstChild; t; t = t.nextSibling)
if (t.nodeName > "@" || 3 === t.nodeType || 4 === t.nodeType) return !1;
return !0
},
parent: function (t) {
return !S.pseudos.empty(t)
},
header: function (t) {
return _e.test(t.nodeName)
},
input: function (t) {
return be.test(t.nodeName)
},
button: function (t) {
var e = t.nodeName.toLowerCase();
return "input" === e && "button" === t.type || "button" === e
},
text: function (t) {
var e;
return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (e = t.getAttribute("type")) || e.toLowerCase() === t.type)
},
first: u(function () {
return [0]
}),
last: u(function (t, e) {
return [e - 1]
}),
eq: u(function (t, e, n) {
return [0 > n ? n + e : n]
}),
even: u(function (t, e) {
for (var n = 0; e > n; n += 2) t.push(n);
return t
}),
odd: u(function (t, e) {
for (var n = 1; e > n; n += 2) t.push(n);
return t
}),
lt: u(function (t, e, n) {
for (var i = 0 > n ? n + e : n; --i >= 0;) t.push(i);
return t
}),
gt: u(function (t, e, n) {
for (var i = 0 > n ? n + e : n; e > ++i;) t.push(i);
return t
})
}
}, S.pseudos.nth = S.pseudos.eq;
for (x in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) S.pseudos[x] = l(x);
for (x in {
submit: !0,
reset: !0
}) S.pseudos[x] = c(x);
d.prototype = S.filters = S.pseudos, S.setFilters = new d, E = n.compile = function (t, e) {
var n, i = [],
r = [],
s = z[t + " "];
if (!s) {
for (e || (e = h(t)), n = e.length; n--;) s = y(e[n]), s[q] ? i.push(s) : r.push(s);
s = z(t, w(r, i))
}
return s
}, k.sortStable = q.split("").sort(X).join("") === q, k.detectDuplicates = W, O(), k.sortDetached = s(function (t) {
return 1 & t.compareDocumentPosition(N.createElement("div"))
}), s(function (t) {
return t.innerHTML = "<a href='#'></a>", "#" === t.firstChild.getAttribute("href")
}) || a("type|href|height|width", function (t, n, i) {
return i ? e : t.getAttribute(n, "type" === n.toLowerCase() ? 1 : 2)
}), k.attributes && s(function (t) {
return t.innerHTML = "<input/>", t.firstChild.setAttribute("value", ""), "" === t.firstChild.getAttribute("value")
}) || a("value", function (t, n, i) {
return i || "input" !== t.nodeName.toLowerCase() ? e : t.defaultValue
}), s(function (t) {
return null == t.getAttribute("disabled")
}) || a(ie, function (t, n, i) {
var r;
return i ? e : (r = t.getAttributeNode(n)) && r.specified ? r.value : t[n] === !0 ? n.toLowerCase() : null
}), ue.find = n, ue.expr = n.selectors, ue.expr[":"] = ue.expr.pseudos, ue.unique = n.uniqueSort, ue.text = n.getText, ue.isXMLDoc = n.isXML, ue.contains = n.contains
}(t);
var Se = {};
ue.Callbacks = function (t) {
t = "string" == typeof t ? Se[t] || i(t) : ue.extend({}, t);
var n, r, s, a, o, l, c = [],
u = !t.once && [],
d = function (e) {
for (r = t.memory && e, s = !0, o = l || 0, l = 0, a = c.length, n = !0; c && a > o; o++)
if (c[o].apply(e[0], e[1]) === !1 && t.stopOnFalse) {
r = !1;
break
}
n = !1, c && (u ? u.length && d(u.shift()) : r ? c = [] : h.disable())
}, h = {
add: function () {
if (c) {
var e = c.length;
! function i(e) {
ue.each(e, function (e, n) {
var r = ue.type(n);
"function" === r ? t.unique && h.has(n) || c.push(n) : n && n.length && "string" !== r && i(n)
})
}(arguments), n ? a = c.length : r && (l = e, d(r))
}
return this
},
remove: function () {
return c && ue.each(arguments, function (t, e) {
for (var i;
(i = ue.inArray(e, c, i)) > -1;) c.splice(i, 1), n && (a >= i && a--, o >= i && o--)
}), this
},
has: function (t) {
return t ? ue.inArray(t, c) > -1 : !(!c || !c.length)
},
empty: function () {
return c = [], a = 0, this
},
disable: function () {
return c = u = r = e, this
},
disabled: function () {
return !c
},
lock: function () {
return u = e, r || h.disable(), this
},
locked: function () {
return !u
},
fireWith: function (t, e) {
return !c || s && !u || (e = e || [], e = [t, e.slice ? e.slice() : e], n ? u.push(e) : d(e)), this
},
fire: function () {
return h.fireWith(this, arguments), this
},
fired: function () {
return !!s
}
};
return h
}, ue.extend({
Deferred: function (t) {
var e = [
["resolve", "done", ue.Callbacks("once memory"), "resolved"],
["reject", "fail", ue.Callbacks("once memory"), "rejected"],
["notify", "progress", ue.Callbacks("memory")]
],
n = "pending",
i = {
state: function () {
return n
},
always: function () {
return r.done(arguments).fail(arguments), this
},
then: function () {
var t = arguments;
return ue.Deferred(function (n) {
ue.each(e, function (e, s) {
var a = s[0],
o = ue.isFunction(t[e]) && t[e];
r[s[1]](function () {
var t = o && o.apply(this, arguments);
t && ue.isFunction(t.promise) ? t.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === i ? n.promise() : this, o ? [t] : arguments)
})
}), t = null
}).promise()
},
promise: function (t) {
return null != t ? ue.extend(t, i) : i
}
}, r = {};
return i.pipe = i.then, ue.each(e, function (t, s) {
var a = s[2],
o = s[3];
i[s[1]] = a.add, o && a.add(function () {
n = o
}, e[1 ^ t][2].disable, e[2][2].lock), r[s[0]] = function () {
return r[s[0] + "With"](this === r ? i : this, arguments), this
}, r[s[0] + "With"] = a.fireWith
}), i.promise(r), t && t.call(r, r), r
},
when: function (t) {
var e, n, i, r = 0,
s = se.call(arguments),
a = s.length,
o = 1 !== a || t && ue.isFunction(t.promise) ? a : 0,
l = 1 === o ? t : ue.Deferred(),
c = function (t, n, i) {
return function (r) {
n[t] = this, i[t] = arguments.length > 1 ? se.call(arguments) : r, i === e ? l.notifyWith(n, i) : --o || l.resolveWith(n, i)
}
};
if (a > 1)
for (e = Array(a), n = Array(a), i = Array(a); a > r; r++) s[r] && ue.isFunction(s[r].promise) ? s[r].promise().done(c(r, i, s)).fail(l.reject).progress(c(r, n, e)) : --o;
return o || l.resolveWith(i, s), l.promise()
}
}), ue.support = function (e) {
var n, i, r, s, a, o, l, c, u, d = G.createElement("div");
if (d.setAttribute("className", "t"), d.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", n = d.getElementsByTagName("*") || [], i = d.getElementsByTagName("a")[0], !i || !i.style || !n.length) return e;
s = G.createElement("select"), o = s.appendChild(G.createElement("option")), r = d.getElementsByTagName("input")[0], i.style.cssText = "top:1px;float:left;opacity:.5", e.getSetAttribute = "t" !== d.className, e.leadingWhitespace = 3 === d.firstChild.nodeType, e.tbody = !d.getElementsByTagName("tbody").length, e.htmlSerialize = !! d.getElementsByTagName("link").length, e.style = /top/.test(i.getAttribute("style")), e.hrefNormalized = "/a" === i.getAttribute("href"), e.opacity = /^0.5/.test(i.style.opacity), e.cssFloat = !! i.style.cssFloat, e.checkOn = !! r.value, e.optSelected = o.selected, e.enctype = !! G.createElement("form").enctype, e.html5Clone = "<:nav></:nav>" !== G.createElement("nav").cloneNode(!0).outerHTML, e.inlineBlockNeedsLayout = !1, e.shrinkWrapBlocks = !1, e.pixelPosition = !1, e.deleteExpando = !0, e.noCloneEvent = !0, e.reliableMarginRight = !0, e.boxSizingReliable = !0, r.checked = !0, e.noCloneChecked = r.cloneNode(!0).checked, s.disabled = !0, e.optDisabled = !o.disabled;
try {
delete d.test
} catch (h) {
e.deleteExpando = !1
}
r = G.createElement("input"), r.setAttribute("value", ""), e.input = "" === r.getAttribute("value"), r.value = "t", r.setAttribute("type", "radio"), e.radioValue = "t" === r.value, r.setAttribute("checked", "t"), r.setAttribute("name", "t"), a = G.createDocumentFragment(), a.appendChild(r), e.appendChecked = r.checked, e.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked, d.attachEvent && (d.attachEvent("onclick", function () {
e.noCloneEvent = !1
}), d.cloneNode(!0).click());
for (u in {
submit: !0,
change: !0,
focusin: !0
}) d.setAttribute(l = "on" + u, "t"), e[u + "Bubbles"] = l in t || d.attributes[l].expando === !1;
d.style.backgroundClip = "content-box", d.cloneNode(!0).style.backgroundClip = "", e.clearCloneStyle = "content-box" === d.style.backgroundClip;
for (u in ue(e)) break;
return e.ownLast = "0" !== u, ue(function () {
var n, i, r, s = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
a = G.getElementsByTagName("body")[0];
a && (n = G.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", a.appendChild(n).appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", r = d.getElementsByTagName("td"), r[0].style.cssText = "padding:0;margin:0;border:0;display:none", c = 0 === r[0].offsetHeight, r[0].style.display = "", r[1].style.display = "none", e.reliableHiddenOffsets = c && 0 === r[0].offsetHeight, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", ue.swap(a, null != a.style.zoom ? {
zoom: 1
} : {}, function () {
e.boxSizing = 4 === d.offsetWidth
}), t.getComputedStyle && (e.pixelPosition = "1%" !== (t.getComputedStyle(d, null) || {}).top, e.boxSizingReliable = "4px" === (t.getComputedStyle(d, null) || {
width: "4px"
}).width, i = d.appendChild(G.createElement("div")), i.style.cssText = d.style.cssText = s, i.style.marginRight = i.style.width = "0", d.style.width = "1px", e.reliableMarginRight = !parseFloat((t.getComputedStyle(i, null) || {}).marginRight)), typeof d.style.zoom !== Y && (d.innerHTML = "", d.style.cssText = s + "width:1px;padding:1px;display:inline;zoom:1", e.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", e.shrinkWrapBlocks = 3 !== d.offsetWidth, e.inlineBlockNeedsLayout && (a.style.zoom = 1)), a.removeChild(n), n = d = r = i = null)
}), n = s = a = o = i = r = null, e
}({});
var Te = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
$e = /([A-Z])/g;
ue.extend({
cache: {},
noData: {
applet: !0,
embed: !0,
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
},
hasData: function (t) {
return t = t.nodeType ? ue.cache[t[ue.expando]] : t[ue.expando], !! t && !o(t)
},
data: function (t, e, n) {
return r(t, e, n)
},
removeData: function (t, e) {
return s(t, e)
},
_data: function (t, e, n) {
return r(t, e, n, !0)
},
_removeData: function (t, e) {
return s(t, e, !0)
},
acceptData: function (t) {
if (t.nodeType && 1 !== t.nodeType && 9 !== t.nodeType) return !1;
var e = t.nodeName && ue.noData[t.nodeName.toLowerCase()];
return !e || e !== !0 && t.getAttribute("classid") === e
}
}), ue.fn.extend({
data: function (t, n) {
var i, r, s = null,
o = 0,
l = this[0];
if (t === e) {
if (this.length && (s = ue.data(l), 1 === l.nodeType && !ue._data(l, "parsedAttrs"))) {
for (i = l.attributes; i.length > o; o++) r = i[o].name, 0 === r.indexOf("data-") && (r = ue.camelCase(r.slice(5)), a(l, r, s[r]));
ue._data(l, "parsedAttrs", !0)
}
return s
}
return "object" == typeof t ? this.each(function () {
ue.data(this, t)
}) : arguments.length > 1 ? this.each(function () {
ue.data(this, t, n)
}) : l ? a(l, t, ue.data(l, t)) : null
},
removeData: function (t) {
return this.each(function () {
ue.removeData(this, t)
})
}
}), ue.extend({
queue: function (t, n, i) {
var r;
return t ? (n = (n || "fx") + "queue", r = ue._data(t, n), i && (!r || ue.isArray(i) ? r = ue._data(t, n, ue.makeArray(i)) : r.push(i)), r || []) : e
},
dequeue: function (t, e) {
e = e || "fx";
var n = ue.queue(t, e),
i = n.length,
r = n.shift(),
s = ue._queueHooks(t, e),
a = function () {
ue.dequeue(t, e)
};
"inprogress" === r && (r = n.shift(), i--), r && ("fx" === e && n.unshift("inprogress"), delete s.stop, r.call(t, a, s)), !i && s && s.empty.fire()
},
_queueHooks: function (t, e) {
var n = e + "queueHooks";
return ue._data(t, n) || ue._data(t, n, {
empty: ue.Callbacks("once memory").add(function () {
ue._removeData(t, e + "queue"), ue._removeData(t, n)
})
})
}
}), ue.fn.extend({
queue: function (t, n) {
var i = 2;
return "string" != typeof t && (n = t, t = "fx", i--), i > arguments.length ? ue.queue(this[0], t) : n === e ? this : this.each(function () {
var e = ue.queue(this, t, n);
ue._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && ue.dequeue(this, t)
})
},
dequeue: function (t) {
return this.each(function () {
ue.dequeue(this, t)
})
},
delay: function (t, e) {
return t = ue.fx ? ue.fx.speeds[t] || t : t, e = e || "fx", this.queue(e, function (e, n) {
var i = setTimeout(e, t);
n.stop = function () {
clearTimeout(i)
}
})
},
clearQueue: function (t) {
return this.queue(t || "fx", [])
},
promise: function (t, n) {
var i, r = 1,
s = ue.Deferred(),
a = this,
o = this.length,
l = function () {
--r || s.resolveWith(a, [a])
};
for ("string" != typeof t && (n = t, t = e), t = t || "fx"; o--;) i = ue._data(a[o], t + "queueHooks"), i && i.empty && (r++, i.empty.add(l));
return l(), s.promise(n)
}
});
var Ee, Ae, je = /[\t\r\n\f]/g,
Oe = /\r/g,
Ne = /^(?:input|select|textarea|button|object)$/i,
Ie = /^(?:a|area)$/i,
Me = /^(?:checked|selected)$/i,
Le = ue.support.getSetAttribute,
Pe = ue.support.input;
ue.fn.extend({
attr: function (t, e) {
return ue.access(this, ue.attr, t, e, arguments.length > 1)
},
removeAttr: function (t) {
return this.each(function () {
ue.removeAttr(this, t)
})
},
prop: function (t, e) {
return ue.access(this, ue.prop, t, e, arguments.length > 1)
},
removeProp: function (t) {
return t = ue.propFix[t] || t, this.each(function () {
try {
this[t] = e, delete this[t]
} catch (n) {}
})
},
addClass: function (t) {
var e, n, i, r, s, a = 0,
o = this.length,
l = "string" == typeof t && t;
if (ue.isFunction(t)) return this.each(function (e) {
ue(this).addClass(t.call(this, e, this.className))
});
if (l)
for (e = (t || "").match(he) || []; o > a; a++)
if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(je, " ") : " ")) {
for (s = 0; r = e[s++];) 0 > i.indexOf(" " + r + " ") && (i += r + " ");
n.className = ue.trim(i)
}
return this
},
removeClass: function (t) {
var e, n, i, r, s, a = 0,
o = this.length,
l = 0 === arguments.length || "string" == typeof t && t;
if (ue.isFunction(t)) return this.each(function (e) {
ue(this).removeClass(t.call(this, e, this.className))
});
if (l)
for (e = (t || "").match(he) || []; o > a; a++)
if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(je, " ") : "")) {
for (s = 0; r = e[s++];)
for (; i.indexOf(" " + r + " ") >= 0;) i = i.replace(" " + r + " ", " ");
n.className = t ? ue.trim(i) : ""
}
return this
},
toggleClass: function (t, e) {
var n = typeof t;
return "boolean" == typeof e && "string" === n ? e ? this.addClass(t) : this.removeClass(t) : ue.isFunction(t) ? this.each(function (n) {
ue(this).toggleClass(t.call(this, n, this.className, e), e)
}) : this.each(function () {
if ("string" === n)
for (var e, i = 0, r = ue(this), s = t.match(he) || []; e = s[i++];) r.hasClass(e) ? r.removeClass(e) : r.addClass(e);
else(n === Y || "boolean" === n) && (this.className && ue._data(this, "__className__", this.className), this.className = this.className || t === !1 ? "" : ue._data(this, "__className__") || "")
})
},
hasClass: function (t) {
for (var e = " " + t + " ", n = 0, i = this.length; i > n; n++)
if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(je, " ").indexOf(e) >= 0) return !0;
return !1
},
val: function (t) {
var n, i, r, s = this[0];
return arguments.length ? (r = ue.isFunction(t), this.each(function (n) {
var s;
1 === this.nodeType && (s = r ? t.call(this, n, ue(this).val()) : t, null == s ? s = "" : "number" == typeof s ? s += "" : ue.isArray(s) && (s = ue.map(s, function (t) {
return null == t ? "" : t + ""
})), i = ue.valHooks[this.type] || ue.valHooks[this.nodeName.toLowerCase()], i && "set" in i && i.set(this, s, "value") !== e || (this.value = s))
})) : s ? (i = ue.valHooks[s.type] || ue.valHooks[s.nodeName.toLowerCase()], i && "get" in i && (n = i.get(s, "value")) !== e ? n : (n = s.value, "string" == typeof n ? n.replace(Oe, "") : null == n ? "" : n)) : void 0
}
}), ue.extend({
valHooks: {
option: {
get: function (t) {
var e = ue.find.attr(t, "value");
return null != e ? e : t.text
}
},
select: {
get: function (t) {
for (var e, n, i = t.options, r = t.selectedIndex, s = "select-one" === t.type || 0 > r, a = s ? null : [], o = s ? r + 1 : i.length, l = 0 > r ? o : s ? r : 0; o > l; l++)
if (n = i[l], !(!n.selected && l !== r || (ue.support.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && ue.nodeName(n.parentNode, "optgroup"))) {
if (e = ue(n).val(), s) return e;
a.push(e)
}
return a
},
set: function (t, e) {
for (var n, i, r = t.options, s = ue.makeArray(e), a = r.length; a--;) i = r[a], (i.selected = ue.inArray(ue(i).val(), s) >= 0) && (n = !0);
return n || (t.selectedIndex = -1), s
}
}
},
attr: function (t, n, i) {
var r, s, a = t.nodeType;
return t && 3 !== a && 8 !== a && 2 !== a ? typeof t.getAttribute === Y ? ue.prop(t, n, i) : (1 === a && ue.isXMLDoc(t) || (n = n.toLowerCase(), r = ue.attrHooks[n] || (ue.expr.match.bool.test(n) ? Ae : Ee)), i === e ? r && "get" in r && null !== (s = r.get(t, n)) ? s : (s = ue.find.attr(t, n), null == s ? e : s) : null !== i ? r && "set" in r && (s = r.set(t, i, n)) !== e ? s : (t.setAttribute(n, i + ""), i) : (ue.removeAttr(t, n), e)) : void 0
},
removeAttr: function (t, e) {
var n, i, r = 0,
s = e && e.match(he);
if (s && 1 === t.nodeType)
for (; n = s[r++];) i = ue.propFix[n] || n, ue.expr.match.bool.test(n) ? Pe && Le || !Me.test(n) ? t[i] = !1 : t[ue.camelCase("default-" + n)] = t[i] = !1 : ue.attr(t, n, ""), t.removeAttribute(Le ? n : i)
},
attrHooks: {
type: {
set: function (t, e) {
if (!ue.support.radioValue && "radio" === e && ue.nodeName(t, "input")) {
var n = t.value;
return t.setAttribute("type", e), n && (t.value = n), e
}
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function (t, n, i) {
var r, s, a, o = t.nodeType;
return t && 3 !== o && 8 !== o && 2 !== o ? (a = 1 !== o || !ue.isXMLDoc(t), a && (n = ue.propFix[n] || n, s = ue.propHooks[n]), i !== e ? s && "set" in s && (r = s.set(t, i, n)) !== e ? r : t[n] = i : s && "get" in s && null !== (r = s.get(t, n)) ? r : t[n]) : void 0
},
propHooks: {
tabIndex: {
get: function (t) {
var e = ue.find.attr(t, "tabindex");
return e ? parseInt(e, 10) : Ne.test(t.nodeName) || Ie.test(t.nodeName) && t.href ? 0 : -1
}
}
}
}), Ae = {
set: function (t, e, n) {
return e === !1 ? ue.removeAttr(t, n) : Pe && Le || !Me.test(n) ? t.setAttribute(!Le && ue.propFix[n] || n, n) : t[ue.camelCase("default-" + n)] = t[n] = !0, n
}
}, ue.each(ue.expr.match.bool.source.match(/\w+/g), function (t, n) {
var i = ue.expr.attrHandle[n] || ue.find.attr;
ue.expr.attrHandle[n] = Pe && Le || !Me.test(n) ? function (t, n, r) {
var s = ue.expr.attrHandle[n],
a = r ? e : (ue.expr.attrHandle[n] = e) != i(t, n, r) ? n.toLowerCase() : null;
return ue.expr.attrHandle[n] = s, a
} : function (t, n, i) {
return i ? e : t[ue.camelCase("default-" + n)] ? n.toLowerCase() : null
}
}), Pe && Le || (ue.attrHooks.value = {
set: function (t, n, i) {
return ue.nodeName(t, "input") ? (t.defaultValue = n, e) : Ee && Ee.set(t, n, i)
}
}), Le || (Ee = {
set: function (t, n, i) {
var r = t.getAttributeNode(i);
return r || t.setAttributeNode(r = t.ownerDocument.createAttribute(i)), r.value = n += "", "value" === i || n === t.getAttribute(i) ? n : e
}
}, ue.expr.attrHandle.id = ue.expr.attrHandle.name = ue.expr.attrHandle.coords = function (t, n, i) {
var r;
return i ? e : (r = t.getAttributeNode(n)) && "" !== r.value ? r.value : null
}, ue.valHooks.button = {
get: function (t, n) {
var i = t.getAttributeNode(n);
return i && i.specified ? i.value : e
},
set: Ee.set
}, ue.attrHooks.contenteditable = {
set: function (t, e, n) {
Ee.set(t, "" === e ? !1 : e, n)
}
}, ue.each(["width", "height"], function (t, n) {
ue.attrHooks[n] = {
set: function (t, i) {
return "" === i ? (t.setAttribute(n, "auto"), i) : e
}
}
})), ue.support.hrefNormalized || ue.each(["href", "src"], function (t, e) {
ue.propHooks[e] = {
get: function (t) {
return t.getAttribute(e, 4)
}
}
}), ue.support.style || (ue.attrHooks.style = {
get: function (t) {
return t.style.cssText || e
},
set: function (t, e) {
return t.style.cssText = e + ""
}
}), ue.support.optSelected || (ue.propHooks.selected = {
get: function (t) {
var e = t.parentNode;
return e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex), null
}
}), ue.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
ue.propFix[this.toLowerCase()] = this
}), ue.support.enctype || (ue.propFix.enctype = "encoding"), ue.each(["radio", "checkbox"], function () {
ue.valHooks[this] = {
set: function (t, n) {
return ue.isArray(n) ? t.checked = ue.inArray(ue(t).val(), n) >= 0 : e
}
}, ue.support.checkOn || (ue.valHooks[this].get = function (t) {
return null === t.getAttribute("value") ? "on" : t.value
})
});
var De = /^(?:input|select|textarea)$/i,
He = /^key/,
qe = /^(?:mouse|contextmenu)|click/,
Ue = /^(?:focusinfocus|focusoutblur)$/,
Be = /^([^.]*)(?:\.(.+)|)$/;
ue.event = {
global: {},
add: function (t, n, i, r, s) {
var a, o, l, c, u, d, h, p, f, m, g, v = ue._data(t);
if (v) {
for (i.handler && (c = i, i = c.handler, s = c.selector), i.guid || (i.guid = ue.guid++), (o = v.events) || (o = v.events = {}), (d = v.handle) || (d = v.handle = function (t) {
return typeof ue === Y || t && ue.event.triggered === t.type ? e : ue.event.dispatch.apply(d.elem, arguments)
}, d.elem = t), n = (n || "").match(he) || [""], l = n.length; l--;) a = Be.exec(n[l]) || [], f = g = a[1], m = (a[2] || "").split(".").sort(), f && (u = ue.event.special[f] || {}, f = (s ? u.delegateType : u.bindType) || f, u = ue.event.special[f] || {}, h = ue.extend({
type: f,
origType: g,
data: r,
handler: i,
guid: i.guid,
selector: s,
needsContext: s && ue.expr.match.needsContext.test(s),
namespace: m.join(".")
}, c), (p = o[f]) || (p = o[f] = [], p.delegateCount = 0, u.setup && u.setup.call(t, r, m, d) !== !1 || (t.addEventListener ? t.addEventListener(f, d, !1) : t.attachEvent && t.attachEvent("on" + f, d))), u.add && (u.add.call(t, h), h.handler.guid || (h.handler.guid = i.guid)), s ? p.splice(p.delegateCount++, 0, h) : p.push(h), ue.event.global[f] = !0);
t = null
}
},
remove: function (t, e, n, i, r) {
var s, a, o, l, c, u, d, h, p, f, m, g = ue.hasData(t) && ue._data(t);
if (g && (u = g.events)) {
for (e = (e || "").match(he) || [""], c = e.length; c--;)
if (o = Be.exec(e[c]) || [], p = m = o[1], f = (o[2] || "").split(".").sort(), p) {
for (d = ue.event.special[p] || {}, p = (i ? d.delegateType : d.bindType) || p, h = u[p] || [], o = o[2] && RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), l = s = h.length; s--;) a = h[s], !r && m !== a.origType || n && n.guid !== a.guid || o && !o.test(a.namespace) || i && i !== a.selector && ("**" !== i || !a.selector) || (h.splice(s, 1), a.selector && h.delegateCount--, d.remove && d.remove.call(t, a));
l && !h.length && (d.teardown && d.teardown.call(t, f, g.handle) !== !1 || ue.removeEvent(t, p, g.handle), delete u[p])
} else
for (p in u) ue.event.remove(t, p + e[c], n, i, !0);
ue.isEmptyObject(u) && (delete g.handle, ue._removeData(t, "events"))
}
},
trigger: function (n, i, r, s) {
var a, o, l, c, u, d, h, p = [r || G],
f = le.call(n, "type") ? n.type : n,
m = le.call(n, "namespace") ? n.namespace.split(".") : [];
if (l = d = r = r || G, 3 !== r.nodeType && 8 !== r.nodeType && !Ue.test(f + ue.event.triggered) && (f.indexOf(".") >= 0 && (m = f.split("."), f = m.shift(), m.sort()), o = 0 > f.indexOf(":") && "on" + f, n = n[ue.expando] ? n : new ue.Event(f, "object" == typeof n && n), n.isTrigger = s ? 2 : 3, n.namespace = m.join("."), n.namespace_re = n.namespace ? RegExp("(^|\\.)" + m.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, n.result = e, n.target || (n.target = r), i = null == i ? [n] : ue.makeArray(i, [n]), u = ue.event.special[f] || {}, s || !u.trigger || u.trigger.apply(r, i) !== !1)) {
if (!s && !u.noBubble && !ue.isWindow(r)) {
for (c = u.delegateType || f, Ue.test(c + f) || (l = l.parentNode); l; l = l.parentNode) p.push(l), d = l;
d === (r.ownerDocument || G) && p.push(d.defaultView || d.parentWindow || t)
}
for (h = 0;
(l = p[h++]) && !n.isPropagationStopped();) n.type = h > 1 ? c : u.bindType || f, a = (ue._data(l, "events") || {})[n.type] && ue._data(l, "handle"), a && a.apply(l, i), a = o && l[o], a && ue.acceptData(l) && a.apply && a.apply(l, i) === !1 && n.preventDefault();
if (n.type = f, !s && !n.isDefaultPrevented() && (!u._default || u._default.apply(p.pop(), i) === !1) && ue.acceptData(r) && o && r[f] && !ue.isWindow(r)) {
d = r[o], d && (r[o] = null), ue.event.triggered = f;
try {
r[f]()
} catch (g) {}
ue.event.triggered = e, d && (r[o] = d)
}
return n.result
}
},
dispatch: function (t) {
t = ue.event.fix(t);
var n, i, r, s, a, o = [],
l = se.call(arguments),
c = (ue._data(this, "events") || {})[t.type] || [],
u = ue.event.special[t.type] || {};
if (l[0] = t, t.delegateTarget = this, !u.preDispatch || u.preDispatch.call(this, t) !== !1) {
for (o = ue.event.handlers.call(this, t, c), n = 0;
(s = o[n++]) && !t.isPropagationStopped();)
for (t.currentTarget = s.elem, a = 0;
(r = s.handlers[a++]) && !t.isImmediatePropagationStopped();)(!t.namespace_re || t.namespace_re.test(r.namespace)) && (t.handleObj = r, t.data = r.data, i = ((ue.event.special[r.origType] || {}).handle || r.handler).apply(s.elem, l), i !== e && (t.result = i) === !1 && (t.preventDefault(), t.stopPropagation()));
return u.postDispatch && u.postDispatch.call(this, t), t.result
}
},
handlers: function (t, n) {
var i, r, s, a, o = [],
l = n.delegateCount,
c = t.target;
if (l && c.nodeType && (!t.button || "click" !== t.type))
for (; c != this; c = c.parentNode || this)
if (1 === c.nodeType && (c.disabled !== !0 || "click" !== t.type)) {
for (s = [], a = 0; l > a; a++) r = n[a], i = r.selector + " ", s[i] === e && (s[i] = r.needsContext ? ue(i, this).index(c) >= 0 : ue.find(i, this, null, [c]).length), s[i] && s.push(r);
s.length && o.push({
elem: c,
handlers: s
})
}
return n.length > l && o.push({
elem: this,
handlers: n.slice(l)
}), o
},
fix: function (t) {
if (t[ue.expando]) return t;
var e, n, i, r = t.type,
s = t,
a = this.fixHooks[r];
for (a || (this.fixHooks[r] = a = qe.test(r) ? this.mouseHooks : He.test(r) ? this.keyHooks : {}), i = a.props ? this.props.concat(a.props) : this.props, t = new ue.Event(s), e = i.length; e--;) n = i[e], t[n] = s[n];
return t.target || (t.target = s.srcElement || G), 3 === t.target.nodeType && (t.target = t.target.parentNode), t.metaKey = !! t.metaKey, a.filter ? a.filter(t, s) : t
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function (t, e) {
return null == t.which && (t.which = null != e.charCode ? e.charCode : e.keyCode), t
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function (t, n) {
var i, r, s, a = n.button,
o = n.fromElement;
return null == t.pageX && null != n.clientX && (r = t.target.ownerDocument || G, s = r.documentElement, i = r.body, t.pageX = n.clientX + (s && s.scrollLeft || i && i.scrollLeft || 0) - (s && s.clientLeft || i && i.clientLeft || 0), t.pageY = n.clientY + (s && s.scrollTop || i && i.scrollTop || 0) - (s && s.clientTop || i && i.clientTop || 0)), !t.relatedTarget && o && (t.relatedTarget = o === t.target ? n.toElement : o), t.which || a === e || (t.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), t
}
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function () {
if (this !== u() && this.focus) try {
return this.focus(), !1
} catch (t) {}
},
delegateType: "focusin"
},
blur: {
trigger: function () {
return this === u() && this.blur ? (this.blur(), !1) : e
},
delegateType: "focusout"
},
click: {
trigger: function () {
return ue.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : e
},
_default: function (t) {
return ue.nodeName(t.target, "a")
}
},
beforeunload: {
postDispatch: function (t) {
t.result !== e && (t.originalEvent.returnValue = t.result)
}
}
},
simulate: function (t, e, n, i) {
var r = ue.extend(new ue.Event, n, {
type: t,
isSimulated: !0,
originalEvent: {}
});
i ? ue.event.trigger(r, null, e) : ue.event.dispatch.call(e, r), r.isDefaultPrevented() && n.preventDefault()
}
}, ue.removeEvent = G.removeEventListener ? function (t, e, n) {
t.removeEventListener && t.removeEventListener(e, n, !1)
} : function (t, e, n) {
var i = "on" + e;
t.detachEvent && (typeof t[i] === Y && (t[i] = null), t.detachEvent(i, n))
}, ue.Event = function (t, n) {
return this instanceof ue.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type, this.isDefaultPrevented = t.defaultPrevented || t.returnValue === !1 || t.getPreventDefault && t.getPreventDefault() ? l : c) : this.type = t, n && ue.extend(this, n), this.timeStamp = t && t.timeStamp || ue.now(), this[ue.expando] = !0, e) : new ue.Event(t, n)
}, ue.Event.prototype = {
isDefaultPrevented: c,
isPropagationStopped: c,
isImmediatePropagationStopped: c,
preventDefault: function () {
var t = this.originalEvent;
this.isDefaultPrevented = l, t && (t.preventDefault ? t.preventDefault() : t.returnValue = !1)
},
stopPropagation: function () {
var t = this.originalEvent;
this.isPropagationStopped = l, t && (t.stopPropagation && t.stopPropagation(), t.cancelBubble = !0)
},
stopImmediatePropagation: function () {
this.isImmediatePropagationStopped = l, this.stopPropagation()
}
}, ue.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function (t, e) {
ue.event.special[t] = {
delegateType: e,
bindType: e,
handle: function (t) {
var n, i = this,
r = t.relatedTarget,
s = t.handleObj;
return (!r || r !== i && !ue.contains(i, r)) && (t.type = s.origType, n = s.handler.apply(this, arguments), t.type = e), n
}
}
}), ue.support.submitBubbles || (ue.event.special.submit = {
setup: function () {
return ue.nodeName(this, "form") ? !1 : (ue.event.add(this, "click._submit keypress._submit", function (t) {
var n = t.target,
i = ue.nodeName(n, "input") || ue.nodeName(n, "button") ? n.form : e;
i && !ue._data(i, "submitBubbles") && (ue.event.add(i, "submit._submit", function (t) {
t._submit_bubble = !0
}), ue._data(i, "submitBubbles", !0))
}), e)
},
postDispatch: function (t) {
t._submit_bubble && (delete t._submit_bubble, this.parentNode && !t.isTrigger && ue.event.simulate("submit", this.parentNode, t, !0))
},
teardown: function () {
return ue.nodeName(this, "form") ? !1 : (ue.event.remove(this, "._submit"), e)
}
}), ue.support.changeBubbles || (ue.event.special.change = {
setup: function () {
return De.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (ue.event.add(this, "propertychange._change", function (t) {
"checked" === t.originalEvent.propertyName && (this._just_changed = !0)
}), ue.event.add(this, "click._change", function (t) {
this._just_changed && !t.isTrigger && (this._just_changed = !1), ue.event.simulate("change", this, t, !0)
})), !1) : (ue.event.add(this, "beforeactivate._change", function (t) {
var e = t.target;
De.test(e.nodeName) && !ue._data(e, "changeBubbles") && (ue.event.add(e, "change._change", function (t) {
!this.parentNode || t.isSimulated || t.isTrigger || ue.event.simulate("change", this.parentNode, t, !0)
}), ue._data(e, "changeBubbles", !0))
}), e)
},
handle: function (t) {
var n = t.target;
return this !== n || t.isSimulated || t.isTrigger || "radio" !== n.type && "checkbox" !== n.type ? t.handleObj.handler.apply(this, arguments) : e
},
teardown: function () {
return ue.event.remove(this, "._change"), !De.test(this.nodeName)
}
}), ue.support.focusinBubbles || ue.each({
focus: "focusin",
blur: "focusout"
}, function (t, e) {
var n = 0,
i = function (t) {
ue.event.simulate(e, t.target, ue.event.fix(t), !0)
};
ue.event.special[e] = {
setup: function () {
0 === n++ && G.addEventListener(t, i, !0)
},
teardown: function () {
0 === --n && G.removeEventListener(t, i, !0)
}
}
}), ue.fn.extend({
on: function (t, n, i, r, s) {
var a, o;
if ("object" == typeof t) {
"string" != typeof n && (i = i || n, n = e);
for (a in t) this.on(a, n, i, t[a], s);
return this
}
if (null == i && null == r ? (r = n, i = n = e) : null == r && ("string" == typeof n ? (r = i, i = e) : (r = i, i = n, n = e)), r === !1) r = c;
else if (!r) return this;
return 1 === s && (o = r, r = function (t) {
return ue().off(t), o.apply(this, arguments)
}, r.guid = o.guid || (o.guid = ue.guid++)), this.each(function () {
ue.event.add(this, t, r, i, n)
})
},
one: function (t, e, n, i) {
return this.on(t, e, n, i, 1)
},
off: function (t, n, i) {
var r, s;
if (t && t.preventDefault && t.handleObj) return r = t.handleObj, ue(t.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this;
if ("object" == typeof t) {
for (s in t) this.off(s, n, t[s]);
return this
}
return (n === !1 || "function" == typeof n) && (i = n, n = e), i === !1 && (i = c), this.each(function () {
ue.event.remove(this, t, i, n)
})
},
trigger: function (t, e) {
return this.each(function () {
ue.event.trigger(t, e, this)
})
},
triggerHandler: function (t, n) {
var i = this[0];
return i ? ue.event.trigger(t, n, i, !0) : e
}
});
var Fe = /^.[^:#\[\.,]*$/,
Ve = /^(?:parents|prev(?:Until|All))/,
Re = ue.expr.match.needsContext,
ze = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
ue.fn.extend({
find: function (t) {
var e, n = [],
i = this,
r = i.length;
if ("string" != typeof t) return this.pushStack(ue(t).filter(function () {
for (e = 0; r > e; e++)
if (ue.contains(i[e], this)) return !0
}));
for (e = 0; r > e; e++) ue.find(t, i[e], n);
return n = this.pushStack(r > 1 ? ue.unique(n) : n), n.selector = this.selector ? this.selector + " " + t : t, n
},
has: function (t) {
var e, n = ue(t, this),
i = n.length;
return this.filter(function () {
for (e = 0; i > e; e++)
if (ue.contains(this, n[e])) return !0
})
},
not: function (t) {
return this.pushStack(h(this, t || [], !0))
},
filter: function (t) {
return this.pushStack(h(this, t || [], !1))
},
is: function (t) {
return !!h(this, "string" == typeof t && Re.test(t) ? ue(t) : t || [], !1).length
},
closest: function (t, e) {
for (var n, i = 0, r = this.length, s = [], a = Re.test(t) || "string" != typeof t ? ue(t, e || this.context) : 0; r > i; i++)
for (n = this[i]; n && n !== e; n = n.parentNode)
if (11 > n.nodeType && (a ? a.index(n) > -1 : 1 === n.nodeType && ue.find.matchesSelector(n, t))) {
n = s.push(n);
break
}
return this.pushStack(s.length > 1 ? ue.unique(s) : s)
},
index: function (t) {
return t ? "string" == typeof t ? ue.inArray(this[0], ue(t)) : ue.inArray(t.jquery ? t[0] : t, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
},
add: function (t, e) {
var n = "string" == typeof t ? ue(t, e) : ue.makeArray(t && t.nodeType ? [t] : t),
i = ue.merge(this.get(), n);
return this.pushStack(ue.unique(i))
},
addBack: function (t) {
return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
}
}), ue.each({
parent: function (t) {
var e = t.parentNode;
return e && 11 !== e.nodeType ? e : null
},
parents: function (t) {
return ue.dir(t, "parentNode")
},
parentsUntil: function (t, e, n) {
return ue.dir(t, "parentNode", n)
},
next: function (t) {
return d(t, "nextSibling")
},
prev: function (t) {
return d(t, "previousSibling")
},
nextAll: function (t) {
return ue.dir(t, "nextSibling")
},
prevAll: function (t) {
return ue.dir(t, "previousSibling")
},
nextUntil: function (t, e, n) {
return ue.dir(t, "nextSibling", n)
},
prevUntil: function (t, e, n) {
return ue.dir(t, "previousSibling", n)
},
siblings: function (t) {
return ue.sibling((t.parentNode || {}).firstChild, t)
},
children: function (t) {
return ue.sibling(t.firstChild)
},
contents: function (t) {
return ue.nodeName(t, "iframe") ? t.contentDocument || t.contentWindow.document : ue.merge([], t.childNodes)
}
}, function (t, e) {
ue.fn[t] = function (n, i) {
var r = ue.map(this, e, n);
return "Until" !== t.slice(-5) && (i = n), i && "string" == typeof i && (r = ue.filter(i, r)), this.length > 1 && (ze[t] || (r = ue.unique(r)), Ve.test(t) && (r = r.reverse())), this.pushStack(r)
}
}), ue.extend({
filter: function (t, e, n) {
var i = e[0];
return n && (t = ":not(" + t + ")"), 1 === e.length && 1 === i.nodeType ? ue.find.matchesSelector(i, t) ? [i] : [] : ue.find.matches(t, ue.grep(e, function (t) {
return 1 === t.nodeType
}))
},
dir: function (t, n, i) {
for (var r = [], s = t[n]; s && 9 !== s.nodeType && (i === e || 1 !== s.nodeType || !ue(s).is(i));) 1 === s.nodeType && r.push(s), s = s[n];
return r
},
sibling: function (t, e) {
for (var n = []; t; t = t.nextSibling) 1 === t.nodeType && t !== e && n.push(t);
return n
}
});
var We = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
Xe = / jQuery\d+="(?:null|\d+)"/g,
Ye = RegExp("<(?:" + We + ")[\\s/>]", "i"),
Qe = /^\s+/,
Ge = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
Je = /<([\w:]+)/,
Ke = /<tbody/i,
Ze = /<|&#?\w+;/,
tn = /<(?:script|style|link)/i,
en = /^(?:checkbox|radio)$/i,
nn = /checked\s*(?:[^=]|=\s*.checked.)/i,
rn = /^$|\/(?:java|ecma)script/i,
sn = /^true\/(.*)/,
an = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
on = {
option: [1, "<select multiple='multiple'>", "</select>"],
legend: [1, "<fieldset>", "</fieldset>"],
area: [1, "<map>", "</map>"],
param: [1, "<object>", "</object>"],
thead: [1, "<table>", "</table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: ue.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
}, ln = p(G),
cn = ln.appendChild(G.createElement("div"));
on.optgroup = on.option, on.tbody = on.tfoot = on.colgroup = on.caption = on.thead, on.th = on.td, ue.fn.extend({
text: function (t) {
return ue.access(this, function (t) {
return t === e ? ue.text(this) : this.empty().append((this[0] && this[0].ownerDocument || G).createTextNode(t))
}, null, t, arguments.length)
},
append: function () {
return this.domManip(arguments, function (t) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var e = f(this, t);
e.appendChild(t)
}
})
},
prepend: function () {
return this.domManip(arguments, function (t) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var e = f(this, t);
e.insertBefore(t, e.firstChild)
}
})
},
before: function () {
return this.domManip(arguments, function (t) {
this.parentNode && this.parentNode.insertBefore(t, this)
})
},
after: function () {
return this.domManip(arguments, function (t) {
this.parentNode && this.parentNode.insertBefore(t, this.nextSibling)
})
},
remove: function (t, e) {
for (var n, i = t ? ue.filter(t, this) : this, r = 0; null != (n = i[r]); r++) e || 1 !== n.nodeType || ue.cleanData(b(n)), n.parentNode && (e && ue.contains(n.ownerDocument, n) && v(b(n, "script")), n.parentNode.removeChild(n));
return this
},
empty: function () {
for (var t, e = 0; null != (t = this[e]); e++) {
for (1 === t.nodeType && ue.cleanData(b(t, !1)); t.firstChild;) t.removeChild(t.firstChild);
t.options && ue.nodeName(t, "select") && (t.options.length = 0)
}
return this
},
clone: function (t, e) {
return t = null == t ? !1 : t, e = null == e ? t : e, this.map(function () {
return ue.clone(this, t, e)
})
},
html: function (t) {
return ue.access(this, function (t) {
var n = this[0] || {}, i = 0,
r = this.length;
if (t === e) return 1 === n.nodeType ? n.innerHTML.replace(Xe, "") : e;
if (!("string" != typeof t || tn.test(t) || !ue.support.htmlSerialize && Ye.test(t) || !ue.support.leadingWhitespace && Qe.test(t) || on[(Je.exec(t) || ["", ""])[1].toLowerCase()])) {
t = t.replace(Ge, "<$1></$2>");
try {
for (; r > i; i++) n = this[i] || {}, 1 === n.nodeType && (ue.cleanData(b(n, !1)), n.innerHTML = t);
n = 0
} catch (s) {}
}
n && this.empty().append(t)
}, null, t, arguments.length)
},
replaceWith: function () {
var t = ue.map(this, function (t) {
return [t.nextSibling, t.parentNode]
}),
e = 0;
return this.domManip(arguments, function (n) {
var i = t[e++],
r = t[e++];
r && (i && i.parentNode !== r && (i = this.nextSibling), ue(this).remove(), r.insertBefore(n, i))
}, !0), e ? this : this.remove()
},
detach: function (t) {
return this.remove(t, !0)
},
domManip: function (t, e, n) {
t = ie.apply([], t);
var i, r, s, a, o, l, c = 0,
u = this.length,
d = this,
h = u - 1,
p = t[0],
f = ue.isFunction(p);
if (f || !(1 >= u || "string" != typeof p || ue.support.checkClone) && nn.test(p)) return this.each(function (i) {
var r = d.eq(i);
f && (t[0] = p.call(this, i, r.html())), r.domManip(t, e, n)
});
if (u && (l = ue.buildFragment(t, this[0].ownerDocument, !1, !n && this), i = l.firstChild, 1 === l.childNodes.length && (l = i), i)) {
for (a = ue.map(b(l, "script"), m), s = a.length; u > c; c++) r = l, c !== h && (r = ue.clone(r, !0, !0), s && ue.merge(a, b(r, "script"))), e.call(this[c], r, c);
if (s)
for (o = a[a.length - 1].ownerDocument, ue.map(a, g), c = 0; s > c; c++) r = a[c], rn.test(r.type || "") && !ue._data(r, "globalEval") && ue.contains(o, r) && (r.src ? ue._evalUrl(r.src) : ue.globalEval((r.text || r.textContent || r.innerHTML || "").replace(an, "")));
l = i = null
}
return this
}
}), ue.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function (t, e) {
ue.fn[t] = function (t) {
for (var n, i = 0, r = [], s = ue(t), a = s.length - 1; a >= i; i++) n = i === a ? this : this.clone(!0), ue(s[i])[e](n), re.apply(r, n.get());
return this.pushStack(r)
}
}), ue.extend({
clone: function (t, e, n) {
var i, r, s, a, o, l = ue.contains(t.ownerDocument, t);
if (ue.support.html5Clone || ue.isXMLDoc(t) || !Ye.test("<" + t.nodeName + ">") ? s = t.cloneNode(!0) : (cn.innerHTML = t.outerHTML, cn.removeChild(s = cn.firstChild)), !(ue.support.noCloneEvent && ue.support.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || ue.isXMLDoc(t)))
for (i = b(s), o = b(t), a = 0; null != (r = o[a]); ++a) i[a] && w(r, i[a]);
if (e)
if (n)
for (o = o || b(t), i = i || b(s), a = 0; null != (r = o[a]); a++) y(r, i[a]);
else y(t, s);
return i = b(s, "script"), i.length > 0 && v(i, !l && b(t, "script")), i = o = r = null, s
},
buildFragment: function (t, e, n, i) {
for (var r, s, a, o, l, c, u, d = t.length, h = p(e), f = [], m = 0; d > m; m++)
if (s = t[m], s || 0 === s)
if ("object" === ue.type(s)) ue.merge(f, s.nodeType ? [s] : s);
else if (Ze.test(s)) {
for (o = o || h.appendChild(e.createElement("div")), l = (Je.exec(s) || ["", ""])[1].toLowerCase(), u = on[l] || on._default, o.innerHTML = u[1] + s.replace(Ge, "<$1></$2>") + u[2], r = u[0]; r--;) o = o.lastChild;
if (!ue.support.leadingWhitespace && Qe.test(s) && f.push(e.createTextNode(Qe.exec(s)[0])), !ue.support.tbody)
for (s = "table" !== l || Ke.test(s) ? "<table>" !== u[1] || Ke.test(s) ? 0 : o : o.firstChild, r = s && s.childNodes.length; r--;) ue.nodeName(c = s.childNodes[r], "tbody") && !c.childNodes.length && s.removeChild(c);
for (ue.merge(f, o.childNodes), o.textContent = ""; o.firstChild;) o.removeChild(o.firstChild);
o = h.lastChild
} else f.push(e.createTextNode(s));
for (o && h.removeChild(o), ue.support.appendChecked || ue.grep(b(f, "input"), _), m = 0; s = f[m++];)
if ((!i || -1 === ue.inArray(s, i)) && (a = ue.contains(s.ownerDocument, s), o = b(h.appendChild(s), "script"), a && v(o), n))
for (r = 0; s = o[r++];) rn.test(s.type || "") && n.push(s);
return o = null, h
},
cleanData: function (t, e) {
for (var n, i, r, s, a = 0, o = ue.expando, l = ue.cache, c = ue.support.deleteExpando, u = ue.event.special; null != (n = t[a]); a++)
if ((e || ue.acceptData(n)) && (r = n[o], s = r && l[r])) {
if (s.events)
for (i in s.events) u[i] ? ue.event.remove(n, i) : ue.removeEvent(n, i, s.handle);
l[r] && (delete l[r], c ? delete n[o] : typeof n.removeAttribute !== Y ? n.removeAttribute(o) : n[o] = null, ee.push(r))
}
},
_evalUrl: function (t) {
return ue.ajax({
url: t,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
})
}
}), ue.fn.extend({
wrapAll: function (t) {
if (ue.isFunction(t)) return this.each(function (e) {
ue(this).wrapAll(t.call(this, e))
});
if (this[0]) {
var e = ue(t, this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode && e.insertBefore(this[0]), e.map(function () {
for (var t = this; t.firstChild && 1 === t.firstChild.nodeType;) t = t.firstChild;
return t
}).append(this)
}
return this
},
wrapInner: function (t) {
return ue.isFunction(t) ? this.each(function (e) {
ue(this).wrapInner(t.call(this, e))
}) : this.each(function () {
var e = ue(this),
n = e.contents();
n.length ? n.wrapAll(t) : e.append(t)
})
},
wrap: function (t) {
var e = ue.isFunction(t);
return this.each(function (n) {
ue(this).wrapAll(e ? t.call(this, n) : t)
})
},
unwrap: function () {
return this.parent().each(function () {
ue.nodeName(this, "body") || ue(this).replaceWith(this.childNodes)
}).end()
}
});
var un, dn, hn, pn = /alpha\([^)]*\)/i,
fn = /opacity\s*=\s*([^)]*)/,
mn = /^(top|right|bottom|left)$/,
gn = /^(none|table(?!-c[ea]).+)/,
vn = /^margin/,
yn = RegExp("^(" + de + ")(.*)$", "i"),
wn = RegExp("^(" + de + ")(?!px)[a-z%]+$", "i"),
bn = RegExp("^([+-])=(" + de + ")", "i"),
_n = {
BODY: "block"
}, xn = {
position: "absolute",
visibility: "hidden",
display: "block"
}, kn = {
letterSpacing: 0,
fontWeight: 400
}, Cn = ["Top", "Right", "Bottom", "Left"],
Sn = ["Webkit", "O", "Moz", "ms"];
ue.fn.extend({
css: function (t, n) {
return ue.access(this, function (t, n, i) {
var r, s, a = {}, o = 0;
if (ue.isArray(n)) {
for (s = dn(t), r = n.length; r > o; o++) a[n[o]] = ue.css(t, n[o], !1, s);
return a
}
return i !== e ? ue.style(t, n, i) : ue.css(t, n)
}, t, n, arguments.length > 1)
},
show: function () {
return C(this, !0)
},
hide: function () {
return C(this)
},
toggle: function (t) {
return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function () {
k(this) ? ue(this).show() : ue(this).hide()
})
}
}), ue.extend({
cssHooks: {
opacity: {
get: function (t, e) {
if (e) {
var n = hn(t, "opacity");
return "" === n ? "1" : n
}
}
}
},
cssNumber: {
columnCount: !0,
fillOpacity: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": ue.support.cssFloat ? "cssFloat" : "styleFloat"
},
style: function (t, n, i, r) {
if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
var s, a, o, l = ue.camelCase(n),
c = t.style;
if (n = ue.cssProps[l] || (ue.cssProps[l] = x(c, l)), o = ue.cssHooks[n] || ue.cssHooks[l], i === e) return o && "get" in o && (s = o.get(t, !1, r)) !== e ? s : c[n];
if (a = typeof i, "string" === a && (s = bn.exec(i)) && (i = (s[1] + 1) * s[2] + parseFloat(ue.css(t, n)), a = "number"), !(null == i || "number" === a && isNaN(i) || ("number" !== a || ue.cssNumber[l] || (i += "px"), ue.support.clearCloneStyle || "" !== i || 0 !== n.indexOf("background") || (c[n] = "inherit"), o && "set" in o && (i = o.set(t, i, r)) === e))) try {
c[n] = i
} catch (u) {}
}
},
css: function (t, n, i, r) {
var s, a, o, l = ue.camelCase(n);
return n = ue.cssProps[l] || (ue.cssProps[l] = x(t.style, l)), o = ue.cssHooks[n] || ue.cssHooks[l], o && "get" in o && (a = o.get(t, !0, i)), a === e && (a = hn(t, n, r)), "normal" === a && n in kn && (a = kn[n]), "" === i || i ? (s = parseFloat(a), i === !0 || ue.isNumeric(s) ? s || 0 : a) : a
}
}), t.getComputedStyle ? (dn = function (e) {
return t.getComputedStyle(e, null)
}, hn = function (t, n, i) {
var r, s, a, o = i || dn(t),
l = o ? o.getPropertyValue(n) || o[n] : e,
c = t.style;
return o && ("" !== l || ue.contains(t.ownerDocument, t) || (l = ue.style(t, n)), wn.test(l) && vn.test(n) && (r = c.width, s = c.minWidth, a = c.maxWidth, c.minWidth = c.maxWidth = c.width = l, l = o.width, c.width = r, c.minWidth = s, c.maxWidth = a)), l
}) : G.documentElement.currentStyle && (dn = function (t) {
return t.currentStyle
}, hn = function (t, n, i) {
var r, s, a, o = i || dn(t),
l = o ? o[n] : e,
c = t.style;
return null == l && c && c[n] && (l = c[n]), wn.test(l) && !mn.test(n) && (r = c.left, s = t.runtimeStyle, a = s && s.left, a && (s.left = t.currentStyle.left), c.left = "fontSize" === n ? "1em" : l, l = c.pixelLeft + "px", c.left = r, a && (s.left = a)), "" === l ? "auto" : l
}), ue.each(["height", "width"], function (t, n) {
ue.cssHooks[n] = {
get: function (t, i, r) {
return i ? 0 === t.offsetWidth && gn.test(ue.css(t, "display")) ? ue.swap(t, xn, function () {
return $(t, n, r)
}) : $(t, n, r) : e
},
set: function (t, e, i) {
var r = i && dn(t);
return S(t, e, i ? T(t, n, i, ue.support.boxSizing && "border-box" === ue.css(t, "boxSizing", !1, r), r) : 0)
}
}
}), ue.support.opacity || (ue.cssHooks.opacity = {
get: function (t, e) {
return fn.test((e && t.currentStyle ? t.currentStyle.filter : t.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : e ? "1" : ""
},
set: function (t, e) {
var n = t.style,
i = t.currentStyle,
r = ue.isNumeric(e) ? "alpha(opacity=" + 100 * e + ")" : "",
s = i && i.filter || n.filter || "";
n.zoom = 1, (e >= 1 || "" === e) && "" === ue.trim(s.replace(pn, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === e || i && !i.filter) || (n.filter = pn.test(s) ? s.replace(pn, r) : s + " " + r)
}
}), ue(function () {
ue.support.reliableMarginRight || (ue.cssHooks.marginRight = {
get: function (t, n) {
return n ? ue.swap(t, {
display: "inline-block"
}, hn, [t, "marginRight"]) : e
}
}), !ue.support.pixelPosition && ue.fn.position && ue.each(["top", "left"], function (t, n) {
ue.cssHooks[n] = {
get: function (t, i) {
return i ? (i = hn(t, n), wn.test(i) ? ue(t).position()[n] + "px" : i) : e
}
}
})
}), ue.expr && ue.expr.filters && (ue.expr.filters.hidden = function (t) {
return 0 >= t.offsetWidth && 0 >= t.offsetHeight || !ue.support.reliableHiddenOffsets && "none" === (t.style && t.style.display || ue.css(t, "display"))
}, ue.expr.filters.visible = function (t) {
return !ue.expr.filters.hidden(t)
}), ue.each({
margin: "",
padding: "",
border: "Width"
}, function (t, e) {
ue.cssHooks[t + e] = {
expand: function (n) {
for (var i = 0, r = {}, s = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++) r[t + Cn[i] + e] = s[i] || s[i - 2] || s[0];
return r
}
}, vn.test(t) || (ue.cssHooks[t + e].set = S)
});
var Tn = /%20/g,
$n = /\[\]$/,
En = /\r?\n/g,
An = /^(?:submit|button|image|reset|file)$/i,
jn = /^(?:input|select|textarea|keygen)/i;
ue.fn.extend({
serialize: function () {
return ue.param(this.serializeArray())
},
serializeArray: function () {
return this.map(function () {
var t = ue.prop(this, "elements");
return t ? ue.makeArray(t) : this
}).filter(function () {
var t = this.type;
return this.name && !ue(this).is(":disabled") && jn.test(this.nodeName) && !An.test(t) && (this.checked || !en.test(t))
}).map(function (t, e) {
var n = ue(this).val();
return null == n ? null : ue.isArray(n) ? ue.map(n, function (t) {
return {
name: e.name,
value: t.replace(En, "\r\n")
}
}) : {
name: e.name,
value: n.replace(En, "\r\n")
}
}).get()
}
}), ue.param = function (t, n) {
var i, r = [],
s = function (t, e) {
e = ue.isFunction(e) ? e() : null == e ? "" : e, r[r.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e)
};
if (n === e && (n = ue.ajaxSettings && ue.ajaxSettings.traditional), ue.isArray(t) || t.jquery && !ue.isPlainObject(t)) ue.each(t, function () {
s(this.name, this.value)
});
else
for (i in t) j(i, t[i], n, s);
return r.join("&").replace(Tn, "+")
}, ue.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (t, e) {
ue.fn[e] = function (t, n) {
return arguments.length > 0 ? this.on(e, null, t, n) : this.trigger(e)
}
}), ue.fn.extend({
hover: function (t, e) {
return this.mouseenter(t).mouseleave(e || t)
},
bind: function (t, e, n) {
return this.on(t, null, e, n)
},
unbind: function (t, e) {
return this.off(t, null, e)
},
delegate: function (t, e, n, i) {
return this.on(e, t, n, i)
},
undelegate: function (t, e, n) {
return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", n)
}
});
var On, Nn, In = ue.now(),
Mn = /\?/,
Ln = /#.*$/,
Pn = /([?&])_=[^&]*/,
Dn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
Hn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
qn = /^(?:GET|HEAD)$/,
Un = /^\/\//,
Bn = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
Fn = ue.fn.load,
Vn = {}, Rn = {}, zn = "*/".concat("*");
try {
Nn = Q.href
} catch (Wn) {
Nn = G.createElement("a"), Nn.href = "", Nn = Nn.href
}
On = Bn.exec(Nn.toLowerCase()) || [], ue.fn.load = function (t, n, i) {
if ("string" != typeof t && Fn) return Fn.apply(this, arguments);
var r, s, a, o = this,
l = t.indexOf(" ");
return l >= 0 && (r = t.slice(l, t.length), t = t.slice(0, l)), ue.isFunction(n) ? (i = n, n = e) : n && "object" == typeof n && (a = "POST"), o.length > 0 && ue.ajax({
url: t,
type: a,
dataType: "html",
data: n
}).done(function (t) {
s = arguments, o.html(r ? ue("<div>").append(ue.parseHTML(t)).find(r) : t)
}).complete(i && function (t, e) {
o.each(i, s || [t.responseText, e, t])
}), this
}, ue.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (t, e) {
ue.fn[e] = function (t) {
return this.on(e, t)
}
}), ue.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: Nn,
type: "GET",
isLocal: Hn.test(On[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": zn,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": !0,
"text json": ue.parseJSON,
"text xml": ue.parseXML
},
flatOptions: {
url: !0,
context: !0
}
},
ajaxSetup: function (t, e) {
return e ? I(I(t, ue.ajaxSettings), e) : I(ue.ajaxSettings, t)
},
ajaxPrefilter: O(Vn),
ajaxTransport: O(Rn),
ajax: function (t, n) {
function i(t, n, i, r) {
var s, d, y, w, _, k = n;
2 !== b && (b = 2, l && clearTimeout(l), u = e, o = r || "", x.readyState = t > 0 ? 4 : 0, s = t >= 200 && 300 > t || 304 === t, i && (w = M(h, x, i)), w = L(h, w, x, s), s ? (h.ifModified && (_ = x.getResponseHeader("Last-Modified"), _ && (ue.lastModified[a] = _), _ = x.getResponseHeader("etag"), _ && (ue.etag[a] = _)), 204 === t || "HEAD" === h.type ? k = "nocontent" : 304 === t ? k = "notmodified" : (k = w.state, d = w.data, y = w.error, s = !y)) : (y = k, (t || !k) && (k = "error", 0 > t && (t = 0))), x.status = t, x.statusText = (n || k) + "", s ? m.resolveWith(p, [d, k, x]) : m.rejectWith(p, [x, k, y]), x.statusCode(v), v = e, c && f.trigger(s ? "ajaxSuccess" : "ajaxError", [x, h, s ? d : y]), g.fireWith(p, [x, k]), c && (f.trigger("ajaxComplete", [x, h]), --ue.active || ue.event.trigger("ajaxStop")))
}
"object" == typeof t && (n = t, t = e), n = n || {};
var r, s, a, o, l, c, u, d, h = ue.ajaxSetup({}, n),
p = h.context || h,
f = h.context && (p.nodeType || p.jquery) ? ue(p) : ue.event,
m = ue.Deferred(),
g = ue.Callbacks("once memory"),
v = h.statusCode || {}, y = {}, w = {}, b = 0,
_ = "canceled",
x = {
readyState: 0,
getResponseHeader: function (t) {
var e;
if (2 === b) {
if (!d)
for (d = {}; e = Dn.exec(o);) d[e[1].toLowerCase()] = e[2];
e = d[t.toLowerCase()]
}
return null == e ? null : e
},
getAllResponseHeaders: function () {
return 2 === b ? o : null
},
setRequestHeader: function (t, e) {
var n = t.toLowerCase();
return b || (t = w[n] = w[n] || t, y[t] = e), this
},
overrideMimeType: function (t) {
return b || (h.mimeType = t), this
},
statusCode: function (t) {
var e;
if (t)
if (2 > b)
for (e in t) v[e] = [v[e], t[e]];
else x.always(t[x.status]);
return this
},
abort: function (t) {
var e = t || _;
return u && u.abort(e), i(0, e), this
}
};
if (m.promise(x).complete = g.add, x.success = x.done, x.error = x.fail, h.url = ((t || h.url || Nn) + "").replace(Ln, "").replace(Un, On[1] + "//"), h.type = n.method || n.type || h.method || h.type, h.dataTypes = ue.trim(h.dataType || "*").toLowerCase().match(he) || [""], null == h.crossDomain && (r = Bn.exec(h.url.toLowerCase()), h.crossDomain = !(!r || r[1] === On[1] && r[2] === On[2] && (r[3] || ("http:" === r[1] ? "80" : "443")) === (On[3] || ("http:" === On[1] ? "80" : "443")))), h.data && h.processData && "string" != typeof h.data && (h.data = ue.param(h.data, h.traditional)), N(Vn, h, n, x), 2 === b) return x;
c = h.global, c && 0 === ue.active++ && ue.event.trigger("ajaxStart"), h.type = h.type.toUpperCase(), h.hasContent = !qn.test(h.type), a = h.url, h.hasContent || (h.data && (a = h.url += (Mn.test(a) ? "&" : "?") + h.data, delete h.data), h.cache === !1 && (h.url = Pn.test(a) ? a.replace(Pn, "$1_=" + In++) : a + (Mn.test(a) ? "&" : "?") + "_=" + In++)), h.ifModified && (ue.lastModified[a] && x.setRequestHeader("If-Modified-Since", ue.lastModified[a]), ue.etag[a] && x.setRequestHeader("If-None-Match", ue.etag[a])), (h.data && h.hasContent && h.contentType !== !1 || n.contentType) && x.setRequestHeader("Content-Type", h.contentType), x.setRequestHeader("Accept", h.dataTypes[0] && h.accepts[h.dataTypes[0]] ? h.accepts[h.dataTypes[0]] + ("*" !== h.dataTypes[0] ? ", " + zn + "; q=0.01" : "") : h.accepts["*"]);
for (s in h.headers) x.setRequestHeader(s, h.headers[s]);
if (h.beforeSend && (h.beforeSend.call(p, x, h) === !1 || 2 === b)) return x.abort();
_ = "abort";
for (s in {
success: 1,
error: 1,
complete: 1
}) x[s](h[s]);
if (u = N(Rn, h, n, x)) {
x.readyState = 1, c && f.trigger("ajaxSend", [x, h]), h.async && h.timeout > 0 && (l = setTimeout(function () {
x.abort("timeout")
}, h.timeout));
try {
b = 1, u.send(y, i)
} catch (k) {
if (!(2 > b)) throw k;
i(-1, k)
}
} else i(-1, "No Transport");
return x
},
getJSON: function (t, e, n) {
return ue.get(t, e, n, "json")
},
getScript: function (t, n) {
return ue.get(t, e, n, "script")
}
}), ue.each(["get", "post"], function (t, n) {
ue[n] = function (t, i, r, s) {
return ue.isFunction(i) && (s = s || r, r = i, i = e), ue.ajax({
url: t,
type: n,
dataType: s,
data: i,
success: r
})
}
}), ue.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function (t) {
return ue.globalEval(t), t
}
}
}), ue.ajaxPrefilter("script", function (t) {
t.cache === e && (t.cache = !1), t.crossDomain && (t.type = "GET", t.global = !1)
}), ue.ajaxTransport("script", function (t) {
if (t.crossDomain) {
var n, i = G.head || ue("head")[0] || G.documentElement;
return {
send: function (e, r) {
n = G.createElement("script"), n.async = !0, t.scriptCharset && (n.charset = t.scriptCharset), n.src = t.url, n.onload = n.onreadystatechange = function (t, e) {
(e || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, n.parentNode && n.parentNode.removeChild(n), n = null, e || r(200, "success"))
}, i.insertBefore(n, i.firstChild)
},
abort: function () {
n && n.onload(e, !0)
}
}
}
});
var Xn = [],
Yn = /(=)\?(?=&|$)|\?\?/;
ue.ajaxSetup({
jsonp: "callback",
jsonpCallback: function () {
var t = Xn.pop() || ue.expando + "_" + In++;
return this[t] = !0, t
}
}), ue.ajaxPrefilter("json jsonp", function (n, i, r) {
var s, a, o, l = n.jsonp !== !1 && (Yn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Yn.test(n.data) && "data");
return l || "jsonp" === n.dataTypes[0] ? (s = n.jsonpCallback = ue.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, l ? n[l] = n[l].replace(Yn, "$1" + s) : n.jsonp !== !1 && (n.url += (Mn.test(n.url) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function () {
return o || ue.error(s + " was not called"), o[0]
}, n.dataTypes[0] = "json", a = t[s], t[s] = function () {
o = arguments
}, r.always(function () {
t[s] = a, n[s] && (n.jsonpCallback = i.jsonpCallback, Xn.push(s)), o && ue.isFunction(a) && a(o[0]), o = a = e
}), "script") : e
});
var Qn, Gn, Jn = 0,
Kn = t.ActiveXObject && function () {
var t;
for (t in Qn) Qn[t](e, !0)
};
ue.ajaxSettings.xhr = t.ActiveXObject ? function () {
return !this.isLocal && P() || D()
} : P, Gn = ue.ajaxSettings.xhr(), ue.support.cors = !! Gn && "withCredentials" in Gn, Gn = ue.support.ajax = !! Gn, Gn && ue.ajaxTransport(function (n) {
if (!n.crossDomain || ue.support.cors) {
var i;
return {
send: function (r, s) {
var a, o, l = n.xhr();
if (n.username ? l.open(n.type, n.url, n.async, n.username, n.password) : l.open(n.type, n.url, n.async), n.xhrFields)
for (o in n.xhrFields) l[o] = n.xhrFields[o];
n.mimeType && l.overrideMimeType && l.overrideMimeType(n.mimeType), n.crossDomain || r["X-Requested-With"] || (r["X-Requested-With"] = "XMLHttpRequest");
try {
for (o in r) l.setRequestHeader(o, r[o])
} catch (c) {}
l.send(n.hasContent && n.data || null), i = function (t, r) {
var o, c, u, d;
try {
if (i && (r || 4 === l.readyState))
if (i = e, a && (l.onreadystatechange = ue.noop, Kn && delete Qn[a]), r) 4 !== l.readyState && l.abort();
else {
d = {}, o = l.status, c = l.getAllResponseHeaders(), "string" == typeof l.responseText && (d.text = l.responseText);
try {
u = l.statusText
} catch (h) {
u = ""
}
o || !n.isLocal || n.crossDomain ? 1223 === o && (o = 204) : o = d.text ? 200 : 404
}
} catch (p) {
r || s(-1, p)
}
d && s(o, u, d, c)
}, n.async ? 4 === l.readyState ? setTimeout(i) : (a = ++Jn, Kn && (Qn || (Qn = {}, ue(t).unload(Kn)), Qn[a] = i), l.onreadystatechange = i) : i()
},
abort: function () {
i && i(e, !0)
}
}
}
});
var Zn, ti, ei = /^(?:toggle|show|hide)$/,
ni = RegExp("^(?:([+-])=|)(" + de + ")([a-z%]*)$", "i"),
ii = /queueHooks$/,
ri = [F],
si = {
"*": [
function (t, e) {
var n = this.createTween(t, e),
i = n.cur(),
r = ni.exec(e),
s = r && r[3] || (ue.cssNumber[t] ? "" : "px"),
a = (ue.cssNumber[t] || "px" !== s && +i) && ni.exec(ue.css(n.elem, t)),
o = 1,
l = 20;
if (a && a[3] !== s) {
s = s || a[3], r = r || [], a = +i || 1;
do o = o || ".5", a /= o, ue.style(n.elem, t, a + s); while (o !== (o = n.cur() / i) && 1 !== o && --l)
}
return r && (a = n.start = +a || +i || 0, n.unit = s, n.end = r[1] ? a + (r[1] + 1) * r[2] : +r[2]), n
}
]
};
ue.Animation = ue.extend(U, {
tweener: function (t, e) {
ue.isFunction(t) ? (e = t, t = ["*"]) : t = t.split(" ");
for (var n, i = 0, r = t.length; r > i; i++) n = t[i], si[n] = si[n] || [], si[n].unshift(e)
},
prefilter: function (t, e) {
e ? ri.unshift(t) : ri.push(t)
}
}), ue.Tween = V, V.prototype = {
constructor: V,
init: function (t, e, n, i, r, s) {
this.elem = t, this.prop = n, this.easing = r || "swing", this.options = e, this.start = this.now = this.cur(), this.end = i, this.unit = s || (ue.cssNumber[n] ? "" : "px")
},
cur: function () {
var t = V.propHooks[this.prop];
return t && t.get ? t.get(this) : V.propHooks._default.get(this)
},
run: function (t) {
var e, n = V.propHooks[this.prop];
return this.pos = e = this.options.duration ? ue.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : t, this.now = (this.end - this.start) * e + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : V.propHooks._default.set(this), this
}
}, V.prototype.init.prototype = V.prototype, V.propHooks = {
_default: {
get: function (t) {
var e;
return null == t.elem[t.prop] || t.elem.style && null != t.elem.style[t.prop] ? (e = ue.css(t.elem, t.prop, ""), e && "auto" !== e ? e : 0) : t.elem[t.prop]
},
set: function (t) {
ue.fx.step[t.prop] ? ue.fx.step[t.prop](t) : t.elem.style && (null != t.elem.style[ue.cssProps[t.prop]] || ue.cssHooks[t.prop]) ? ue.style(t.elem, t.prop, t.now + t.unit) : t.elem[t.prop] = t.now
}
}
}, V.propHooks.scrollTop = V.propHooks.scrollLeft = {
set: function (t) {
t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now)
}
}, ue.each(["toggle", "show", "hide"], function (t, e) {
var n = ue.fn[e];
ue.fn[e] = function (t, i, r) {
return null == t || "boolean" == typeof t ? n.apply(this, arguments) : this.animate(R(e, !0), t, i, r)
}
}), ue.fn.extend({
fadeTo: function (t, e, n, i) {
return this.filter(k).css("opacity", 0).show().end().animate({
opacity: e
}, t, n, i)
},
animate: function (t, e, n, i) {
var r = ue.isEmptyObject(t),
s = ue.speed(e, n, i),
a = function () {
var e = U(this, ue.extend({}, t), s);
(r || ue._data(this, "finish")) && e.stop(!0)
};
return a.finish = a, r || s.queue === !1 ? this.each(a) : this.queue(s.queue, a)
},
stop: function (t, n, i) {
var r = function (t) {
var e = t.stop;
delete t.stop, e(i)
};
return "string" != typeof t && (i = n, n = t, t = e), n && t !== !1 && this.queue(t || "fx", []), this.each(function () {
var e = !0,
n = null != t && t + "queueHooks",
s = ue.timers,
a = ue._data(this);
if (n) a[n] && a[n].stop && r(a[n]);
else
for (n in a) a[n] && a[n].stop && ii.test(n) && r(a[n]);
for (n = s.length; n--;) s[n].elem !== this || null != t && s[n].queue !== t || (s[n].anim.stop(i), e = !1, s.splice(n, 1));
(e || !i) && ue.dequeue(this, t)
})
},
finish: function (t) {
return t !== !1 && (t = t || "fx"), this.each(function () {
var e, n = ue._data(this),
i = n[t + "queue"],
r = n[t + "queueHooks"],
s = ue.timers,
a = i ? i.length : 0;
for (n.finish = !0, ue.queue(this, t, []), r && r.stop && r.stop.call(this, !0), e = s.length; e--;) s[e].elem === this && s[e].queue === t && (s[e].anim.stop(!0), s.splice(e, 1));
for (e = 0; a > e; e++) i[e] && i[e].finish && i[e].finish.call(this);
delete n.finish
})
}
}), ue.each({
slideDown: R("show"),
slideUp: R("hide"),
slideToggle: R("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function (t, e) {
ue.fn[t] = function (t, n, i) {
return this.animate(e, t, n, i)
}
}), ue.speed = function (t, e, n) {
var i = t && "object" == typeof t ? ue.extend({}, t) : {
complete: n || !n && e || ue.isFunction(t) && t,
duration: t,
easing: n && e || e && !ue.isFunction(e) && e
};
return i.duration = ue.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in ue.fx.speeds ? ue.fx.speeds[i.duration] : ue.fx.speeds._default, (null == i.queue || i.queue === !0) && (i.queue = "fx"), i.old = i.complete, i.complete = function () {
ue.isFunction(i.old) && i.old.call(this), i.queue && ue.dequeue(this, i.queue)
}, i
}, ue.easing = {
linear: function (t) {
return t
},
swing: function (t) {
return .5 - Math.cos(t * Math.PI) / 2
}
}, ue.timers = [], ue.fx = V.prototype.init, ue.fx.tick = function () {
var t, n = ue.timers,
i = 0;
for (Zn = ue.now(); n.length > i; i++) t = n[i], t() || n[i] !== t || n.splice(i--, 1);
n.length || ue.fx.stop(), Zn = e
}, ue.fx.timer = function (t) {
t() && ue.timers.push(t) && ue.fx.start()
}, ue.fx.interval = 13, ue.fx.start = function () {
ti || (ti = setInterval(ue.fx.tick, ue.fx.interval))
}, ue.fx.stop = function () {
clearInterval(ti), ti = null
}, ue.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, ue.fx.step = {}, ue.expr && ue.expr.filters && (ue.expr.filters.animated = function (t) {
return ue.grep(ue.timers, function (e) {
return t === e.elem
}).length
}), ue.fn.offset = function (t) {
if (arguments.length) return t === e ? this : this.each(function (e) {
ue.offset.setOffset(this, t, e)
});
var n, i, r = {
top: 0,
left: 0
}, s = this[0],
a = s && s.ownerDocument;
return a ? (n = a.documentElement, ue.contains(n, s) ? (typeof s.getBoundingClientRect !== Y && (r = s.getBoundingClientRect()), i = z(a), {
top: r.top + (i.pageYOffset || n.scrollTop) - (n.clientTop || 0),
left: r.left + (i.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)
}) : r) : void 0
}, ue.offset = {
setOffset: function (t, e, n) {
var i = ue.css(t, "position");
"static" === i && (t.style.position = "relative");
var r, s, a = ue(t),
o = a.offset(),
l = ue.css(t, "top"),
c = ue.css(t, "left"),
u = ("absolute" === i || "fixed" === i) && ue.inArray("auto", [l, c]) > -1,
d = {}, h = {};
u ? (h = a.position(), r = h.top, s = h.left) : (r = parseFloat(l) || 0, s = parseFloat(c) || 0), ue.isFunction(e) && (e = e.call(t, n, o)), null != e.top && (d.top = e.top - o.top + r), null != e.left && (d.left = e.left - o.left + s), "using" in e ? e.using.call(t, d) : a.css(d)
}
}, ue.fn.extend({
position: function () {
if (this[0]) {
var t, e, n = {
top: 0,
left: 0
}, i = this[0];
return "fixed" === ue.css(i, "position") ? e = i.getBoundingClientRect() : (t = this.offsetParent(), e = this.offset(), ue.nodeName(t[0], "html") || (n = t.offset()), n.top += ue.css(t[0], "borderTopWidth", !0), n.left += ue.css(t[0], "borderLeftWidth", !0)), {
top: e.top - n.top - ue.css(i, "marginTop", !0),
left: e.left - n.left - ue.css(i, "marginLeft", !0)
}
}
},
offsetParent: function () {
return this.map(function () {
for (var t = this.offsetParent || J; t && !ue.nodeName(t, "html") && "static" === ue.css(t, "position");) t = t.offsetParent;
return t || J
})
}
}), ue.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function (t, n) {
var i = /Y/.test(n);
ue.fn[t] = function (r) {
return ue.access(this, function (t, r, s) {
var a = z(t);
return s === e ? a ? n in a ? a[n] : a.document.documentElement[r] : t[r] : (a ? a.scrollTo(i ? ue(a).scrollLeft() : s, i ? s : ue(a).scrollTop()) : t[r] = s, e)
}, t, r, arguments.length, null)
}
}), ue.each({
Height: "height",
Width: "width"
}, function (t, n) {
ue.each({
padding: "inner" + t,
content: n,
"": "outer" + t
}, function (i, r) {
ue.fn[r] = function (r, s) {
var a = arguments.length && (i || "boolean" != typeof r),
o = i || (r === !0 || s === !0 ? "margin" : "border");
return ue.access(this, function (n, i, r) {
var s;
return ue.isWindow(n) ? n.document.documentElement["client" + t] : 9 === n.nodeType ? (s = n.documentElement, Math.max(n.body["scroll" + t], s["scroll" + t], n.body["offset" + t], s["offset" + t], s["client" + t])) : r === e ? ue.css(n, i, o) : ue.style(n, i, r, o)
}, n, a ? r : e, a, null)
}
})
}), ue.fn.size = function () {
return this.length
}, ue.fn.andSelf = ue.fn.addBack, "object" == typeof module && module && "object" == typeof module.exports ? module.exports = ue : (t.jQuery = t.$ = ue, "function" == typeof define && define.amd && define("jquery", [], function () {
return ue
}))
}(window),
/*!
* jQuery Migrate - v1.2.1 - 2013-05-08
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
function (t, e, n) {
function i(n) {
var i = e.console;
s[n] || (s[n] = !0, t.migrateWarnings.push(n), i && i.warn && !t.migrateMute && (i.warn("JQMIGRATE: " + n), t.migrateTrace && i.trace && i.trace()))
}
function r(e, n, r, s) {
if (Object.defineProperty) try {
return Object.defineProperty(e, n, {
configurable: !0,
enumerable: !0,
get: function () {
return i(s), r
},
set: function (t) {
i(s), r = t
}
}), void 0
} catch (a) {}
t._definePropertyBroken = !0, e[n] = r
}
var s = {};
t.migrateWarnings = [], t.migrateMute = !0, !t.migrateMute && e.console && e.console.log && e.console.log("JQMIGRATE: Logging is active"), t.migrateTrace === n && (t.migrateTrace = !0), t.migrateReset = function () {
s = {}, t.migrateWarnings.length = 0
}, "BackCompat" === document.compatMode && i("jQuery is not compatible with Quirks Mode");
var a = t("<input/>", {
size: 1
}).attr("size") && t.attrFn,
o = t.attr,
l = t.attrHooks.value && t.attrHooks.value.get || function () {
return null
}, c = t.attrHooks.value && t.attrHooks.value.set || function () {
return n
}, u = /^(?:input|button)$/i,
d = /^[238]$/,
h = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
p = /^(?:checked|selected)$/i;
r(t, "attrFn", a || {}, "jQuery.attrFn is deprecated"), t.attr = function (e, r, s, l) {
var c = r.toLowerCase(),
f = e && e.nodeType;
return l && (o.length < 4 && i("jQuery.fn.attr( props, pass ) is deprecated"), e && !d.test(f) && (a ? r in a : t.isFunction(t.fn[r]))) ? t(e)[r](s) : ("type" === r && s !== n && u.test(e.nodeName) && e.parentNode && i("Can't change the 'type' of an input or button in IE 6/7/8"), !t.attrHooks[c] && h.test(c) && (t.attrHooks[c] = {
get: function (e, i) {
var r, s = t.prop(e, i);
return s === !0 || "boolean" != typeof s && (r = e.getAttributeNode(i)) && r.nodeValue !== !1 ? i.toLowerCase() : n
},
set: function (e, n, i) {
var r;
return n === !1 ? t.removeAttr(e, i) : (r = t.propFix[i] || i, r in e && (e[r] = !0), e.setAttribute(i, i.toLowerCase())), i
}
}, p.test(c) && i("jQuery.fn.attr('" + c + "') may use property instead of attribute")), o.call(t, e, r, s))
}, t.attrHooks.value = {
get: function (t, e) {
var n = (t.nodeName || "").toLowerCase();
return "button" === n ? l.apply(this, arguments) : ("input" !== n && "option" !== n && i("jQuery.fn.attr('value') no longer gets properties"), e in t ? t.value : null)
},
set: function (t, e) {
var n = (t.nodeName || "").toLowerCase();
return "button" === n ? c.apply(this, arguments) : ("input" !== n && "option" !== n && i("jQuery.fn.attr('value', val) no longer sets properties"), t.value = e, void 0)
}
};
var f, m, g = t.fn.init,
v = t.parseJSON,
y = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
t.fn.init = function (e, n, r) {
var s;
return e && "string" == typeof e && !t.isPlainObject(n) && (s = y.exec(t.trim(e))) && s[0] && ("<" !== e.charAt(0) && i("$(html) HTML strings must start with '<' character"), s[3] && i("$(html) HTML text after last tag is ignored"), "#" === s[0].charAt(0) && (i("HTML string cannot start with a '#' character"), t.error("JQMIGRATE: Invalid selector string (XSS)")), n && n.context && (n = n.context), t.parseHTML) ? g.call(this, t.parseHTML(s[2], n, !0), n, r) : g.apply(this, arguments)
}, t.fn.init.prototype = t.fn, t.parseJSON = function (t) {
return t || null === t ? v.apply(this, arguments) : (i("jQuery.parseJSON requires a valid JSON string"), null)
}, t.uaMatch = function (t) {
t = t.toLowerCase();
var e = /(chrome)[ \/]([\w.]+)/.exec(t) || /(webkit)[ \/]([\w.]+)/.exec(t) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t) || /(msie) ([\w.]+)/.exec(t) || t.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t) || [];
return {
browser: e[1] || "",
version: e[2] || "0"
}
}, t.browser || (f = t.uaMatch(navigator.userAgent), m = {}, f.browser && (m[f.browser] = !0, m.version = f.version), m.chrome ? m.webkit = !0 : m.webkit && (m.safari = !0), t.browser = m), r(t, "browser", t.browser, "jQuery.browser is deprecated"), t.sub = function () {
function e(t, n) {
return new e.fn.init(t, n)
}
t.extend(!0, e, this), e.superclass = this, e.fn = e.prototype = this(), e.fn.constructor = e, e.sub = this.sub, e.fn.init = function (i, r) {
return r && r instanceof t && !(r instanceof e) && (r = e(r)), t.fn.init.call(this, i, r, n)
}, e.fn.init.prototype = e.fn;
var n = e(document);
return i("jQuery.sub() is deprecated"), e
}, t.ajaxSetup({
converters: {
"text json": t.parseJSON
}
});
var w = t.fn.data;
t.fn.data = function (e) {
var r, s, a = this[0];
return !a || "events" !== e || 1 !== arguments.length || (r = t.data(a, e), s = t._data(a, e), r !== n && r !== s || s === n) ? w.apply(this, arguments) : (i("Use of jQuery.fn.data('events') is deprecated"), s)
};
var b = /\/(java|ecma)script/i,
_ = t.fn.andSelf || t.fn.addBack;
t.fn.andSelf = function () {
return i("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"), _.apply(this, arguments)
}, t.clean || (t.clean = function (e, n, r, s) {
n = n || document, n = !n.nodeType && n[0] || n, n = n.ownerDocument || n, i("jQuery.clean() is deprecated");
var a, o, l, c, u = [];
if (t.merge(u, t.buildFragment(e, n).childNodes), r)
for (l = function (t) {
return !t.type || b.test(t.type) ? s ? s.push(t.parentNode ? t.parentNode.removeChild(t) : t) : r.appendChild(t) : void 0
}, a = 0; null != (o = u[a]); a++) t.nodeName(o, "script") && l(o) || (r.appendChild(o), "undefined" != typeof o.getElementsByTagName && (c = t.grep(t.merge([], o.getElementsByTagName("script")), l), u.splice.apply(u, [a + 1, 0].concat(c)), a += c.length));
return u
});
var x = t.event.add,
k = t.event.remove,
C = t.event.trigger,
S = t.fn.toggle,
T = t.fn.live,
$ = t.fn.die,
E = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
A = new RegExp("\\b(?:" + E + ")\\b"),
j = /(?:^|\s)hover(\.\S+|)\b/,
O = function (e) {
return "string" != typeof e || t.event.special.hover ? e : (j.test(e) && i("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), e && e.replace(j, "mouseenter$1 mouseleave$1"))
};
t.event.props && "attrChange" !== t.event.props[0] && t.event.props.unshift("attrChange", "attrName", "relatedNode", "srcElement"), t.event.dispatch && r(t.event, "handle", t.event.dispatch, "jQuery.event.handle is undocumented and deprecated"), t.event.add = function (t, e, n, r, s) {
t !== document && A.test(e) && i("AJAX events should be attached to document: " + e), x.call(this, t, O(e || ""), n, r, s)
}, t.event.remove = function (t, e, n, i, r) {
k.call(this, t, O(e) || "", n, i, r)
}, t.fn.error = function () {
var t = Array.prototype.slice.call(arguments, 0);
return i("jQuery.fn.error() is deprecated"), t.splice(0, 0, "error"), arguments.length ? this.bind.apply(this, t) : (this.triggerHandler.apply(this, t), this)
}, t.fn.toggle = function (e, n) {
if (!t.isFunction(e) || !t.isFunction(n)) return S.apply(this, arguments);
i("jQuery.fn.toggle(handler, handler...) is deprecated");
var r = arguments,
s = e.guid || t.guid++,
a = 0,
o = function (n) {
var i = (t._data(this, "lastToggle" + e.guid) || 0) % a;
return t._data(this, "lastToggle" + e.guid, i + 1), n.preventDefault(), r[i].apply(this, arguments) || !1
};
for (o.guid = s; a < r.length;) r[a++].guid = s;
return this.click(o)
}, t.fn.live = function (e, n, r) {
return i("jQuery.fn.live() is deprecated"), T ? T.apply(this, arguments) : (t(this.context).on(e, this.selector, n, r), this)
}, t.fn.die = function (e, n) {
return i("jQuery.fn.die() is deprecated"), $ ? $.apply(this, arguments) : (t(this.context).off(e, this.selector || "**", n), this)
}, t.event.trigger = function (t, e, n, r) {
return n || A.test(t) || i("Global events are undocumented and deprecated"), C.call(this, t, e, n || document, r)
}, t.each(E.split("|"), function (e, n) {
t.event.special[n] = {
setup: function () {
var e = this;
return e !== document && (t.event.add(document, n + "." + t.guid, function () {
t.event.trigger(n, null, e, !0)
}), t._data(this, n, t.guid++)), !1
},
teardown: function () {
return this !== document && t.event.remove(document, n + "." + t._data(this, n)), !1
}
}
})
}(jQuery, window), window.Modernizr = function (t, e, n) {
function i(t) {
y.cssText = t
}
function r(t, e) {
return typeof t === e
}
function s(t, e) {
return !!~("" + t).indexOf(e)
}
function a(t, e) {
for (var i in t) {
var r = t[i];
if (!s(r, "-") && y[r] !== n) return "pfx" == e ? r : !0
}
return !1
}
function o(t, e, i) {
for (var s in t) {
var a = e[t[s]];
if (a !== n) return i === !1 ? t[s] : r(a, "function") ? a.bind(i || e) : a
}
return !1
}
function l(t, e, n) {
var i = t.charAt(0).toUpperCase() + t.slice(1),
s = (t + " " + k.join(i + " ") + i).split(" ");
return r(e, "string") || r(e, "undefined") ? a(s, e) : (s = (t + " " + C.join(i + " ") + i).split(" "), o(s, e, n))
}
function c() {
p.input = function (n) {
for (var i = 0, r = n.length; r > i; i++) $[n[i]] = n[i] in w;
return $.list && ($.list = !! e.createElement("datalist") && !! t.HTMLDataListElement), $
}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), p.inputtypes = function (t) {
for (var i, r, s, a = 0, o = t.length; o > a; a++) w.setAttribute("type", r = t[a]), i = "text" !== w.type, i && (w.value = b, w.style.cssText = "position:absolute;visibility:hidden;", /^range$/.test(r) && w.style.WebkitAppearance !== n ? (m.appendChild(w), s = e.defaultView, i = s.getComputedStyle && "textfield" !== s.getComputedStyle(w, null).WebkitAppearance && 0 !== w.offsetHeight, m.removeChild(w)) : /^(search|tel)$/.test(r) || (i = /^(url|email)$/.test(r) ? w.checkValidity && w.checkValidity() === !1 : w.value != b)), T[t[a]] = !! i;
return T
}("search tel url email datetime date month week time datetime-local number range color".split(" "))
}
var u, d, h = "2.6.2",
p = {}, f = !0,
m = e.documentElement,
g = "modernizr",
v = e.createElement(g),
y = v.style,
w = e.createElement("input"),
b = ":)",
_ = ({}.toString, " -webkit- -moz- -o- -ms- ".split(" ")),
x = "Webkit Moz O ms",
k = x.split(" "),
C = x.toLowerCase().split(" "),
S = {}, T = {}, $ = {}, E = [],
A = E.slice,
j = function (t, n, i, r) {
var s, a, o, l, c = e.createElement("div"),
u = e.body,
d = u || e.createElement("body");
if (parseInt(i, 10))
for (; i--;) o = e.createElement("div"), o.id = r ? r[i] : g + (i + 1), c.appendChild(o);
return s = ["&#173;", '<style id="s', g, '">', t, "</style>"].join(""), c.id = g, (u ? c : d).innerHTML += s, d.appendChild(c), u || (d.style.background = "", d.style.overflow = "hidden", l = m.style.overflow, m.style.overflow = "hidden", m.appendChild(d)), a = n(c, t), u ? c.parentNode.removeChild(c) : (d.parentNode.removeChild(d), m.style.overflow = l), !! a
}, O = function (e) {
var n = t.matchMedia || t.msMatchMedia;
if (n) return n(e).matches;
var i;
return j("@media " + e + " { #" + g + " { position: absolute; } }", function (e) {
i = "absolute" == (t.getComputedStyle ? getComputedStyle(e, null) : e.currentStyle).position
}), i
}, N = function () {
function t(t, s) {
s = s || e.createElement(i[t] || "div"), t = "on" + t;
var a = t in s;
return a || (s.setAttribute || (s = e.createElement("div")), s.setAttribute && s.removeAttribute && (s.setAttribute(t, ""), a = r(s[t], "function"), r(s[t], "undefined") || (s[t] = n), s.removeAttribute(t))), s = null, a
}
var i = {
select: "input",
change: "input",
submit: "form",
reset: "form",
error: "img",
load: "img",
abort: "img"
};
return t
}(),
I = {}.hasOwnProperty;
d = r(I, "undefined") || r(I.call, "undefined") ? function (t, e) {
return e in t && r(t.constructor.prototype[e], "undefined")
} : function (t, e) {
return I.call(t, e)
}, Function.prototype.bind || (Function.prototype.bind = function (t) {
var e = this;
if ("function" != typeof e) throw new TypeError;
var n = A.call(arguments, 1),
i = function () {
if (this instanceof i) {
var r = function () {};
r.prototype = e.prototype;
var s = new r,
a = e.apply(s, n.concat(A.call(arguments)));
return Object(a) === a ? a : s
}
return e.apply(t, n.concat(A.call(arguments)))
};
return i
}), S.flexbox = function () {
return l("flexWrap")
}, S.flexboxlegacy = function () {
return l("boxDirection")
}, S.canvas = function () {
var t = e.createElement("canvas");
return !!t.getContext && !! t.getContext("2d")
}, S.canvastext = function () {
return !!p.canvas && !! r(e.createElement("canvas").getContext("2d").fillText, "function")
}, S.touch = function () {
var n;
return "ontouchstart" in t || t.DocumentTouch && e instanceof DocumentTouch ? n = !0 : j(["@media (", _.join("touch-enabled),("), g, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function (t) {
n = 9 === t.offsetTop
}), n
}, S.postmessage = function () {
return !!t.postMessage
}, S.hashchange = function () {
return N("hashchange", t) && (e.documentMode === n || e.documentMode > 7)
}, S.history = function () {
return !!t.history && !! history.pushState
}, S.websockets = function () {
return "WebSocket" in t || "MozWebSocket" in t
}, S.rgba = function () {
return i("background-color:rgba(150,255,150,.5)"), s(y.backgroundColor, "rgba")
}, S.hsla = function () {
return i("background-color:hsla(120,40%,100%,.5)"), s(y.backgroundColor, "rgba") || s(y.backgroundColor, "hsla")
}, S.multiplebgs = function () {
return i("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(y.background)
}, S.backgroundsize = function () {
return l("backgroundSize")
}, S.borderimage = function () {
return l("borderImage")
}, S.cssanimations = function () {
return l("animationName")
}, S.csscolumns = function () {
return l("columnCount")
}, S.cssgradients = function () {
var t = "background-image:",
e = "gradient(linear,left top,right bottom,from(#9f9),to(white));",
n = "linear-gradient(left top,#9f9, white);";
return i((t + "-webkit- ".split(" ").join(e + t) + _.join(n + t)).slice(0, -t.length)), s(y.backgroundImage, "gradient")
}, S.cssreflections = function () {
return l("boxReflect")
}, S.csstransforms = function () {
return !!l("transform")
}, S.csstransforms3d = function () {
var t = !! l("perspective");
return t && "webkitPerspective" in m.style && j("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function (e) {
t = 9 === e.offsetLeft && 3 === e.offsetHeight
}), t
}, S.csstransitions = function () {
return l("transition")
}, S.fontface = function () {
var t;
return j('@font-face {font-family:"font";src:url("https://")}', function (n, i) {
var r = e.getElementById("smodernizr"),
s = r.sheet || r.styleSheet,
a = s ? s.cssRules && s.cssRules[0] ? s.cssRules[0].cssText : s.cssText || "" : "";
t = /src/i.test(a) && 0 === a.indexOf(i.split(" ")[0])
}), t
}, S.generatedcontent = function () {
var t;
return j(["#", g, "{font:0/0 a}#", g, ':after{content:"', b, '";visibility:hidden;font:3px/1 a}'].join(""), function (e) {
t = e.offsetHeight >= 3
}), t
}, S.video = function () {
var t = e.createElement("video"),
n = !1;
try {
(n = !! t.canPlayType) && (n = new Boolean(n), n.ogg = t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), n.h264 = t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), n.webm = t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ""))
} catch (i) {}
return n
}, S.audio = function () {
var t = e.createElement("audio"),
n = !1;
try {
(n = !! t.canPlayType) && (n = new Boolean(n), n.ogg = t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), n.mp3 = t.canPlayType("audio/mpeg;").replace(/^no$/, ""), n.wav = t.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), n.m4a = (t.canPlayType("audio/x-m4a;") || t.canPlayType("audio/aac;")).replace(/^no$/, ""))
} catch (i) {}
return n
}, S.localstorage = function () {
try {
return localStorage.setItem(g, g), localStorage.removeItem(g), !0
} catch (t) {
return !1
}
}, S.sessionstorage = function () {
try {
return sessionStorage.setItem(g, g), sessionStorage.removeItem(g), !0
} catch (t) {
return !1
}
}, S.webworkers = function () {
return !!t.Worker
}, S.applicationcache = function () {
return !!t.applicationCache
};
for (var M in S) d(S, M) && (u = M.toLowerCase(), p[u] = S[M](), E.push((p[u] ? "" : "no-") + u));
return p.input || c(), p.addTest = function (t, e) {
if ("object" == typeof t)
for (var i in t) d(t, i) && p.addTest(i, t[i]);
else {
if (t = t.toLowerCase(), p[t] !== n) return p;
e = "function" == typeof e ? e() : e, "undefined" != typeof f && f && (m.className += " " + (e ? "" : "no-") + t), p[t] = e
}
return p
}, i(""), v = w = null,
function (t, e) {
function n(t, e) {
var n = t.createElement("p"),
i = t.getElementsByTagName("head")[0] || t.documentElement;
return n.innerHTML = "x<style>" + e + "</style>", i.insertBefore(n.lastChild, i.firstChild)
}
function i() {
var t = v.elements;
return "string" == typeof t ? t.split(" ") : t
}
function r(t) {
var e = g[t[f]];
return e || (e = {}, m++, t[f] = m, g[m] = e), e
}
function s(t, n, i) {
if (n || (n = e), u) return n.createElement(t);
i || (i = r(n));
var s;
return s = i.cache[t] ? i.cache[t].cloneNode() : p.test(t) ? (i.cache[t] = i.createElem(t)).cloneNode() : i.createElem(t), s.canHaveChildren && !h.test(t) ? i.frag.appendChild(s) : s
}
function a(t, n) {
if (t || (t = e), u) return t.createDocumentFragment();
n = n || r(t);
for (var s = n.frag.cloneNode(), a = 0, o = i(), l = o.length; l > a; a++) s.createElement(o[a]);
return s
}
function o(t, e) {
e.cache || (e.cache = {}, e.createElem = t.createElement, e.createFrag = t.createDocumentFragment, e.frag = e.createFrag()), t.createElement = function (n) {
return v.shivMethods ? s(n, t, e) : e.createElem(n)
}, t.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + i().join().replace(/\w+/g, function (t) {
return e.createElem(t), e.frag.createElement(t), 'c("' + t + '")'
}) + ");return n}")(v, e.frag)
}
function l(t) {
t || (t = e);
var i = r(t);
return v.shivCSS && !c && !i.hasCSS && (i.hasCSS = !! n(t, "article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")), u || o(t, i), t
}
var c, u, d = t.html5 || {}, h = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
p = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
f = "_html5shiv",
m = 0,
g = {};
! function () {
try {
var t = e.createElement("a");
t.innerHTML = "<xyz></xyz>", c = "hidden" in t, u = 1 == t.childNodes.length || function () {
e.createElement("a");
var t = e.createDocumentFragment();
return "undefined" == typeof t.cloneNode || "undefined" == typeof t.createDocumentFragment || "undefined" == typeof t.createElement
}()
} catch (n) {
c = !0, u = !0
}
}();
var v = {
elements: d.elements || "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
shivCSS: d.shivCSS !== !1,
supportsUnknownElements: u,
shivMethods: d.shivMethods !== !1,
type: "default",
shivDocument: l,
createElement: s,
createDocumentFragment: a
};
t.html5 = v, l(e)
}(this, e), p._version = h, p._prefixes = _, p._domPrefixes = C, p._cssomPrefixes = k, p.mq = O, p.hasEvent = N, p.testProp = function (t) {
return a([t])
}, p.testAllProps = l, p.testStyles = j, m.className = m.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + E.join(" ") : ""), p
}(this, this.document),
function (t, e, n) {
function i(t) {
return "[object Function]" == g.call(t)
}
function r(t) {
return "string" == typeof t
}
function s() {}
function a(t) {
return !t || "loaded" == t || "complete" == t || "uninitialized" == t
}
function o() {
var t = v.shift();
y = 1, t ? t.t ? f(function () {
("c" == t.t ? h.injectCss : h.injectJs)(t.s, 0, t.a, t.x, t.e, 1)
}, 0) : (t(), o()) : y = 0
}
function l(t, n, i, r, s, l, c) {
function u(e) {
if (!p && a(d.readyState) && (w.r = p = 1, !y && o(), d.onload = d.onreadystatechange = null, e)) {
"img" != t && f(function () {
_.removeChild(d)
}, 50);
for (var i in T[n]) T[n].hasOwnProperty(i) && T[n][i].onload()
}
}
var c = c || h.errorTimeout,
d = e.createElement(t),
p = 0,
g = 0,
w = {
t: i,
s: n,
e: s,
a: l,
x: c
};
1 === T[n] && (g = 1, T[n] = []), "object" == t ? d.data = n : (d.src = n, d.type = t), d.width = d.height = "0", d.onerror = d.onload = d.onreadystatechange = function () {
u.call(this, g)
}, v.splice(r, 0, w), "img" != t && (g || 2 === T[n] ? (_.insertBefore(d, b ? null : m), f(u, c)) : T[n].push(d))
}
function c(t, e, n, i, s) {
return y = 0, e = e || "j", r(t) ? l("c" == e ? k : x, t, e, this.i++, n, i, s) : (v.splice(this.i++, 0, t), 1 == v.length && o()), this
}
function u() {
var t = h;
return t.loader = {
load: c,
i: 0
}, t
}
var d, h, p = e.documentElement,
f = t.setTimeout,
m = e.getElementsByTagName("script")[0],
g = {}.toString,
v = [],
y = 0,
w = "MozAppearance" in p.style,
b = w && !! e.createRange().compareNode,
_ = b ? p : m.parentNode,
p = t.opera && "[object Opera]" == g.call(t.opera),
p = !! e.attachEvent && !p,
x = w ? "object" : p ? "script" : "img",
k = p ? "script" : x,
C = Array.isArray || function (t) {
return "[object Array]" == g.call(t)
}, S = [],
T = {}, $ = {
timeout: function (t, e) {
return e.length && (t.timeout = e[0]), t
}
};
h = function (t) {
function e(t) {
var e, n, i, t = t.split("!"),
r = S.length,
s = t.pop(),
a = t.length,
s = {
url: s,
origUrl: s,
prefixes: t
};
for (n = 0; a > n; n++) i = t[n].split("="), (e = $[i.shift()]) && (s = e(s, i));
for (n = 0; r > n; n++) s = S[n](s);
return s
}
function a(t, r, s, a, o) {
var l = e(t),
c = l.autoCallback;
l.url.split(".").pop().split("?").shift(), l.bypass || (r && (r = i(r) ? r : r[t] || r[a] || r[t.split("/").pop().split("?")[0]]), l.instead ? l.instead(t, r, s, a, o) : (T[l.url] ? l.noexec = !0 : T[l.url] = 1, s.load(l.url, l.forceCSS || !l.forceJS && "css" == l.url.split(".").pop().split("?").shift() ? "c" : n, l.noexec, l.attrs, l.timeout), (i(r) || i(c)) && s.load(function () {
u(), r && r(l.origUrl, o, a), c && c(l.origUrl, o, a), T[l.url] = 2
})))
}
function o(t, e) {
function n(t, n) {
if (t) {
if (r(t)) n || (d = function () {
var t = [].slice.call(arguments);
h.apply(this, t), p()
}), a(t, d, e, 0, c);
else if (Object(t) === t)
for (l in o = function () {
var e, n = 0;
for (e in t) t.hasOwnProperty(e) && n++;
return n
}(), t) t.hasOwnProperty(l) && (!n && !--o && (i(d) ? d = function () {
var t = [].slice.call(arguments);
h.apply(this, t), p()
} : d[l] = function (t) {
return function () {
var e = [].slice.call(arguments);
t && t.apply(this, e), p()
}
}(h[l])), a(t[l], d, e, l, c))
} else !n && p()
}
var o, l, c = !! t.test,
u = t.load || t.both,
d = t.callback || s,
h = d,
p = t.complete || s;
n(c ? t.yep : t.nope, !! u), u && n(u)
}
var l, c, d = this.yepnope.loader;
if (r(t)) a(t, 0, d, 0);
else if (C(t))
for (l = 0; l < t.length; l++) c = t[l], r(c) ? a(c, 0, d, 0) : C(c) ? h(c) : Object(c) === c && o(c, d);
else Object(t) === t && o(t, d)
}, h.addPrefix = function (t, e) {
$[t] = e
}, h.addFilter = function (t) {
S.push(t)
}, h.errorTimeout = 1e4, null == e.readyState && e.addEventListener && (e.readyState = "loading", e.addEventListener("DOMContentLoaded", d = function () {
e.removeEventListener("DOMContentLoaded", d, 0), e.readyState = "complete"
}, 0)), t.yepnope = u(), t.yepnope.executeStack = o, t.yepnope.injectJs = function (t, n, i, r, l, c) {
var u, d, p = e.createElement("script"),
r = r || h.errorTimeout;
p.src = t;
for (d in i) p.setAttribute(d, i[d]);
n = c ? o : n || s, p.onreadystatechange = p.onload = function () {
!u && a(p.readyState) && (u = 1, n(), p.onload = p.onreadystatechange = null)
}, f(function () {
u || (u = 1, n(1))
}, r), l ? p.onload() : m.parentNode.insertBefore(p, m)
}, t.yepnope.injectCss = function (t, n, i, r, a, l) {
var c, r = e.createElement("link"),
n = l ? o : n || s;
r.href = t, r.rel = "stylesheet", r.type = "text/css";
for (c in i) r.setAttribute(c, i[c]);
a || (m.parentNode.insertBefore(r, m), f(n, 0))
}
}(this, document), Modernizr.load = function () {
yepnope.apply(window, [].slice.call(arguments, 0))
},
function () {
var t, e, n, i, r;
t = 2500, r = null, i = !1, n = !1, window.comscoreBeacon = function () {
return (new Date).getTime() - r < t ? void 0 : ("undefined" != typeof COMSCORE && null !== COMSCORE && COMSCORE.beacon({
c1: "2",
c2: "8750086"
}), $.get("/pv.xml?t=" + (new Date).getTime()))
}, window.ga = function (e) {
return !window._gaq || (new Date).getTime() - r < t ? void 0 : (e = _.compact(_.flatten([
["_trackPageview"], e
])), window._gaq.push(e))
}, e = [], window.omniCallback = function (t) {
return e.push(t)
}, window.loadOmniture = function () {
return i = !0, n = !0, r = (new Date).getTime()
}, window.omni = function (s) {
var a, o, l, c, u, d, h, p, f, m, g, v, y, w, b, x, k, C, S, T, E, A, j;
if (i && window.s_gi && !(!n && !window.pageLoaded || (new Date).getTime() - r < t && !n)) {
for (n = !1, a = "mashtesladev", d = "mashable", m = "mashable.d2.sc.omtrdc.net", window.location.host.match(/^mashable.com/) && (a = "mashdev"), f = window.s_gi(a), l = null != s && null != s.track_link ? $.extend({}, s) : $.extend({}, window.__o, s), p = ["clearVars", "p_gvf", "p_gpv", "getQueryParam", "getTimeParting", "split", "usePlugins", "doPlugins"], y = 0, k = p.length; k > y; y++) h = p[y], f[h] = window.s[h];
for (f.charSet = "ISO-8859-1", f.currencyCode = "USD", f.trackDownloadLinks = !1, f.trackExternalLinks = !0, f.trackInlineStats = !1, f.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx", f.linkInternalFilters = "javascript:," + window.location.hostname, f.linkLeaveQueryString = !1, null != l.track_vars && (f.linkTrackVars = l.track_vars), null != l.track_events && (f.linkTrackEvents = l.track_events), f.visitorNamespace = d, f.trackingServer = m, v = (new Date).getUTCHours(), f.events = null == l.events || "" === l.events ? "event1" : _.some(["event25", "event35"], function (t) {
return~ l.events.indexOf(t)
}) ? l.events : l.events.split(",").concat("event1").join(), f.pageName = document.title, f.pageType = l.pageClass, f.channel = l.channel, f.prop1 = l.location || window.location.pathname, f.prop2 = l.content_type, f.prop3 = l.page_type || "Standard", f.prop4 = l.embedded_content, f.prop5 = l.content_source, f.prop6 = l.page_number, null != l.top_channel && (f.prop7 = l.top_channel), l.isPostView ? (null != l.post_lead_type && (f.prop9 = l.post_lead_type), f.prop10 = l.display_mode, null != l.content_source_type && (f.prop11 = l.content_source_type), null != l.content_source_name && (f.prop12 = l.content_source_name), null != l.author_name && (f.prop13 = l.author_name), null != l.age && (f.prop14 = l.age), f.prop15 = v, null != l.pub_day && (f.prop16 = l.pub_day), null != l.pub_month && (f.prop17 = l.pub_month), null != l.pub_year && (f.prop18 = l.pub_year), null != l.pub_date && (f.prop19 = l.pub_date), null != l.campaign && (f.prop51 = l.campaign), null != l.v_buy && (f.prop52 = String(l.v_buy)), null != l.v_cur && (f.prop53 = String(l.v_cur)), null != l.v_max && (f.prop54 = String(l.v_max)), null != l.h_pub && (f.prop55 = String(l.h_pub)), null != l.h_buy && (f.prop56 = String(l.h_buy)), null != l.h_pub_buy && (f.prop57 = String(l.h_pub_buy)), null != l.v_buy_i && (f.prop58 = String(l.v_buy_i)), null != l.v_cur_i && (f.prop59 = String(l.v_cur_i)), null != l.v_max_i && (f.prop60 = String(l.v_max_i)), null != l.topics && (f.list1 = l.topics)) : (f.prop9 = null, f.prop10 = null, f.prop11 = null, f.prop12 = null, f.prop13 = null, f.prop14 = null, f.prop15 = null, f.prop16 = null, f.prop17 = null, f.prop18 = null, f.prop19 = null, f.prop51 = null, f.prop52 = null, f.prop53 = null, f.prop54 = null, f.prop55 = null, f.prop56 = null, f.prop57 = null, f.prop58 = null, f.prop59 = null, f.prop60 = null), null != l.query && (f.prop31 = l.query), E = [1, 2, 3, 4, 5, 6, 7, 9, 31], w = 0, C = E.length; C > w; w++) c = E[w], f["eVar" + c] = null != f["prop" + c] ? "D=c" + c : null;
for (A = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19].concat([51, 52, 53, 54, 55, 56, 57, 58, 59, 60]), b = 0, S = A.length; S > b; b++) c = A[b], f["eVar" + c] = l.isPostView && null != f["prop" + c] ? "D=c" + c : null;
for (null != l.microNetwork && (f.eVar25 = l.microNetwork), null != l.microType && (f.eVar26 = l.microType), null != l.microUrl && (f.eVar27 = l.microUrl), null != l.gallery_view && (f.eVar35 = l.gallery_view), x = 0, T = e.length; T > x; x++) o = e[x], o(f);
if (null != l.raw) {
j = l.raw;
for (u in j) g = j[u], f[u] = g
}
return null != l.track_link ? f.tl(!0, "o", l.track_link) : f.t()
}
}
}.call(this),
function () {
function t(e, n, i) {
if (e === n) return 0 !== e || 1 / e == 1 / n;
if (null == e || null == n) return e === n;
if (e._chain && (e = e._wrapped), n._chain && (n = n._wrapped), e.isEqual && k.isFunction(e.isEqual)) return e.isEqual(n);
if (n.isEqual && k.isFunction(n.isEqual)) return n.isEqual(e);
var r = c.call(e);
if (r != c.call(n)) return !1;
switch (r) {
case "[object String]":
return e == String(n);
case "[object Number]":
return e != +e ? n != +n : 0 == e ? 1 / e == 1 / n : e == +n;
case "[object Date]":
case "[object Boolean]":
return +e == +n;
case "[object RegExp]":
return e.source == n.source && e.global == n.global && e.multiline == n.multiline && e.ignoreCase == n.ignoreCase
}
if ("object" != typeof e || "object" != typeof n) return !1;
for (var s = i.length; s--;)
if (i[s] == e) return !0;
i.push(e);
var a = 0,
o = !0;
if ("[object Array]" == r) {
if (a = e.length, o = a == n.length)
for (; a-- && (o = a in e == a in n && t(e[a], n[a], i)););
} else {
if ("constructor" in e != "constructor" in n || e.constructor != n.constructor) return !1;
for (var l in e)
if (k.has(e, l) && (a++, !(o = k.has(n, l) && t(e[l], n[l], i)))) break;
if (o) {
for (l in n)
if (k.has(n, l) && !a--) break;
o = !a
}
}
return i.pop(), o
}
var e = this,
n = e._,
i = {}, r = Array.prototype,
s = Object.prototype,
a = Function.prototype,
o = r.slice,
l = r.unshift,
c = s.toString,
u = s.hasOwnProperty,
d = r.forEach,
h = r.map,
p = r.reduce,
f = r.reduceRight,
m = r.filter,
g = r.every,
v = r.some,
y = r.indexOf,
w = r.lastIndexOf,
b = Array.isArray,
_ = Object.keys,
x = a.bind,
k = function (t) {
return new M(t)
};
"undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = k), exports._ = k) : e._ = k, k.VERSION = "1.3.3";
var C = k.each = k.forEach = function (t, e, n) {
if (null != t)
if (d && t.forEach === d) t.forEach(e, n);
else if (t.length === +t.length) {
for (var r = 0, s = t.length; s > r; r++)
if (r in t && e.call(n, t[r], r, t) === i) return
} else
for (var a in t)
if (k.has(t, a) && e.call(n, t[a], a, t) === i) return
};
k.map = k.collect = function (t, e, n) {
var i = [];
return null == t ? i : h && t.map === h ? t.map(e, n) : (C(t, function (t, r, s) {
i[i.length] = e.call(n, t, r, s)
}), t.length === +t.length && (i.length = t.length), i)
}, k.reduce = k.foldl = k.inject = function (t, e, n, i) {
var r = arguments.length > 2;
if (null == t && (t = []), p && t.reduce === p) return i && (e = k.bind(e, i)), r ? t.reduce(e, n) : t.reduce(e);
if (C(t, function (t, s, a) {
r ? n = e.call(i, n, t, s, a) : (n = t, r = !0)
}), !r) throw new TypeError("Reduce of empty array with no initial value");
return n
}, k.reduceRight = k.foldr = function (t, e, n, i) {
var r = arguments.length > 2;
if (null == t && (t = []), f && t.reduceRight === f) return i && (e = k.bind(e, i)), r ? t.reduceRight(e, n) : t.reduceRight(e);
var s = k.toArray(t).reverse();
return i && !r && (e = k.bind(e, i)), r ? k.reduce(s, e, n, i) : k.reduce(s, e)
}, k.find = k.detect = function (t, e, n) {
var i;
return S(t, function (t, r, s) {
return e.call(n, t, r, s) ? (i = t, !0) : void 0
}), i
}, k.filter = k.select = function (t, e, n) {
var i = [];
return null == t ? i : m && t.filter === m ? t.filter(e, n) : (C(t, function (t, r, s) {
e.call(n, t, r, s) && (i[i.length] = t)
}), i)
}, k.reject = function (t, e, n) {
var i = [];
return null == t ? i : (C(t, function (t, r, s) {
e.call(n, t, r, s) || (i[i.length] = t)
}), i)
}, k.every = k.all = function (t, e, n) {
var r = !0;
return null == t ? r : g && t.every === g ? t.every(e, n) : (C(t, function (t, s, a) {
return (r = r && e.call(n, t, s, a)) ? void 0 : i
}), !! r)
};
var S = k.some = k.any = function (t, e, n) {
e || (e = k.identity);
var r = !1;
return null == t ? r : v && t.some === v ? t.some(e, n) : (C(t, function (t, s, a) {
return r || (r = e.call(n, t, s, a)) ? i : void 0
}), !! r)
};
k.include = k.contains = function (t, e) {
var n = !1;
return null == t ? n : y && t.indexOf === y ? -1 != t.indexOf(e) : n = S(t, function (t) {
return t === e
})
}, k.invoke = function (t, e) {
var n = o.call(arguments, 2);
return k.map(t, function (t) {
return (k.isFunction(e) ? e || t : t[e]).apply(t, n)
})
}, k.pluck = function (t, e) {
return k.map(t, function (t) {
return t[e]
})
}, k.max = function (t, e, n) {
if (!e && k.isArray(t) && t[0] === +t[0]) return Math.max.apply(Math, t);
if (!e && k.isEmpty(t)) return -1 / 0;
var i = {
computed: -1 / 0
};
return C(t, function (t, r, s) {
var a = e ? e.call(n, t, r, s) : t;
a >= i.computed && (i = {
value: t,
computed: a
})
}), i.value
}, k.min = function (t, e, n) {
if (!e && k.isArray(t) && t[0] === +t[0]) return Math.min.apply(Math, t);
if (!e && k.isEmpty(t)) return 1 / 0;
var i = {
computed: 1 / 0
};
return C(t, function (t, r, s) {
var a = e ? e.call(n, t, r, s) : t;
a < i.computed && (i = {
value: t,
computed: a
})
}), i.value
}, k.shuffle = function (t) {
var e, n = [];
return C(t, function (t, i) {
e = Math.floor(Math.random() * (i + 1)), n[i] = n[e], n[e] = t
}), n
}, k.sortBy = function (t, e, n) {
var i = k.isFunction(e) ? e : function (t) {
return t[e]
};
return k.pluck(k.map(t, function (t, e, r) {
return {
value: t,
criteria: i.call(n, t, e, r)
}
}).sort(function (t, e) {
var n = t.criteria,
i = e.criteria;
return void 0 === n ? 1 : void 0 === i ? -1 : i > n ? -1 : n > i ? 1 : 0
}), "value")
}, k.groupBy = function (t, e) {
var n = {}, i = k.isFunction(e) ? e : function (t) {
return t[e]
};
return C(t, function (t, e) {
var r = i(t, e);
(n[r] || (n[r] = [])).push(t)
}), n
}, k.sortedIndex = function (t, e, n) {
n || (n = k.identity);
for (var i = 0, r = t.length; r > i;) {
var s = i + r >> 1;
n(t[s]) < n(e) ? i = s + 1 : r = s
}
return i
}, k.toArray = function (t) {
return t ? k.isArray(t) ? o.call(t) : k.isArguments(t) ? o.call(t) : t.toArray && k.isFunction(t.toArray) ? t.toArray() : k.values(t) : []
}, k.size = function (t) {
return k.isArray(t) ? t.length : k.keys(t).length
}, k.first = k.head = k.take = function (t, e, n) {
return null == e || n ? t[0] : o.call(t, 0, e)
}, k.initial = function (t, e, n) {
return o.call(t, 0, t.length - (null == e || n ? 1 : e))
}, k.last = function (t, e, n) {
return null == e || n ? t[t.length - 1] : o.call(t, Math.max(t.length - e, 0))
}, k.rest = k.tail = function (t, e, n) {
return o.call(t, null == e || n ? 1 : e)
}, k.compact = function (t) {
return k.filter(t, function (t) {
return !!t
})
}, k.flatten = function (t, e) {
return k.reduce(t, function (t, n) {
return k.isArray(n) ? t.concat(e ? n : k.flatten(n)) : (t[t.length] = n, t)
}, [])
}, k.without = function (t) {
return k.difference(t, o.call(arguments, 1))
}, k.uniq = k.unique = function (t, e, n) {
var i = n ? k.map(t, n) : t,
r = [];
return t.length < 3 && (e = !0), k.reduce(i, function (n, i, s) {
return (e ? k.last(n) === i && n.length : k.include(n, i)) || (n.push(i), r.push(t[s])), n
}, []), r
}, k.union = function () {
return k.uniq(k.flatten(arguments, !0))
}, k.intersection = k.intersect = function (t) {
var e = o.call(arguments, 1);
return k.filter(k.uniq(t), function (t) {
return k.every(e, function (e) {
return k.indexOf(e, t) >= 0
})
})
}, k.difference = function (t) {
var e = k.flatten(o.call(arguments, 1), !0);
return k.filter(t, function (t) {
return !k.include(e, t)
})
}, k.zip = function () {
for (var t = o.call(arguments), e = k.max(k.pluck(t, "length")), n = new Array(e), i = 0; e > i; i++) n[i] = k.pluck(t, "" + i);
return n
}, k.indexOf = function (t, e, n) {
if (null == t) return -1;
var i, r;
if (n) return i = k.sortedIndex(t, e), t[i] === e ? i : -1;
if (y && t.indexOf === y) return t.indexOf(e);
for (i = 0, r = t.length; r > i; i++)
if (i in t && t[i] === e) return i;
return -1
}, k.lastIndexOf = function (t, e) {
if (null == t) return -1;
if (w && t.lastIndexOf === w) return t.lastIndexOf(e);
for (var n = t.length; n--;)
if (n in t && t[n] === e) return n;
return -1
}, k.range = function (t, e, n) {
arguments.length <= 1 && (e = t || 0, t = 0), n = arguments[2] || 1;
for (var i = Math.max(Math.ceil((e - t) / n), 0), r = 0, s = new Array(i); i > r;) s[r++] = t, t += n;
return s
};
var T = function () {};
k.bind = function (t, e) {
var n, i;
if (t.bind === x && x) return x.apply(t, o.call(arguments, 1));
if (!k.isFunction(t)) throw new TypeError;
return i = o.call(arguments, 2), n = function () {
if (!(this instanceof n)) return t.apply(e, i.concat(o.call(arguments)));
T.prototype = t.prototype;
var r = new T,
s = t.apply(r, i.concat(o.call(arguments)));
return Object(s) === s ? s : r
}
}, k.bindAll = function (t) {
var e = o.call(arguments, 1);
return 0 == e.length && (e = k.functions(t)), C(e, function (e) {
t[e] = k.bind(t[e], t)
}), t
}, k.memoize = function (t, e) {
var n = {};
return e || (e = k.identity),
function () {
var i = e.apply(this, arguments);
return k.has(n, i) ? n[i] : n[i] = t.apply(this, arguments)
}
}, k.delay = function (t, e) {
var n = o.call(arguments, 2);
return setTimeout(function () {
return t.apply(null, n)
}, e)
}, k.defer = function (t) {
return k.delay.apply(k, [t, 1].concat(o.call(arguments, 1)))
}, k.throttle = function (t, e) {
var n, i, r, s, a, o, l = k.debounce(function () {
a = s = !1
}, e);
return function () {
n = this, i = arguments;
var c = function () {
r = null, a && t.apply(n, i), l()
};
return r || (r = setTimeout(c, e)), s ? a = !0 : o = t.apply(n, i), l(), s = !0, o
}
}, k.debounce = function (t, e, n) {
var i;
return function () {
var r = this,
s = arguments,
a = function () {
i = null, n || t.apply(r, s)
};
n && !i && t.apply(r, s), clearTimeout(i), i = setTimeout(a, e)
}
}, k.once = function (t) {
var e, n = !1;
return function () {
return n ? e : (n = !0, e = t.apply(this, arguments))
}
}, k.wrap = function (t, e) {
return function () {
var n = [t].concat(o.call(arguments, 0));
return e.apply(this, n)
}
}, k.compose = function () {
var t = arguments;
return function () {
for (var e = arguments, n = t.length - 1; n >= 0; n--) e = [t[n].apply(this, e)];
return e[0]
}
}, k.after = function (t, e) {
return 0 >= t ? e() : function () {
return --t < 1 ? e.apply(this, arguments) : void 0
}
}, k.keys = _ || function (t) {
if (t !== Object(t)) throw new TypeError("Invalid object");
var e = [];
for (var n in t) k.has(t, n) && (e[e.length] = n);
return e
}, k.values = function (t) {
return k.map(t, k.identity)
}, k.functions = k.methods = function (t) {
var e = [];
for (var n in t) k.isFunction(t[n]) && e.push(n);
return e.sort()
}, k.extend = function (t) {
return C(o.call(arguments, 1), function (e) {
for (var n in e) t[n] = e[n]
}), t
}, k.pick = function (t) {
var e = {};
return C(k.flatten(o.call(arguments, 1)), function (n) {
n in t && (e[n] = t[n])
}), e
}, k.defaults = function (t) {
return C(o.call(arguments, 1), function (e) {
for (var n in e) null == t[n] && (t[n] = e[n])
}), t
}, k.clone = function (t) {
return k.isObject(t) ? k.isArray(t) ? t.slice() : k.extend({}, t) : t
}, k.tap = function (t, e) {
return e(t), t
}, k.isEqual = function (e, n) {
return t(e, n, [])
}, k.isEmpty = function (t) {
if (null == t) return !0;
if (k.isArray(t) || k.isString(t)) return 0 === t.length;
for (var e in t)
if (k.has(t, e)) return !1;
return !0
}, k.isElement = function (t) {
return !(!t || 1 != t.nodeType)
}, k.isArray = b || function (t) {
return "[object Array]" == c.call(t)
}, k.isObject = function (t) {
return t === Object(t)
}, k.isArguments = function (t) {
return "[object Arguments]" == c.call(t)
}, k.isArguments(arguments) || (k.isArguments = function (t) {
return !(!t || !k.has(t, "callee"))
}), k.isFunction = function (t) {
return "[object Function]" == c.call(t)
}, k.isString = function (t) {
return "[object String]" == c.call(t)
}, k.isNumber = function (t) {
return "[object Number]" == c.call(t)
}, k.isFinite = function (t) {
return k.isNumber(t) && isFinite(t)
}, k.isNaN = function (t) {
return t !== t
}, k.isBoolean = function (t) {
return t === !0 || t === !1 || "[object Boolean]" == c.call(t)
}, k.isDate = function (t) {
return "[object Date]" == c.call(t)
}, k.isRegExp = function (t) {
return "[object RegExp]" == c.call(t)
}, k.isNull = function (t) {
return null === t
}, k.isUndefined = function (t) {
return void 0 === t
}, k.has = function (t, e) {
return u.call(t, e)
}, k.noConflict = function () {
return e._ = n, this
}, k.identity = function (t) {
return t
}, k.times = function (t, e, n) {
for (var i = 0; t > i; i++) e.call(n, i)
}, k.escape = function (t) {
return ("" + t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/\//g, "&#x2F;")
}, k.result = function (t, e) {
if (null == t) return null;
var n = t[e];
return k.isFunction(n) ? n.call(t) : n
}, k.mixin = function (t) {
C(k.functions(t), function (e) {
P(e, k[e] = t[e])
})
};
var $ = 0;
k.uniqueId = function (t) {
var e = $++;
return t ? t + e : e
}, k.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var E = /.^/,
A = {
"\\": "\\",
"'": "'",
r: "\r",
n: "\n",
t: " ",
u2028: "\u2028",
u2029: "\u2029"
};
for (var j in A) A[A[j]] = j;
var O = /\\|'|\r|\n|\t|\u2028|\u2029/g,
N = /\\(\\|'|r|n|t|u2028|u2029)/g,
I = function (t) {
return t.replace(N, function (t, e) {
return A[e]
})
};
k.template = function (t, e, n) {
n = k.defaults(n || {}, k.templateSettings);
var i = "__p+='" + t.replace(O, function (t) {
return "\\" + A[t]
}).replace(n.escape || E, function (t, e) {
return "'+\n_.escape(" + I(e) + ")+\n'"
}).replace(n.interpolate || E, function (t, e) {
return "'+\n(" + I(e) + ")+\n'"
}).replace(n.evaluate || E, function (t, e) {
return "';\n" + I(e) + "\n;__p+='"
}) + "';\n";
n.variable || (i = "with(obj||{}){\n" + i + "}\n"), i = "var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" + i + "return __p;\n";
var r = new Function(n.variable || "obj", "_", i);
if (e) return r(e, k);
var s = function (t) {
return r.call(this, t, k)
};
return s.source = "function(" + (n.variable || "obj") + "){\n" + i + "}", s
}, k.chain = function (t) {
return k(t).chain()
};
var M = function (t) {
this._wrapped = t
};
k.prototype = M.prototype;
var L = function (t, e) {
return e ? k(t).chain() : t
}, P = function (t, e) {
M.prototype[t] = function () {
var t = o.call(arguments);
return l.call(t, this._wrapped), L(e.apply(k, t), this._chain)
}
};
k.mixin(k), C(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (t) {
var e = r[t];
M.prototype[t] = function () {
var n = this._wrapped;
e.apply(n, arguments);
var i = n.length;
return "shift" != t && "splice" != t || 0 !== i || delete n[0], L(n, this._chain)
}
}), C(["concat", "join", "slice"], function (t) {
var e = r[t];
M.prototype[t] = function () {
return L(e.apply(this._wrapped, arguments), this._chain)
}
}), M.prototype.chain = function () {
return this._chain = !0, this
}, M.prototype.value = function () {
return this._wrapped
}
}.call(this),
function () {
var t, e = this,
n = e.Backbone,
i = Array.prototype.slice,
r = Array.prototype.splice;
t = "undefined" != typeof exports ? exports : e.Backbone = {}, t.VERSION = "0.9.2";
var s = e._;
s || "undefined" == typeof require || (s = require("underscore"));
var a = e.jQuery || e.Zepto || e.ender;
t.setDomLibrary = function (t) {
a = t
}, t.noConflict = function () {
return e.Backbone = n, this
}, t.emulateHTTP = !1, t.emulateJSON = !1;
var o = /\s+/,
l = t.Events = {
on: function (t, e, n) {
var i, r, s, a, l;
if (!e) return this;
for (t = t.split(o), i = this._callbacks || (this._callbacks = {}); r = t.shift();) l = i[r], s = l ? l.tail : {}, s.next = a = {}, s.context = n, s.callback = e, i[r] = {
tail: a,
next: l ? l.next : s
};
return this
},
off: function (t, e, n) {
var i, r, a, l, c, u;
if (r = this._callbacks) {
if (!(t || e || n)) return delete this._callbacks, this;
for (t = t ? t.split(o) : s.keys(r); i = t.shift();)
if (a = r[i], delete r[i], a && (e || n))
for (l = a.tail;
(a = a.next) !== l;) c = a.callback, u = a.context, (e && c !== e || n && u !== n) && this.on(i, c, u);
return this
}
},
trigger: function (t) {
var e, n, r, s, a, l, c;
if (!(r = this._callbacks)) return this;
for (l = r.all, t = t.split(o), c = i.call(arguments, 1); e = t.shift();) {
if (n = r[e])
for (s = n.tail;
(n = n.next) !== s;) n.callback.apply(n.context || this, c);
if (n = l)
for (s = n.tail, a = [e].concat(c);
(n = n.next) !== s;) n.callback.apply(n.context || this, a)
}
return this
}
};
l.bind = l.on, l.unbind = l.off;
var c = t.Model = function (t, e) {
var n;
t || (t = {}), e && e.parse && (t = this.parse(t)), (n = T(this, "defaults")) && (t = s.extend({}, n, t)), e && e.collection && (this.collection = e.collection), this.attributes = {}, this._escapedAttributes = {}, this.cid = s.uniqueId("c"), this.changed = {}, this._silent = {}, this._pending = {}, this.set(t, {
silent: !0
}), this.changed = {}, this._silent = {}, this._pending = {}, this._previousAttributes = {}, this.initialize.apply(this, arguments)
};
s.extend(c.prototype, l, {
changed: null,
_silent: null,
_pending: null,
idAttribute: "id",
initialize: function () {},
toJSON: function () {
return s.clone(this.attributes)
},
get: function (t) {
return this.attributes[t]
},
escape: function (t) {
var e;
if (e = this._escapedAttributes[t]) return e;
var n = this.get(t);
return this._escapedAttributes[t] = s.escape(null == n ? "" : "" + n)
},
has: function (t) {
return null != this.get(t)
},
set: function (t, e, n) {
var i, r, a;
if (s.isObject(t) || null == t ? (i = t, n = e) : (i = {}, i[t] = e), n || (n = {}), !i) return this;
if (i instanceof c && (i = i.attributes), n.unset)
for (r in i) i[r] = void 0;
if (!this._validate(i, n)) return !1;
this.idAttribute in i && (this.id = i[this.idAttribute]);
var o = n.changes = {}, l = this.attributes,
u = this._escapedAttributes,
d = this._previousAttributes || {};
for (r in i) a = i[r], (!s.isEqual(l[r], a) || n.unset && s.has(l, r)) && (delete u[r], (n.silent ? this._silent : o)[r] = !0), n.unset ? delete l[r] : l[r] = a, s.isEqual(d[r], a) && s.has(l, r) == s.has(d, r) ? (delete this.changed[r], delete this._pending[r]) : (this.changed[r] = a, n.silent || (this._pending[r] = !0));
return n.silent || this.change(n), this
},
unset: function (t, e) {
return (e || (e = {})).unset = !0, this.set(t, null, e)
},
clear: function (t) {
return (t || (t = {})).unset = !0, this.set(s.clone(this.attributes), t)
},
fetch: function (e) {
e = e ? s.clone(e) : {};
var n = this,
i = e.success;
return e.success = function (t, r, s) {
return n.set(n.parse(t, s), e) ? (i && i(n, t), void 0) : !1
}, e.error = t.wrapError(e.error, n, e), (this.sync || t.sync).call(this, "read", this, e)
},
save: function (e, n, i) {
var r, a;
if (s.isObject(e) || null == e ? (r = e, i = n) : (r = {}, r[e] = n), i = i ? s.clone(i) : {}, i.wait) {
if (!this._validate(r, i)) return !1;
a = s.clone(this.attributes)
}
var o = s.extend({}, i, {
silent: !0
});
if (r && !this.set(r, i.wait ? o : i)) return !1;
var l = this,
c = i.success;
i.success = function (t, e, n) {
var a = l.parse(t, n);
return i.wait && (delete i.wait, a = s.extend(r || {}, a)), l.set(a, i) ? (c ? c(l, t) : l.trigger("sync", l, t, i), void 0) : !1
}, i.error = t.wrapError(i.error, l, i);
var u = this.isNew() ? "create" : "update",
d = (this.sync || t.sync).call(this, u, this, i);
return i.wait && this.set(a, o), d
},
destroy: function (e) {
e = e ? s.clone(e) : {};
var n = this,
i = e.success,
r = function () {
n.trigger("destroy", n, n.collection, e)
};
if (this.isNew()) return r(), !1;
e.success = function (t) {
e.wait && r(), i ? i(n, t) : n.trigger("sync", n, t, e)
}, e.error = t.wrapError(e.error, n, e);
var a = (this.sync || t.sync).call(this, "delete", this, e);
return e.wait || r(), a
},
url: function () {
var t = T(this, "urlRoot") || T(this.collection, "url") || $();
return this.isNew() ? t : t + ("/" == t.charAt(t.length - 1) ? "" : "/") + encodeURIComponent(this.id)
},
parse: function (t) {
return t
},
clone: function () {
return new this.constructor(this.attributes)
},
isNew: function () {
return null == this.id
},
change: function (t) {
t || (t = {});
var e = this._changing;
this._changing = !0;
for (var n in this._silent) this._pending[n] = !0;
var i = s.extend({}, t.changes, this._silent);
this._silent = {};
for (var n in i) this.trigger("change:" + n, this, this.get(n), t);
if (e) return this;
for (; !s.isEmpty(this._pending);) {
this._pending = {}, this.trigger("change", this, t);
for (var n in this.changed) this._pending[n] || this._silent[n] || delete this.changed[n];
this._previousAttributes = s.clone(this.attributes)
}
return this._changing = !1, this
},
hasChanged: function (t) {
return arguments.length ? s.has(this.changed, t) : !s.isEmpty(this.changed)
},
changedAttributes: function (t) {
if (!t) return this.hasChanged() ? s.clone(this.changed) : !1;
var e, n = !1,
i = this._previousAttributes;
for (var r in t) s.isEqual(i[r], e = t[r]) || ((n || (n = {}))[r] = e);
return n
},
previous: function (t) {
return arguments.length && this._previousAttributes ? this._previousAttributes[t] : null
},
previousAttributes: function () {
return s.clone(this._previousAttributes)
},
isValid: function () {
return !this.validate(this.attributes)
},
_validate: function (t, e) {
if (e.silent || !this.validate) return !0;
t = s.extend({}, this.attributes, t);
var n = this.validate(t, e);
return n ? (e && e.error ? e.error(this, n, e) : this.trigger("error", this, n, e), !1) : !0
}
});
var u = t.Collection = function (t, e) {
e || (e = {}), e.model && (this.model = e.model), e.comparator && (this.comparator = e.comparator), this._reset(), this.initialize.apply(this, arguments), t && this.reset(t, {
silent: !0,
parse: e.parse
})
};
s.extend(u.prototype, l, {
model: c,
initialize: function () {},
toJSON: function (t) {
return this.map(function (e) {
return e.toJSON(t)
})
},
add: function (t, e) {
var n, i, a, o, l, c, u = {}, d = {}, h = [];
for (e || (e = {}), t = s.isArray(t) ? t.slice() : [t], n = 0, a = t.length; a > n; n++) {
if (!(o = t[n] = this._prepareModel(t[n], e))) throw new Error("Can't add an invalid model to a collection");
l = o.cid, c = o.id, u[l] || this._byCid[l] || null != c && (d[c] || this._byId[c]) ? h.push(n) : u[l] = d[c] = o
}
for (n = h.length; n--;) t.splice(h[n], 1);
for (n = 0, a = t.length; a > n; n++)(o = t[n]).on("all", this._onModelEvent, this), this._byCid[o.cid] = o, null != o.id && (this._byId[o.id] = o);
if (this.length += a, i = null != e.at ? e.at : this.models.length, r.apply(this.models, [i, 0].concat(t)), this.comparator && this.sort({
silent: !0
}), e.silent) return this;
for (n = 0, a = this.models.length; a > n; n++) u[(o = this.models[n]).cid] && (e.index = n, o.trigger("add", o, this, e));
return this
},
remove: function (t, e) {
var n, i, r, a;
for (e || (e = {}), t = s.isArray(t) ? t.slice() : [t], n = 0, i = t.length; i > n; n++) a = this.getByCid(t[n]) || this.get(t[n]), a && (delete this._byId[a.id], delete this._byCid[a.cid], r = this.indexOf(a), this.models.splice(r, 1), this.length--, e.silent || (e.index = r, a.trigger("remove", a, this, e)), this._removeReference(a));
return this
},
push: function (t, e) {
return t = this._prepareModel(t, e), this.add(t, e), t
},
pop: function (t) {
var e = this.at(this.length - 1);
return this.remove(e, t), e
},
unshift: function (t, e) {
return t = this._prepareModel(t, e), this.add(t, s.extend({
at: 0
}, e)), t
},
shift: function (t) {
var e = this.at(0);
return this.remove(e, t), e
},
get: function (t) {
return null == t ? void 0 : this._byId[null != t.id ? t.id : t]
},
getByCid: function (t) {
return t && this._byCid[t.cid || t]
},
at: function (t) {
return this.models[t]
},
where: function (t) {
return s.isEmpty(t) ? [] : this.filter(function (e) {
for (var n in t)
if (t[n] !== e.get(n)) return !1;
return !0
})
},
sort: function (t) {
if (t || (t = {}), !this.comparator) throw new Error("Cannot sort a set without a comparator");
var e = s.bind(this.comparator, this);
return 1 == this.comparator.length ? this.models = this.sortBy(e) : this.models.sort(e), t.silent || this.trigger("reset", this, t), this
},
pluck: function (t) {
return s.map(this.models, function (e) {
return e.get(t)
})
},
reset: function (t, e) {
t || (t = []), e || (e = {});
for (var n = 0, i = this.models.length; i > n; n++) this._removeReference(this.models[n]);
return this._reset(), this.add(t, s.extend({
silent: !0
}, e)), e.silent || this.trigger("reset", this, e), this
},
fetch: function (e) {
e = e ? s.clone(e) : {}, void 0 === e.parse && (e.parse = !0);
var n = this,
i = e.success;
return e.success = function (t, r, s) {
n[e.add ? "add" : "reset"](n.parse(t, s), e), i && i(n, t)
}, e.error = t.wrapError(e.error, n, e), (this.sync || t.sync).call(this, "read", this, e)
},
create: function (t, e) {
var n = this;
if (e = e ? s.clone(e) : {}, t = this._prepareModel(t, e), !t) return !1;
e.wait || n.add(t, e);
var i = e.success;
return e.success = function (r, s) {
e.wait && n.add(r, e), i ? i(r, s) : r.trigger("sync", t, s, e)
}, t.save(null, e), t
},
parse: function (t) {
return t
},
chain: function () {
return s(this.models).chain()
},
_reset: function () {
this.length = 0, this.models = [], this._byId = {}, this._byCid = {}
},
_prepareModel: function (t, e) {
if (e || (e = {}), t instanceof c) t.collection || (t.collection = this);
else {
var n = t;
e.collection = this, t = new this.model(n, e), t._validate(t.attributes, e) || (t = !1)
}
return t
},
_removeReference: function (t) {
this == t.collection && delete t.collection, t.off("all", this._onModelEvent, this)
},
_onModelEvent: function (t, e, n, i) {
("add" != t && "remove" != t || n == this) && ("destroy" == t && this.remove(e, i), e && t === "change:" + e.idAttribute && (delete this._byId[e.previous(e.idAttribute)], this._byId[e.id] = e), this.trigger.apply(this, arguments))
}
});
var d = ["forEach", "each", "map", "reduce", "reduceRight", "find", "detect", "filter", "select", "reject", "every", "all", "some", "any", "include", "contains", "invoke", "max", "min", "sortBy", "sortedIndex", "toArray", "size", "first", "initial", "rest", "last", "without", "indexOf", "shuffle", "lastIndexOf", "isEmpty", "groupBy"];
s.each(d, function (t) {
u.prototype[t] = function () {
return s[t].apply(s, [this.models].concat(s.toArray(arguments)))
}
});
var h = t.Router = function (t) {
t || (t = {}), t.routes && (this.routes = t.routes), this._bindRoutes(), this.initialize.apply(this, arguments)
}, p = /:\w+/g,
f = /\*\w+/g,
m = /[-[\]{}()+?.,\\^$|#\s]/g;
s.extend(h.prototype, l, {
initialize: function () {},
route: function (e, n, i) {
return t.history || (t.history = new g), s.isRegExp(e) || (e = this._routeToRegExp(e)), i || (i = this[n]), t.history.route(e, s.bind(function (r) {
var s = this._extractParameters(e, r);
i && i.apply(this, s), this.trigger.apply(this, ["route:" + n].concat(s)), t.history.trigger("route", this, n, s)
}, this)), this
},
navigate: function (e, n) {
t.history.navigate(e, n)
},
_bindRoutes: function () {
if (this.routes) {
var t = [];
for (var e in this.routes) t.unshift([e, this.routes[e]]);
for (var n = 0, i = t.length; i > n; n++) this.route(t[n][0], t[n][1], this[t[n][1]])
}
},
_routeToRegExp: function (t) {
return t = t.replace(m, "\\$&").replace(p, "([^/]+)").replace(f, "(.*?)"), new RegExp("^" + t + "$")
},
_extractParameters: function (t, e) {
return t.exec(e).slice(1)
}
});
var g = t.History = function () {
this.handlers = [], s.bindAll(this, "checkUrl")
}, v = /^[#\/]/,
y = /msie [\w.]+/;
g.started = !1, s.extend(g.prototype, l, {
interval: 50,
getHash: function (t) {
var e = t ? t.location : window.location,
n = e.href.match(/#(.*)$/);
return n ? n[1] : ""
},
getFragment: function (t, e) {
if (null == t)
if (this._hasPushState || e) {
t = window.location.pathname;
var n = window.location.search;
n && (t += n)
} else t = this.getHash();
return t.indexOf(this.options.root) || (t = t.substr(this.options.root.length)), t.replace(v, "")
},
start: function (t) {
if (g.started) throw new Error("Backbone.history has already been started");
g.started = !0, this.options = s.extend({}, {
root: "/"
}, this.options, t), this._wantsHashChange = this.options.hashChange !== !1, this._wantsPushState = !! this.options.pushState, this._hasPushState = !! (this.options.pushState && window.history && window.history.pushState);
var e = this.getFragment(),
n = document.documentMode,
i = y.exec(navigator.userAgent.toLowerCase()) && (!n || 7 >= n);
i && (this.iframe = a('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow, this.navigate(e)), this._hasPushState ? a(window).bind("popstate", this.checkUrl) : this._wantsHashChange && "onhashchange" in window && !i ? a(window).bind("hashchange", this.checkUrl) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)), this.fragment = e;
var r = window.location,
o = r.pathname == this.options.root;
return this._wantsHashChange && this._wantsPushState && !this._hasPushState && !o ? (this.fragment = this.getFragment(null, !0), window.location.replace(this.options.root + "#" + this.fragment), !0) : (this._wantsPushState && this._hasPushState && o && r.hash && (this.fragment = this.getHash().replace(v, ""), window.history.replaceState({}, document.title, r.protocol + "//" + r.host + this.options.root + this.fragment)), this.options.silent ? void 0 : this.loadUrl())
},
stop: function () {
a(window).unbind("popstate", this.checkUrl).unbind("hashchange", this.checkUrl), clearInterval(this._checkUrlInterval), g.started = !1
},
route: function (t, e) {
this.handlers.unshift({
route: t,
callback: e
})
},
checkUrl: function () {
var t = this.getFragment();
return t == this.fragment && this.iframe && (t = this.getFragment(this.getHash(this.iframe))), t == this.fragment ? !1 : (this.iframe && this.navigate(t), this.loadUrl() || this.loadUrl(this.getHash()), void 0)
},
loadUrl: function (t) {
var e = this.fragment = this.getFragment(t),
n = s.any(this.handlers, function (t) {
return t.route.test(e) ? (t.callback(e), !0) : void 0
});
return n
},
navigate: function (t, e) {
if (!g.started) return !1;
e && e !== !0 || (e = {
trigger: e
});
var n = (t || "").replace(v, "");
this.fragment != n && (this._hasPushState ? (0 != n.indexOf(this.options.root) && (n = this.options.root + n), this.fragment = n, window.history[e.replace ? "replaceState" : "pushState"]({}, document.title, n)) : this._wantsHashChange ? (this.fragment = n, this._updateHash(window.location, n, e.replace), this.iframe && n != this.getFragment(this.getHash(this.iframe)) && (e.replace || this.iframe.document.open().close(), this._updateHash(this.iframe.location, n, e.replace))) : window.location.assign(this.options.root + t), e.trigger && this.loadUrl(t))
},
_updateHash: function (t, e, n) {
n ? t.replace(t.toString().replace(/(javascript:|#).*$/, "") + "#" + e) : t.hash = e
}
});
var w = t.View = function (t) {
this.cid = s.uniqueId("view"), this._configure(t || {}), this._ensureElement(), this.initialize.apply(this, arguments), this.delegateEvents()
}, b = /^(\S+)\s*(.*)$/,
_ = ["model", "collection", "el", "id", "attributes", "className", "tagName"];
s.extend(w.prototype, l, {
tagName: "div",
$: function (t) {
return this.$el.find(t)
},
initialize: function () {},
render: function () {
return this
},
remove: function () {
return this.$el.remove(), this
},
make: function (t, e, n) {
var i = document.createElement(t);
return e && a(i).attr(e), n && a(i).html(n), i
},
setElement: function (t, e) {
return this.$el && this.undelegateEvents(), this.$el = t instanceof a ? t : a(t), this.el = this.$el[0], e !== !1 && this.delegateEvents(), this
},
delegateEvents: function (t) {
if (t || (t = T(this, "events"))) {
this.undelegateEvents();
for (var e in t) {
var n = t[e];
if (s.isFunction(n) || (n = this[t[e]]), !n) throw new Error('Method "' + t[e] + '" does not exist');
var i = e.match(b),
r = i[1],
a = i[2];
n = s.bind(n, this), r += ".delegateEvents" + this.cid, "" === a ? this.$el.bind(r, n) : this.$el.delegate(a, r, n)
}
}
},
undelegateEvents: function () {
this.$el.unbind(".delegateEvents" + this.cid)
},
_configure: function (t) {
this.options && (t = s.extend({}, this.options, t));
for (var e = 0, n = _.length; n > e; e++) {
var i = _[e];
t[i] && (this[i] = t[i])
}
this.options = t
},
_ensureElement: function () {
if (this.el) this.setElement(this.el, !1);
else {
var t = T(this, "attributes") || {};
this.id && (t.id = this.id), this.className && (t["class"] = this.className), this.setElement(this.make(this.tagName, t), !1)
}
}
});
var x = function (t, e) {
var n = S(this, t, e);
return n.extend = this.extend, n
};
c.extend = u.extend = h.extend = w.extend = x;
var k = {
create: "POST",
update: "PUT",
"delete": "DELETE",
read: "GET"
};
t.sync = function (e, n, i) {
var r = k[e];
i || (i = {});
var o = {
type: r,
dataType: "json"
};
return i.url || (o.url = T(n, "url") || $()), i.data || !n || "create" != e && "update" != e || (o.contentType = "application/json", o.data = JSON.stringify(n.toJSON())), t.emulateJSON && (o.contentType = "application/x-www-form-urlencoded", o.data = o.data ? {
model: o.data
} : {}), t.emulateHTTP && ("PUT" === r || "DELETE" === r) && (t.emulateJSON && (o.data._method = r), o.type = "POST", o.beforeSend = function (t) {
t.setRequestHeader("X-HTTP-Method-Override", r)
}), "GET" === o.type || t.emulateJSON || (o.processData = !1), a.ajax(s.extend(o, i))
}, t.wrapError = function (t, e, n) {
return function (i, r) {
r = i === e ? r : i, t ? t(e, r, n) : e.trigger("error", e, r, n)
}
};
var C = function () {}, S = function (t, e, n) {
var i;
return i = e && e.hasOwnProperty("constructor") ? e.constructor : function () {
t.apply(this, arguments)
}, s.extend(i, t), C.prototype = t.prototype, i.prototype = new C, e && s.extend(i.prototype, e), n && s.extend(i, n), i.prototype.constructor = i, i.__super__ = t.prototype, i
}, T = function (t, e) {
return t && t[e] ? s.isFunction(t[e]) ? t[e]() : t[e] : null
}, $ = function () {
throw new Error('A "url" property or function must be specified')
}
}.call(this),
/* bootstrap-tab.js v2.0.4
* Copyright 2012 Twitter, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");*/
! function (t) {
"use strict";
var e = function (e) {
this.element = t(e)
};
e.prototype = {
constructor: e,
show: function () {
var e, n, i, r = this.element,
s = r.closest("ul:not(.dropdown-menu)"),
a = r.attr("data-target");
a || (a = r.attr("href"), a = a && a.replace(/.*(?=#[^\s]*$)/, "")), r.parent("li").hasClass("active") || (e = s.find(".active a").last()[0], i = t.Event("show", {
relatedTarget: e
}), r.trigger(i), i.isDefaultPrevented() || (n = t(a), this.activate(r.parent("li"), s), this.activate(n, n.parent(), function () {
r.trigger({
type: "shown",
relatedTarget: e
})
})))
},
activate: function (e, n, i) {
function r() {
s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), e.addClass("active"), a ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"), e.parent(".dropdown-menu") && e.closest("li.dropdown").addClass("active"), i && i()
}
var s = n.find("> .active"),
a = i && t.support.transition && s.hasClass("fade");
a ? s.one(t.support.transition.end, r) : r(), s.removeClass("in")
}
}, t.fn.tab = function (n) {
return this.each(function () {
var i = t(this),
r = i.data("tab");
r || i.data("tab", r = new e(this)), "string" == typeof n && r[n]()
})
}, t.fn.tab.Constructor = e, t(function () {
t("body").on("click.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault(), t(this).tab("show")
})
})
}(window.jQuery),
/* bootstrap-dropdown.js v2.0.4
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); */
! function (t) {
"use strict";
function e() {
t(n).parent().removeClass("open")
}
var n = '[data-toggle="dropdown"]',
i = function (e) {
var n = t(e).on("click.dropdown.data-api", this.toggle);
t("html").on("click.dropdown.data-api", function () {
n.parent().removeClass("open")
})
};
i.prototype = {
constructor: i,
toggle: function () {
var n, i, r, s = t(this);
if (!s.is(".disabled, :disabled")) return i = s.attr("data-target"), i || (i = s.attr("href"), i = i && i.replace(/.*(?=#[^\s]*$)/, "")), n = t(i), n.length || (n = s.parent()), r = n.hasClass("open"), e(), r || n.toggleClass("open"), !1
}
}, t.fn.dropdown = function (e) {
return this.each(function () {
var n = t(this),
r = n.data("dropdown");
r || n.data("dropdown", r = new i(this)), "string" == typeof e && r[e].call(n)
})
}, t.fn.dropdown.Constructor = i, t(function () {
t("html").on("click.dropdown.data-api", e), t("body").on("click.dropdown", ".dropdown form", function (t) {
t.stopPropagation()
}).on("click.dropdown.data-api", n, i.prototype.toggle)
})
}(window.jQuery),
/* bootstrap-tooltip.js v2.0.4
* Copyright 2012 Twitter, Inc.
* Licensed under the Apache License, Version 2.0 (the "License"); */
! function (t) {
"use strict";
var e = function (t, e) {
this.init("tooltip", t, e)
};
e.prototype = {
constructor: e,
init: function (e, n, i) {
var r, s;
this.type = e, this.$element = t(n), this.options = this.getOptions(i), this.enabled = !0, "manual" != this.options.trigger && (r = "hover" == this.options.trigger ? "mouseenter" : "focus", s = "hover" == this.options.trigger ? "mouseleave" : "blur", this.$element.on(r, this.options.selector, t.proxy(this.enter, this)), this.$element.on(s, this.options.selector, t.proxy(this.leave, this))), this.options.selector ? this._options = t.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
},
getOptions: function (e) {
return e = t.extend({}, t.fn[this.type].defaults, e, this.$element.data()), e.delay && "number" == typeof e.delay && (e.delay = {
show: e.delay,
hide: e.delay
}), e
},
enter: function (e) {
var n = t(e.currentTarget)[this.type](this._options).data(this.type);
return n.options.delay && n.options.delay.show ? (clearTimeout(this.timeout), n.hoverState = "in", this.timeout = setTimeout(function () {
"in" == n.hoverState && n.show()
}, n.options.delay.show), void 0) : n.show()
},
leave: function (e) {
var n = t(e.currentTarget)[this.type](this._options).data(this.type);
return this.timeout && clearTimeout(this.timeout), n.options.delay && n.options.delay.hide ? (n.hoverState = "out", this.timeout = setTimeout(function () {
"out" == n.hoverState && n.hide()
}, n.options.delay.hide), void 0) : n.hide()
},
show: function () {
var t, e, n, i, r, s, a;
if (this.hasContent() && this.enabled) {
switch (t = this.tip(), this.setContent(), this.options.animation && t.addClass("fade"), s = "function" == typeof this.options.placement ? this.options.placement.call(this, t[0], this.$element[0]) : this.options.placement, e = /in/.test(s), t.remove().css({
top: 0,
left: 0,
display: "block"
}).appendTo(e ? this.$element : document.body), n = this.getPosition(e), i = t[0].offsetWidth, r = t[0].offsetHeight, e ? s.split(" ")[1] : s) {
case "bottom":
a = {
top: n.top + n.height,
left: n.left + n.width / 2 - i / 2
};
break;
case "top":
a = {
top: n.top - r,
left: n.left + n.width / 2 - i / 2
};
break;
case "left":
a = {
top: n.top + n.height / 2 - r / 2,
left: n.left - i
};
break;
case "right":
a = {
top: n.top + n.height / 2 - r / 2,
left: n.left + n.width
}
}
t.css(a).addClass(s).addClass("in")
}
},
isHTML: function (t) {
return "string" != typeof t || "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(t)
},
setContent: function () {
var t = this.tip(),
e = this.getTitle();
t.find(".tooltip-inner")[this.isHTML(e) ? "html" : "text"](e), t.removeClass("fade in top bottom left right")
},
hide: function () {
function e() {
var e = setTimeout(function () {
n.off(t.support.transition.end).remove()
}, 500);
n.one(t.support.transition.end, function () {
clearTimeout(e), n.remove()
})
}
var n = this.tip();
n.removeClass("in"), t.support.transition && this.$tip.hasClass("fade") ? e() : n.remove()
},
fixTitle: function () {
var t = this.$element;
(t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").removeAttr("title")
},
hasContent: function () {
return this.getTitle()
},
getPosition: function (e) {
return t.extend({}, e ? {
top: 0,
left: 0
} : this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
})
},
getTitle: function () {
var t, e = this.$element,
n = this.options;
return t = e.attr("data-original-title") || ("function" == typeof n.title ? n.title.call(e[0]) : n.title)
},
tip: function () {
return this.$tip = this.$tip || t(this.options.template)
},
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
},
toggle: function () {
this[this.tip().hasClass("in") ? "hide" : "show"]()
}
}, t.fn.tooltip = function (n) {
return this.each(function () {
var i = t(this),
r = i.data("tooltip"),
s = "object" == typeof n && n;
r || i.data("tooltip", r = new e(this, s)), "string" == typeof n && r[n]()
})
}, t.fn.tooltip.Constructor = e, t.fn.tooltip.defaults = {
animation: !0,
placement: "top",
selector: !1,
template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: "hover",
title: "",
delay: 0
}
}(window.jQuery);
/* base64
Copyright (c) 2010 Nick Galbreath
Licensed under the MIT License */
var base64 = {};
base64.PADCHAR = "=", base64.ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", base64.makeDOMException = function () {
try {
return new DOMException(DOMException.INVALID_CHARACTER_ERR)
} catch (t) {
var e = new Error("DOM Exception 5");
return e.code = e.number = 5, e.name = e.description = "INVALID_CHARACTER_ERR", e.toString = function () {
return "Error: " + e.name + ": " + e.message
}, e
}
}, base64.getbyte64 = function (t, e) {
var n = base64.ALPHA.indexOf(t.charAt(e));
if (-1 === n) throw base64.makeDOMException();
return n
}, base64.decode = function (t) {
if (window.atob) return window.atob(t);
t = "" + t;
var e, n, i, r = base64.getbyte64,
s = t.length;
if (0 === s) return t;
if (0 !== s % 4) throw base64.makeDOMException();
e = 0, t.charAt(s - 1) === base64.PADCHAR && (e = 1, t.charAt(s - 2) === base64.PADCHAR && (e = 2), s -= 4);
var a = [];
for (n = 0; s > n; n += 4) i = r(t, n) << 18 | r(t, n + 1) << 12 | r(t, n + 2) << 6 | r(t, n + 3), a.push(String.fromCharCode(i >> 16, 255 & i >> 8, 255 & i));
switch (e) {
case 1:
i = r(t, n) << 18 | r(t, n + 1) << 12 | r(t, n + 2) << 6, a.push(String.fromCharCode(i >> 16, 255 & i >> 8));
break;
case 2:
i = r(t, n) << 18 | r(t, n + 1) << 12, a.push(String.fromCharCode(i >> 16))
}
return a.join("")
}, base64.getbyte = function (t, e) {
var n = t.charCodeAt(e);
if (n > 255) throw base64.makeDOMException();
return n
}, base64.encode = function (t) {
if (window.btoa) return window.btoa(t);
if (1 !== arguments.length) throw new SyntaxError("Not enough arguments");
var e, n, i = base64.PADCHAR,
r = base64.ALPHA,
s = base64.getbyte,
a = [];
t = "" + t;
var o = t.length - t.length % 3;
if (0 === t.length) return t;
for (e = 0; o > e; e += 3) n = s(t, e) << 16 | s(t, e + 1) << 8 | s(t, e + 2), a.push(r.charAt(n >> 18)), a.push(r.charAt(63 & n >> 12)), a.push(r.charAt(63 & n >> 6)), a.push(r.charAt(63 & n));
switch (t.length - o) {
case 1:
n = s(t, e) << 16, a.push(r.charAt(n >> 18) + r.charAt(63 & n >> 12) + i + i);
break;
case 2:
n = s(t, e) << 16 | s(t, e + 1) << 8, a.push(r.charAt(n >> 18) + r.charAt(63 & n >> 12) + r.charAt(63 & n >> 6) + i)
}
return a.join("")
};
/*
Handlebars
Copyright (C) 2011 by Yehuda Katz
Licensed under the MIT License */
var Handlebars = {};
! function (t, e) {
t.VERSION = "1.0.0", t.COMPILER_REVISION = 4, t.REVISION_CHANGES = {
1: "<= 1.0.rc.2",
2: "== 1.0.0-rc.3",
3: "== 1.0.0-rc.4",
4: ">= 1.0.0"
}, t.helpers = {}, t.partials = {};
var n = Object.prototype.toString,
i = "[object Function]",
r = "[object Object]";
t.registerHelper = function (e, i, s) {
if (n.call(e) === r) {
if (s || i) throw new t.Exception("Arg not supported with multiple helpers");
t.Utils.extend(this.helpers, e)
} else s && (i.not = s), this.helpers[e] = i
}, t.registerPartial = function (e, i) {
n.call(e) === r ? t.Utils.extend(this.partials, e) : this.partials[e] = i
}, t.registerHelper("helperMissing", function (t) {
if (2 === arguments.length) return e;
throw new Error("Missing helper: '" + t + "'")
}), t.registerHelper("blockHelperMissing", function (e, r) {
var s = r.inverse || function () {}, a = r.fn,
o = n.call(e);
return o === i && (e = e.call(this)), e === !0 ? a(this) : e === !1 || null == e ? s(this) : "[object Array]" === o ? e.length > 0 ? t.helpers.each(e, r) : s(this) : a(e)
}), t.K = function () {}, t.createFrame = Object.create || function (e) {
t.K.prototype = e;
var n = new t.K;
return t.K.prototype = null, n
}, t.logger = {
DEBUG: 0,
INFO: 1,
WARN: 2,
ERROR: 3,
level: 3,
methodMap: {
0: "debug",
1: "info",
2: "warn",
3: "error"
},
log: function (e, n) {
if (t.logger.level <= e) {
var i = t.logger.methodMap[e];
"undefined" != typeof console && console[i] && console[i].call(console, n)
}
}
}, t.log = function (e, n) {
t.logger.log(e, n)
}, t.registerHelper("each", function (e, r) {
var s, a = r.fn,
o = r.inverse,
l = 0,
c = "",
u = n.call(e);
if (u === i && (e = e.call(this)), r.data && (s = t.createFrame(r.data)), e && "object" == typeof e)
if (e instanceof Array)
for (var d = e.length; d > l; l++) s && (s.index = l), c += a(e[l], {
data: s
});
else
for (var h in e) e.hasOwnProperty(h) && (s && (s.key = h), c += a(e[h], {
data: s
}), l++);
return 0 === l && (c = o(this)), c
}), t.registerHelper("if", function (e, r) {
var s = n.call(e);
return s === i && (e = e.call(this)), !e || t.Utils.isEmpty(e) ? r.inverse(this) : r.fn(this)
}), t.registerHelper("unless", function (e, n) {
return t.helpers["if"].call(this, e, {
fn: n.inverse,
inverse: n.fn
})
}), t.registerHelper("with", function (e, r) {
var s = n.call(e);
return s === i && (e = e.call(this)), t.Utils.isEmpty(e) ? void 0 : r.fn(e)
}), t.registerHelper("log", function (e, n) {
var i = n.data && null != n.data.level ? parseInt(n.data.level, 10) : 1;
t.log(i, e)
});
var s = function () {
function t() {
this.yy = {}
}
var e = {
trace: function () {},
yy: {},
symbols_: {
error: 2,
root: 3,
program: 4,
EOF: 5,
simpleInverse: 6,
statements: 7,
statement: 8,
openInverse: 9,
closeBlock: 10,
openBlock: 11,
mustache: 12,
partial: 13,
CONTENT: 14,
COMMENT: 15,
OPEN_BLOCK: 16,
inMustache: 17,
CLOSE: 18,
OPEN_INVERSE: 19,
OPEN_ENDBLOCK: 20,
path: 21,
OPEN: 22,
OPEN_UNESCAPED: 23,
CLOSE_UNESCAPED: 24,
OPEN_PARTIAL: 25,
partialName: 26,
params: 27,
hash: 28,
dataName: 29,
param: 30,
STRING: 31,
INTEGER: 32,
BOOLEAN: 33,
hashSegments: 34,
hashSegment: 35,
ID: 36,
EQUALS: 37,
DATA: 38,
pathSegments: 39,
SEP: 40,
$accept: 0,
$end: 1
},
terminals_: {
2: "error",
5: "EOF",
14: "CONTENT",
15: "COMMENT",
16: "OPEN_BLOCK",
18: "CLOSE",
19: "OPEN_INVERSE",
20: "OPEN_ENDBLOCK",
22: "OPEN",
23: "OPEN_UNESCAPED",
24: "CLOSE_UNESCAPED",
25: "OPEN_PARTIAL",
31: "STRING",
32: "INTEGER",
33: "BOOLEAN",
36: "ID",
37: "EQUALS",
38: "DATA",
40: "SEP"
},
productions_: [0, [3, 2],
[4, 2],
[4, 3],
[4, 2],
[4, 1],
[4, 1],
[4, 0],
[7, 1],
[7, 2],
[8, 3],
[8, 3],
[8, 1],
[8, 1],
[8, 1],
[8, 1],
[11, 3],
[9, 3],
[10, 3],
[12, 3],
[12, 3],
[13, 3],
[13, 4],
[6, 2],
[17, 3],
[17, 2],
[17, 2],
[17, 1],
[17, 1],
[27, 2],
[27, 1],
[30, 1],
[30, 1],
[30, 1],
[30, 1],
[30, 1],
[28, 1],
[34, 2],
[34, 1],
[35, 3],
[35, 3],
[35, 3],
[35, 3],
[35, 3],
[26, 1],
[26, 1],
[26, 1],
[29, 2],
[21, 1],
[39, 3],
[39, 1]
],
performAction: function (t, e, n, i, r, s) {
var a = s.length - 1;
switch (r) {
case 1:
return s[a - 1];
case 2:
this.$ = new i.ProgramNode([], s[a]);
break;
case 3:
this.$ = new i.ProgramNode(s[a - 2], s[a]);
break;
case 4:
this.$ = new i.ProgramNode(s[a - 1], []);
break;
case 5:
this.$ = new i.ProgramNode(s[a]);
break;
case 6:
this.$ = new i.ProgramNode([], []);
break;
case 7:
this.$ = new i.ProgramNode([]);
break;
case 8:
this.$ = [s[a]];
break;
case 9:
s[a - 1].push(s[a]), this.$ = s[a - 1];
break;
case 10:
this.$ = new i.BlockNode(s[a - 2], s[a - 1].inverse, s[a - 1], s[a]);
break;
case 11:
this.$ = new i.BlockNode(s[a - 2], s[a - 1], s[a - 1].inverse, s[a]);
break;
case 12:
this.$ = s[a];
break;
case 13:
this.$ = s[a];
break;
case 14:
this.$ = new i.ContentNode(s[a]);
break;
case 15:
this.$ = new i.CommentNode(s[a]);
break;
case 16:
this.$ = new i.MustacheNode(s[a - 1][0], s[a - 1][1]);
break;
case 17:
this.$ = new i.MustacheNode(s[a - 1][0], s[a - 1][1]);
break;
case 18:
this.$ = s[a - 1];
break;
case 19:
this.$ = new i.MustacheNode(s[a - 1][0], s[a - 1][1], "&" === s[a - 2][2]);
break;
case 20:
this.$ = new i.MustacheNode(s[a - 1][0], s[a - 1][1], !0);
break;
case 21:
this.$ = new i.PartialNode(s[a - 1]);
break;
case 22:
this.$ = new i.PartialNode(s[a - 2], s[a - 1]);
break;
case 23:
break;
case 24:
this.$ = [
[s[a - 2]].concat(s[a - 1]), s[a]
];
break;
case 25:
this.$ = [
[s[a - 1]].concat(s[a]), null
];
break;
case 26:
this.$ = [
[s[a - 1]], s[a]
];
break;
case 27:
this.$ = [
[s[a]], null
];
break;
case 28:
this.$ = [
[s[a]], null
];
break;
case 29:
s[a - 1].push(s[a]), this.$ = s[a - 1];
break;
case 30:
this.$ = [s[a]];
break;
case 31:
this.$ = s[a];
break;
case 32:
this.$ = new i.StringNode(s[a]);
break;
case 33:
this.$ = new i.IntegerNode(s[a]);
break;
case 34:
this.$ = new i.BooleanNode(s[a]);
break;
case 35:
this.$ = s[a];
break;
case 36:
this.$ = new i.HashNode(s[a]);
break;
case 37:
s[a - 1].push(s[a]), this.$ = s[a - 1];
break;
case 38:
this.$ = [s[a]];
break;
case 39:
this.$ = [s[a - 2], s[a]];
break;
case 40:
this.$ = [s[a - 2], new i.StringNode(s[a])];
break;
case 41:
this.$ = [s[a - 2], new i.IntegerNode(s[a])];
break;
case 42:
this.$ = [s[a - 2], new i.BooleanNode(s[a])];
break;
case 43:
this.$ = [s[a - 2], s[a]];
break;
case 44:
this.$ = new i.PartialNameNode(s[a]);
break;
case 45:
this.$ = new i.PartialNameNode(new i.StringNode(s[a]));
break;
case 46:
this.$ = new i.PartialNameNode(new i.IntegerNode(s[a]));
break;
case 47:
this.$ = new i.DataNode(s[a]);
break;
case 48:
this.$ = new i.IdNode(s[a]);
break;
case 49:
s[a - 2].push({
part: s[a],
separator: s[a - 1]
}), this.$ = s[a - 2];
break;
case 50:
this.$ = [{
part: s[a]
}]
}
},
table: [{
3: 1,
4: 2,
5: [2, 7],
6: 3,
7: 4,
8: 6,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 5],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
1: [3]
}, {
5: [1, 17]
}, {
5: [2, 6],
7: 18,
8: 6,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 19],
20: [2, 6],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
5: [2, 5],
6: 20,
8: 21,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 5],
20: [2, 5],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
17: 23,
18: [1, 22],
21: 24,
29: 25,
36: [1, 28],
38: [1, 27],
39: 26
}, {
5: [2, 8],
14: [2, 8],
15: [2, 8],
16: [2, 8],
19: [2, 8],
20: [2, 8],
22: [2, 8],
23: [2, 8],
25: [2, 8]
}, {
4: 29,
6: 3,
7: 4,
8: 6,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 5],
20: [2, 7],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
4: 30,
6: 3,
7: 4,
8: 6,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 5],
20: [2, 7],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
5: [2, 12],
14: [2, 12],
15: [2, 12],
16: [2, 12],
19: [2, 12],
20: [2, 12],
22: [2, 12],
23: [2, 12],
25: [2, 12]
}, {
5: [2, 13],
14: [2, 13],
15: [2, 13],
16: [2, 13],
19: [2, 13],
20: [2, 13],
22: [2, 13],
23: [2, 13],
25: [2, 13]
}, {
5: [2, 14],
14: [2, 14],
15: [2, 14],
16: [2, 14],
19: [2, 14],
20: [2, 14],
22: [2, 14],
23: [2, 14],
25: [2, 14]
}, {
5: [2, 15],
14: [2, 15],
15: [2, 15],
16: [2, 15],
19: [2, 15],
20: [2, 15],
22: [2, 15],
23: [2, 15],
25: [2, 15]
}, {
17: 31,
21: 24,
29: 25,
36: [1, 28],
38: [1, 27],
39: 26
}, {
17: 32,
21: 24,
29: 25,
36: [1, 28],
38: [1, 27],
39: 26
}, {
17: 33,
21: 24,
29: 25,
36: [1, 28],
38: [1, 27],
39: 26
}, {
21: 35,
26: 34,
31: [1, 36],
32: [1, 37],
36: [1, 28],
39: 26
}, {
1: [2, 1]
}, {
5: [2, 2],
8: 21,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 19],
20: [2, 2],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
17: 23,
21: 24,
29: 25,
36: [1, 28],
38: [1, 27],
39: 26
}, {
5: [2, 4],
7: 38,
8: 6,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 19],
20: [2, 4],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
5: [2, 9],
14: [2, 9],
15: [2, 9],
16: [2, 9],
19: [2, 9],
20: [2, 9],
22: [2, 9],
23: [2, 9],
25: [2, 9]
}, {
5: [2, 23],
14: [2, 23],
15: [2, 23],
16: [2, 23],
19: [2, 23],
20: [2, 23],
22: [2, 23],
23: [2, 23],
25: [2, 23]
}, {
18: [1, 39]
}, {
18: [2, 27],
21: 44,
24: [2, 27],
27: 40,
28: 41,
29: 48,
30: 42,
31: [1, 45],
32: [1, 46],
33: [1, 47],
34: 43,
35: 49,
36: [1, 50],
38: [1, 27],
39: 26
}, {
18: [2, 28],
24: [2, 28]
}, {
18: [2, 48],
24: [2, 48],
31: [2, 48],
32: [2, 48],
33: [2, 48],
36: [2, 48],
38: [2, 48],
40: [1, 51]
}, {
21: 52,
36: [1, 28],
39: 26
}, {
18: [2, 50],
24: [2, 50],
31: [2, 50],
32: [2, 50],
33: [2, 50],
36: [2, 50],
38: [2, 50],
40: [2, 50]
}, {
10: 53,
20: [1, 54]
}, {
10: 55,
20: [1, 54]
}, {
18: [1, 56]
}, {
18: [1, 57]
}, {
24: [1, 58]
}, {
18: [1, 59],
21: 60,
36: [1, 28],
39: 26
}, {
18: [2, 44],
36: [2, 44]
}, {
18: [2, 45],
36: [2, 45]
}, {
18: [2, 46],
36: [2, 46]
}, {
5: [2, 3],
8: 21,
9: 7,
11: 8,
12: 9,
13: 10,
14: [1, 11],
15: [1, 12],
16: [1, 13],
19: [1, 19],
20: [2, 3],
22: [1, 14],
23: [1, 15],
25: [1, 16]
}, {
14: [2, 17],
15: [2, 17],
16: [2, 17],
19: [2, 17],
20: [2, 17],
22: [2, 17],
23: [2, 17],
25: [2, 17]
}, {
18: [2, 25],
21: 44,
24: [2, 25],
28: 61,
29: 48,
30: 62,
31: [1, 45],
32: [1, 46],
33: [1, 47],
34: 43,
35: 49,
36: [1, 50],
38: [1, 27],
39: 26
}, {
18: [2, 26],
24: [2, 26]
}, {
18: [2, 30],
24: [2, 30],
31: [2, 30],
32: [2, 30],
33: [2, 30],
36: [2, 30],
38: [2, 30]
}, {
18: [2, 36],
24: [2, 36],
35: 63,
36: [1, 64]
}, {
18: [2, 31],
24: [2, 31],
31: [2, 31],
32: [2, 31],
33: [2, 31],
36: [2, 31],
38: [2, 31]
}, {
18: [2, 32],
24: [2, 32],
31: [2, 32],
32: [2, 32],
33: [2, 32],
36: [2, 32],
38: [2, 32]
}, {
18: [2, 33],
24: [2, 33],
31: [2, 33],
32: [2, 33],
33: [2, 33],
36: [2, 33],
38: [2, 33]
}, {
18: [2, 34],
24: [2, 34],
31: [2, 34],
32: [2, 34],
33: [2, 34],
36: [2, 34],
38: [2, 34]
}, {
18: [2, 35],
24: [2, 35],
31: [2, 35],
32: [2, 35],
33: [2, 35],
36: [2, 35],
38: [2, 35]
}, {
18: [2, 38],
24: [2, 38],
36: [2, 38]
}, {
18: [2, 50],
24: [2, 50],
31: [2, 50],
32: [2, 50],
33: [2, 50],
36: [2, 50],
37: [1, 65],
38: [2, 50],
40: [2, 50]
}, {
36: [1, 66]
}, {
18: [2, 47],
24: [2, 47],
31: [2, 47],
32: [2, 47],
33: [2, 47],
36: [2, 47],
38: [2, 47]
}, {
5: [2, 10],
14: [2, 10],
15: [2, 10],
16: [2, 10],
19: [2, 10],
20: [2, 10],
22: [2, 10],
23: [2, 10],
25: [2, 10]
}, {
21: 67,
36: [1, 28],
39: 26
}, {
5: [2, 11],
14: [2, 11],
15: [2, 11],
16: [2, 11],
19: [2, 11],
20: [2, 11],
22: [2, 11],
23: [2, 11],
25: [2, 11]
}, {
14: [2, 16],
15: [2, 16],
16: [2, 16],
19: [2, 16],
20: [2, 16],
22: [2, 16],
23: [2, 16],
25: [2, 16]
}, {
5: [2, 19],
14: [2, 19],
15: [2, 19],
16: [2, 19],
19: [2, 19],
20: [2, 19],
22: [2, 19],
23: [2, 19],
25: [2, 19]
}, {
5: [2, 20],
14: [2, 20],
15: [2, 20],
16: [2, 20],
19: [2, 20],
20: [2, 20],
22: [2, 20],
23: [2, 20],
25: [2, 20]
}, {
5: [2, 21],
14: [2, 21],
15: [2, 21],
16: [2, 21],
19: [2, 21],
20: [2, 21],
22: [2, 21],
23: [2, 21],
25: [2, 21]
}, {
18: [1, 68]
}, {
18: [2, 24],
24: [2, 24]
}, {
18: [2, 29],
24: [2, 29],
31: [2, 29],
32: [2, 29],
33: [2, 29],
36: [2, 29],
38: [2, 29]
}, {
18: [2, 37],
24: [2, 37],
36: [2, 37]
}, {
37: [1, 65]
}, {
21: 69,
29: 73,
31: [1, 70],
32: [1, 71],
33: [1, 72],
36: [1, 28],
38: [1, 27],
39: 26
}, {
18: [2, 49],
24: [2, 49],
31: [2, 49],
32: [2, 49],
33: [2, 49],
36: [2, 49],
38: [2, 49],
40: [2, 49]
}, {
18: [1, 74]
}, {
5: [2, 22],
14: [2, 22],
15: [2, 22],
16: [2, 22],
19: [2, 22],
20: [2, 22],
22: [2, 22],
23: [2, 22],
25: [2, 22]
}, {
18: [2, 39],
24: [2, 39],
36: [2, 39]
}, {
18: [2, 40],
24: [2, 40],
36: [2, 40]
}, {
18: [2, 41],
24: [2, 41],
36: [2, 41]
}, {
18: [2, 42],
24: [2, 42],
36: [2, 42]
}, {
18: [2, 43],
24: [2, 43],
36: [2, 43]
}, {
5: [2, 18],
14: [2, 18],
15: [2, 18],
16: [2, 18],
19: [2, 18],
20: [2, 18],
22: [2, 18],
23: [2, 18],
25: [2, 18]
}],
defaultActions: {
17: [2, 1]
},
parseError: function (t) {
throw new Error(t)
},
parse: function (t) {
function e() {
var t;
return t = n.lexer.lex() || 1, "number" != typeof t && (t = n.symbols_[t] || t), t
}
var n = this,
i = [0],
r = [null],
s = [],
a = this.table,
o = "",
l = 0,
c = 0,
u = 0;
this.lexer.setInput(t), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, "undefined" == typeof this.lexer.yylloc && (this.lexer.yylloc = {});
var d = this.lexer.yylloc;
s.push(d);
var h = this.lexer.options && this.lexer.options.ranges;
"function" == typeof this.yy.parseError && (this.parseError = this.yy.parseError);
for (var p, f, m, g, v, y, w, b, _, x = {};;) {
if (m = i[i.length - 1], this.defaultActions[m] ? g = this.defaultActions[m] : ((null === p || "undefined" == typeof p) && (p = e()), g = a[m] && a[m][p]), "undefined" == typeof g || !g.length || !g[0]) {
var k = "";
if (!u) {
_ = [];
for (y in a[m]) this.terminals_[y] && y > 2 && _.push("'" + this.terminals_[y] + "'");
k = this.lexer.showPosition ? "Parse error on line " + (l + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + _.join(", ") + ", got '" + (this.terminals_[p] || p) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (1 == p ? "end of input" : "'" + (this.terminals_[p] || p) + "'"), this.parseError(k, {
text: this.lexer.match,
token: this.terminals_[p] || p,
line: this.lexer.yylineno,
loc: d,
expected: _
})
}
}
if (g[0] instanceof Array && g.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + m + ", token: " + p);
switch (g[0]) {
case 1:
i.push(p), r.push(this.lexer.yytext), s.push(this.lexer.yylloc), i.push(g[1]), p = null, f ? (p = f, f = null) : (c = this.lexer.yyleng, o = this.lexer.yytext, l = this.lexer.yylineno, d = this.lexer.yylloc, u > 0 && u--);
break;
case 2:
if (w = this.productions_[g[1]][1], x.$ = r[r.length - w], x._$ = {
first_line: s[s.length - (w || 1)].first_line,
last_line: s[s.length - 1].last_line,
first_column: s[s.length - (w || 1)].first_column,
last_column: s[s.length - 1].last_column
}, h && (x._$.range = [s[s.length - (w || 1)].range[0], s[s.length - 1].range[1]]), v = this.performAction.call(x, o, c, l, this.yy, g[1], r, s), "undefined" != typeof v) return v;
w && (i = i.slice(0, 2 * -1 * w), r = r.slice(0, -1 * w), s = s.slice(0, -1 * w)), i.push(this.productions_[g[1]][0]), r.push(x.$), s.push(x._$), b = a[i[i.length - 2]][i[i.length - 1]], i.push(b);
break;
case 3:
return !0
}
}
return !0
}
}, n = function () {
var t = {
EOF: 1,
parseError: function (t, e) {
if (!this.yy.parser) throw new Error(t);
this.yy.parser.parseError(t, e)
},
setInput: function (t) {
return this._input = t, this._more = this._less = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this
},
input: function () {
var t = this._input[0];
this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
var e = t.match(/(?:\r\n?|\n).*/g);
return e ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t
},
unput: function (t) {
var e = t.length,
n = t.split(/(?:\r\n?|\n)/g);
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e - 1), this.offset -= e;
var i = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
var r = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: n ? (n.length === i.length ? this.yylloc.first_column : 0) + i[i.length - n.length].length - n[0].length : this.yylloc.first_column - e
}, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - e]), this
},
more: function () {
return this._more = !0, this
},
less: function (t) {
this.unput(this.match.slice(t))
},
pastInput: function () {
var t = this.matched.substr(0, this.matched.length - this.match.length);
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "")
},
upcomingInput: function () {
var t = this.match;
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "")
},
showPosition: function () {
var t = this.pastInput(),
e = new Array(t.length + 1).join("-");
return t + this.upcomingInput() + "\n" + e + "^"
},
next: function () {
if (this.done) return this.EOF;
this._input || (this.done = !0);
var t, e, n, i, r;
this._more || (this.yytext = "", this.match = "");
for (var s = this._currentRules(), a = 0; a < s.length && (n = this._input.match(this.rules[s[a]]), !n || e && !(n[0].length > e[0].length) || (e = n, i = a, this.options.flex)); a++);
return e ? (r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
}, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], t = this.performAction.call(this, this.yy, this, s[i], this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), t ? t : void 0) : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
})
},
lex: function () {
var t = this.next();
return "undefined" != typeof t ? t : this.lex()
},
begin: function (t) {
this.conditionStack.push(t)
},
popState: function () {
return this.conditionStack.pop()
},
_currentRules: function () {
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules
},
topState: function () {
return this.conditionStack[this.conditionStack.length - 2]
},
pushState: function (t) {
this.begin(t)
}
};
return t.options = {}, t.performAction = function (t, e, n, i) {
switch (n) {
case 0:
return e.yytext = "\\", 14;
case 1:
if ("\\" !== e.yytext.slice(-1) && this.begin("mu"), "\\" === e.yytext.slice(-1) && (e.yytext = e.yytext.substr(0, e.yyleng - 1), this.begin("emu")), e.yytext) return 14;
break;
case 2:
return 14;
case 3:
return "\\" !== e.yytext.slice(-1) && this.popState(), "\\" === e.yytext.slice(-1) && (e.yytext = e.yytext.substr(0, e.yyleng - 1)), 14;
case 4:
return e.yytext = e.yytext.substr(0, e.yyleng - 4), this.popState(), 15;
case 5:
return 25;
case 6:
return 16;
case 7:
return 20;
case 8:
return 19;
case 9:
return 19;
case 10:
return 23;
case 11:
return 22;
case 12:
this.popState(), this.begin("com");
break;
case 13:
return e.yytext = e.yytext.substr(3, e.yyleng - 5), this.popState(), 15;
case 14:
return 22;
case 15:
return 37;
case 16:
return 36;
case 17:
return 36;
case 18:
return 40;
case 19:
break;
case 20:
return this.popState(), 24;
case 21:
return this.popState(), 18;
case 22:
return e.yytext = e.yytext.substr(1, e.yyleng - 2).replace(/\\"/g, '"'), 31;
case 23:
return e.yytext = e.yytext.substr(1, e.yyleng - 2).replace(/\\'/g, "'"), 31;
case 24:
return 38;
case 25:
return 33;
case 26:
return 33;
case 27:
return 32;
case 28:
return 36;
case 29:
return e.yytext = e.yytext.substr(1, e.yyleng - 2), 36;
case 30:
return "INVALID";
case 31:
return 5
}
}, t.rules = [/^(?:\\\\(?=(\{\{)))/, /^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|$)))/, /^(?:[\s\S]*?--\}\})/, /^(?:\{\{>)/, /^(?:\{\{#)/, /^(?:\{\{\/)/, /^(?:\{\{\^)/, /^(?:\{\{\s*else\b)/, /^(?:\{\{\{)/, /^(?:\{\{&)/, /^(?:\{\{!--)/, /^(?:\{\{![\s\S]*?\}\})/, /^(?:\{\{)/, /^(?:=)/, /^(?:\.(?=[}\/ ]))/, /^(?:\.\.)/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}\}\})/, /^(?:\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=[}\s]))/, /^(?:false(?=[}\s]))/, /^(?:-?[0-9]+(?=[}\s]))/, /^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/], t.conditions = {
mu: {
rules: [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31],
inclusive: !1
},
emu: {
rules: [3],
inclusive: !1
},
com: {
rules: [4],
inclusive: !1
},
INITIAL: {
rules: [0, 1, 2, 31],
inclusive: !0
}
}, t
}();
return e.lexer = n, t.prototype = e, e.Parser = t, new t
}();
t.Parser = s, t.parse = function (e) {
return e.constructor === t.AST.ProgramNode ? e : (t.Parser.yy = t.AST, t.Parser.parse(e))
}, t.AST = {}, t.AST.ProgramNode = function (e, n) {
this.type = "program", this.statements = e, n && (this.inverse = new t.AST.ProgramNode(n))
}, t.AST.MustacheNode = function (t, e, n) {
this.type = "mustache", this.escaped = !n, this.hash = e;
var i = this.id = t[0],
r = this.params = t.slice(1),
s = this.eligibleHelper = i.isSimple;
this.isHelper = s && (r.length || e)
}, t.AST.PartialNode = function (t, e) {
this.type = "partial", this.partialName = t, this.context = e
}, t.AST.BlockNode = function (e, n, i, r) {
var s = function (e, n) {
if (e.original !== n.original) throw new t.Exception(e.original + " doesn't match " + n.original)
};
s(e.id, r), this.type = "block", this.mustache = e, this.program = n, this.inverse = i, this.inverse && !this.program && (this.isInverse = !0)
}, t.AST.ContentNode = function (t) {
this.type = "content", this.string = t
}, t.AST.HashNode = function (t) {
this.type = "hash", this.pairs = t
}, t.AST.IdNode = function (e) {
this.type = "ID";
for (var n = "", i = [], r = 0, s = 0, a = e.length; a > s; s++) {
var o = e[s].part;
if (n += (e[s].separator || "") + o, ".." === o || "." === o || "this" === o) {
if (i.length > 0) throw new t.Exception("Invalid path: " + n);
".." === o ? r++ : this.isScoped = !0
} else i.push(o)
}
this.original = n, this.parts = i, this.string = i.join("."), this.depth = r, this.isSimple = 1 === e.length && !this.isScoped && 0 === r, this.stringModeValue = this.string
}, t.AST.PartialNameNode = function (t) {
this.type = "PARTIAL_NAME", this.name = t.original
}, t.AST.DataNode = function (t) {
this.type = "DATA", this.id = t
}, t.AST.StringNode = function (t) {
this.type = "STRING", this.original = this.string = this.stringModeValue = t
}, t.AST.IntegerNode = function (t) {
this.type = "INTEGER", this.original = this.integer = t, this.stringModeValue = Number(t)
}, t.AST.BooleanNode = function (t) {
this.type = "BOOLEAN", this.bool = t, this.stringModeValue = "true" === t
}, t.AST.CommentNode = function (t) {
this.type = "comment", this.comment = t
};
var a = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"];
t.Exception = function () {
for (var t = Error.prototype.constructor.apply(this, arguments), e = 0; e < a.length; e++) this[a[e]] = t[a[e]]
}, t.Exception.prototype = new Error, t.SafeString = function (t) {
this.string = t
}, t.SafeString.prototype.toString = function () {
return this.string.toString()
};
var o = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"`": "&#x60;"
}, l = /[&<>"'`]/g,
c = /[&<>"'`]/,
u = function (t) {
return o[t] || "&amp;"
};
t.Utils = {
extend: function (t, e) {
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n])
},
escapeExpression: function (e) {
return e instanceof t.SafeString ? e.toString() : null == e || e === !1 ? "" : (e = e.toString(), c.test(e) ? e.replace(l, u) : e)
},
isEmpty: function (t) {
return t || 0 === t ? "[object Array]" === n.call(t) && 0 === t.length ? !0 : !1 : !0
}
};
var d = t.Compiler = function () {}, h = t.JavaScriptCompiler = function () {};
d.prototype = {
compiler: d,
disassemble: function () {
for (var t, e, n, i = this.opcodes, r = [], s = 0, a = i.length; a > s; s++)
if (t = i[s], "DECLARE" === t.opcode) r.push("DECLARE " + t.name + "=" + t.value);
else {
e = [];
for (var o = 0; o < t.args.length; o++) n = t.args[o], "string" == typeof n && (n = '"' + n.replace("\n", "\\n") + '"'), e.push(n);
r.push(t.opcode + " " + e.join(" "))
}
return r.join("\n")
},
equals: function (t) {
var e = this.opcodes.length;
if (t.opcodes.length !== e) return !1;
for (var n = 0; e > n; n++) {
var i = this.opcodes[n],
r = t.opcodes[n];
if (i.opcode !== r.opcode || i.args.length !== r.args.length) return !1;
for (var s = 0; s < i.args.length; s++)
if (i.args[s] !== r.args[s]) return !1
}
if (e = this.children.length, t.children.length !== e) return !1;
for (n = 0; e > n; n++)
if (!this.children[n].equals(t.children[n])) return !1;
return !0
},
guid: 0,
compile: function (t, e) {
this.children = [], this.depths = {
list: []
}, this.options = e;
var n = this.options.knownHelpers;
if (this.options.knownHelpers = {
helperMissing: !0,
blockHelperMissing: !0,
each: !0,
"if": !0,
unless: !0,
"with": !0,
log: !0
}, n)
for (var i in n) this.options.knownHelpers[i] = n[i];
return this.program(t)
},
accept: function (t) {
return this[t.type](t)
},
program: function (t) {
var e, n = t.statements;
this.opcodes = [];
for (var i = 0, r = n.length; r > i; i++) e = n[i], this[e.type](e);
return this.isSimple = 1 === r, this.depths.list = this.depths.list.sort(function (t, e) {
return t - e
}), this
},
compileProgram: function (t) {
var e, n = (new this.compiler).compile(t, this.options),
i = this.guid++;
this.usePartial = this.usePartial || n.usePartial, this.children[i] = n;
for (var r = 0, s = n.depths.list.length; s > r; r++) e = n.depths.list[r], 2 > e || this.addDepth(e - 1);
return i
},
block: function (t) {
var e = t.mustache,
n = t.program,
i = t.inverse;
n && (n = this.compileProgram(n)), i && (i = this.compileProgram(i));
var r = this.classifyMustache(e);
"helper" === r ? this.helperMustache(e, n, i) : "simple" === r ? (this.simpleMustache(e), this.opcode("pushProgram", n), this.opcode("pushProgram", i), this.opcode("emptyHash"), this.opcode("blockValue")) : (this.ambiguousMustache(e, n, i), this.opcode("pushProgram", n), this.opcode("pushProgram", i), this.opcode("emptyHash"), this.opcode("ambiguousBlockValue")), this.opcode("append")
},
hash: function (t) {
var e, n, i = t.pairs;
this.opcode("pushHash");
for (var r = 0, s = i.length; s > r; r++) e = i[r], n = e[1], this.options.stringParams ? (n.depth && this.addDepth(n.depth), this.opcode("getContext", n.depth || 0), this.opcode("pushStringParam", n.stringModeValue, n.type)) : this.accept(n), this.opcode("assignToHash", e[0]);
this.opcode("popHash")
},
partial: function (t) {
var e = t.partialName;
this.usePartial = !0, t.context ? this.ID(t.context) : this.opcode("push", "depth0"), this.opcode("invokePartial", e.name), this.opcode("append")
},
content: function (t) {
this.opcode("appendContent", t.string)
},
mustache: function (t) {
var e = this.options,
n = this.classifyMustache(t);
"simple" === n ? this.simpleMustache(t) : "helper" === n ? this.helperMustache(t) : this.ambiguousMustache(t), t.escaped && !e.noEscape ? this.opcode("appendEscaped") : this.opcode("append")
},
ambiguousMustache: function (t, e, n) {
var i = t.id,
r = i.parts[0],
s = null != e || null != n;
this.opcode("getContext", i.depth), this.opcode("pushProgram", e), this.opcode("pushProgram", n), this.opcode("invokeAmbiguous", r, s)
},
simpleMustache: function (t) {
var e = t.id;
"DATA" === e.type ? this.DATA(e) : e.parts.length ? this.ID(e) : (this.addDepth(e.depth), this.opcode("getContext", e.depth), this.opcode("pushContext")), this.opcode("resolvePossibleLambda")
},
helperMustache: function (t, e, n) {
var i = this.setupFullMustacheParams(t, e, n),
r = t.id.parts[0];
if (this.options.knownHelpers[r]) this.opcode("invokeKnownHelper", i.length, r);
else {
if (this.options.knownHelpersOnly) throw new Error("You specified knownHelpersOnly, but used the unknown helper " + r);
this.opcode("invokeHelper", i.length, r)
}
},
ID: function (t) {
this.addDepth(t.depth), this.opcode("getContext", t.depth);
var e = t.parts[0];
e ? this.opcode("lookupOnContext", t.parts[0]) : this.opcode("pushContext");
for (var n = 1, i = t.parts.length; i > n; n++) this.opcode("lookup", t.parts[n])
},
DATA: function (e) {
if (this.options.data = !0, e.id.isScoped || e.id.depth) throw new t.Exception("Scoped data references are not supported: " + e.original);
this.opcode("lookupData");
for (var n = e.id.parts, i = 0, r = n.length; r > i; i++) this.opcode("lookup", n[i])
},
STRING: function (t) {
this.opcode("pushString", t.string)
},
INTEGER: function (t) {
this.opcode("pushLiteral", t.integer)
},
BOOLEAN: function (t) {
this.opcode("pushLiteral", t.bool)
},
comment: function () {},
opcode: function (t) {
this.opcodes.push({
opcode: t,
args: [].slice.call(arguments, 1)
})
},
declare: function (t, e) {
this.opcodes.push({
opcode: "DECLARE",
name: t,
value: e
})
},
addDepth: function (t) {
if (isNaN(t)) throw new Error("EWOT");
0 !== t && (this.depths[t] || (this.depths[t] = !0, this.depths.list.push(t)))
},
classifyMustache: function (t) {
var e = t.isHelper,
n = t.eligibleHelper,
i = this.options;
if (n && !e) {
var r = t.id.parts[0];
i.knownHelpers[r] ? e = !0 : i.knownHelpersOnly && (n = !1)
}
return e ? "helper" : n ? "ambiguous" : "simple"
},
pushParams: function (t) {
for (var e, n = t.length; n--;) e = t[n], this.options.stringParams ? (e.depth && this.addDepth(e.depth), this.opcode("getContext", e.depth || 0), this.opcode("pushStringParam", e.stringModeValue, e.type)) : this[e.type](e)
},
setupMustacheParams: function (t) {
var e = t.params;
return this.pushParams(e), t.hash ? this.hash(t.hash) : this.opcode("emptyHash"), e
},
setupFullMustacheParams: function (t, e, n) {
var i = t.params;
return this.pushParams(i), this.opcode("pushProgram", e), this.opcode("pushProgram", n), t.hash ? this.hash(t.hash) : this.opcode("emptyHash"), i
}
};
var p = function (t) {
this.value = t
};
h.prototype = {
nameLookup: function (t, e) {
return /^[0-9]+$/.test(e) ? t + "[" + e + "]" : h.isValidJavaScriptVariableName(e) ? t + "." + e : t + "['" + e + "']"
},
appendToBuffer: function (t) {
return this.environment.isSimple ? "return " + t + ";" : {
appendToBuffer: !0,
content: t,
toString: function () {
return "buffer += " + t + ";"
}
}
},
initializeBuffer: function () {
return this.quotedString("")
},
namespace: "Handlebars",
compile: function (e, n, i, r) {
this.environment = e, this.options = n || {}, t.log(t.logger.DEBUG, this.environment.disassemble() + "\n\n"), this.name = this.environment.name, this.isChild = !! i, this.context = i || {
programs: [],
environments: [],
aliases: {}
}, this.preamble(), this.stackSlot = 0, this.stackVars = [], this.registers = {
list: []
}, this.compileStack = [], this.inlineStack = [], this.compileChildren(e, n);
var s, a = e.opcodes;
for (this.i = 0, v = a.length; this.i < v; this.i++) s = a[this.i], "DECLARE" === s.opcode ? this[s.name] = s.value : this[s.opcode].apply(this, s.args);
return this.createFunctionContext(r)
},
nextOpcode: function () {
var t = this.environment.opcodes;
return t[this.i + 1]
},
eat: function () {
this.i = this.i + 1
},
preamble: function () {
var t = [];
if (this.isChild) t.push("");
else {
var e = this.namespace,
n = "helpers = this.merge(helpers, " + e + ".helpers);";
this.environment.usePartial && (n = n + " partials = this.merge(partials, " + e + ".partials);"), this.options.data && (n += " data = data || {};"), t.push(n)
}
this.environment.isSimple ? t.push("") : t.push(", buffer = " + this.initializeBuffer()), this.lastContext = 0, this.source = t
},
createFunctionContext: function (e) {
var n = this.stackVars.concat(this.registers.list);
if (n.length > 0 && (this.source[1] = this.source[1] + ", " + n.join(", ")), !this.isChild)
for (var i in this.context.aliases) this.context.aliases.hasOwnProperty(i) && (this.source[1] = this.source[1] + ", " + i + "=" + this.context.aliases[i]);
this.source[1] && (this.source[1] = "var " + this.source[1].substring(2) + ";"), this.isChild || (this.source[1] += "\n" + this.context.programs.join("\n") + "\n"), this.environment.isSimple || this.source.push("return buffer;");
for (var r = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"], s = 0, a = this.environment.depths.list.length; a > s; s++) r.push("depth" + this.environment.depths.list[s]);
var o = this.mergeSource();
if (!this.isChild) {
var l = t.COMPILER_REVISION,
c = t.REVISION_CHANGES[l];
o = "this.compilerInfo = [" + l + ",'" + c + "'];\n" + o
}
if (e) return r.push(o), Function.apply(this, r);
var u = "function " + (this.name || "") + "(" + r.join(",") + ") {\n " + o + "}";
return t.log(t.logger.DEBUG, u + "\n\n"), u
},
mergeSource: function () {
for (var t, n = "", i = 0, r = this.source.length; r > i; i++) {
var s = this.source[i];
s.appendToBuffer ? t = t ? t + "\n + " + s.content : s.content : (t && (n += "buffer += " + t + ";\n ", t = e), n += s + "\n ")
}
return n
},
blockValue: function () {
this.context.aliases.blockHelperMissing = "helpers.blockHelperMissing";
var t = ["depth0"];
this.setupParams(0, t), this.replaceStack(function (e) {
return t.splice(1, 0, e), "blockHelperMissing.call(" + t.join(", ") + ")"
})
},
ambiguousBlockValue: function () {
this.context.aliases.blockHelperMissing = "helpers.blockHelperMissing";
var t = ["depth0"];
this.setupParams(0, t);
var e = this.topStack();
t.splice(1, 0, e), t[t.length - 1] = "options", this.source.push("if (!" + this.lastHelper + ") { " + e + " = blockHelperMissing.call(" + t.join(", ") + "); }")
},
appendContent: function (t) {
this.source.push(this.appendToBuffer(this.quotedString(t)))
},
append: function () {
this.flushInline();
var t = this.popStack();
this.source.push("if(" + t + " || " + t + " === 0) { " + this.appendToBuffer(t) + " }"), this.environment.isSimple && this.source.push("else { " + this.appendToBuffer("''") + " }")
},
appendEscaped: function () {
this.context.aliases.escapeExpression = "this.escapeExpression", this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")"))
},
getContext: function (t) {
this.lastContext !== t && (this.lastContext = t)
},
lookupOnContext: function (t) {
this.push(this.nameLookup("depth" + this.lastContext, t, "context"))
},
pushContext: function () {
this.pushStackLiteral("depth" + this.lastContext)
},
resolvePossibleLambda: function () {
this.context.aliases.functionType = '"function"', this.replaceStack(function (t) {
return "typeof " + t + " === functionType ? " + t + ".apply(depth0) : " + t
})
},
lookup: function (t) {
this.replaceStack(function (e) {
return e + " == null || " + e + " === false ? " + e + " : " + this.nameLookup(e, t, "context")
})
},
lookupData: function () {
this.push("data")
},
pushStringParam: function (t, e) {
this.pushStackLiteral("depth" + this.lastContext), this.pushString(e), "string" == typeof t ? this.pushString(t) : this.pushStackLiteral(t)
},
emptyHash: function () {
this.pushStackLiteral("{}"), this.options.stringParams && (this.register("hashTypes", "{}"), this.register("hashContexts", "{}"))
},
pushHash: function () {
this.hash = {
values: [],
types: [],
contexts: []
}
},
popHash: function () {
var t = this.hash;
this.hash = e, this.options.stringParams && (this.register("hashContexts", "{" + t.contexts.join(",") + "}"), this.register("hashTypes", "{" + t.types.join(",") + "}")), this.push("{\n " + t.values.join(",\n ") + "\n }")
},
pushString: function (t) {
this.pushStackLiteral(this.quotedString(t))
},
push: function (t) {
return this.inlineStack.push(t), t
},
pushLiteral: function (t) {
this.pushStackLiteral(t)
},
pushProgram: function (t) {
null != t ? this.pushStackLiteral(this.programExpression(t)) : this.pushStackLiteral(null)
},
invokeHelper: function (t, e) {
this.context.aliases.helperMissing = "helpers.helperMissing";
var n = this.lastHelper = this.setupHelper(t, e, !0),
i = this.nameLookup("depth" + this.lastContext, e, "context");
this.push(n.name + " || " + i), this.replaceStack(function (t) {
return t + " ? " + t + ".call(" + n.callParams + ") " + ": helperMissing.call(" + n.helperMissingParams + ")"
})
},
invokeKnownHelper: function (t, e) {
var n = this.setupHelper(t, e);
this.push(n.name + ".call(" + n.callParams + ")")
},
invokeAmbiguous: function (t, e) {
this.context.aliases.functionType = '"function"', this.pushStackLiteral("{}");
var n = this.setupHelper(0, t, e),
i = this.lastHelper = this.nameLookup("helpers", t, "helper"),
r = this.nameLookup("depth" + this.lastContext, t, "context"),
s = this.nextStack();
this.source.push("if (" + s + " = " + i + ") { " + s + " = " + s + ".call(" + n.callParams + "); }"), this.source.push("else { " + s + " = " + r + "; " + s + " = typeof " + s + " === functionType ? " + s + ".apply(depth0) : " + s + "; }")
},
invokePartial: function (t) {
var e = [this.nameLookup("partials", t, "partial"), "'" + t + "'", this.popStack(), "helpers", "partials"];
this.options.data && e.push("data"), this.context.aliases.self = "this", this.push("self.invokePartial(" + e.join(", ") + ")")
},
assignToHash: function (t) {
var e, n, i = this.popStack();
this.options.stringParams && (n = this.popStack(), e = this.popStack());
var r = this.hash;
e && r.contexts.push("'" + t + "': " + e), n && r.types.push("'" + t + "': " + n), r.values.push("'" + t + "': (" + i + ")")
},
compiler: h,
compileChildren: function (t, e) {
for (var n, i, r = t.children, s = 0, a = r.length; a > s; s++) {
n = r[s], i = new this.compiler;
var o = this.matchExistingProgram(n);
null == o ? (this.context.programs.push(""), o = this.context.programs.length, n.index = o, n.name = "program" + o, this.context.programs[o] = i.compile(n, e, this.context), this.context.environments[o] = n) : (n.index = o, n.name = "program" + o)
}
},
matchExistingProgram: function (t) {
for (var e = 0, n = this.context.environments.length; n > e; e++) {
var i = this.context.environments[e];
if (i && i.equals(t)) return e
}
},
programExpression: function (t) {
if (this.context.aliases.self = "this", null == t) return "self.noop";
for (var e, n = this.environment.children[t], i = n.depths.list, r = [n.index, n.name, "data"], s = 0, a = i.length; a > s; s++) e = i[s], 1 === e ? r.push("depth0") : r.push("depth" + (e - 1));
return (0 === i.length ? "self.program(" : "self.programWithDepth(") + r.join(", ") + ")"
},
register: function (t, e) {
this.useRegister(t), this.source.push(t + " = " + e + ";")
},
useRegister: function (t) {
this.registers[t] || (this.registers[t] = !0, this.registers.list.push(t))
},
pushStackLiteral: function (t) {
return this.push(new p(t))
},
pushStack: function (t) {
this.flushInline();
var e = this.incrStack();
return t && this.source.push(e + " = " + t + ";"), this.compileStack.push(e), e
},
replaceStack: function (t) {
var e, n = "",
i = this.isInline();
if (i) {
var r = this.popStack(!0);
if (r instanceof p) e = r.value;
else {
var s = this.stackSlot ? this.topStackName() : this.incrStack();
n = "(" + this.push(s) + " = " + r + "),", e = this.topStack()
}
} else e = this.topStack();
var a = t.call(this, e);
return i ? ((this.inlineStack.length || this.compileStack.length) && this.popStack(), this.push("(" + n + a + ")")) : (/^stack/.test(e) || (e = this.nextStack()), this.source.push(e + " = (" + n + a + ");")), e
},
nextStack: function () {
return this.pushStack()
},
incrStack: function () {
return this.stackSlot++, this.stackSlot > this.stackVars.length && this.stackVars.push("stack" + this.stackSlot), this.topStackName()
},
topStackName: function () {
return "stack" + this.stackSlot
},
flushInline: function () {
var t = this.inlineStack;
if (t.length) {
this.inlineStack = [];
for (var e = 0, n = t.length; n > e; e++) {
var i = t[e];
i instanceof p ? this.compileStack.push(i) : this.pushStack(i)
}
}
},
isInline: function () {
return this.inlineStack.length
},
popStack: function (t) {
var e = this.isInline(),
n = (e ? this.inlineStack : this.compileStack).pop();
return !t && n instanceof p ? n.value : (e || this.stackSlot--, n)
},
topStack: function (t) {
var e = this.isInline() ? this.inlineStack : this.compileStack,
n = e[e.length - 1];
return !t && n instanceof p ? n.value : n
},
quotedString: function (t) {
return '"' + t.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"'
},
setupHelper: function (t, e, n) {
var i = [];
this.setupParams(t, i, n);
var r = this.nameLookup("helpers", e, "helper");
return {
params: i,
name: r,
callParams: ["depth0"].concat(i).join(", "),
helperMissingParams: n && ["depth0", this.quotedString(e)].concat(i).join(", ")
}
},
setupParams: function (t, e, n) {
var i, r, s, a = [],
o = [],
l = [];
a.push("hash:" + this.popStack()), r = this.popStack(), s = this.popStack(), (s || r) && (s || (this.context.aliases.self = "this", s = "self.noop"), r || (this.context.aliases.self = "this", r = "self.noop"), a.push("inverse:" + r), a.push("fn:" + s));
for (var c = 0; t > c; c++) i = this.popStack(), e.push(i), this.options.stringParams && (l.push(this.popStack()), o.push(this.popStack()));
return this.options.stringParams && (a.push("contexts:[" + o.join(",") + "]"), a.push("types:[" + l.join(",") + "]"), a.push("hashContexts:hashContexts"), a.push("hashTypes:hashTypes")), this.options.data && a.push("data:data"), a = "{" + a.join(",") + "}", n ? (this.register("options", a), e.push("options")) : e.push(a), e.join(", ")
}
};
for (var f = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "), m = h.RESERVED_WORDS = {}, g = 0, v = f.length; v > g; g++) m[f[g]] = !0;
h.isValidJavaScriptVariableName = function (t) {
return !h.RESERVED_WORDS[t] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(t) ? !0 : !1
}, t.precompile = function (e, n) {
if (null == e || "string" != typeof e && e.constructor !== t.AST.ProgramNode) throw new t.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + e);
n = n || {}, "data" in n || (n.data = !0);
var i = t.parse(e),
r = (new d).compile(i, n);
return (new h).compile(r, n)
}, t.compile = function (n, i) {
function r() {
var r = t.parse(n),
s = (new d).compile(r, i),
a = (new h).compile(s, i, e, !0);
return t.template(a)
}
if (null == n || "string" != typeof n && n.constructor !== t.AST.ProgramNode) throw new t.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + n);
i = i || {}, "data" in i || (i.data = !0);
var s;
return function (t, e) {
return s || (s = r()), s.call(this, t, e)
}
}, t.VM = {
template: function (e) {
var n = {
escapeExpression: t.Utils.escapeExpression,
invokePartial: t.VM.invokePartial,
programs: [],
program: function (e, n, i) {
var r = this.programs[e];
return i ? r = t.VM.program(e, n, i) : r || (r = this.programs[e] = t.VM.program(e, n)), r
},
merge: function (e, n) {
var i = e || n;
return e && n && (i = {}, t.Utils.extend(i, n), t.Utils.extend(i, e)), i
},
programWithDepth: t.VM.programWithDepth,
noop: t.VM.noop,
compilerInfo: null
};
return function (i, r) {
r = r || {};
var s = e.call(n, t, i, r.helpers, r.partials, r.data),
a = n.compilerInfo || [],
o = a[0] || 1,
l = t.COMPILER_REVISION;
if (o !== l) {
if (l > o) {
var c = t.REVISION_CHANGES[l],
u = t.REVISION_CHANGES[o];
throw "Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + c + ") or downgrade your runtime to an older version (" + u + ")."
}
throw "Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + a[1] + ")."
}
return s
}
},
programWithDepth: function (t, e, n) {
var i = Array.prototype.slice.call(arguments, 3),
r = function (t, r) {
return r = r || {}, e.apply(this, [t, r.data || n].concat(i))
};
return r.program = t, r.depth = i.length, r
},
program: function (t, e, n) {
var i = function (t, i) {
return i = i || {}, e(t, i.data || n)
};
return i.program = t, i.depth = 0, i
},
noop: function () {
return ""
},
invokePartial: function (n, i, r, s, a, o) {
var l = {
helpers: s,
partials: a,
data: o
};
if (n === e) throw new t.Exception("The partial " + i + " could not be found");
if (n instanceof Function) return n(r, l);
if (t.compile) return a[i] = t.compile(n, {
data: o !== e
}), a[i](r, l);
throw new t.Exception("The partial " + i + " could not be compiled when running in runtime-only mode")
}
}, t.template = t.VM.template
}(Handlebars),
function () {
Handlebars.registerHelper("share_count", function (t) {
return t > 1e4 ? Math.round(t / 1e3) + "k" : t > 1e3 ? Math.round(t / 100) / 10 + "k" : t
}), Handlebars.registerHelper("debug", function (t) {
return console.log("Current Context"), console.log("===================="), console.log(this), t ? (console.log("Value"), console.log("===================="), console.log(t)) : void 0
})
}.call(this),
/*! jQuery requestAnimationFrame - v0.0.0 - 2012-08-31
* https://github.com/gnarf37/jquery-requestAnimationFrame
* Copyright (c) 2012 Corey Frang; Licensed MIT */
function () {
function t() {
e && (r(t), jQuery.fx.tick())
}
for (var e, n = 0, i = ["ms", "moz", "webkit", "o"], r = window.requestAnimationFrame, s = window.cancelAnimationFrame; n < i.length && !r; n++) r = window[i[n] + "RequestAnimationFrame"], s = s || window[i[n] + "CancelAnimationFrame"] || window[i[n] + "CancelRequestAnimationFrame"];
r ? (window.requestAnimationFrame = r, window.cancelAnimationFrame = s, jQuery.fx.timer = function (n) {
n() && jQuery.timers.push(n) && !e && (e = !0, t())
}, jQuery.fx.stop = function () {
e = !1
}) : (window.requestAnimationFrame = function (t) {
var e = (new Date).getTime(),
i = Math.max(0, 16 - (e - n)),
r = window.setTimeout(function () {
t(e + i)
}, i);
return n = e + i, r
}, window.cancelAnimationFrame = function (t) {
clearTimeout(t)
})
}(jQuery),
function (t) {
function e(t) {
return "object" == typeof t ? t : {
top: t,
left: t
}
}
var n = t.scrollTo = function (e, n, i) {
t(window).scrollTo(e, n, i)
};
n.defaults = {
axis: "xy",
duration: parseFloat(t.fn.jquery) >= 1.3 ? 0 : 1,
limit: !0
}, n.window = function () {
return t(window)._scrollable()
}, t.fn._scrollable = function () {
return this.map(function () {
var e = this,
n = !e.nodeName || -1 != t.inArray(e.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]);
if (!n) return e;
var i = (e.contentWindow || e).document || e.ownerDocument || e;
return /webkit/i.test(navigator.userAgent) || "BackCompat" == i.compatMode ? i.body : i.documentElement
})
}, t.fn.scrollTo = function (i, r, s) {
return "object" == typeof r && (s = r, r = 0), "function" == typeof s && (s = {
onAfter: s
}), "max" == i && (i = 9e9), s = t.extend({}, n.defaults, s), r = r || s.duration, s.queue = s.queue && s.axis.length > 1, s.queue && (r /= 2), s.offset = e(s.offset), s.over = e(s.over), this._scrollable().each(function () {
function a(t) {
c.animate(d, r, s.easing, t && function () {
t.call(this, i, s)
})
}
if (null != i) {
var o, l = this,
c = t(l),
u = i,
d = {}, h = c.is("html,body");
switch (typeof u) {
case "number":
case "string":
if (/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(u)) {
u = e(u);
break
}
if (u = t(u, this), !u.length) return;
case "object":
(u.is || u.style) && (o = (u = t(u)).offset())
}
t.each(s.axis.split(""), function (t, e) {
var i = "x" == e ? "Left" : "Top",
r = i.toLowerCase(),
p = "scroll" + i,
f = l[p],
m = n.max(l, e);
if (o) d[p] = o[r] + (h ? 0 : f - c.offset()[r]), s.margin && (d[p] -= parseInt(u.css("margin" + i)) || 0, d[p] -= parseInt(u.css("border" + i + "Width")) || 0), d[p] += s.offset[r] || 0, s.over[r] && (d[p] += u["x" == e ? "width" : "height"]() * s.over[r]);
else {
var g = u[r];
d[p] = g && g.slice && "%" == g.slice(-1) ? parseFloat(g) / 100 * m : g
}
s.limit && /^\d+$/.test(d[p]) && (d[p] = d[p] <= 0 ? 0 : Math.min(d[p], m)), !t && s.queue && (f != d[p] && a(s.onAfterFirst), delete d[p])
}), a(s.onAfter)
}
}).end()
}, n.max = function (e, n) {
var i = "x" == n ? "Width" : "Height",
r = "scroll" + i;
if (!t(e).is("html,body")) return e[r] - t(e)[i.toLowerCase()]();
var s = "client" + i,
a = e.ownerDocument.documentElement,
o = e.ownerDocument.body;
return Math.max(a[r], o[r]) - Math.min(a[s], o[s])
}
}(jQuery),
function () {
$.fn.bindFirst = function (t, e) {
var n, i, r, s, a;
for (this.bind(t, e), a = [], r = 0, s = this.length; s > r; r++) n = this[r], i = jQuery._data(n).events[t.split(".")[0]], a.push(i.unshift(i.pop()));
return a
}
}.call(this),
/* jquery.cookie
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses */
function () {
jQuery.cookie = function (t, e, n) {
if ("undefined" == typeof e) {
var i = null;
if (document.cookie && "" != document.cookie)
for (var r = document.cookie.split(";"), s = 0; s < r.length; s++) {
var a = jQuery.trim(r[s]);
if (a.substring(0, t.length + 1) == t + "=") {
i = decodeURIComponent(a.substring(t.length + 1));
break
}
}
return i
}
n = n || {}, null === e && (e = "", n.expires = -1);
var o = "";
if (n.expires && ("number" == typeof n.expires || n.expires.toUTCString)) {
var l;
"number" == typeof n.expires ? (l = new Date, l.setTime(l.getTime() + 1e3 * 60 * 60 * 24 * n.expires)) : l = n.expires, o = "; expires=" + l.toUTCString()
}
var c = n.path ? "; path=" + n.path : "",
u = n.domain ? "; domain=" + n.domain : "",
d = n.secure ? "; secure" : "";
document.cookie = [t, "=", encodeURIComponent(e), o, c, u, d].join("")
}
}(jQuery),
function (t) {
t.fn.hoverIntent = function (e, n) {
var i = {
sensitivity: 7,
interval: 100,
timeout: 0
};
i = t.extend(i, n ? {
over: e,
out: n
} : e);
var r, s, a, o, l = function (t) {
r = t.pageX, s = t.pageY
}, c = function (e, n) {
return n.hoverIntent_t = clearTimeout(n.hoverIntent_t), Math.abs(a - r) + Math.abs(o - s) < i.sensitivity ? (t(n).unbind("mousemove", l), n.hoverIntent_s = 1, i.over.apply(n, [e])) : (a = r, o = s, n.hoverIntent_t = setTimeout(function () {
c(e, n)
}, i.interval), void 0)
}, u = function (t, e) {
return e.hoverIntent_t = clearTimeout(e.hoverIntent_t), e.hoverIntent_s = 0, i.out.apply(e, [t])
}, d = function (e) {
var n = jQuery.extend({}, e),
r = this;
r.hoverIntent_t && (r.hoverIntent_t = clearTimeout(r.hoverIntent_t)), "mouseenter" == e.type ? (a = n.pageX, o = n.pageY, t(r).bind("mousemove", l), 1 != r.hoverIntent_s && (r.hoverIntent_t = setTimeout(function () {
c(n, r)
}, i.interval))) : (t(r).unbind("mousemove", l), 1 == r.hoverIntent_s && (r.hoverIntent_t = setTimeout(function () {
u(n, r)
}, i.timeout)))
};
return this.on({
mouseenter: d,
mouseleave: d
}, i.on)
}
}(jQuery),
function () {
! function (t) {
var e, n, i, r, s, a, o;
return a = function () {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (t) {
return setTimeout(t, 1e3 / 60)
}
}(), e = function () {
function e(e, n) {
this.elem = e, this.$elem = t(e), this.options = n, this.lastPosition = "up", this.options.handler = this.options.handler.bind(e)
}
return e.prototype.check = function (t) {
return this.offset = this.$elem.offset().top, "up" === this.lastPosition && t > this.offset - this.options.offset ? !0 : "down" === this.lastPosition && t < this.offset - this.options.offset ? !0 : !1
}, e.prototype.fire = function (t, e) {
return this.lastPosition !== e ? (this.lastPosition = e, this.options.handler(t, e)) : void 0
}, e
}(), o = [], r = -1, n = function (t, e) {
return t.offset - e.offset
}, s = function (t) {
var e, i, s, a, l, c, u, d, h, p, f;
if (l = window.pageYOffset, l !== r) {
for (a = l > r, r = l, i = [], u = 0, h = o.length; h > u; u++) c = o[u], c.check(l) && i.push(c);
if (0 !== i.length) {
for (i.sort(n), a || i.reverse(), f = [], s = d = 0, p = i.length; p > d; s = ++d) e = i[s], e.options.continuous || s === i.length - 1 ? f.push(e.fire(t, a ? "down" : "up")) : f.push(void 0);
return f
}
}
}, t(window).on("scroll", function (t) {
return a(function () {
return s(t)
})
}), i = {
offset: 0,
continuous: !0
}, t(document).on("page:change", function () {
return o = []
}), t.fn.waypoint = function (n, r) {
var s;
return "function" == typeof n ? (s = t.extend({}, i), s.handler = n) : (s = t.extend({}, i, n), s.handler || (s.handler = r)), this.each(function () {
return o.push(new e(this, s))
})
}
}(jQuery)
}.call(this),
function (t) {
var e = t(window),
n = function (t, e) {
return function () {
return t.apply(e, arguments)
}
}, i = 650;
t.extend(t.easing, {
easeInQuad: function (t, e, n, i, r) {
return i * (e /= r) * e + n
},
easeOutQuad: function (t, e, n, i, r) {
return -i * (e /= r) * (e - 2) + n
},
easeInOutQuad: function (t, e, n, i, r) {
return (e /= r / 2) < 1 ? i / 2 * e * e + n : -i / 2 * (--e * (e - 2) - 1) + n
},
easeInCubic: function (t, e, n, i, r) {
return i * (e /= r) * e * e + n
},
easeOutCubic: function (t, e, n, i, r) {
return i * ((e = e / r - 1) * e * e + 1) + n
},
easeInOutCubic: function (t, e, n, i, r) {
return (e /= r / 2) < 1 ? i / 2 * e * e * e + n : i / 2 * ((e -= 2) * e * e + 2) + n
}
});
var r = function (e, i) {
this.options = i, this.options.xOffset || (this.options.xOffset = 0), this.el = e, this.$this = t(e), this.axis = null, this.children = this.options.children || this.$this.find(i.snapTo), this.childOffsets = [], this.touching = !1, this.initialOffset = [0, 0], this.startEvent = "touchstart.enableMobileScroll", this.endEvent = "touchend.enableMobileScroll", this.moveEvent = "touchmove.enableMobileScroll", this.startOffsetX = this.startOffsetY = this.startTouchX = this.startTouchY = null, this.lastPosition = {}, this.lastTransform = null, this.lastActiveIndex = 0, this.targetX = 0, this.snap = n(this.snap, this), this.currentOffset = n(this.currentOffset, this), this.checkColumns = n(this.checkColumns, this), this.moveToIndex = n(this.moveToIndex, this);
var r = /iP(hone|od|ad)/.test(window.navigator.userAgent);
r && this.$this.css({
"-webkit-overflow-scrolling": "auto"
})
};
r.prototype = {
constructor: r,
currentOffset: function () {
return this.el.scrollLeft
},
computeChildOffsets: function () {
this.childOffsets = [];
for (var t = 0; t < this.children.length; t++) {
var e = this.children[t].style.webkitTransform;
if (e) {
var n = e.split(/[(,)]/, 3);
this.childOffsets.push([-1 * parseInt(n[1], 10), -1 * parseInt(n[2], 10)])
} else this.childOffsets.push([0, 0])
}
},
activate: function (t, n) {
var i = this;
this.initialOffset = [t || 0, n || 0], this.computeChildOffsets(), this.$this.on(this.startEvent, function (t) {
return i.axis = null, i.startTouchX = t.clientX || t.originalEvent.touches[0].clientX, i.startTouchY = t.clientY || t.originalEvent.touches[0].clientY, i.startOffsetX = this.scrollLeft, i.startOffsetY = this.scrollTop, i.touching = !0, i.$this.stop(), !0
}).on(this.moveEvent, function (t) {
if (!i.touching) return !0;
if (t.originalEvent.touches.length > 1) return i.cancel(), !0;
var e = t.clientX || t.originalEvent.touches[0].clientX,
n = i.startTouchX - e,
r = t.clientY || t.originalEvent.touches[0].clientY,
s = i.startTouchY - r;
if (!i.axis) {
var a = Math.sqrt(n * n + s * s);
if (a > i.options.deadzone && (i.axis = n * n > s * s ? "x" : "y", "y" === i.axis)) return i.cancel(), !0
}
if ("y" === i.axis) return !0;
if ("x" === i.axis) {
t.preventDefault();
var o = i.startOffsetX + n;
o != this.targetX && i.moveTo(o)
}
}).on(this.endEvent, function () {
if (i.touching) {
i.touching = !1, i.axis = null;
var t = this.scrollLeft - i.startOffsetX;
Math.abs(t) > i.options.minMovement ? i.snap() : i.cancel()
}
}), e.on("orientationchange.enableMobileScroll", function () {
i.checkColumns()
})
},
deactivate: function () {
this.$this.off(".enableMobileScroll"), e.off(".enableMobileScroll")
},
moveTo: function (t, e) {
if (null !== t && this.targetX !== t)
if (this.targetX = t, e) {
var n = Math.ceil(Math.abs(this.el.scrollLeft - t) / 320 * i);
n > i && (n = i), this.$this.animate({
scrollLeft: t
}, n, "easeOutCubic", this.checkColumns)
} else this.el.scrollLeft = t
},
moveToIndex: function (t) {
var e = this.children[t].offsetLeft - this.childOffsets[t][0];
this.lastActiveIndex = t, this.startOffsetX = e, this.$this.trigger("snapped", t, this.children[t]), this.moveTo(e, !0)
},
checkColumns: function () {
for (var t = this.el.getBoundingClientRect(), e = t.left, n = t.right + 50, i = [], r = 0; r < this.children.length; r++) {
var s = this.children[r].getBoundingClientRect();
s.left >= e && s.right <= n ? i.push(!0) : i.push(!1)
}
for (var r = 0; r < i.length; r++) {
var a = 1 == i[r] ? "activateColumn" : "deactivateColumn";
this.$this.trigger(a, [r, this.children[r]])
}
},
getCandidateByVisibleEdge: function (t) {
var e = 0,
n = this.currentOffset();
for (e = 0; e < this.children.length; e++) {
var i = this.children[e].offsetLeft - n;
if (i >= 0) break
}
return e > 0 && 0 > t && e--, e
},
snap: function () {
var t = this.getCandidateByVisibleEdge(this.currentOffset() - this.startOffsetX);
this.moveToIndex(t)
},
cancel: function () {
return this.touching = !1, this.moveTo(this.startOffsetX, !0), !0
}
}, t.fn.mobileScroll = function (e) {
"string" != typeof e && (e = t.extend({}, e, {
minMovement: 80,
deadzone: 30
}));
var n = Array.prototype.slice.call(arguments).slice(1);
return this.each(function () {
if (void 0 !== window.ontouchstart) {
var i = t(this),
s = i.data("mobileScroll");
if ("string" == typeof e) {
if (!s) throw "Element does not have a mobileScroll bound";
s[e].apply(s, n)
} else s || i.data("mobileScroll", s = new r(this, e))
}
})
}
}(jQuery),
function (t) {
t.fn.relatizeDate = function () {
return t(this).each(function () {
this.textContent ? this.textContent = t.relatizeDate(this) : this.innerHTML = t.relatizeDate(this)
})
}, t.relatizeDate = function (e) {
var n, i = t(e);
return n = void 0 !== i.attr("datetime") ? new Date(i.attr("datetime")) : void 0 !== i.attr("rel") ? new Date(i.attr("rel")) : new Date(i.text()), t.relatizeDate.timeAgoInWords(n)
}, $r = t.relatizeDate, t.extend(t.relatizeDate, {
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
strftime: function (t, e) {
var n = t.getDay(),
i = t.getMonth(),
r = t.getHours(),
s = t.getMinutes(),
a = function (t) {
var e = t.toString(10);
return new Array(2 - e.length + 1).join("0") + e
};
return e.replace(/\%([aAbBcdHImMpSwyY])/g, function (e) {
switch (e[1]) {
case "a":
return $r.shortDays[n];
case "A":
return $r.days[n];
case "b":
return $r.shortMonths[i];
case "B":
return $r.months[i];
case "c":
return t.toString();
case "d":
return a(t.getDate());
case "H":
return a(r);
case "I":
return a((r + 12) % 12);
case "m":
return a(i + 1);
case "M":
return a(s);
case "p":
return r > 12 ? "PM" : "AM";
case "S":
return a(t.getSeconds());
case "w":
return n;
case "y":
return a(t.getFullYear() % 100);
case "Y":
return t.getFullYear().toString()
}
})
},
timeAgoInWords: function (t, e) {
return $r.distanceOfTimeInWords(t, new Date, e)
},
distanceOfTimeInWords: function (t, e, n) {
var i = parseInt((e.getTime() - t.getTime()) / 1e3);
if (60 > i) return 1 == i ? "1 second ago" : i + " seconds ago";
if (120 > i) return "1 minute ago";
if (2700 > i) return parseInt(i / 60).toString() + " minutes ago";
if (7200 > i) return "1 hour ago";
if (86400 > i) return parseInt(i / 3600).toString() + " hours ago";
if (172800 > i) return "1 day ago";
var r = parseInt(i / 86400).toString();
if (r > 5) {
var s = "%b %d, %Y";
return n && (s += " %I:%M %p"), $r.strftime(t, s)
}
return r + " days ago"
}
})
}(jQuery),
/* jQuery Simple Dialog Plugin
* Copyright (c) 2009 Yusuke Horie
* Released under the MIT License:
*/
function (t) {
var e = null,
n = null,
i = 0,
r = 0,
s = 0,
a = null,
o = null,
l = null,
c = "",
u = "",
d = "",
h = null;
validMethods = {
put: !0,
post: !0,
"delete": !0
}, t.fn.simpleDialog = function (e) {
var n = t.extend({}, t.fn.simpleDialog.defaults, e);
return this.each(function (e, i) {
if (!i._sd) {
i._sd = !0;
var r = t(i),
s = r.is("form") ? "submit" : "click";
i.clickBinding = s, r.bind(s + ".simpledialog", function (e) {
e.preventDefault(), a = this, a.opts = n, o = e, p(), y();
var i = t(this);
if ("" != a.opts.title && (u = a.opts.title), i.is("a")) {
if (a.opts.useTitleAttr) {
var r = i.attr("title");
"undefined" != typeof r && "" != r && (u = r)
}
var s = i.attr("href");
if (s.match(/^#/)) {
var h = t("#" + i.attr("rel"));
if (0 == h.length) return !1;
l = h, c = l.clone().html(), l.empty(), f(c)
} else if (i.find("img").length > 0) a.opts.showCaption && (d = i.find("img").attr("title")), g(s);
else {
var v = i.attr("rel");
"undefined" != typeof v && (v = v.toLowerCase()), validMethods[v] ? m(s, {}, v) : m(s, {})
}
} else if (i.is(":submit", ":button")) {
var w = i.parents("form");
m(w.attr("action"), w.serialize(), w.attr("method"))
} else i.is("form") ? m(i.attr("action"), i.serialize(), i.attr("method")) : t.simpleDialog.close(e);
return !1
})
}
})
}, t.fn.simpleDialog.defaults = {
title: "",
useTitleAttr: !0,
containerId: "sd_container",
containerClass: "sd_container",
overlayId: "sd_overlay",
overlayClass: "sd_overlay",
loadingClass: "sd_loading",
closeLabelClass: "sd_closelabel",
showCloseLabel: !0,
closeLabel: "Close",
opacity: .6,
duration: 400,
closeDuration: 250,
easing: "linear",
zIndex: 2e4,
width: null,
height: null,
showCaption: !0,
open: null,
close: null,
closeSelector: ".close",
ajaxOptions: {},
showOverlay: !0
}, t.simpleDialog = {
close: function (e, n) {
return a ? (null != l && l.html(c), t.isFunction(a.opts.close) && a.opts.close.apply(this, ["undefined" == typeof e ? null : e, a]), n || (null != h && h.remove(), t("#" + a.opts.overlayId).animate({
opacity: 0
}, a.opts.closeDuration, null, function () {
t(this).remove()
})), !1) : void 0
}
};
var p = function () {
e = e || t(document), n = n || t(window), i = e.height(), r = n.height(), s = n.width(), u = "", d = ""
}, f = function (e) {
var n = "";
"" != u && (n += '<div class="sd_header">' + u + "</div>"), n += '<div class="sd_content">' + e + "</div>", "" != d && "undefined" != typeof d && (n += ' <div class="sd_footer">' + d + "</div>");
var i = t("<div />").addClass(a.opts.containerClass).hide().css({
position: "absolute",
height: "auto"
}).html(n).appendTo(document.body),
r = a.opts.width ? parseInt(a.opts.width) : i.width(),
s = a.opts.height ? parseInt(a.opts.height) : i.height(),
l = w(r, s);
h.removeClass(a.opts.loadingClass).animate({
width: r + "px",
left: parseInt(l[0]) + "px"
}, a.opts.duration, a.opts.easing, function () {
t(this).animate({
height: s + "px",
top: parseInt(l[1]) + "px"
}, a.opts.duration, a.opts.easing, function () {
if (t(this).css({
height: "auto"
}), i.removeClass(a.opts.containerClass).css({
position: "relative"
}).appendTo(h).show(), h.find(a.opts.closeSelector).bind("click.simpledialog", t.simpleDialog.close), a.opts.showCloseLabel) {
var e = '<div id="sd_closelabel" class="' + a.opts.closeLabelClass + '">' + '<a href="#">' + a.opts.closeLabel + "</a></div>";
h.append(e), h.find("#sd_closelabel a").bind("click.simpledialog", t.simpleDialog.close)
}
t.isFunction(a.opts.open) && a.opts.open.apply(h, [o, a])
})
})
};
t.simpleDialogManual = function (e) {
var n = t.extend({}, t.fn.simpleDialog.defaults, e);
a = {
opts: n
}, p(), y(), u = "", e.content && f(e.content)
};
var m = function (e, n, i) {
t.ajax(t.extend(a.opts.ajaxOptions || {}, {
type: "undefined" == typeof i ? "GET" : i,
url: e,
data: n,
cache: !1,
dataType: "html",
success: f
}))
};
t.simpleDialogManualAjax = function (e, n, i, r) {
var s = t.extend({}, t.fn.simpleDialog.defaults, e);
a = {
opts: s
}, p(), y(), m(n, i, r)
};
var g = function (e) {
t(document.body).append('<div id="sd_tmp_image" style="display:none;"><img src="' + e + '" alt="" /></div>');
var n = t("#sd_tmp_image");
n.find("img").load(function () {
var t = n.html();
n.remove(), f(t)
}).error(function (e) {
t.simpleDialog.close(e), n.remove()
})
}, v = function (e, n) {
var i = t(n),
r = i.width(),
s = i.height();
i.empty().css({
width: null,
height: null
}).removeClass().addClass(a.opts.loadingClass).addClass(a.opts.containerClass);
var o = i.width(),
l = i.height(),
c = w(o, l);
i.css({
width: r,
height: s
}).animate({
left: c[0] + "px",
top: c[1] + "px",
width: o + "px",
height: l + "px"
}, a.opts.duration)
}, y = function () {
if (t.simpleDialog.close(null, !0), a.opts.showOverlay) {
var e = t("#" + a.opts.overlayClass);
0 == e.length && t("<div />").attr("id", a.opts.overlayId).addClass(a.opts.overlayClass).css({
position: "absolute",
width: s,
height: i,
opacity: a.opts.opacity,
zIndex: a.opts.zIndex
}).bind("click.simpledialog", t.simpleDialog.close).appendTo(document.body)
}
var n = t("#" + a.opts.containerId);
if (0 == n.length) {
h = t("<div />").attr("id", a.opts.containerId).addClass(a.opts.loadingClass).addClass(a.opts.containerClass).hide().appendTo(document.body);
var r = h.width(),
o = h.height(),
l = w(r, o);
h.css({
position: "absolute",
left: l[0] + "px",
top: l[1] + "px",
width: r + "px",
height: o + "px",
zIndex: a.opts.zIndex + 1e3
}).show()
} else n.each(v)
}, w = function (t, n) {
return [i > r ? s / 2 - t / 2 - 18 : s / 2 - t / 2, e.scrollTop() + r / 2 - n / 2]
}
}(jQuery),
/* jQuery Transit - CSS3 transitions and transformations
* Copyright(c) 2011 Rico Sta. Cruz <[email protected]>
* MIT Licensed. */
function (t) {
"use strict";
function e(t) {
var e = ["Moz", "Webkit", "O", "ms"],
n = t.charAt(0).toUpperCase() + t.substr(1);
if (t in d.style) return t;
for (var i = 0; i < e.length; ++i) {
var r = e[i] + n;
if (r in d.style) return r
}
}
function n() {
return d.style[h.transform] = "", d.style[h.transform] = "rotateY(90deg)", "" !== d.style[h.transform]
}
function i(t) {
return "string" == typeof t && this.parse(t), this
}
function r(t, e, n) {
e === !0 ? t.queue(n) : e ? t.queue(e, n) : n()
}
function s(e) {
var n = [];
return t.each(e, function (e) {
e = t.camelCase(e), e = t.transit.propertyMap[e] || e, e = l(e), -1 === t.inArray(e, n) && n.push(e)
}), n
}
function a(e, n, i, r) {
var a = s(e);
t.cssEase[i] && (i = t.cssEase[i]);
var o = "" + u(n) + " " + i;
parseInt(r, 10) > 0 && (o += " " + u(r));
var l = [];
return t.each(a, function (t, e) {
l.push(e + " " + o)
}), l.join(", ")
}
function o(e, n) {
n || (t.cssNumber[e] = !0), t.transit.propertyMap[e] = h.transform, t.cssHooks[e] = {
get: function (n) {
var r = t(n).css("transit:transform") || new i;
return r.get(e)
},
set: function (n, r) {
var s = t(n).css("transit:transform") || new i;
s.setFromString(e, r), t(n).css({
transform: s
})
}
}
}
function l(t) {
return t.replace(/([A-Z])/g, function (t) {
return "-" + t.toLowerCase()
})
}
function c(t, e) {
return "string" != typeof t || t.match(/^[\-0-9\.]+$/) ? "" + t + e : t
}
function u(e) {
var n = e;
return t.fx.speeds[n] && (n = t.fx.speeds[n]), c(n, "ms")
}
t.transit = {
version: "0.1.3",
propertyMap: {
marginLeft: "margin",
marginRight: "margin",
marginBottom: "margin",
marginTop: "margin",
paddingLeft: "padding",
paddingRight: "padding",
paddingBottom: "padding",
paddingTop: "padding"
},
enabled: !0,
useTransitionEnd: !1
};
var d = document.createElement("div"),
h = {}, p = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
h.transition = e("transition"), h.transitionDelay = e("transitionDelay"), h.transform = e("transform"), h.transformOrigin = e("transformOrigin"), h.transform3d = n(), t.extend(t.support, h);
var f = {
MozTransition: "transitionend",
OTransition: "oTransitionEnd",
WebkitTransition: "webkitTransitionEnd",
msTransition: "MSTransitionEnd"
}, m = h.transitionEnd = f[h.transition] || null;
d = null, t.cssEase = {
_default: "ease",
"in": "ease-in",
out: "ease-out",
"in-out": "ease-in-out",
snap: "cubic-bezier(0,1,.5,1)"
}, t.cssHooks.transform = {
get: function (e) {
return t(e).data("transform")
},
set: function (e, n) {
var r = n;
r instanceof i || (r = new i(r)), e.style[h.transform] = "WebkitTransform" !== h.transform || p ? r.toString() : r.toString(!0), t(e).data("transform", r)
}
}, t.cssHooks.transformOrigin = {
get: function (t) {
return t.style[h.transformOrigin]
},
set: function (t, e) {
t.style[h.transformOrigin] = e
}
}, t.cssHooks.transition = {
get: function (t) {
return t.style[h.transition]
},
set: function (t, e) {
t.style[h.transition] = e
}
}, o("scale"), o("translate"), o("rotate"), o("rotateX"), o("rotateY"), o("rotate3d"), o("perspective"), o("skewX"), o("skewY"), o("x", !0), o("y", !0), i.prototype = {
setFromString: function (t, e) {
var n = "string" == typeof e ? e.split(",") : e.constructor === Array ? e : [e];
n.unshift(t), i.prototype.set.apply(this, n)
},
set: function (t) {
var e = Array.prototype.slice.apply(arguments, [1]);
this.setter[t] ? this.setter[t].apply(this, e) : this[t] = e.join(",")
},
get: function (t) {
return this.getter[t] ? this.getter[t].apply(this) : this[t] || 0
},
setter: {
rotate: function (t) {
this.rotate = c(t, "deg")
},
rotateX: function (t) {
this.rotateX = c(t, "deg")
},
rotateY: function (t) {
this.rotateY = c(t, "deg")
},
scale: function (t, e) {
void 0 === e && (e = t), this.scale = t + "," + e
},
skewX: function (t) {
this.skewX = c(t, "deg")
},
skewY: function (t) {
this.skewY = c(t, "deg")
},
perspective: function (t) {
this.perspective = c(t, "px")
},
x: function (t) {
this.set("translate", t, null)
},
y: function (t) {
this.set("translate", null, t)
},
translate: function (t, e) {
void 0 === this._translateX && (this._translateX = 0), void 0 === this._translateY && (this._translateY = 0), null !== t && (this._translateX = c(t, "px")), null !== e && (this._translateY = c(e, "px")), this.translate = this._translateX + "," + this._translateY
}
},
getter: {
x: function () {
return this._translateX || 0
},
y: function () {
return this._translateY || 0
},
scale: function () {
var t = (this.scale || "1,1").split(",");
return t[0] && (t[0] = parseFloat(t[0])), t[1] && (t[1] = parseFloat(t[1])), t[0] === t[1] ? t[0] : t
},
rotate3d: function () {
for (var t = (this.rotate3d || "0,0,0,0deg").split(","), e = 0; 3 >= e; ++e) t[e] && (t[e] = parseFloat(t[e]));
return t[3] && (t[3] = c(t[3], "deg")), t
}
},
parse: function (t) {
var e = this;
t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g, function (t, n, i) {
e.setFromString(n, i)
})
},
toString: function (t) {
var e = [];
for (var n in this)
if (this.hasOwnProperty(n)) {
if (!h.transform3d && ("rotateX" === n || "rotateY" === n || "perspective" === n || "transformOrigin" === n)) continue;
"_" !== n[0] && (t && "scale" === n ? e.push(n + "3d(" + this[n] + ",1)") : t && "translate" === n ? e.push(n + "3d(" + this[n] + ",0)") : e.push(n + "(" + this[n] + ")"))
}
return e.join(" ")
}
}, t.fn.transition = t.fn.transit = function (e, n, i, s) {
var o = this,
l = 0,
c = !0;
"function" == typeof n && (s = n, n = void 0), "function" == typeof i && (s = i, i = void 0), "undefined" != typeof e.easing && (i = e.easing, delete e.easing), "undefined" != typeof e.duration && (n = e.duration, delete e.duration), "undefined" != typeof e.complete && (s = e.complete, delete e.complete), "undefined" != typeof e.queue && (c = e.queue, delete e.queue), "undefined" != typeof e.delay && (l = e.delay, delete e.delay), "undefined" == typeof n && (n = t.fx.speeds._default), "undefined" == typeof i && (i = t.cssEase._default), n = u(n);
var d = a(e, n, i, l),
p = t.transit.enabled && h.transition,
f = p ? parseInt(n, 10) + parseInt(l, 10) : 0;
if (0 === f) {
var g = function (t) {
o.css(e), s && s.apply(o), t && t()
};
return r(o, c, g), o
}
var v = {}, y = function (n) {
var i = !1,
r = function () {
i && o.unbind(m, r), f > 0 && o.each(function () {
this.style[h.transition] = v[this] || null
}), "function" == typeof s && s.apply(o), "function" == typeof n && n()
};
f > 0 && m && t.transit.useTransitionEnd ? (i = !0, o.bind(m, r)) : window.setTimeout(r, f), o.each(function () {
f > 0 && (this.style[h.transition] = d), t(this).css(e)
})
}, w = function (t) {
var e = 0;
"MozTransition" === h.transition && 25 > e && (e = 25), window.setTimeout(function () {
y(t)
}, e)
};
return r(o, c, w), this
}, t.transit.getTransitionValue = a
}(jQuery),
function (t, e) {
var n, i = t.document,
r = i.documentElement,
s = "overthrow-enabled",
a = "ontouchmove" in i,
o = "WebkitOverflowScrolling" in r.style || !a && t.screen.width > 1200 || function () {
var e = t.navigator.userAgent,
n = e.match(/AppleWebKit\/([0-9]+)/),
i = n && n[1],
r = n && i >= 534;
return e.match(/Android ([0-9]+)/) && RegExp.$1 >= 3 && r || e.match(/ Version\/([0-9]+)/) && RegExp.$1 >= 0 && t.blackberry && r || e.indexOf(/PlayBook/) > -1 && RegExp.$1 >= 0 && r || e.match(/Fennec\/([0-9]+)/) && RegExp.$1 >= 4 || e.match(/wOSBrowser\/([0-9]+)/) && RegExp.$1 >= 233 && r || e.match(/NokiaBrowser\/([0-9\.]+)/) && 7.3 === parseFloat(RegExp.$1) && n && i >= 533
}(),
l = function (t, e, n, i) {
return n * ((t = t / i - 1) * t * t + 1) + e
}, c = !1,
u = function (i, r) {
var s, a, o = 0,
l = i.scrollLeft,
c = i.scrollTop,
u = {
top: "+0",
left: "+0",
duration: 100,
easing: t.overthrow.easing
};
if (r)
for (var d in u) r[d] !== e && (u[d] = r[d]);
return "string" == typeof u.left ? (u.left = parseFloat(u.left), s = u.left + l) : (s = u.left, u.left = u.left - l), "string" == typeof u.top ? (u.top = parseFloat(u.top), a = u.top + c) : (a = u.top, u.top = u.top - c), n = setInterval(function () {
o++ < u.duration ? (i.scrollLeft = u.easing(o, l, u.left, u.duration), i.scrollTop = u.easing(o, c, u.top, u.duration)) : (s !== i.scrollLeft && (i.scrollLeft = s), a !== i.scrollTop && (i.scrollTop = a), h())
}, 1), {
top: a,
left: s,
duration: u.duration,
easing: u.easing
}
}, d = function (t, e) {
return !e && t.className && t.className.indexOf("overthrow") > -1 && t || d(t.parentNode)
}, h = function () {
clearInterval(n)
}, p = function () {
if (!c && (c = !0, (o || a) && (r.className += " " + s), t.overthrow.forget = function () {
r.className = r.className.replace(s, ""), i.removeEventListener && i.removeEventListener("touchstart", k, !1), t.overthrow.easing = l, c = !1
}, !o && a)) {
var n, p, f, m, g = [],
v = [],
y = function () {
g = [], p = null
}, w = function () {
v = [], f = null
}, b = function () {
var t = 8 * (g[0] - g[g.length - 1]),
e = 8 * (v[0] - v[v.length - 1]),
i = Math.max(Math.abs(e), Math.abs(t)) / 8;
t = (t > 0 ? "+" : "") + t, e = (e > 0 ? "+" : "") + e, !isNaN(i) && i > 0 && (Math.abs(e) > 80 || Math.abs(t) > 80) && u(n, {
left: e,
top: t,
duration: i
})
}, _ = function (t) {
m = n.querySelectorAll("textarea, input");
for (var e = 0, i = m.length; i > e; e++) m[e].style.pointerEvents = t
}, x = function (t, r) {
if (i.createEvent) {
var s, a = (!r || r === e) && n.parentNode || n.touchchild || n;
a !== n && (s = i.createEvent("HTMLEvents"), s.initEvent("touchend", !0, !0), n.dispatchEvent(s), a.touchchild = n, n = a, a.dispatchEvent(t))
}
}, k = function (t) {
if (h(), y(), w(), n = d(t.target), n && n !== r && !(t.touches.length > 1)) {
_("none");
var e = t,
i = n.scrollTop,
s = n.scrollLeft,
a = n.offsetHeight,
o = n.offsetWidth,
l = t.touches[0].pageY,
c = t.touches[0].pageX,
u = n.scrollHeight,
m = n.scrollWidth,
k = function (t) {
var r = i + l - t.touches[0].pageY,
d = s + c - t.touches[0].pageX,
h = r >= (g.length ? g[0] : 0),
b = d >= (v.length ? v[0] : 0);
r > 0 && u - a > r || d > 0 && m - o > d ? t.preventDefault() : x(e), p && h !== p && y(), f && b !== f && w(), p = h, f = b, n.scrollTop = r, n.scrollLeft = d, g.unshift(r), v.unshift(d), g.length > 3 && g.pop(), v.length > 3 && v.pop()
}, C = function () {
b(), _("auto"), setTimeout(function () {
_("none")
}, 450), n.removeEventListener("touchmove", k, !1), n.removeEventListener("touchend", C, !1)
};
n.addEventListener("touchmove", k, !1), n.addEventListener("touchend", C, !1)
}
};
i.addEventListener("touchstart", k, !1)
}
};
t.overthrow = {
set: p,
forget: function () {},
easing: l,
toss: u,
intercept: h,
closest: d,
support: o ? "native" : a && "polyfilled" || "none"
}, p()
}(this),
function (t) {
"use strict";
function e() {
var t;
return t = "undefined" != typeof window.innerWidth ? window.innerWidth : "undefined" != typeof document.documentElement && "undefined" != typeof document.documentElement.clientWidth && 0 != document.documentElement.clientWidth ? document.documentElement.clientWidth : document.getElementsByTagName("body")[0].clientWidth
}
var n = function () {
var t = $(this).closest("span._ppf");
t.addClass("loaded")
};
t.picturefill = function (e, i) {
e || (e = window.jQuery("span._pf"));
for (var r = 0, s = e.length; s > r; r++)
if (null !== e[r].className.match(/_pf/)) {
var a = e[r].getElementsByTagName("span"),
o = [];
e[r].className = "_ppf";
for (var l = null, c = 0, u = a.length; u > c; c++) {
var d = a[c].getAttribute("data-q");
(!d || "true" === d || t.matchMedia && t.matchMedia(d).matches) && ("true" === d ? l = a[c] : o.push(a[c]))
}
var h = e[r].getElementsByTagName("img")[0];
if (!o.length && l && o.push(l), o.length > 0) {
if (!h) {
h = t.document.createElement("img");
var p = e[r].getAttribute("data-alt");
p && (h.alt = p), e[r].appendChild(h)
}
var f = o.pop().getAttribute("data-s");
window.attachEvent ? h.onload = function (t) {
n.bind(h)(t)
} : (h.addEventListener("load", n), i && h.addEventListener("load", i)), h.src = f
} else h && e[r].removeChild(h)
}
};
var i = 0;
t.addEventListener ? (t.addEventListener("resize", function () {
var n = e();
n > i && (i = n, t.picturefill())
}, !1), t.addEventListener("DOMContentLoaded", function () {
t.picturefill(), t.removeEventListener("load", t.picturefill, !1)
}, !1), t.addEventListener("load", t.picturefill, !1)) : t.attachEvent && t.attachEvent("onload", t.picturefill)
}(this),
function (t, e) {
var n = function () {
var e = t._data(document, "events");
return e && e.click && t.grep(e.click, function (t) {
return "rails" === t.namespace
}).length
};
n() && t.error("jquery-ujs has already been loaded!");
var i;
t.rails = i = {
linkClickSelector: "a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",
inputChangeSelector: "select[data-remote], input[data-remote], textarea[data-remote]",
formSubmitSelector: "form",
formInputClickSelector: "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",
disableSelector: "input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",
enableSelector: "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",
requiredInputSelector: "input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",
fileInputSelector: "input:file",
linkDisableSelector: "a[data-disable-with]",
CSRFProtection: function (e) {
var n = t('meta[name="csrf-token"]').attr("content");
n && e.setRequestHeader("X-CSRF-Token", n)
},
fire: function (e, n, i) {
var r = t.Event(n);
return e.trigger(r, i), r.result !== !1
},
confirm: function (t) {
return confirm(t)
},
ajax: function (e) {
return t.ajax(e)
},
href: function (t) {
return t.attr("href")
},
handleRemote: function (n) {
var r, s, a, o, l, c, u, d;
if (i.fire(n, "ajax:before")) {
if (o = n.data("cross-domain"), l = o === e ? null : o, c = n.data("with-credentials") || null, u = n.data("type") || t.ajaxSettings && t.ajaxSettings.dataType, n.is("form")) {
r = n.attr("method"), s = n.attr("action"), a = n.serializeArray();
var h = n.data("ujs:submit-button");
h && (a.push(h), n.data("ujs:submit-button", null))
} else n.is(i.inputChangeSelector) ? (r = n.data("method"), s = n.data("url"), a = n.serialize(), n.data("params") && (a = a + "&" + n.data("params"))) : (r = n.data("method"), s = i.href(n), a = n.data("params") || null);
d = {
type: r || "GET",
data: a,
dataType: u,
beforeSend: function (t, r) {
return r.dataType === e && t.setRequestHeader("accept", "*/*;q=0.5, " + r.accepts.script), i.fire(n, "ajax:beforeSend", [t, r])
},
success: function (t, e, i) {
n.trigger("ajax:success", [t, e, i])
},
complete: function (t, e) {
n.trigger("ajax:complete", [t, e])
},
error: function (t, e, i) {
n.trigger("ajax:error", [t, e, i])
},
xhrFields: {
withCredentials: c
},
crossDomain: l
}, s && (d.url = s);
var p = i.ajax(d);
return n.trigger("ajax:send", p), p
}
return !1
},
handleMethod: function (n) {
var r = i.href(n),
s = n.data("method"),
a = n.attr("target"),
o = t("meta[name=csrf-token]").attr("content"),
l = t("meta[name=csrf-param]").attr("content"),
c = t('<form method="post" action="' + r + '"></form>'),
u = '<input name="_method" value="' + s + '" type="hidden" />';
l !== e && o !== e && (u += '<input name="' + l + '" value="' + o + '" type="hidden" />'), a && c.attr("target", a), c.hide().append(u).appendTo("body"), c.submit()
},
disableFormElements: function (e) {
e.find(i.disableSelector).each(function () {
var e = t(this),
n = e.is("button") ? "html" : "val";
e.data("ujs:enable-with", e[n]()), e[n](e.data("disable-with")), e.prop("disabled", !0)
})
},
enableFormElements: function (e) {
e.find(i.enableSelector).each(function () {
var e = t(this),
n = e.is("button") ? "html" : "val";
e.data("ujs:enable-with") && e[n](e.data("ujs:enable-with")), e.prop("disabled", !1)
})
},
allowAction: function (t) {
var e, n = t.data("confirm"),
r = !1;
return n ? (i.fire(t, "confirm") && (r = i.confirm(n), e = i.fire(t, "confirm:complete", [r])), r && e) : !0
},
blankInputs: function (e, n, i) {
var r, s, a = t(),
o = n || "input,textarea";
return e.find(o).each(function () {
r = t(this), s = r.is(":checkbox,:radio") ? r.is(":checked") : r.val(), !s == !i && (a = a.add(r))
}), a.length ? a : !1
},
nonBlankInputs: function (t, e) {
return i.blankInputs(t, e, !0)
},
stopEverything: function (e) {
return t(e.target).trigger("ujs:everythingStopped"), e.stopImmediatePropagation(), !1
},
callFormSubmitBindings: function (n, i) {
var r = n.data("events"),
s = !0;
return r !== e && r.submit !== e && t.each(r.submit, function (t, e) {
return "function" == typeof e.handler ? s = e.handler(i) : void 0
}), s
},
disableElement: function (t) {
t.data("ujs:enable-with", t.html()), t.html(t.data("disable-with")), t.bind("click.railsDisable", function (t) {
return i.stopEverything(t)
})
},
enableElement: function (t) {
t.data("ujs:enable-with") !== e && (t.html(t.data("ujs:enable-with")), t.data("ujs:enable-with", !1)), t.unbind("click.railsDisable")
}
}, i.fire(t(document), "rails:attachBindings") && (t.ajaxPrefilter(function (t, e, n) {
t.crossDomain || i.CSRFProtection(n)
}), t(document).delegate(i.linkDisableSelector, "ajax:complete", function () {
i.enableElement(t(this))
}), t(document).delegate(i.linkClickSelector, "click.rails", function (n) {
var r = t(this),
s = r.data("method"),
a = r.data("params");
if (!i.allowAction(r)) return i.stopEverything(n);
if (r.is(i.linkDisableSelector) && i.disableElement(r), r.data("remote") !== e) {
if (!(!n.metaKey && !n.ctrlKey || s && "GET" !== s || a)) return !0;
var o = i.handleRemote(r);
return o === !1 ? i.enableElement(r) : o.error(function () {
i.enableElement(r)
}), !1
}
return r.data("method") ? (i.handleMethod(r), !1) : void 0
}), t(document).delegate(i.inputChangeSelector, "change.rails", function (e) {
var n = t(this);
return i.allowAction(n) ? (i.handleRemote(n), !1) : i.stopEverything(e)
}), t(document).delegate(i.formSubmitSelector, "submit.rails", function (n) {
var r = t(this),
s = r.data("remote") !== e,
a = i.blankInputs(r, i.requiredInputSelector),
o = i.nonBlankInputs(r, i.fileInputSelector);
if (!i.allowAction(r)) return i.stopEverything(n);
if (a && r.attr("novalidate") == e && i.fire(r, "ajax:aborted:required", [a])) return i.stopEverything(n);
if (s) {
if (o) {
setTimeout(function () {
i.disableFormElements(r)
}, 13);
var l = i.fire(r, "ajax:aborted:file", [o]);
return l || setTimeout(function () {
i.enableFormElements(r)
}, 13), l
}
return !t.support.submitBubbles && t().jquery < "1.7" && i.callFormSubmitBindings(r, n) === !1 ? i.stopEverything(n) : (i.handleRemote(r), !1)
}
setTimeout(function () {
i.disableFormElements(r)
}, 13)
}), t(document).delegate(i.formInputClickSelector, "click.rails", function (e) {
var n = t(this);
if (!i.allowAction(n)) return i.stopEverything(e);
var r = n.attr("name"),
s = r ? {
name: r,
value: n.val()
} : null;
n.closest("form").data("ujs:submit-button", s)
}), t(document).delegate(i.formSubmitSelector, "ajax:beforeSend.rails", function (e) {
this == e.target && i.disableFormElements(t(this))
}), t(document).delegate(i.formSubmitSelector, "ajax:complete.rails", function (e) {
this == e.target && i.enableFormElements(t(this))
}), t(function () {
csrf_token = t("meta[name=csrf-token]").attr("content"), csrf_param = t("meta[name=csrf-param]").attr("content"), t('form input[name="' + csrf_param + '"]').val(csrf_token)
}))
}(jQuery);
/* SiteCatalyst code version: H.24.4.
Copyright 1996-2012 Adobe, Inc. All Rights Reserved
More info available at http://www.omniture.com */
var s_account = "mashdev",
s = s_gi(s_account);
s.charSet = "ISO-8859-1", s.currencyCode = "USD", s.trackDownloadLinks = !1, s.trackExternalLinks = !0, s.trackInlineStats = !1, s.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx", s.linkInternalFilters = "javascript:," + window.location.hostname, s.linkLeaveQueryString = !1, s.linkTrackVars = "None", s.linkTrackEvents = "None", s.usePlugins = !0, s.getQueryParam = new Function("p", "d", "u", "var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.location);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p.length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i==p.length?i:i+1)}return v"), s.p_gpv = new Function("k", "u", "var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v=s.pt(q,'&','p_gvf',k)}return v"), s.p_gvf = new Function("t", "k", "if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'True':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s.epa(v)}return ''"), s.getTimeParting = new Function("t", "z", "y", "l", "var s=this,d,A,U,X,Z,W,B,C,D,Y;d=new Date();A=d.getFullYear();Y=U=String(A);if(s.dstStart&&s.dstEnd){B=s.dstStart;C=s.dstEnd}else{;U=U.substring(2,4);X='090801|101407|111306|121104|131003|140902|150801|161306|171205|181104|191003';X=s.split(X,'|');for(W=0;W<=10;W++){Z=X[W].substring(0,2);if(U==Z){B=X[W].substring(2,4);C=X[W].substring(4,6)}}if(!B||!C){B='08';C='01'}B='03/'+B+'/'+A;C='11/'+C+'/'+A;}D=new Date('1/1/2000');if(D.getDay()!=6||D.getMonth()!=0){return'Data Not Available'}else{z=z?z:'0';z=parseFloat(z);B=new Date(B);C=new Date(C);W=new Date();if(W>B&&W<C&&l!='0'){z=z+1}W=W.getTime()+(W.getTimezoneOffset()*60000);W=new Date(W+(3600000*z));X=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];B=W.getHours();C=W.getMinutes();D=W.getDay();Z=X[D];U='AM';A='Weekday';X='00';if(C>30){X='30'}if(B>=12){U='PM';B=B-12};if(B==0){B=12};if(D==6||D==0){A='Weekend'}W=B+':'+X+U;if(y&&y!=Y){return'Data Not Available'}else{if(t){if(t=='h'){return W}if(t=='d'){return Z}if(t=='w'){return A}}else{return Z+', '+W}}}"), s.split = new Function("l", "d", "var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x++]=l.substring(0,i);l=l.substring(i+d.length);}return a"), s.clearVars = function () {
for (i = 0; 75 >= i; i++) this["prop" + i] = this["eVar" + i] = null, 5 >= i && (this["hier" + i] = null), 3 >= i && (this["list" + i] = null);
this.pageName = this.channel = this.events = this.purchaseID = this.transactionID = this.server = this.pageType = null
}, s.doPlugins = function (t) {
t.campaign || (t.campaign = t.getQueryParam("utm_cid") || t.getQueryParam("cid")), t.eVar74 || (t.eVar74 = t.getQueryParam("utm_icid"));
var e = new Date,
n = e.getFullYear();
t.prop62 = t.eVar62 = t.getTimeParting("h", "-5", n), t.prop63 = t.eVar63 = t.getTimeParting("d", "-5", n), t.prop64 = t.eVar64 = t.getTimeParting("w", "-5", n)
}, s.visitorNamespace = "mashable", s.trackingServer = "mashable.d2.sc.omtrdc.net";
var s_code = "",
s_objectID;
s_giqf(), /** Copyright (c) 2013 Sailthru, Inc. | Generated: Tue Aug 6 9:22:03 EDT 2013 **/
function () {
var t, e = Array.prototype.indexOf || function (t) {
for (var e = 0, n = this.length; n > e; e++)
if (e in this && this[e] === t) return e;
return -1
};
window.Sailthru = window.sailthru = t = function () {
function t() {
this.options = {
spider: !0,
concierge: !1,
akamai: !1,
track_url: !0,
cookieDomain: window.location.host,
useStoredTags: !1
}, this.hidden = !1, this.protocol = window.location.protocol
}
var n;
return n = null, t.setup = function (e) {
var n, i, r, s, a, o, l;
if ("undefined" != typeof e.domain) {
if (r = t, r.tracked = {}, !(r.__instance instanceof t)) {
r.__instance = new this;
for (n in e) i = e[n], r.__instance.options[n] = e[n];
if ("undefined" == typeof r.__instance.options.tags && (r.__instance.options.tags = r.__instance.getContentTags()), r.__instance.options.jQuery ? t.jq = r.__instance.options.jQuery : window.jQuery ? t.jq = window.jQuery : window.$ && (t.jq = window.$), a = r.__instance.cookieIsEnabled(), l = -1 !== document.location.search.indexOf("concierge_stage"), o = "true" === r.__instance.getCookie("sailthru_recommendation_hidden"), (r.__instance.options.concierge || l) && a && !o) {
if (r.__instance.options.concierge = r.__instance._conciergeDefaultOptions(), e.concierge !== !0) {
s = e.concierge;
for (n in s) i = s[n], r.__instance.options.concierge[n] = e.concierge[n]
}
l && (r.__instance.options.concierge.stage = 1), (!e.concierge.stage_only || l) && r.__instance._recommendationBox()
} else("undefined" != typeof r.__instance.options.tags || r.__instance.options.spider === !0) && r.__instance._horizonTrack()
}
return r.__instance
}
}, t.logFB = function (t) {
var e, n, i, r;
return null == t && (t = !1), t === !1 && (t = window.location.href), n = {}, r = function (t, e) {
var n;
"undefined" != typeof window.FB ? window.FB.api("/", {
id: t
}, function (t) {
return "undefined" !== t.shares ? e(t.shares) : void 0
}) : (n = {
url: "https://graph.facebook.com/?id=" + encodeURIComponent(t),
async: !1,
success: function (t) {
return "undefined" !== t.shares ? e(t.shares) : void 0
}
}, $.ajax(n))
}, window.FB && (i = window.FB, e = function () {
var t;
return t = !1, i.getLoginStatus(function (e) {
e.authResponse ? e.authResponse.userID && (t = {
logged_in: !0,
uid: null != e.authResponse.userID
}) : e.session ? e.session.uid && (t = {
uid: e.session.uid,
logged_in: !0
}) : t = !1
}), t
}(), e !== !1 && (n = e)), r(t, function (t) {
"undefined" !== t && (n.shares = t)
}), n
}, t.track = function (e) {
if ("undefined" != typeof e.domain) {
var n, i, r = t;
r.__trackInstance = new this;
for (n in e) i = e[n], r.__trackInstance.options[n] = e[n];
"undefined" == typeof r.__trackInstance.options.tags && (r.__trackInstance.options.tags = r.__trackInstance.getContentTags()), r.__trackInstance._horizonTrack()
}
}, t.prototype.getContentTags = function () {
var t, e, n, i, r, s;
if (t = document.getElementsByTagName("meta"), t.length > 0) {
for (n = 0, r = t.length; r > n; n++)
if (e = t[n], "undefined" != typeof e.name && "sailthru.tags" === e.name.toLowerCase() && "undefined" != typeof e.content) return e.content;
for (i = 0, s = t.length; s > i; i++)
if (e = t[i], "undefined" != typeof e.name && "keywords" === e.name.toLowerCase() && "undefined" != typeof e.content) return e.content
}
return null
}, t.prototype.getCookie = function (t) {
var e, n, i, r, s;
if (this.cookieIsEnabled() !== !0) return null;
for (i = t + "=", n = document.cookie.split(";"), r = 0, s = n.length; s > r; r++) {
for (e = n[r];
" " === e.charAt(0);) e = e.substring(1, e.length);
if (0 === e.indexOf(i)) return e.substring(i.length, e.length)
}
return null
}, t.prototype.setCookie = function (t, e, n) {
var i, r;
return this.cookieIsEnabled() !== !0 ? !1 : (r = new Date, r.setDate(r.getDate() + n), i = t + "=" + escape(e), null !== n && (r = new Date, r.setDate(r.getDate() + n), i += ";expires=" + r.toUTCString()), i += ";path=/;domain=" + this.options.cookieDomain, document.cookie = i, !0)
}, t.prototype.cookieIsEnabled = function () {
return navigator.cookieEnabled || e.call(document, "cookie") >= 0 && (document.cookie.length > 0 || (document.cookie = "test").indexOf.call(document.cookie, "test") > -1)
}, t.prototype.tagsToString = function (t) {
var e;
return e = t instanceof Array ? t.join(",") : t
}, t.recommendationTrack = function (e, n, i, r) {
var s, a, o, l, c, u, d;
if ("undefined" == typeof t.tracked && (t.tracked = {}), !t.tracked[i]) {
if (t.tracked[i] = !0, "https:" === window.location.protocol ? (u = "https://horizon.sailthru.com/horizon/recommendtrack?id=" + n, u += "&d=" + e, sailthru_hid = this.getCookie("sailthru_hid"), null !== sailthru_hid && (u += "&hid=" + sailthru_hid)) : u = window.location.protocol + "//" + e + "/horizon/recommendtrack?id=" + n, i && (u += "&event=" + i), r)
for (l in r) d = r[l], u += "&" + l + "=" + encodeURIComponent(d);
"click" === i && (o = t.__instance, s = parseInt(o.getCookie("hcl")), s = isNaN(s) ? 1 : s + 1, o.setCookie("hcl", s, 5)), c = parseInt(1e4 * Math.random(), 10), u += "&cb=" + c, a = new Image(1, 1), a.src = u, a.onerror = ""
}
}, t.recommendationBoxCallback = function (e) {
return t.jq(document).trigger("SailthruDataLoaded", [e])
}, t.emailSignup = function () {
var e, n, i = t.__instance.options;
return n = t.jq(this).serialize(), document.getElementById("sailthru_email_address") && (e = window.location.protocol + "//" + i.domain + "/horizon/conciergesignup?format=jsonp&callback=?&" + n, i.concierge.stage && (e += "&concierge_stage=1"), t.jq.getJSON(e)), !1
}, t.signupCallback = function (e) {
var n, i;
n = t.jq(".recommendationSignup"), n.html(e.content.html), i = n.find("form"), i.submit(t.emailSignup), e.ok && setTimeout(function () {
t.prototype._hide(), t.__instance.hidden = !0
}, 1500)
}, t.prototype.test = function () {
"undefined" != typeof console && console.log("this is test call")
}, t.prototype._conciergeDefaultOptions = function () {
var t, e;
return t = "ak.sail-horizon.com", e = {
from: "top",
threshold: 400,
delay: null,
offsetBottom: 0,
cssPath: this.protocol + "//" + t + "/horizon/recommendation.css"
}
}, t.prototype._recommendationBox = function () {
var e, n, i, r, s, a, o, l, c;
return e = t.jq.extend({}, this.options.concierge), s = null, n = !1, "https:" === this.protocol ? (e.url = "https://horizon.sailthru.com/recommend?format=jsonp&callback=?", sailthru_hid = this.getCookie("sailthru_hid"), e.url += "&d=" + this.options.domain, null !== sailthru_hid && (e.url += "&hid=" + sailthru_hid)) : e.url = this.protocol + "//" + this.options.domain + "/recommend?format=jsonp&callback=?", this.options.concierge.filter && this.options.concierge.filter.tags && (e.url += "&filter[tags]=" + this.tagsToString(this.options.concierge.filter.tags)), this.options.spider !== !0 && (e.url += "&nospider=1"), this.options.noPageview && (e.url += "&nopageview=1"), this.options.useStoredTags && (e.url += "&use_stored_tags=1"), this.options.tags && (e.url += "&tags=" + encodeURIComponent(this.tagsToString(this.options.tags))), this.getCookie("hcl") && (e.url += "&num_clicks=" + this.getCookie("hcl")), this.options.concierge.stage && (e.url += "&concierge_stage=1"), e.domain = this.options.domain, this.data = {}, r = this, i = "undefined" != typeof this.options.delay ? this.options.delay : !1, o = function () {
var n = this;
return l(e.cssPath), t.jq(document).bind("SailthruDataLoaded", function (t, e) {
return n.data = e, n.dataLoaded = !0, a.call(n)
}), t.jq.getJSON(e.url), t.jq(window).scroll(function () {
var i, r, s, a, o;
return n.dataLoaded === !0 ? (i = t.jq(this), s = i.scrollTop(), r = t.jq(document).height() - t.jq(window).height(), e.threshold instanceof jQuery ? (o = 0 - (e.threshold.eq(0).offset().top - t.jq(window).height()), a = 0) : (o = "bottom" === e.from ? e.threshold : -e.threshold, a = "bottom" === e.from ? r : 0), s >= a - o && !n.hidden ? c.call(n) : t.__instance._hide()) : void 0
}), i ? s = setTimeout(function () {
return clearTimeout(s), c.call(n)
}, i) : void 0
}, l = function (t) {
var e;
e = document.createElement("link"), e.href = t, e.rel = "stylesheet", e.type = "text/css", e.async = !0, document.getElementsByTagName("head")[0].appendChild(e)
}, a = function () {
var n, i, s, a, o, l = this;
a = this.data.content, n = t.jq('<div class="recommendation sailthruRecommendation" />'), -1 != navigator.appVersion.indexOf("MSIE 1") && n.addClass("ie"), "undefined" != typeof a.html && (n.html(a.html), i = n.find("a.closeRecommendation"), s = n.find("a.openRecommendation"), o = n.find("form"), n.appendTo("body")), i.click(function (e) {
return e.preventDefault(), r.setCookie("sailthru_recommendation_hidden", "true", 30), l.hidden = !0, t.__instance._hide(), !1
}), s.click(function (t) {
return t.preventDefault(), r.setCookie("sailthru_recommendation_hidden", "false", 30), l.hidden = !1, c.call(l), !1
}), o.submit(t.emailSignup), setTimeout(function () {
var i, r, s;
return i = t.jq('<iframe id="sailthru_iframe" src="" FRAMEBORDER="0" />'), r = {
bottom: e.offsetBottom,
zIndex: "10000"
}, n.css(r), s = {
position: "fixed",
width: n.outerWidth(),
height: n.outerHeight(),
zIndex: "9999",
right: 0,
bottom: e.offsetBottom,
display: "none"
}, i.css(s), i.appendTo("body"), l.$elem = n, l.$iframe = i
}, 100)
}, c = function () {
return navigator.cookieEnabled ? r.getCookie(!1) ? !1 : t.__instance.hidden ? !1 : (this.$elem && !this.$elem.is(":animated") && (this.$elem.find(".openWrapper").hide(), this.$iframe.show(), this.$elem.show().animate({
right: 0
}, "normal")), this.data.content.id ? t.recommendationTrack(e.domain, this.data.content.id, "show", this.data.track) : !1) : !1
}, o.call(this)
}, t.prototype._hide = function () {
var e, n, i, r, s, a;
return n = t.jq(".sailthruRecommendation"), i = t.jq("#sailthru_iframe"), n && !n.is(":animated") ? (r = n.find(".openWrapper"), e = r.children("a"), s = n.outerHeight() / 2 - 11, r.show(), a = n.outerWidth() - r.outerWidth(), n.animate({
right: -a
}, "normal", function () {
return i.hide()
})) : void 0
}, t.prototype._horizonTrack = function () {
var t, e, n, i, r, s, a, o, l;
if (n = parseInt(1e4 * Math.random(), 10), t = "https:" === this.protocol ? "horizon.sailthru.com" : this.options.domain, r = this.protocol + "//" + t + "/horizon/track", l = this.protocol + "//ak.sail-horizon.com", r = this.options.akamai === !0 ? l + "/aktrack.gif" : r, r += "?r=" + n, this.options.track_url === !0 && (r += "&url=" + (void 0 != this.options.url ? encodeURIComponent(this.options.url) : encodeURIComponent(document.location))), ("https:" === this.protocol || this.options.akamai === !0) && (r += "&d=" + this.options.domain), i = this.getCookie("sailthru_hid"), null === i || this.options.akamai !== !0 && "https:" !== this.protocol || (r += "&hid=" + i), "undefined" != typeof this.options.tag && (this.options.tags = this.options.tag), this.options.useStoredTags && (r += "&use_stored_tags=1"), this.options.tags)
if (this.options.tags instanceof Array) r += "&tags=" + encodeURIComponent(this.options.tags.join(","));
else if (this.options.tags instanceof Object) {
a = this.options.tags;
for (s in a) o = a[s], r += "&tags[" + encodeURIComponent(s) + "]=" + encodeURIComponent(o)
} else r += "&tags=" + encodeURIComponent(this.options.tags);
return this.options.spider && (r += "&spider=1"), e = new Image(1, 1), e.src = r, e.onerror = "", e
}, t
}()
}.call(this),
function (t, e) {
"use strict";
var n = "undefined" != typeof Element && "ALLOW_KEYBOARD_INPUT" in Element,
i = function () {
for (var t, n, i = [
["requestFullscreen", "exitFullscreen", "fullscreenchange", "fullscreen", "fullscreenElement", "fullscreenerror"],
["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitIsFullScreen", "webkitCurrentFullScreenElement", "webkitfullscreenerror"],
["mozRequestFullScreen", "mozCancelFullScreen", "mozfullscreenchange", "mozFullScreen", "mozFullScreenElement", "mozfullscreenerror"]
], r = 0, s = i.length, a = {}; s > r; r++)
if (t = i[r], t && t[1] in e) {
for (r = 0, n = t.length; n > r; r++) a[i[0][r]] = t[r];
return a
}
return !1
}(),
r = {
isFullscreen: e[i.fullscreen],
element: e[i.fullscreenElement],
request: function (t) {
var r = i.requestFullscreen;
t = t || e.documentElement, t[r](n && Element.ALLOW_KEYBOARD_INPUT), e.isFullscreen || t[r]()
},
exit: function () {
e[i.exitFullscreen]()
},
toggle: function (t) {
this.isFullscreen ? this.exit() : this.request(t)
},
onchange: function () {},
onerror: function () {}
};
return i ? (e.addEventListener(i.fullscreenchange, function (n) {
r.isFullscreen = e[i.fullscreen], r.element = e[i.fullscreenElement], $(t).trigger("fullscreen", r.isFullscreen, r.element), r.onchange.call(r, n)
}), e.addEventListener(i.fullscreenerror, function (t) {
r.onerror.call(r, t)
}), t.screenfull = r, void 0) : (t.screenfull = null, void 0)
}(window, document),
function () {
! function (t) {
return t.fn.swipe = function (e) {
var n, i, r;
return n = {
maxTime: 500,
fingers: 1,
deadzone: 15,
distance: 150,
delay: 200,
swipeLeft: function () {},
swipeRight: function () {},
swipeUp: function () {},
swipeDown: function () {},
pinch: function () {},
expand: function () {},
passthru: function () {
return !1
}
}, i = t.extend({}, n, e), r = function (t, e, n, r, s, a) {
var o, l, c;
if (l = n - t, c = r - e, o = a - s, o < i.maxTime) {
if (Math.abs(c) < i.deadzone) {
if (l < -i.distance) return i.swipeLeft(), !0;
if (l > i.distance) return i.swipeRight(), !0
} else if (Math.abs(l) < i.deadzone) {
if (c < -i.distance) return i.swipeUp(), !0;
if (c > i.distance) return i.swipeDown(), !0
}
return !1
}
}, this.each(function () {
var e, n, s, a, o, l, c, u, d, h;
return c = 0, d = 0, u = 0, h = 0, n = 0, a = 0, l = 0, o = 0, e = t(this), e.bind("touchstart", function (t) {
var e, i, r;
return n = t.originalEvent.touches.length, l = new Date, n >= 1 && (r = t.originalEvent.touches[0], c = r.pageX, d = r.pageY), 2 === n ? (r = t.originalEvent.touches[1], u = r.pageX, h = r.pageY, e = Math.abs(c - u), i = Math.abs(d - h), o = Math.sqrt(e * e + i * i)) : void 0
}), s = function (t) {
var e, s, u, h, p, f, m, g;
return n = t.originalEvent.touches.length, p = new Date, p - a > i.delay && (1 === n ? (f = t.originalEvent.touches[0], n === i.fingers && r(c, d, f.pageX, f.pageY, l, p) && (a = p, n = 0)) : 2 === n && (m = t.originalEvent.touches[0], g = t.originalEvent.touches[1], u = Math.abs(m.pageX - g.pageX), h = Math.abs(m.pageY - g.pageY), s = Math.sqrt(u * u + h * h), e = s - o, e < -i.distance ? (i.pinch(), a = p, n = 0) : e > i.distance && (i.expand(), a = p, n = 0))), i.passthru() ? void 0 : (t.preventDefault(), !1)
}, e.bind("touchmove", s)
})
}
}(jQuery)
}.call(this), ! function (t, e) {
"use strict";
var n = e.prototype.trim,
i = e.prototype.trimRight,
r = e.prototype.trimLeft,
s = function (t) {
return 1 * t || 0
}, a = function (t, e) {
if (1 > e) return "";
for (var n = ""; e > 0;) 1 & e && (n += t), e >>= 1, t += t;
return n
}, o = [].slice,
l = function (t) {
return null == t ? "\\s" : t.source ? t.source : "[" + p.escapeRegExp(t) + "]"
}, c = {
lt: "<",
gt: ">",
quot: '"',
amp: "&",
apos: "'"
}, u = {};
for (var d in c) u[c[d]] = d;
u["'"] = "#39"; // Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
var h = function () {
function t(t) {
return Object.prototype.toString.call(t).slice(8, -1).toLowerCase()
}
var n = a,
i = function () {
return i.cache.hasOwnProperty(arguments[0]) || (i.cache[arguments[0]] = i.parse(arguments[0])), i.format.call(null, i.cache[arguments[0]], arguments)
};
return i.format = function (i, r) {
var s, a, o, l, c, u, d, p = 1,
f = i.length,
m = "",
g = [];
for (a = 0; f > a; a++)
if (m = t(i[a]), "string" === m) g.push(i[a]);
else if ("array" === m) {
if (l = i[a], l[2])
for (s = r[p], o = 0; o < l[2].length; o++) {
if (!s.hasOwnProperty(l[2][o])) throw new Error(h('[_.sprintf] property "%s" does not exist', l[2][o]));
s = s[l[2][o]]
} else s = l[1] ? r[l[1]] : r[p++];
if (/[^s]/.test(l[8]) && "number" != t(s)) throw new Error(h("[_.sprintf] expecting number but found %s", t(s)));
switch (l[8]) {
case "b":
s = s.toString(2);
break;
case "c":
s = e.fromCharCode(s);
break;
case "d":
s = parseInt(s, 10);
break;
case "e":
s = l[7] ? s.toExponential(l[7]) : s.toExponential();
break;
case "f":
s = l[7] ? parseFloat(s).toFixed(l[7]) : parseFloat(s);
break;
case "o":
s = s.toString(8);
break;
case "s":
s = (s = e(s)) && l[7] ? s.substring(0, l[7]) : s;
break;
case "u":
s = Math.abs(s);
break;
case "x":
s = s.toString(16);
break;
case "X":
s = s.toString(16).toUpperCase()
}
s = /[def]/.test(l[8]) && l[3] && s >= 0 ? "+" + s : s, u = l[4] ? "0" == l[4] ? "0" : l[4].charAt(1) : " ", d = l[6] - e(s).length, c = l[6] ? n(u, d) : "", g.push(l[5] ? s + c : c + s)
}
return g.join("")
}, i.cache = {}, i.parse = function (t) {
for (var e = t, n = [], i = [], r = 0; e;) {
if (null !== (n = /^[^\x25]+/.exec(e))) i.push(n[0]);
else if (null !== (n = /^\x25{2}/.exec(e))) i.push("%");
else {
if (null === (n = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(e))) throw new Error("[_.sprintf] huh?");
if (n[2]) {
r |= 1;
var s = [],
a = n[2],
o = [];
if (null === (o = /^([a-z_][a-z_\d]*)/i.exec(a))) throw new Error("[_.sprintf] huh?");
for (s.push(o[1]);
"" !== (a = a.substring(o[0].length));)
if (null !== (o = /^\.([a-z_][a-z_\d]*)/i.exec(a))) s.push(o[1]);
else {
if (null === (o = /^\[(\d+)\]/.exec(a))) throw new Error("[_.sprintf] huh?");
s.push(o[1])
}
n[2] = s
} else r |= 2; if (3 === r) throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");
i.push(n)
}
e = e.substring(n[0].length)
}
return i
}, i
}(),
p = {
VERSION: "2.3.0",
isBlank: function (t) {
return null == t && (t = ""), /^\s*$/.test(t)
},
stripTags: function (t) {
return null == t ? "" : e(t).replace(/<\/?[^>]+>/g, "")
},
capitalize: function (t) {
return t = null == t ? "" : e(t), t.charAt(0).toUpperCase() + t.slice(1)
},
chop: function (t, n) {
return null == t ? [] : (t = e(t), n = ~~n, n > 0 ? t.match(new RegExp(".{1," + n + "}", "g")) : [t])
},
clean: function (t) {
return p.strip(t).replace(/\s+/g, " ")
},
count: function (t, n) {
if (null == t || null == n) return 0;
t = e(t), n = e(n);
for (var i = 0, r = 0, s = n.length;;) {
if (r = t.indexOf(n, r), -1 === r) break;
i++, r += s
}
return i
},
chars: function (t) {
return null == t ? [] : e(t).split("")
},
swapCase: function (t) {
return null == t ? "" : e(t).replace(/\S/g, function (t) {
return t === t.toUpperCase() ? t.toLowerCase() : t.toUpperCase()
})
},
escapeHTML: function (t) {
return null == t ? "" : e(t).replace(/[&<>"']/g, function (t) {
return "&" + u[t] + ";"
})
},
unescapeHTML: function (t) {
return null == t ? "" : e(t).replace(/\&([^;]+);/g, function (t, n) {
var i;
return n in c ? c[n] : (i = n.match(/^#x([\da-fA-F]+)$/)) ? e.fromCharCode(parseInt(i[1], 16)) : (i = n.match(/^#(\d+)$/)) ? e.fromCharCode(~~i[1]) : t
})
},
escapeRegExp: function (t) {
return null == t ? "" : e(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1")
},
splice: function (t, e, n, i) {
var r = p.chars(t);
return r.splice(~~e, ~~n, i), r.join("")
},
insert: function (t, e, n) {
return p.splice(t, e, 0, n)
},
include: function (t, n) {
return "" === n ? !0 : null == t ? !1 : -1 !== e(t).indexOf(n)
},
join: function () {
var t = o.call(arguments),
e = t.shift();
return null == e && (e = ""), t.join(e)
},
lines: function (t) {
return null == t ? [] : e(t).split("\n")
},
reverse: function (t) {
return p.chars(t).reverse().join("")
},
startsWith: function (t, n) {
return "" === n ? !0 : null == t || null == n ? !1 : (t = e(t), n = e(n), t.length >= n.length && t.slice(0, n.length) === n)
},
endsWith: function (t, n) {
return "" === n ? !0 : null == t || null == n ? !1 : (t = e(t), n = e(n), t.length >= n.length && t.slice(t.length - n.length) === n)
},
succ: function (t) {
return null == t ? "" : (t = e(t), t.slice(0, -1) + e.fromCharCode(t.charCodeAt(t.length - 1) + 1))
},
titleize: function (t) {
return null == t ? "" : e(t).replace(/(?:^|\s)\S/g, function (t) {
return t.toUpperCase()
})
},
camelize: function (t) {
return p.trim(t).replace(/[-_\s]+(.)?/g, function (t, e) {
return e.toUpperCase()
})
},
underscored: function (t) {
return p.trim(t).replace(/([a-z\d])([A-Z]+)/g, "$1_$2").replace(/[-\s]+/g, "_").toLowerCase()
},
dasherize: function (t) {
return p.trim(t).replace(/([A-Z])/g, "-$1").replace(/[-_\s]+/g, "-").toLowerCase()
},
classify: function (t) {
return p.titleize(e(t).replace(/[\W_]/g, " ")).replace(/\s/g, "")
},
humanize: function (t) {
return p.capitalize(p.underscored(t).replace(/_id$/, "").replace(/_/g, " "))
},
trim: function (t, i) {
return null == t ? "" : !i && n ? n.call(t) : (i = l(i), e(t).replace(new RegExp("^" + i + "+|" + i + "+$", "g"), ""))
},
ltrim: function (t, n) {
return null == t ? "" : !n && r ? r.call(t) : (n = l(n), e(t).replace(new RegExp("^" + n + "+"), ""))
},
rtrim: function (t, n) {
return null == t ? "" : !n && i ? i.call(t) : (n = l(n), e(t).replace(new RegExp(n + "+$"), ""))
},
truncate: function (t, n, i) {
return null == t ? "" : (t = e(t), i = i || "...", n = ~~n, t.length > n ? t.slice(0, n) + i : t)
},
prune: function (t, n, i) {
if (null == t) return "";
if (t = e(t), n = ~~n, i = null != i ? e(i) : "...", t.length <= n) return t;
var r = function (t) {
return t.toUpperCase() !== t.toLowerCase() ? "A" : " "
}, s = t.slice(0, n + 1).replace(/.(?=\W*\w*$)/g, r);
return s = s.slice(s.length - 2).match(/\w\w/) ? s.replace(/\s*\S+$/, "") : p.rtrim(s.slice(0, s.length - 1)), (s + i).length > t.length ? t : t.slice(0, s.length) + i
},
words: function (t, e) {
return p.isBlank(t) ? [] : p.trim(t, e).split(e || /\s+/)
},
pad: function (t, n, i, r) {
t = null == t ? "" : e(t), n = ~~n;
var s = 0;
switch (i ? i.length > 1 && (i = i.charAt(0)) : i = " ", r) {
case "right":
return s = n - t.length, t + a(i, s);
case "both":
return s = n - t.length, a(i, Math.ceil(s / 2)) + t + a(i, Math.floor(s / 2));
default:
return s = n - t.length, a(i, s) + t
}
},
lpad: function (t, e, n) {
return p.pad(t, e, n)
},
rpad: function (t, e, n) {
return p.pad(t, e, n, "right")
},
lrpad: function (t, e, n) {
return p.pad(t, e, n, "both")
},
sprintf: h,
vsprintf: function (t, e) {
return e.unshift(t), h.apply(null, e)
},
toNumber: function (t, e) {
return t ? (t = p.trim(t), t.match(/^-?\d+(?:\.\d+)?$/) ? s(s(t).toFixed(~~e)) : 0 / 0) : 0
},
numberFormat: function (t, e, n, i) {
if (isNaN(t) || null == t) return "";
t = t.toFixed(~~e), i = "string" == typeof i ? i : ",";
var r = t.split("."),
s = r[0],
a = r[1] ? (n || ".") + r[1] : "";
return s.replace(/(\d)(?=(?:\d{3})+$)/g, "$1" + i) + a
},
strRight: function (t, n) {
if (null == t) return "";
t = e(t), n = null != n ? e(n) : n;
var i = n ? t.indexOf(n) : -1;
return~ i ? t.slice(i + n.length, t.length) : t
},
strRightBack: function (t, n) {
if (null == t) return "";
t = e(t), n = null != n ? e(n) : n;
var i = n ? t.lastIndexOf(n) : -1;
return~ i ? t.slice(i + n.length, t.length) : t
},
strLeft: function (t, n) {
if (null == t) return "";
t = e(t), n = null != n ? e(n) : n;
var i = n ? t.indexOf(n) : -1;
return~ i ? t.slice(0, i) : t
},
strLeftBack: function (t, e) {
if (null == t) return "";
t += "", e = null != e ? "" + e : e;
var n = t.lastIndexOf(e);
return~ n ? t.slice(0, n) : t
},
toSentence: function (t, e, n, i) {
e = e || ", ", n = n || " and ";
var r = t.slice(),
s = r.pop();
return t.length > 2 && i && (n = p.rtrim(e) + n), r.length ? r.join(e) + n + s : s
},
toSentenceSerial: function () {
var t = o.call(arguments);
return t[3] = !0, p.toSentence.apply(p, t)
},
slugify: function (t) {
if (null == t) return "";
var n = "ąà áäâãåæćęèéëêìíïîłńòóöôõøśùúüûñçżź",
i = "aaaaaaaaceeeeeiiiilnoooooosuuuunczz",
r = new RegExp(l(n), "g");
return t = e(t).toLowerCase().replace(r, function (t) {
var e = n.indexOf(t);
return i.charAt(e) || "-"
}), p.dasherize(t.replace(/[^\w\s-]/g, ""))
},
surround: function (t, e) {
return [e, t, e].join("")
},
quote: function (t) {
return p.surround(t, '"')
},
exports: function () {
var t = {};
for (var e in this) this.hasOwnProperty(e) && !e.match(/^(?:include|contains|reverse)$/) && (t[e] = this[e]);
return t
},
repeat: function (t, n, i) {
if (null == t) return "";
if (n = ~~n, null == i) return a(e(t), n);
for (var r = []; n > 0; r[--n] = t);
return r.join(i)
},
naturalCmp: function (t, n) {
if (t == n) return 0;
if (!t) return -1;
if (!n) return 1;
for (var i = /(\.\d+)|(\d+)|(\D+)/g, r = e(t).toLowerCase().match(i), s = e(n).toLowerCase().match(i), a = Math.min(r.length, s.length), o = 0; a > o; o++) {
var l = r[o],
c = s[o];
if (l !== c) {
var u = parseInt(l, 10);
if (!isNaN(u)) {
var d = parseInt(c, 10);
if (!isNaN(d) && u - d) return u - d
}
return c > l ? -1 : 1
}
}
return r.length === s.length ? r.length - s.length : n > t ? -1 : 1
},
levenshtein: function (t, n) {
if (null == t && null == n) return 0;
if (null == t) return e(n).length;
if (null == n) return e(t).length;
t = e(t), n = e(n);
for (var i, r, s = [], a = 0; a <= n.length; a++)
for (var o = 0; o <= t.length; o++) r = a && o ? t.charAt(o - 1) === n.charAt(a - 1) ? i : Math.min(s[o], s[o - 1], i) + 1 : a + o, i = s[o], s[o] = r;
return s.pop()
}
};
p.strip = p.trim, p.lstrip = p.ltrim, p.rstrip = p.rtrim, p.center = p.lrpad, p.rjust = p.lpad, p.ljust = p.rpad, p.contains = p.include, p.q = p.quote, "undefined" != typeof exports && ("undefined" != typeof module && module.exports && (module.exports = p), exports._s = p), "function" == typeof define && define.amd && define("underscore.string", [], function () {
return p
}), t._ = t._ || {}, t._.string = t._.str = p
}(this, String), window.assetMap = {
"livefyre-wall": "http://rack.3.mshcdn.com/assets/app/streamhub-sdk.min-2d44b2112ee80fab0baa5175b558da84.js"
},
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m = [].slice;
for (window.console || (window.console = {
log: function () {
var t;
t = 1 <= arguments.length ? m.call(arguments, 0) : []
}
}), window.debug = function () {
var t;
return t = 1 <= arguments.length ? m.call(arguments, 0) : [], window.console && console.log(t), null
}, window.App = {}, t = $(window), App.VISIBLE_SIDEBAR = "(min-width: 960px)", window.requestAnimFrame = function () {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (t) {
return setTimeout(t, 1e3 / 60)
}
}(), window.location.searchObj = {}, f = window.location.search.substring(1).split("&"), h = 0, p = f.length; p > h; h++) o = f[h], d = o.split("="), window.location.searchObj[d[0]] = unescape(d[1]);
e = null, window.env_is = function (t) {
return window.env() === t
}, window.env = function () {
return e || (e = $("html").data("env"))
}, window.provides = function (t) {
return window.App = _.extend({}, t, window.App)
}, window.delay = function (t, e) {
return setTimeout(e, t)
}, window.every = function (t, e) {
return setInterval(e, t)
},
function () {
var e, n;
return n = [], e = function (t) {
var e;
return Modernizr.rgba ? !1 : (e = t.match(/min-width: (\d+)/)).length > 1 && $(document).width() > e[1]
}, t.on("resize.querymapping", function () {
return $.throttle("checkQueries", 75, function () {
var t, i, r, s;
for (i = null, r = 0, s = n.length; s > r; r++) t = n[r], (Modernizr.mq(t[1]) || e(t[1])) && (i || (i = []), i.push(t), t[2]());
return i ? n = _.difference(n, i) : void 0
})
}), window.onceQueryIs = function (t, i, r) {
var s, a, o;
if (Modernizr.mq(i) || e(i)) return r();
for (a = 0, o = n.length; o > a; a++)
if (s = n[a], s[0] === t) return s[1] = i, s[2] = r, void 0;
return n.push([t, i, r])
}
}(), window.isNearBottom = function (t, e) {
var n, i, r;
return i = t.height(), r = t.scrollTop() + i, n = t[0].scrollHeight ? t[0].scrollHeight : document.documentElement.scrollHeight, r + i * e > n
}, window.writeSession = function (t, e, n) {
return writeStore("sessionStorage", t, e, n)
}, window.writeLocal = function (t, e, n) {
return writeStore("localStorage", t, e, n)
}, window.readSession = function (t, e, n) {
return readStore("sessionStorage", t, e, n)
}, window.readLocal = function (t, e, n) {
return readStore("localStorage", t, e, n)
}, window.deleteSession = function (t, e, n) {
return deleteStore("sessionStorage", t, e, n)
}, window.deleteLocal = function (t, e, n) {
return deleteStore("localStorage", t, e, n)
}, s = 0, i = 0, r = 0, t.on("resize", function () {
var e, n, a;
return e = (new Date).getTime(), e - r > 10 ? (r = e, a = t.width(), n = t.height(), s !== a && t.trigger("resize-width"), i !== a && t.trigger("resize-height"), s = a, i = n) : void 0
}), window.writeStore = function (t, e, n, i) {
var r, s;
if (window[t]) return window[t][e] = JSON.stringify(n), s = (new Date).getTime(), i ? (r = JSON.parse(window[t]._ex || "{}"), r[e] = s + i, window[t]._ex = JSON.stringify(r)) : void 0
}, window.readStore = function (t, e) {
var n, i, r;
if (window[t]) return n = JSON.parse(window[t]._ex || "{}"), i = (new Date).getTime(), n[e] && n[e] < i ? null : (r = window[t][e], r ? JSON.parse(r) : null)
}, window.deleteStore = function (t, e) {
return window[t] ? delete window[t][e] : void 0
}, window.plusOneLoaded = function () {
return GooglePlus.load(window.gapi)
}, window.GooglePlus = $.extend([], {
run: function (t) {
return t(window.gapi)
},
load: function () {
var t, e, n;
for (this.shift = this.run, this.push = this.run, e = 0, n = this.length; n > e; e++) t = this[e], this.run(t);
return this.splice(0, this.length)
}
}), window.loadFbMarketing = function (t) {
return window.fb_param = {
pixel_id: t,
value: "0.00"
}, a("https://connect.facebook.net/en_US/fp.js", "fp")
}, a = null,
function () {
var t, e, n;
return n = [], t = null, e = {
facebook: "https://connect.facebook.net/en_US/all.js#appId=116628718381794&xfbml=1&status=1&cookie=1",
twitter: "https://platform.twitter.com/widgets.js",
gplus: "https://apis.google.com/js/plusone.js",
gplusapi: "https://apis.google.com/js/client:plusone.js?onload=plusOneLoaded"
}, a = function (i, r, s, a) {
var o, l, c, u, d;
if (o = e[i], o && (r = i + "_jssdk", i = o), s || (s = null), !document.getElementById(r) && !n[r] && !n[i]) {
n[r] = !0, n[i] = !0, t || (t = document.getElementsByTagName("script")[0]), c = document.createElement("script"), c.id = r, c.async = !0, c.src = i;
try {
c.innerHTML = s
} catch (h) {
l = h, c.textContent = s
}
if (a)
for (u in a) d = a[u], c[u] = d;
return t.parentNode.insertBefore(c, t), c
}
}
}(), this.loadScriptAsync = a, window.params = function () {
var t, e, n, i, r, s, a;
if (!window.location.search) return {};
for (r = {}, s = window.location.search.slice(1).split("&"), n = 0, i = s.length; i > n; n++) e = s[n], a = e.split("=", 2), t = a[0], d = a[1], r[t] = unescape(d);
return r
},
function () {
var t, e;
return t = {}, e = {}, $.throttle = function (n, i, r) {
var s, a;
return s = (new Date).getTime(), !t[n] || s - t[n] > i ? (t[n] = s, r()) : !e[n] || s - e[n] < i ? (a = i - (s - t[n]), delay(a, r), e[n] = s, t[n] = s + a) : void 0
}
}(), window.Facebook = $.extend([], {
run: function (t) {
return t(window.FB)
},
load: function () {
var t, e, n;
for (this.shift = this.run, this.push = this.run, e = 0, n = this.length; n > e; e++) t = this[e], this.run(t);
return this.splice(0, this.length)
}
}), window.fbAsyncInit = function () {
return Facebook.load(window.FB)
}, window.Twitter = $.extend([], {
run: function (t) {
return t(window.twttr)
},
load: function () {
var t, e, n, i, r;
for (this.shift = this.run, t = this.run, r = [], n = 0, i = this.length; i > n; n++) e = this[n], r.push(this.run(e));
return r
}
}), window.twttr || (window.twttr = u = {
_e: [],
ready: function (t) {
return u._e.push(t)
}
}), twttr.ready(function () {
return window.Twitter.load()
}), Facebook.push(function (t) {
return t.init({
appId: "122071082108",
channelUrl: "//#{window.location.hostname}/channel.html",
status: !0,
cookie: !0,
xfbml: !1
})
}),
function () {
var t, e, n;
return n = {}, e = function () {
var t, e, i, r, s, a, o, l;
for (i = 2 <= arguments.length ? m.call(arguments, 0, r = arguments.length - 1) : (r = 0, []), t = arguments[r++], 0 === i.length && i.push("_G"), o = _.flatten(i), l = [], s = 0, a = o.length; a > s; s++) e = o[s], n[e] || (n[e] = []), l.push(n[e].push(t));
return l
}, this.$$ = t = e, this.initPage = function (t) {
var e, i, r, s, a, o, l, c;
if (null == t && (t = !1), window.jQuery.migrateMute = window.env_is("production"), t && $(document).one("page:load", function () {
return TripleClick.newPage()
}), window.picturefill(), $(".tooltip-trigger").tooltip(), loadAnalytics(), i = document.body.getAttribute("data-jsid"), i && n[i])
for (l = n[i], r = 0, a = l.length; a > r; r++) e = l[r], e($, t);
if (n._G)
for (c = n._G, s = 0, o = c.length; o > s; s++) e = c[s], e($, t);
return this.pageLoaded = !0
}
}(), $(document).on("page:change", function () {
return window.initPage(!0)
}), window.login = function (t) {
return null == t && (t = !1), window.__loginScreen = App.AjaxDialog.open("/login/?xhr=1&return=" + escape(window.location.pathname + window.location.search)), null != document.activeElement && document.activeElement.blur(), t ? App.AjaxDialog.lightbox.el.on("click", ".login-popup", function (t) {
return App.AjaxDialog.lightbox.hide(), App.WaitDialog.show(), window.Livefyre ? (window.Livefyre.startLogin($(this).attr("href"), 600, 400, function () {
return App.WaitDialog.lightbox.hide(), checkLogin()
}), t.preventDefault(), !1) : !0
}) : App.AjaxDialog.lightbox.el.off("click", ".login-popup").on("click", ".login-popup", function () {
return popupCenter($(this).attr("href"), 650, 650, "login-popup"), !1
})
}, c = [window.location.pathname], window.setUrl = function (t, e, n) {
var i, r, s;
return null == e && (e = !1), null == n && (n = !0), t ? (r = !1, n && -1 === _.indexOf(c, t) && (r = !0, c.push(t), window.gaq && window.gaq.push(["_trackPageview", t])), history.pushState && (i = e ? "replaceState" : "pushState", s = window.history.state || window.location.pathname, history[i](s, "", t)), r) : !1
}, n = function (t) {
var e;
return e = t.id ? Handlebars.templates["templates/header/user_menu"] : Handlebars.templates["templates/header/no_user_menu"], $(".main-menu #sign-in, .main-menu .user-submenu").replaceWith(e(t))
}, window.checkLogin = function () {
var t, e, i, r, s;
return i = $.cookie("mv2_ver"), i ? (t = i.split(/[.-]/), r = t[0], s = t[1], e = readSession("session"), e && (r === e.id ? n(e) : ($.cookie("mv2_ver", null), e = !1)), l()) : deleteStore("session")
}, l = function () {
return $.getJSON("/me.json").success(function (t) {
return t.ts = "undefined" != typeof user_ts && null !== user_ts ? user_ts : $.cookie("mv2_ver").split(/[.-]/)[1], writeSession("session", t, 6e5), n(t)
}).error(function () {
return deleteStore("session"), n({})
})
}, window.popupCenter = function (t, e, n, i) {
var r, s;
return r = screen.width / 2 - e / 2, s = screen.height / 2 - n / 2, window.open(t, i, "menubar=no,toolbar=no,status=no,width=" + e + ",height=" + n + ",toolbar=no,left=" + r + ",top=" + s)
}, $(function () {
var t;
return $(".main-menu").on("click", "#sign-in a", function (t) {
return t.stopPropagation(), window.login(), !1
}), checkLogin(), t = $(".loader"), $(document).on("page:fetch", function () {
return t.addClass("visible")
}).on("page:load", function () {
return t.removeClass("visible")
})
}), window.isAttachedToDom = function (t) {
for (; t;) {
if (t === document.body) return !0;
t = t.parentNode
}
return !1
}, window.scrollContainer = function () {
return window.__scrollContainer || (window.__scrollContainer = t)
}, $$(function () {
var e, n, i, r;
return e = $("body"), scrollContainer(), "login-popup" === window.name && (null != window.opener && null != window.opener.__loginScreen && (window.opener.__loginScreen.lightbox.hide(), window.opener.checkLogin()), window.close()), $("time").relatizeDate(), activateShareButtons("#scrollable"), $(".nav-tabs[data-auto] li:first-child").addClass("active"), $(".tab-content .tab-pane:first-child").addClass("active"), n = window.location.hash.match(/[a-z0-9_-]+/), null != n && $(".nav-tabs a[href='" + n[0] + "']").tab("show"), i = function () {
var t, e, n, i, r, s, a, o, l, c;
for (a = $(".auto-activate"), c = [], o = 0, l = a.length; l > o; o++) s = a[o], e = $(s), r = e.find("li").removeClass("active"), r.length > 0 ? ($(r[0]).addClass("active"), c.push(function () {
var e, s, a;
for (a = [], e = 0, s = r.length; s > e; e++) {
if (i = r[e], t = $(i), n = t.find("a").attr("href"), window.location.pathname.match(new RegExp("^" + n + "/?$"))) {
r.removeClass("active"), t.addClass("active");
break
}
a.push(void 0)
}
return a
}())) : c.push(void 0);
return c
}, i(), r = function () {
var e;
return e = /iP(hone|od|ad)/.test(window.navigator.userAgent), e ? t.on("load", function () {
return setTimeout(scrollTo, 1, 0, 1)
}) : void 0
}, Modernizr.touch ? r() : void 0
}), window.walkObject = function (t, e) {
var n, i, r;
null == e && (e = []), r = [];
for (n in t) i = t[n], "object" == typeof i ? (e.push(n), r.push(walkObject(i, e))) : "function" == typeof i ? r.push(debug(e.join("") + "." + n)) : r.push(void 0);
return r
}, this.provides({
loadComments: function () {
return this.Livefyre = this.initLivefyre({
force: !0,
auth: {
login: function () {
return window.login(!0)
},
logout: function () {
return window.location = "/logout?back=1"
},
viewProfile: function (t, e) {
return window.location = e.profileUrl
},
editProfile: function (t, e) {
return window.location = e.settingsUrl
}
}
})
},
reloadUserData: l
})
}.call(this),
function () {
var t, e, n, i;
i = function () {
return Sailthru.setup({
domain: "horizon.mashable.com"
})
}, t = function () {
return window._comscore || (window._comscore = []), window._comscore.push({
c1: "2",
c2: "8750086"
}), loadScriptAsync(("https:" === document.location.protocol ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js", "comscore")
}, n = function () {
return window.omni ? (window.loadOmniture(), window.omni()) : $(function () {
return window.loadOmniture(), window.omni()
})
}, e = function () {
return window._gaq.push(["_trackPageview"]), loadScriptAsync(("https:" === document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js", "ga")
}, window.loadAnalytics = function () {
return i(), t(), e(), n(), window.loadAnalytics = function () {}
}
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g;
try {
f = function (t) {
return _gaq.push(["_trackEvent", "Article Share", t, window.location.pathname])
}, m = !1, p = function (t, e, n) {
var i, r, s;
return e ? (s = n.match("!") ? "Image" : "Pullquote", i = "event25,event27") : (s = "Full Page", i = "event25,event26"), r = "/" + n.split("/").slice(3, 100).join("/"), omni({
events: i,
microUrl: r,
microNetwork: "G+",
microType: s,
track_link: "G+ Share"
})
}, window.__gPlusShareTrack = function () {
return _gaq.push(["_trackEvent", "Article Share", "Google+", window.location.pathname])
}, a = function (t) {
return t.parents("article.post").find(".article-title h1 a").attr("href")
}, o = function (t) {
var e, n, i;
return i = t.parent(), e = {
url: t.data("href") || i.data("url") || t.data("url") || a(t) || $("meta[property='og:url']").attr("content") || window.location.href,
media: i.data("image") || t.data("image") || i.data("thumb") || t.data("thumb") || $("meta[property='og:image']").attr("content"),
description: i.data("description") || t.data("description") || $("meta[property='og:description']").attr("content") || $("meta[name='description']").attr("content"),
twitterText: i.data("title") || t.data("title") || i.data("description") || t.data("description") || $("title").text(),
twitterVia: t.data("twitter-handle") || "mashable",
title: i.data("title") || t.data("title") || $("title").text(),
callback: i.data("callback") || t.data("callback"),
"default": i.data("default") || t.data("default")
}, e.url = e.url.replace(/beta.mashable.com/, "mashable.com"), e.url = e.url.replace(/#\S+$/, ""), n = t.data("fragment") || i.data("fragment") || t.parents("[data-fragment]").data("fragment") || null, n && (e.url = e.url + ("#" + n)), e.short_url = i.data("shorturl") || t.data("shorturl") || $("meta[name='short_url']").attr("content") || e.url, e
}, window.getShareMetadata = o
} catch (v) {
n = v, window.console && window.console.log(n)
}
d = {
google_plus: "google_plus",
googleplus: "google_plus",
linked_in: "linked_in",
linkedin: "linked_in",
twitter: "twitter",
pinterest: "pinterest",
stumbleupon: "stumble_upon",
stumble_upon: "stumble_upon",
facebook: "facebook"
}, t = 12e4, h = function (e) {
var n, i, r, s;
return r = {}, n = e.find(".social-share"), i = [], s = _.compact(_.uniq(_.map(n, function (t) {
var e, n, s, a, o, l, c, u;
if (e = $(t), o = e.data("uid"), t.className)
for (u = t.className.split(" "), n = l = 0, c = u.length; c > l; n = ++l) a = u[n], d[a] && (-1 === _.indexOf(i, d[a]) && i.push(d[a]), s = "" + o + "-" + _.indexOf(i, d[a]), r[s] = r[s] || [], r[s].push(e));
return o
}))), s.length > 0 && i.length > 0 && $.get("/stories/shares.json", {
pids: s.sort().join(","),
ns: i.join(","),
t: Math.floor((new Date).getTime() / t) * t
}, function (t) {
var e, n, i, s, a, o, l, c, u, d;
for (s in t)
for (a = t[s], i = l = 0, u = a.length; u > l; i = ++l)
if (o = a[i], n = r["" + s + "-" + i])
for (o > 1e3 && (o = (o / 1e3).toFixed(1) + "k"), c = 0, d = n.length; d > c; c++) e = n[c], e.attr("data-shares", o);
return null
}), null
}, c = function (t) {
var e, n;
return e = o($(this)), n = "https://plus.google.com/share?url=" + encodeURIComponent(e.url), popupCenter(n, 600, 600), f("Google+"), t.stopPropagation(), !1
}, l = function () {
var t, e, n, i, r;
return t = $(this), t.parents("article.short").length > 0 ? !1 : (loadScriptAsync("gplus"), i = t.parent().get(0), n = o(t), r = t.data("size") || "medium", n.callback || (n.callback = "__gPlusShareTrack"), e = "<div class='g-plusone' data-size='" + r + "' data-count='true', data-href='" + n.url + "' data-callback='" + n.callback + "'></div>", t.replaceWith(e), window.gapi && window.gapi.plusone && window.gapi.plusone.go ? window.gapi.plusone.go(i) : void 0)
}, e = null, window.gPlusSigninCallback = function (t) {
var e, n, i, r;
if (window.gPlusState = t, t.id_token) {
for (window.gPlusUserId = JSON.parse(base64.decode(t.id_token.split(".")[1])).sub, r = $(".social-share.google_plus"), n = 0, i = r.length; i > n; n++) e = r[n], u.bind(e)(null);
window.socialRef.identifier() !== window.gPlusUserId && $.ajax({
type: "POST",
url: "/people/bind",
data: {
i: window.socialRef.identifier(),
g: window.gPlusUserId
},
beforeSend: function (t) {
return t.setRequestHeader("X-CSRF-Token", $('meta[name="csrf-token"]').attr("content"))
}
})
}
return window.gPlusSigninCallback = function () {}
}, u = function () {
var t, e, n, i;
return t = o($(this)), i = window.socialRef.personalizeURL(t.url, "g", window.gPlusUserId), n = {
callback: "gPlusSigninCallback",
contenturl: i,
contentdeeplinkid: i,
calltoactionurl: i,
calltoactiondeeplinkid: i,
clientid: "713601546503.apps.googleusercontent.com",
cookiepolicy: "single_host_origin",
calltoactionlabel: "VIEW"
}, e = $(this).clone(), $(this).replaceWith(e), window.gapi.interactivepost.render(e[0], n), $(e).off("click.share").on("click.share", function (t) {
return p(t, i.match("#"), i, "G+")
})
}, s = function (t) {
var e, n;
return e = o($(this)), n = "https://www.facebook.com/sharer/sharer.php?s=100&p[url]=" + encodeURIComponent(e.url) + "&p[images][0]=" + encodeURIComponent(e.media) + "&p[title]=" + encodeURIComponent(e.title) + "&p[summary]=" + encodeURIComponent(e.description), 0 === $(this).parents(".microcontent-shares").length && (n += "&u=" + encodeURIComponent(e.url) + "&t=" + encodeURIComponent(e.title)), popupCenter(n, 685, 500), f("Facebook"), t.stopPropagation(), g(function () {
return r()
}), !1
}, g = function (t) {
return setTimeout(function () {
return $([window, document]).on("focus focusin", function () {
return $([window, document]).off("focus focusin"), t()
})
}, 500)
}, r = function () {
var t;
return JSON.parse($.cookie("fb_like_optout")) ? void 0 : ($("#like-encourager").length < 1 && ($("body").append("<div class='hidden'>" + Handlebars.templates["templates/shared/like_us_on_facebook"]() + "</div>"), Facebook.push(function (t) {
return t.XFBML.parse(), t.Event.subscribe("edge.create", function (t) {
return "http://www.facebook.com/mashable" === t ? _gaq.push(["_trackEvent", "Post Share Dialog", "Like", "Facebook"]) : void 0
})
}), $("#like-encourager").find(".opt-out").on("click", function () {
return _gaq.push(["_trackEvent", "Post Share Dialog", "Opt Out", "Facebook"]), $.cookie("fb_like_optout", !0, {
expires: 7300,
path: "/"
})
}), loadScriptAsync("facebook")), t = new App.Popout, t.lightbox.$el.addClass("small-white-dialog"), t.popOut($("#like-encourager")), _gaq.push(["_trackEvent", "Post Share Dialog", "Open", "Facebook"]), window.activateShareButtons("#like-encourager"))
}, i = function () {
var t, e, n, i, r, s, a;
return t = $(this), t.parents("article.short").length > 0 ? !1 : (s = t.parent().get(0), r = o(t), r["default"] && (n = t.data("layout") || "button_count", "box_count" === n ? (a = 58, e = 90) : (a = 88, e = 21), i = "<iframe src='//www.facebook.com/plugins/like.php?href=" + encodeURIComponent(r.url) + "&amp;send=false&amp;layout=" + n + "&amp;width=" + a + "&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=" + e + "&amp;appId=122071082108' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:" + a + "px; height:" + e + "px;' allowTransparency='true'></iframe>", t.replaceWith(i)), !1)
}, window.activateShareButtons = function (t) {
var e, n, r, a, l;
for (n = $(t), h(n), a = 0, l = n.length; l > a; a++) r = n[a], e = $(r), e.off(".shares", "**"), e.on("click.shares", ".social-share.linked_in", function (t) {
var e, n;
return t.stopPropagation(), e = o($(this)), n = "http://www.linkedin.com/cws/share?url=" + encodeURIComponent(e.url) + "&original_referer=" + encodeURIComponent(window.location.href) + "&isFramed=false&ts=" + (new Date).getTime(), popupCenter(n, 505, 360), f("LinkedIn"), !1
}), e.on("click.shares", ".social-share.stumble_upon", function (t) {
var e, n;
return t.stopPropagation(), e = o($(this)), n = "http://www.stumbleupon.com/badge/?url=" + encodeURIComponent(e.url), popupCenter(n, 435, 360), f("StumbleUpon"), !1
}), e.on("click.shares", ".social-share.pinterest", function (t) {
var e, n;
return t.stopPropagation(), e = o($(this)), n = "http://pinterest.com/pin/create/button/?url=" + encodeURIComponent(e.url) + "&media=" + encodeURIComponent(e.media) + "&description=" + encodeURIComponent(e.description), popupCenter(n, 685, 500), f("Pinterest"), !1
}), e.on("click.shares", ".social-share.twitter:not(.follow)", function () {
var t, e, n;
return t = o($(this)), e = "mashable For the latest from Mashable", n = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(t.twitterText) + "&url=" + encodeURIComponent(t.short_url) + "&via=" + t.twitterVia + "&related=" + encodeURIComponent(e), popupCenter(n, 685, 500), f("Twitter"), !1
}), Modernizr.touch ? e.on("click.shares", ".social-share.facebook", s) : (e.on("mouseover.shares", ".social-share.facebook", i), e.on("click.shares", ".social-share.facebook:not(.like)", s));
return GooglePlus.push(function () {
var t, e, n, i, r;
for (i = $(".social-share.google_plus"), r = [], e = 0, n = i.length; n > e; e++) t = i[e], r.push(u.apply(t));
return r
})
}, loadScriptAsync("gplusapi")
}.call(this),
function () {
var t, e, n = {}.hasOwnProperty,
i = function (t, e) {
function i() {
this.constructor = t
}
for (var r in e) n.call(e, r) && (t[r] = e[r]);
return i.prototype = e.prototype, t.prototype = new i, t.__super__ = e.prototype, t
};
t = function (t) {
function n() {
return e = n.__super__.constructor.apply(this, arguments)
}
return i(n, t), n.prototype.initialize = function () {
var t;
return t = Handlebars.templates["templates/shared/loading"](), this.setElement(t)
}, n.prototype.loading = function (t) {
return t ? (this.$el.addClass("active"), this.isLoading = !0) : (this.$el.removeClass("active"), this.isLoading = !1)
}, n.prototype.show = function () {
return this.el.style.display = "block"
}, n.prototype.hide = function () {
return this.el.style.display = ""
}, n
}(Backbone.View), this.provides({
LoadingIndicator: t
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l = {}.hasOwnProperty,
c = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) l.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
}, u = function (t, e) {
return function () {
return t.apply(e, arguments)
}
};
t = $(window), e = function () {
function t() {}
return t.responsive_image = function (t) {
var e, n, i, r;
n = $("<span>").addClass("_pf");
for (i in t) r = t[i], e = $("<span>"), e.attr("data-s", r.image), "string" == typeof r.query && e.attr("data-q", r.query), n.append(e);
return n
}, t
}(), r = function (t) {
function e() {
return s = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e.prototype.render = function () {
var t, e;
return e = Handlebars.templates[this.template], t = e(null != this.model ? this.model.attributes : null), this.replaceElement === !1 ? this.el.innerHTML = t : this.setElement(t), this.trigger("rendered")
}, e
}(Backbone.View), i = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e.prototype.initialize = function () {
return this.fragment = document.createDocumentFragment(), this.nodes = []
}, e.prototype.append = function (t) {
var e, n, i, r;
for (r = [], n = 0, i = t.length; i > n; n++) e = t[n], r.push(this.fragment.appendChild(e));
return r
}, e.prototype.commit = function () {
return this.el ? (this.fragment.querySelectorAll && (window.picturefill(this.fragment.querySelectorAll("span._pf")), $(this.fragment.querySelectorAll("time")).relatizeDate()), this.el.appendChild(this.fragment), this.fragment.querySelectorAll || (this.$el.find("time").relatizeDate(), window.picturefill(this.$el.find("span._pf"))), this.trigger("commit")) : void 0
}, e
}(Backbone.View), n = function (t) {
function e() {
return this.checkScroll = u(this.checkScroll, this), this.loadPage = u(this.loadPage, this), o = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e.prototype.initialize = function () {
var t, n, i, r = this;
return e.__super__.initialize.apply(this, arguments), this.collection = this.options.collection || new this.collectionClass([], this.options), this.modelView = this.options.view || this.viewClass, this.position = this.collection.length, this.hasMore = !0, this.options.infiniteScroll && ("parse" === this.options.infiniteScroll.startPage && (this.options.infiniteScroll.startPage = (t = window.location.pathname.toString().match(/\/page\/(\d+)\/$/)) ? parseInt(t[1], 10) : 1), this.maxPages = this.options.infiniteScroll.maxPages || 10, this.page = void 0 !== this.options.infiniteScroll.startPage ? this.options.infiniteScroll.startPage : 1, this.failures = 0, this.indicator = new App.LoadingIndicator, this.waypoint = this.indicator.$el, this.$el.after(this.waypoint), scrollContainer().on("scroll", function () {
return $.throttle("CollectionViewScroll", 500, function () {
return r.checkScroll()
})
}), this.checkScroll()), i = this.collection, n = 0, this.collection.on("add", function (t) {
var e;
return n += 1, r.trigger("add", n, t), e = new r.modelView({
model: t
}).render(), r.trigger("addView", e), r.append([e.el])
}), this.collection.on("reset", function () {
return n = 0, r.$el.empty()
}), this.options.manualStart ? void 0 : this.start()
}, e.prototype.start = function () {
return this.collection.reset(), this.options.data && (this.collection.add(this.options.data), this.commit()), delete this.options.data
}, e.prototype.reset = function (t) {
return this.options.infiniteScroll.data = $.extend(this.options.infiniteScroll.data, t), this.page = 0, this.collection.reset(), this.indicator.loading(!0), this.loadPage(1)
}, e.prototype.loadPage = function (t, e) {
var n = this;
return null == e && (e = !1), this.requesting ? void 0 : (this.requesting = !0, this.lastRequest && this.lastRequest.abort(), this.lastRequest = this.collection.fetch({
add: !0,
data: $.extend({
page: t
}, this.options.infiniteScroll.data),
beforeSend: function () {
return n.page = t
},
success: function (t, e) {
var i, r, s;
if (i = !1, t.hasMore && t.hasMore(e)) i = !0;
else if (Object.prototype.toString.call(e).match(/Array/)) i = e.length > 0;
else
for (r in e) s = e[r], Object.prototype.toString.call(s).match(/Array/) && s.length > 0 && (i = !0);
return i ? !0 : (n.page -= 1, n.hasMore = !1, !1)
},
error: function () {
return n.page -= 1, n.failures += 1
},
complete: function () {
return n.commit(), n.indicator.loading(!1), n.requesting = !1
}
}))
}, e.prototype.checkScroll = function () {
return this.indicator.isLoading || this.failures > 3 || !this.hasMore ? void 0 : isNearBottom(scrollContainer(), 1.25) ? (this.indicator.loading(!0), this.loadPage(this.page + 1)) : void 0
}, e
}(i), this.provides({
ApplicationHelper: e,
CollectionView: n,
TemplateView: r,
FragmentView: i
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l = {}.hasOwnProperty,
c = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) l.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = $(window), n = function (t) {
function e() {
return s = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e.prototype.initialize = function () {
return this.view = new i({
model: this
})
}, e
}(Backbone.Model), r = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e
}(App.FragmentView), i = function (t) {
function e() {
return o = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e.prototype.initialize = function () {
return this.template = "templates/users/feed/" + this.model.attributes.action
}, e
}(App.TemplateView), e = function () {
function t(t) {
return null != t.items ? (this.feedView = new r({
el: t.el
}), null != t.items && this.add(t.items), this) : void 0
}
return t.prototype.add = function (t) {
var e, i, r, s, a, o, l, c, u, d;
for (this.feedItems || (this.feedItems = []), r = [], a = 0, c = t.length; c > a; a++) i = t[a], r.push(new n(i));
for (o = 0, u = r.length; u > o; o++) e = r[o], e.view.render();
for (s = [], l = 0, d = r.length; d > l; l++) e = r[l], s.push(e.view.el);
return this.feedView.append(s), this.feedView.commit(), this.feedItems = this.feedItems.concat(r)
}, t
}(), this.provides({
Feed: e
})
}.call(this),
function () {
var BrandUnit, BrandUnitView, ImageLiftLightboxView, ImageLiftUnit, ImageLiftUnitView, LenUnit, LenUnitView, LiftUnit, LiftUnitView, MashableUnit, MashableUnitLightboxView, MashableUnitView, MobileBrandUnit, MobileBrandUnitView, NetworkUnit, NetworkUnitView, PublisherUnit, PublisherUnitView, SalesHubUnit, SalesHubUnitView, SponsoredBrandUnit, SponsoredBrandUnitView, TripleClick, TwitterLiftLightboxView, TwitterLiftUnit, TwitterLiftUnitView, VideoLiftUnit, VideoLiftUnitView, VineEmbed, VineEmbedView, VineLiftUnit, VineLiftUnitView, YouTubeEmbed, YouTubeEmbedView, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref3, _ref30, _ref31, _ref32, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __hasProp = {}.hasOwnProperty,
__extends = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) __hasProp.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
}, __bind = function (t, e) {
return function () {
return t.apply(e, arguments)
}
};
LiftUnit = function (t) {
function e() {
return _ref = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), NetworkUnit = function (t) {
function e() {
return _ref1 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), PublisherUnit = function (t) {
function e() {
return _ref2 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), BrandUnit = function (t) {
function e() {
return _ref3 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), MobileBrandUnit = function (t) {
function e() {
return _ref4 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), SponsoredBrandUnit = function (t) {
function e() {
return _ref5 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), SalesHubUnit = function (t) {
function e() {
return _ref6 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), LenUnit = function (t) {
function e() {
return _ref7 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), VideoLiftUnit = function (t) {
function e() {
return _ref8 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), VineLiftUnit = function (t) {
function e() {
return _ref9 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), YouTubeEmbed = function (t) {
function e() {
return _ref10 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), VineEmbed = function (t) {
function e() {
return _ref11 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), TwitterLiftUnit = function (t) {
function e() {
return _ref12 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), ImageLiftUnit = function (t) {
function e() {
return _ref13 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e
}(Backbone.Model), MashableUnit = function (t) {
function e() {
return _ref14 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.build = function (t, n) {
var i, r;
return r = t.parent(), i = new MashableUnitView({
model: new e(n),
el: r
}), i.template = "templates/tripleclick/mashable_units/" + n.type, i.render(), r
}, e.buildLightbox = function (t) {
var n, i;
return n = new App.Lightbox({
type: "fixed",
classes: "white-dialog " + t.type + "-ad",
contentClasses: "no-close"
}), i = new MashableUnitLightboxView({
model: new e(t),
el: n.content
}), i.template = "templates/tripleclick/mashable_units/lightbox/" + t.type, i.render(), n
}, e
}(Backbone.Model), MashableUnitView = function (t) {
function e() {
return _ref15 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.replaceElement = !1, e
}(App.TemplateView), MashableUnitLightboxView = function (t) {
function e() {
return _ref16 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.replaceElement = !1, e
}(App.TemplateView), LenUnitView = function (t) {
function e() {
return _ref17 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/len_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), LiftUnitView = function (t) {
function e() {
return _ref18 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/lift_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), PublisherUnitView = function (t) {
function e() {
return _ref19 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/publisher_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), BrandUnitView = function (t) {
function e() {
return _ref20 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/brand_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), MobileBrandUnitView = function (t) {
function e() {
return _ref21 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/mobile_brand_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), SponsoredBrandUnitView = function (t) {
function e() {
return _ref22 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/sponsored_brand_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), SalesHubUnitView = function (t) {
function e() {
return _ref23 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/sales_hub_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), VideoLiftUnitView = function (t) {
function e() {
return _ref24 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/video_lift_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), VineLiftUnitView = function (t) {
function e() {
return _ref25 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/vine_lift_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), YouTubeEmbedView = function (t) {
function e() {
return _ref26 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/youtube_embed", e.prototype.replaceElement = !1, e
}(App.TemplateView), VineEmbedView = function (t) {
function e() {
return _ref27 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/vine_embed", e.prototype.replaceElement = !1, e
}(App.TemplateView), NetworkUnitView = function (t) {
function e() {
return _ref28 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/network_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), TwitterLiftUnitView = function (t) {
function e() {
return _ref29 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/twitter_lift_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), TwitterLiftLightboxView = function (t) {
function e() {
return _ref30 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/twitter_lift_lightbox", e.prototype.replaceElement = !1, e
}(App.TemplateView), ImageLiftUnitView = function (t) {
function e() {
return _ref31 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/image_lift_unit", e.prototype.replaceElement = !1, e
}(App.TemplateView), ImageLiftLightboxView = function (t) {
function e() {
return _ref32 = e.__super__.constructor.apply(this, arguments)
}
return __extends(e, t), e.prototype.template = "templates/tripleclick/image_lift_lightbox", e.prototype.replaceElement = !1, e
}(App.TemplateView), TripleClick = function () {
function TripleClick(t, e, n) {
this.type = e, this.customAttrs = null != n ? n : {}, this.callResizeOrLoadAlias = __bind(this.callResizeOrLoadAlias, this), this.handleVideoClick = __bind(this.handleVideoClick, this), t.length && t.length > 0 && (t = t[0]), TripleClick.ads.push(this), this.elem = t, this.$elem = $(t), "preview" === this.type ? this.handleMashableUnit() : this.setLoadHook()
}
return TripleClick.ads = [], TripleClick.ord = null, TripleClick.tile = 0, TripleClick.ad_map = {
left_column: {
width: 300,
height: 250
},
left_column_ad_block_ad: {
width: 125,
height: 125
},
middle_column: {
width: 240,
height: 295
},
right_column: {
width: 300,
height: 250
},
right_column_small: {
width: 300,
height: 250
},
right_column_large: {
width: 650,
height: 250
},
right_rail: {
width: 300,
height: 250
},
right_rail_lift: {
width: 300,
height: 250
},
right_rail_ad: {
width: 300,
height: 250
},
right_rail_lift_ad: {
width: 300,
height: 250
},
right_rail_tall: {
width: 300,
height: 900
},
right_rail_tall_ad: {
width: 300,
height: 900
},
right_rail_ad_block_ad: {
width: 125,
height: 125
},
no_right_rail: {
width: 300,
height: 250
},
sponsored_ad: {
width: 0,
height: 0
},
no_right_rail_sponsored: {
width: 300,
height: 400
},
no_right_rail_ad: {
width: 300,
height: 250
},
no_right_rail_sponsored_ad: {
width: 300,
height: 400
},
banner: {
width: 300,
height: 50
},
large_banner: {
width: 970,
height: 66
},
small_banner: {
width: 728,
height: 90
},
tiny_banner: {
width: 300,
height: 50
},
topic_sales_hub: {
width: 0,
height: 0
},
topic_center: {
width: 728,
height: 66
},
small_topic_center: {
width: 728,
height: 90
},
large_topic_center: {
width: 970,
height: 66
},
series_sponsor: {
width: 200,
height: 31
},
gallery: {
width: 300,
height: 250
},
survey: {
width: 0,
height: 0
}
}, TripleClick.alias_map = {
right_column_small: "right_column",
right_column_large: "right_column",
no_right_rail_ad: "no_right_rail",
no_right_rail_sponsored_ad: "no_right_rail_sponsored",
small_banner: "banner",
large_banner: "banner",
small_topic_center: "topic_center",
large_topic_center: "topic_center",
right_rail_tall_ad: "right_rail_tall",
right_rail_ad: "right_rail"
}, TripleClick.type_list = ["middle_column", "right_rail_lift", "right_column"], TripleClick.updateAds = function () {
var t, e, n, i, r;
for (i = this.ads, r = [], e = 0, n = i.length; n > e; e++) t = i[e], r.push(t.update());
return r
}, TripleClick.resizeAds = function () {
var t, e, n, i, r;
for (i = this.ads, r = [], e = 0, n = i.length; n > e; e++) t = i[e], r.push(t.resizeElem());
return r
}, TripleClick.listAds = function () {
var t, e, n, i, r;
for (i = this.ads, r = [], e = 0, n = i.length; n > e; e++) t = i[e], r.push(console.log(t.type));
return r
}, TripleClick.ord = function () {
return this._ord || (this._ord = Math.ceil(1e15 * Math.random()))
}, TripleClick.page_ord = TripleClick.ord(), TripleClick.setSocialTrackers = function (t, e) {
return t.one("mouseenter", function () {
return t.find(".social-share").on("click", function () {
var n, i;
if (n = $(this).attr("class"), -1 !== n.indexOf("facebook")) {
if (i = e.data("facebook-tracker-src"), null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("twitter")) {
if (i = e.data("twitter-tracker-src"), null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("linked_in")) {
if (i = e.data("linkedin-tracker-src"), null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("google_plus") && (i = e.data("google-plus-tracker-src"), null != i)) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
})
})
}, TripleClick.secValues = function () {
var t;
return t = {
sec0: null,
sec1: null,
sec2: null
}, t.sec0 = $("body").data("sec0"), t.sec1 = $("body").data("sec1"), t.sec2 = $("body").data("sec2"), t
}, TripleClick.newPage = function () {
var t;
return t = $(".post.full"), t.length && (null != t.data("sponsored") || null != t.data("supported") ? (this.remove300x900(), this.add300x900()) : this.remove300x900()), this.tile = 1, this.newOrd(), this.updateAds()
}, TripleClick.add300x900 = function () {
var t, e, n, i, r, s;
for (r = this.ads, s = [], n = 0, i = r.length; i > n; n++) t = r[n], e = this.alias_map[t.type] || t.type, "right_rail" === e ? s.push(t.$elem.parent().after(this.tripleclickAd("right_rail_tall"))) : s.push(void 0);
return s
}, TripleClick.add300x400 = function () {
var t, e, n, i, r, s;
for (r = this.ads, s = [], n = 0, i = r.length; i > n; n++) t = r[n], e = this.alias_map[t.type] || t.type, "no_right_rail" === e ? s.push(t.$elem.parent().after(this.tripleclickAd("no_right_rail_sponsored"))) : s.push(void 0);
return s
}, TripleClick.remove300x900 = function () {
var t, e, n, i, r, s;
for (r = this.ads, s = [], n = 0, i = r.length; i > n; n++) t = r[n], e = this.alias_map[t.type] || t.type, "right_rail_tall" === e ? (t.parent.remove(), s.push(this.ads = _.difference(this.ads, [t]))) : s.push(void 0);
return s
}, TripleClick.remove300x400 = function () {
var t, e, n, i, r, s;
for (r = this.ads, s = [], n = 0, i = r.length; i > n; n++) t = r[n], e = this.alias_map[t.type] || t.type, "no_right_rail_sponsored" === e ? (t.parent.remove(), s.push(this.ads = _.difference(this.ads, [t]))) : s.push(void 0);
return s
}, TripleClick.onDocumentReady = function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m;
for (h = $("span.ad"), a = 0, c = h.length; c > a; a++) i = h[a], i = $(i), n = $('<iframe class="ad" frameBorder="0" scrolling="no">'), n.attr("src", i.data("src") + ("&ord=" + TripleClick.ord())), n.attr("width", i.data("width")), n.attr("height", i.data("height")), i.replaceWith(n);
for (p = $("iframe.ad"), m = [], o = 0, u = p.length; u > o; o++) {
for (t = p[o], e = !1, f = TripleClick.ads, l = 0, d = f.length; d > l; l++)
if (s = f[l], s.elem === t) {
e = !0;
break
}
e ? m.push(void 0) : (r = t.src.match(/type=[^\?$&]+/)[0].substring(5), m.push(new TripleClick(t, r)))
}
return m
}, TripleClick.newOrd = function () {
return this._ord = null, this.ord()
}, TripleClick.brightcoveAd = function () {
return $("<div>").addClass("brightcove").addClass("ad_container").append('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="125" height="125" id="brightcove"> <param name="movie" value="http://ad.doubleclick.net/3123013/Brightcove4_125x125.swf" /><param name="wmode" value="transparent"/><embed wmode="transparent" src="http://ad.doubleclick.net/3123013/Brightcove4_125x125.swf" width="125" height="125" name="brightcove" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>')
}, TripleClick.tripleclickAd = function (t, e) {
var n, i, r, s, a, o, l, c, u, d, h, p, f;
null == e && (e = {}), l = "type=" + t, n = {
ord: TripleClick.ord(),
tile: TripleClick.tile + 1
}, f = TripleClick.secValues();
for (r in f) h = f[r], null != h && (n[r] = h);
(h = $("body").data("topics")) && (n.topics = h), (h = $("body").data("postid")) && (n.postid = h), (h = $("body").data("posts")) && (n.posts = h), (h = $("body").data("topic")) && (n.topic = h), (h = $("body").data("gvcfv")) && (n.gvcfv = h), (h = $("body").data("gvmfv")) && (n.gvmfv = h), (h = $("body").data("gvcv")) && (n.gvcv = h), (h = $("body").data("gvmv")) && (n.gvmv = h), (h = $("body").data("mpp")) && (n.mpp = h), "posts" === n.sec2 && _.indexOf(["right_column", "middle_column", "left_column", "left_column_ad_block_ad"], t) > -1 && (n.sec1 = "index", delete n.sec2), (u = window.location.searchObj.testmode) && (u = u.match(/[a-zA-Z0-9_-]+/)) && (n.testmode = u[0]), (u = window.location.searchObj.demo) && _.indexOf(["963OgRP", "zQ8u387", "ssUNu8s", "r5mb1ZT", "dove", "584jt6k42x", "38ked9wsqq", "i022k56726", "f15d61"], u) > -1 && (n.testmode = u), (s = window.location.searchObj.utm_emailalert) && ("viral" === s && (n.valert = "true"), "breaking" === s && (n.balert = "true"), "daily" === s && (n.dalert = "true")), (i = $("article.full").data("campaign")) && (n.posts = i), (d = $("article.full").data("topic")) && (n.topic = d);
for (r in e) h = e[r], n[r] = h;
for (r in n) h = n[r], l += "object" == typeof h ? "&" + r + "=" + h.join("|") : "&" + r + "=" + h;
return p = $("<div>").addClass("ad_container"), a = $("<iframe>").addClass("ad").attr("scrolling", "no").attr("frameBorder", "0").attr("width", this.ad_map[t].width).attr("height", this.ad_map[t].height), c = "/tripleclick.html#" + l, (o = window.location.searchObj.lift_preview) && (o = o.split("@"), t === TripleClick.type_list[o[1]] && (c = "/ads/" + o[0] + "/")), a.attr("src", c), p.append(a), new TripleClick(a, t, e), p
}, TripleClick.appendAd = function (t, e, n) {
var i;
return null == n && (n = {}), i = this.tripleclickAd(e, n), t.append(i)
}, TripleClick.preview = function (t, e) {
var n;
return n = {}, null != e && (n.metatype = e), new TripleClick(t, "preview", n)
}, TripleClick.prototype.destroy = function () {
return this.$elem.remove(), delete this.elem, delete this.$elem
}, TripleClick.prototype.update = function () {
var t;
return t = TripleClick.alias_map[this.type] || this.type, this.$elem.parent().replaceWith(TripleClick.tripleclickAd(t, this.customAttrs)), TripleClick.ads = _.difference(TripleClick.ads, [this])
}, TripleClick.prototype.localIFrameBust = function () {
var t;
return this.$elem.contents().find('span[data-mashable-content-ad="true"]').length ? (t = this.$elem.contents().find("body"), t.find("script").first().remove(), this.$elem.parent().append(t.html()), this.hideElem(!1, !0), !0) : !1
}, TripleClick.prototype.handleResponsiveAd = function () {
return this.$elem.contents().find(".mash-responsive-ad").length ? (this.$elem.parent().addClass("no-collapse"), !0) : !1
}, TripleClick.prototype.createBrandUnit = function () {
var t, e, n, i;
return e = this.$elem.contents().find("span.mash-brand-unit"), e.length ? (n = new BrandUnit({
twitterWidgetId: e.data("twitter-widget-id"),
facebookHandle: e.data("facebook-handle"),
twitterHandle: e.data("twitter-handle"),
description: e.find("span.mash-brand-desc").html(),
postfixHTML: e.find("span.postfix-html").html(),
prefixHTML: e.find("span.prefix-html").html(),
followUrl: e.data("follow-url"),
imageUrl: e.data("img-url"),
imageSrc: e.data("img-src"),
suffix: e.find("span.mash-brand-suffix").html(),
title: e.data("title")
}), this.parent = this.$elem.parent(), t = this.$elem.parent()[0], "no_right_rail_sponsored_ad" === this.type ? (i = new MobileBrandUnitView({
model: n,
el: this.$elem.parent()
}), i.render()) : "sponsored_ad" === this.type ? (i = new SponsoredBrandUnitView({
model: n,
el: this.$elem.parent()
}), i.render()) : (i = new BrandUnitView({
model: n,
el: this.$elem.parent()
}), i.on("rendered", function () {
return $(t).find(".social-streams .twitter").html("<a class='twitter-timeline' href='https://twitter.com/" + n.attributes.twitterHandle + "' data-widget-id='" + n.attributes.twitterWidgetId + "'>Tweets by @" + n.attributes.twitterHandle + "</a><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);}}(document,'script','twitter-wjs');</script>")
}), i.render()), !0) : !1
}, TripleClick.prototype.createPublisherUnit = function () {
var t, e, n = this;
return t = this.$elem.contents().find("span.mashable-publisher-unit"), t.length ? (e = "/publishers/" + t.data("publisher") + ".json", $.getJSON(e, function (e) {
var i, r, s;
return r = e.publisher.feed_items.length, i = e.publisher.feed_items[Math.floor(Math.random() * Math.min(10, r))], i.imageSrc = t.data("image-src"), i.url = t.data("url"), i.publisher = e.publisher.name, s = new PublisherUnit(i), new PublisherUnitView({
model: s,
el: n.$elem.parent()
}).render()
}).error(function () {
return n.hideElem()
})) : !1
}, TripleClick.prototype.createVineLiftUnit = function () {
var t, e, n, i, r = this;
return e = this.$elem.contents().find("span.vine-lift-unit"), e.length ? (this.vineUrl = e.data("vine-url"), this.trackerSrc = e.data("tracker-src"), "right_rail_lift_ad" === this.type && (t = e.data("image-thumb-src")), t || (t = e.data("image-src")), i = new VineLiftUnit({
twitterHandle: e.data("twitter-handle"),
favoriteUrl: e.data("favorite-url") || "https://twitter.com/intent/favorite?tweet_id=" + e.data("tweet-id"),
retweetUrl: e.data("retweet-url") || "https://twitter.com/intent/retweet?tweet_id=" + e.data("tweet-id"),
replyUrl: e.data("reply-url") || "https://twitter.com/intent/tweet?in_reply_to=" + e.data("tweet-id"),
imageSrc: t,
tweetId: e.data("tweet-id"),
byline: e.data("byline"),
title: e.data("title")
}), this.$parent = this.$elem.parent(), new VineLiftUnitView({
model: i,
el: this.$parent
}).render(), n = e.data("twitter-handle"), Twitter.push(function (t) {
return t.events.bind("follow", function (t) {
var i;
return n === t.data.screen_name && (i = e.data("follow-tracker-src"), null != i) ? r.$parent.append("<img style='width:0px;height:0px' src='" + i + "'/>") : void 0
})
}), this.$parent.append('<script src="//platform.twitter.com/widgets.js"></script>'), this.$parent.find(".article-img-container, .article-category, .article-title").on("click", function (t) {
return t.preventDefault(), null == r.active ? r.handleVineClick() : void 0
}), !0) : !1
}, TripleClick.prototype.handleVineClick = function () {
var t;
return clearTimeout(window.auto_refresh), null == this.vineUrl ? !1 : (this.active = !0, null != this.trackerSrc && this.$parent.append("<img style='width:0px; height:0px;' src='" + this.trackerSrc + "'/>"), "right_rail_lift" === this.type || "right_rail_lift_ad" === this.type ? this.$parent.find(".article-img-container").css("height", "auto") : this.$parent.find(".article-container").css("padding", "10px"), t = new VineEmbed({
url: this.vineUrl
}), new VineEmbedView({
model: t,
el: this.$parent.find(".article-img-container")
}).render(), !1)
}, TripleClick.prototype.createVideoLiftUnit = function () {
var t, e, n, i, r, s, a, o = this;
return r = this.$elem.contents().find("span.video-lift-unit"), r.length ? (this.videoUrl = r.data("video-url"), this.trackerSrc = r.data("tracker-src"), t = r.find("span.render-tracker").map(function (t, e) {
return $(e).data("src")
}).get(), a = r.data("canonical-url"), null != a ? ("/" === a.charAt(a.length - 1) && (a = a.slice(0, -1)), a += ".json", $.getJSON(a, function (e) {
var n, i, s, a, l;
return "right_rail_lift_ad" === o.type && (n = r.data("image-thumb-src")), n || (n = r.data("image-src")), s = r.data("share-text"), s || (s = r.data("title")), a = r.data("share-url"), a || (a = r.data("video-url")), l = new VideoLiftUnit({
suppressShares: r.data("suppress-shares"),
twitterHandle: r.data("twitter-handle"),
shareText: s,
subscribe: r.data("subscribe-url"),
bylineUrl: r.data("byline-url"),
renderTracker: t,
shareUrl: a,
imageSrc: n,
titleUrl: r.data("title-url"),
byline: r.data("byline"),
title: r.data("title"),
shares: e.post.shares
}), o.$parent = o.$elem.parent(), new VideoLiftUnitView({
model: l,
el: o.$parent
}).render(), TripleClick.setSocialTrackers(o.$parent, r), i = ".article-img-container", r.data("title-url") || (i += ",.article-title"), r.data("byline-url") || (i += ",.article-category"), o.$parent.find(i).one("click", function (t) {
return t.preventDefault(), o.handleVideoClick()
})
}).error(function () {
return o.hideElem()
})) : (n = r.data("share-text"), n || (n = r.data("title")), i = r.data("share-url"), i || (i = r.data("video-url")), s = new VideoLiftUnit({
suppressShares: r.data("suppress-shares"),
twitterHandle: r.data("twitter-handle"),
shareText: n,
subscribe: r.data("subscribe-url"),
bylineUrl: r.data("byline-url"),
shareUrl: i,
renderTracker: t,
imageSrc: r.data("image-src"),
titleUrl: r.data("title-url"),
byline: r.data("byline"),
title: r.data("title")
}), this.$parent = this.$elem.parent(), new VideoLiftUnitView({
model: s,
el: this.$parent
}).render(), TripleClick.setSocialTrackers(this.$parent, r), e = ".article-img-container", r.data("title-url") || (e += ",.article-title"), r.data("byline-url") || (e += ",.article-category"), this.$parent.find(e).one("click", function (t) {
return t.preventDefault(), o.handleVideoClick()
})), !0) : !1
}, TripleClick.prototype.handleVideoClick = function () {
return clearTimeout(window.auto_refresh), null == this.videoUrl ? !1 : (null != this.trackerSrc && this.$parent.append("<img style='width:0px; height:0px;' src='" + this.trackerSrc + "'/>"), this.videoUrl.match(/^https?:\/\/www\.youtube\.com/) ? this.loadYouTubeEmbed() : this.loadBrightcoveEmbed())
}, TripleClick.prototype.loadYouTubeEmbed = function () {
var t;
return "right_rail_lift" === this.type || "right_rail_lift_ad" === this.type ? this.$parent.find(".article-img-container").css("height", "auto") : this.$parent.find(".article-container").css("padding", "10px"), t = new YouTubeEmbed({
videoShortcode: this.videoUrl.match(/v=([^&$]+)/)[1]
}), new YouTubeEmbedView({
model: t,
el: this.$parent.find(".article-img-container")
}).render(), !1
}, TripleClick.prototype.loadBrightcoveEmbed = function () {
return alert("brightcove"), !1
}, TripleClick.prototype.createLiftUnit = function () {
var t, e, n = this;
return t = this.$elem.contents().find("span.mashable-lift-unit"), t.length ? (this.vineUrl = t.data("vine-url"), this.trackerSrc = t.data("tracker-src"), e = t.data("canonical-url"), "/" === e.charAt(e.length - 1) && (e = e.slice(0, -1)), e += ".json", $.getJSON(e, function (e) {
var i, r, s, a;
return "right_rail_lift_ad" === n.type && (r = t.data("image-thumb-src")), r || (r = t.data("image-src")), i = t.find("span.ad-tracker").map(function (t, e) {
return $(e).data("src")
}).get(), (s = t.data("ad-tracker-src")) && i.push(s), a = new LiftUnit({
attributionUrl: t.data("attribution-url"),
attribution: t.data("attribution"),
description: t.data("description"),
bylineUrl: t.data("byline-url"),
adTracker: i,
imageSrc: r,
imageUrl: t.data("image-url"),
titleUrl: t.data("title-url"),
byline: t.data("byline"),
title: t.data("title"),
shareUrl: "http://mashable.com" + t.data("canonical-url"),
shares: e.post.shares,
vineUrl: n.vineUrl
}), n.$parent = n.$elem.parent(), new LiftUnitView({
model: a,
el: n.$elem.parent()
}).render(), TripleClick.setSocialTrackers(n.$parent, t), null != n.vineUrl ? n.$parent.find(".article-img-container").on("click", function (t) {
return t.preventDefault(), null == n.active ? n.handleVineClick() : void 0
}) : void 0
}).error(function () {
return n.hideElem()
}), !0) : !1
}, TripleClick.prototype.createNetworkUnit = function () {
var t, e, n, i = this;
return e = this.$elem.contents().find("span.mashable-network-unit"), e.length ? (t = e.find("span.ad-tracker").map(function (t, e) {
return $(e).data("src")
}).get(), this.brightcoveId = e.data("brightcove-id"), n = new NetworkUnit({
adTracker: t,
brightcoveId: this.brightcoveId,
description: e.data("description"),
bylineUrl: e.data("byline-url"),
imageSrc: e.data("image-thumb-src"),
titleUrl: e.data("title-url"),
company: e.data("company-name"),
byline: e.data("byline"),
title: e.data("title")
}), this.$parent = this.$elem.parent(), new NetworkUnitView({
model: n,
el: this.$parent
}).render(), TripleClick.setSocialTrackers(this.$parent, e), null != this.brightcoveId && this.$parent.find(".article-img-container").one("click", function (t) {
return t.stopPropagation(), i.handleBrightcoveClick(), !1
}), !0) : !1
}, TripleClick.prototype.handleBrightcoveClick = function () {
var t, e, n, i;
return this.$parent.find(".article-container").css("padding", "10px"), e = this.brightcoveId, n = this.$parent.find(".article-img-container"), i = n.width(), t = parseInt(9 * (i / 16)), n.html("<object id='myExperience" + e + "' class='BrightcoveExperience'><param name='bgcolor' value='#FFFFFF' /><param name='width' value='" + i + "' /><param name='height' value='" + t + "' /><param name='playerID' value='2579445172001' /><param name='playerKey' value='AQ~~,AAABBzUwv1E~,xP-xFHVUstg6x3X0Ctzy4aRejBM8Clbz' /><param name='isVid' value='true' /><param name='isUI' value='true' /><param name='dynamicStreaming' value='true' /><param name='autoStart' value='true' /><param name='@videoPlayer' value='" + e + "' /></object>"), $("object.BrightcoveExperience").length > 0 ? $.getScript("http://admin.brightcove.com/js/BrightcoveExperiences.js", function () {
return brightcove.createExperiences()
}) : void 0
}, TripleClick.prototype.createTwitterLiftUnit = function () {
var t, e, n, i = this;
return e = this.$elem.contents().find("span.twitter-lift-unit"), e.length ? (t = e.find("span.ad-tracker").map(function (t, e) {
return $(e).data("src")
}).get(), this.unit = new TwitterLiftUnit({
twitterAvatar: e.data("avatar-src"),
twitterHandle: e.data("twitter-handle"),
usernameColor: e.data("username-color"),
hashtagColor: e.data("hashtag-color"),
twitterUser: e.data("twitter-user"),
favoriteUrl: e.data("favorite-url") || "https://twitter.com/intent/favorite?tweet_id=" + e.data("tweet-id"),
retweetUrl: e.data("retweet-url") || "https://twitter.com/intent/retweet?tweet_id=" + e.data("tweet-id"),
accountUrl: e.data("account-url") || "https://twitter.com/" + e.data("twitter-handle"),
textColor: e.data("text-color"),
replyUrl: e.data("reply-url") || "https://twitter.com/intent/tweet?in_reply_to=" + e.data("tweet-id"),
imageSrc: e.data("image-src"),
tweetId: e.data("tweet-id"),
tweet: e.html()
}), this.$parent = this.$elem.parent(), new TwitterLiftUnitView({
model: this.unit,
el: this.$elem.parent()
}).render(), n = e.data("twitter-handle"), Twitter.push(function (t) {
return t.events.bind("follow", function (t) {
var r;
return n === t.data.screen_name && (r = e.data("follow-tracker-src"), null != r) ? i.$parent.append("<img style='width:0px;height:0px' src='" + r + "'/>") : void 0
})
}), this.$parent.append('<script src="//platform.twitter.com/widgets.js"></script>'), e.data("image-src") && this.$parent.find(".tweetPic").on("click", function (t) {
return t.preventDefault(), i.handleTwitterClick()
}), !0) : !1
}, TripleClick.prototype.handleTwitterClick = function () {
var t = this;
return clearTimeout(window.auto_refresh), null == this.lightbox && (this.lightbox = new App.Lightbox({
type: "fixed",
classes: "white-dialog twitter-lift",
contentClasses: "no-close"
}), new TwitterLiftLightboxView({
model: this.unit,
el: this.lightbox.content
}).render(), this.$parent.append('<script src="//platform.twitter.com/widgets.js"></script>'), this.lightbox.on("closing", function () {
return t.$parent.find(".twitter-lift").removeClass("inactive")
}), $(this.lightbox.el).find(".tweetPic").on("click", function () {
return t.lightbox.hide()
}), $(this.lightbox.el).off("click").on("click", function (e) {
return -1 === $(e.target).parents().index($(".no-close")) ? t.lightbox.hide() : void 0
}).on("click", ".mash-lightbox-close", function () {
return t.lightbox.hide()
})), this.$parent.find(".twitter-lift").addClass("inactive"), this.lightbox.show(), this.lightbox.centerContent()
}, TripleClick.prototype.createImageLiftUnit = function () {
var t, e, n = this;
return e = this.$elem.contents().find("span.image-lift-unit"), e.length ? (t = e.find("span.ad-tracker").map(function (t, e) {
return $(e).data("src")
}).get(), this.trackerSrc = e.data("tracker-src"), this.images = e.find("span.image").map(function (t, e) {
return $(e).data()
}).get(), this.nextTracker = e.data("tracker-next-src"), this.prevTracker = e.data("tracker-prev-src"), this.unit = new ImageLiftUnit({
twitterHandle: e.data("twitter-handle"),
description: e.data("description"),
viewOnText: e.data("view-on-text"),
shareText: e.data("share-text"),
viewOnUrl: e.data("view-on-url"),
shareUrl: e.data("share-url"),
gallery: "gallery" === e.data("lift-type"),
images: this.images,
title: e.data("title")
}), this.$parent = this.$elem.parent(), this.span = e, new ImageLiftUnitView({
model: this.unit,
el: this.$elem.parent()
}).render(), TripleClick.setSocialTrackers(this.$parent, e), this.$parent.find("img,.overlay").on("click", function (t) {
return t.preventDefault(), n.handleImageLiftClick(t)
}), !0) : !1
}, TripleClick.prototype.handleImageLiftClick = function (t) {
var e = this;
return clearTimeout(window.auto_refresh), null != this.trackerSrc && this.$parent.append("<img style='width:0px;height:0px' src='" + this.trackerSrc + "'/>"), null == this.lightbox && (this.imageCount = this.images.length, this.lightbox = new App.Lightbox({
type: "fixed",
classes: "white-dialog image-lift",
contentClasses: "no-close"
}), new ImageLiftLightboxView({
model: this.unit,
el: this.lightbox.content
}).render(), TripleClick.setSocialTrackers($(this.lightbox.content), this.span), activateShareButtons($(this.lightbox.content)), $(this.lightbox.content).find(".mash-lightbox-next").on("click", function () {
return e.currentImage = (e.currentImage + 1) % e.imageCount, e.updateImageLightbox(), null != e.nextTracker ? (e.nextTracker = e.nextTracker.replace(/ord=\d+/, "ord=" + Math.ceil(1e15 * Math.random())), e.$parent.append("<img style='width:0px;height:0px' src='" + e.nextTracker + "'/>")) : void 0
}), $(this.lightbox.content).find(".mash-lightbox-prev").on("click", function () {
return e.currentImage = (e.currentImage + e.imageCount - 1) % e.imageCount, e.updateImageLightbox(), null != e.prevTracker ? (e.prevTracker = e.prevTracker.replace(/ord=\d+/, "ord=" + Math.ceil(1e15 * Math.random())), e.$parent.append("<img style='width:0px;height:0px' src='" + e.prevTracker + "'/>")) : void 0
}), $(this.lightbox.el).off("click").on("click", function (t) {
return -1 === $(t.target).parents().index($(".no-close")) ? e.lightbox.hide() : void 0
}).on("click", ".mash-lightbox-close", function () {
return e.lightbox.hide()
}), this.lightbox.on("closing", function () {
return e.$parent.find(".image-lift").removeClass("inactive")
})), this.currentImage = $(t.target).data("index") || 0, this.updateImageLightbox(), this.$parent.find(".image-lift").addClass("inactive"), this.lightbox.show(), this.lightbox.centerContent()
}, TripleClick.prototype.updateImageLightbox = function () {
var t, e, n;
return t = $(this.lightbox.content), e = this.images[this.currentImage], n = this.unit.attributes, t.find("img").attr("src", e.imageSrc), t.find(".title").html(e.title || n.title), t.find(".description").html(e.description || n.description), t.find(".view-on").html(e.viewOnText || n.viewOnText).attr("href", e.viewOnUrl || n.viewOnUrl), t.find(".social-stub.twitter").data("twitter-handle", e.twitterHandle || n.twitterHandle), t.find(".social-stub").data("title", e.shareText || n.shareText).data("href", e.shareUrl || n.shareUrl), t.find(".social-stub.pinterest").data("image", e.imageSrc).data("description", e.description || n.description)
}, TripleClick.prototype.hideEmpty = function () {
var t;
return t = this.$elem.contents(), t.find('input.mash-hide, span.mash-hide, img[src="http://pagead2.googlesyndication.com/pagead/imgad/3103286/1x1.gif"]').length ? (this.hideElem(), !0) : !1
}, TripleClick.prototype.handleLenUnit = function () {
var t, e, n, i;
return e = this.$elem.contents().find("span.mash-len-unit"), e.length ? (n = new LenUnit({
twitterWidgetId: e.data("twitter-widget-id"),
twitterHandle: e.data("twitter-handle"),
postfixHTML: e.find("span.postfix").html(),
wufooHeight: e.data("wufoo-height"),
prefixHTML: e.find("span.prefix").html(),
wufooSrc: e.data("wufoo-src")
}), t = this.$elem.parent()[0], i = new LenUnitView({
model: n,
el: this.$elem.parent()
}), i.on("rendered", function () {
return $(t).parent().prepend(n.attributes.prefixHTML), $(t).find(".social-streams .twitter").html("<a class='twitter-timeline' href='https://twitter.com/" + n.attributes.twitterHandle + "' data-widget-id='" + n.attributes.twitterWidgetId + "'>Tweets by @" + n.attributes.twitterHandle + "</a><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);}}(document,'script','twitter-wjs');</script>"), n.attributes.wufooSrc ? $(".story-stream .article-container").first().after("<iframe scrollable=no style='width: 100%; height: " + n.attributes.wufooHeight + "px; border: none' src='" + n.attributes.wufooSrc + "'></iframe>") : void 0
}), i.render(), !0) : !1
}, TripleClick.prototype.handleSalesHub = function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p;
if ("topic_sales_hub" !== this.type) return !1;
for (this.$elem.parent().removeClass("ad970"), t = this.$elem.contents().find("span.mash-sales-unit"), r = new SalesHubUnit({
descriptionColor: t.data("description-color"),
googlePlusUrl: t.data("google-plus-url"),
pinterestUrl: t.data("pinterest-url"),
followColor: t.data("follow-color"),
facebookUrl: t.data("facebook-url"),
linkedinUrl: t.data("linkedin-url"),
description: t.find("span.description").html(),
twitterUrl: t.data("twitter-url"),
youtubeUrl: t.data("youtube-url"),
followText: t.data("follow-text"),
innerColor: t.data("inner-color"),
outerColor: t.data("outer-color"),
imageSrc: t.data("image-src"),
titleUrl: t.data("title-url"),
rssUrl: t.data("rss-url"),
imageTrackers: [],
impressionTags: [],
scriptTags: []
}), d = this.$elem.contents().find("span.image-tracker"), s = 0, l = d.length; l > s; s++) e = d[s], r.attributes.imageTrackers.push({
imageSrc: $(e).data("image-src") + TripleClick.ord()
});
for (h = this.$elem.contents().find("span.impression-tag"), a = 0, c = h.length; c > a; a++) n = h[a], r.attributes.impressionTags.push({
imageSrc: $(n).data("image-src") + TripleClick.ord()
});
for (p = this.$elem.contents().find("third-party-script"), o = 0, u = p.length; u > o; o++) i = p[o], r.attributes.scriptTags.push({
src: $(i).data("script-src") + TripleClick.ord()
});
return $("#main,header.box970").css({
background: r.attributes.outerColor
}), $(".visible-desktop").css({
background: r.attributes.outerColor
}), $(".visible-desktop").css({
background: "-webkit-radial-gradient(circle," + r.attributes.innerColor + " 30%, " + r.attributes.outerColor + " 60%)"
}), $(".visible-desktop").css({
background: "-moz-radial-gradient(circle," + r.attributes.innerColor + " 30%, " + r.attributes.outerColor + " 60%)"
}), $(".visible-desktop").css({
background: "-o-radial-gradient(circle," + r.attributes.innerColor + " 30%, " + r.attributes.outerColor + " 60%)"
}), $(".visible-desktop").css({
background: "-ms-radial-gradient(circle," + r.attributes.innerColor + " 30%, " + r.attributes.outerColor + " 60%)",
border: "none"
}), new SalesHubUnitView({
model: r,
el: this.$elem.parent()
}).render(), !0
}, TripleClick.prototype.handleMashableUnit = function () {
return this.attributes = "preview" === this.type ? null != this.customAttrs.metatype ? Quadratus.defaults[this.customAttrs.metatype] : mashableUnit : this.$elem[0].contentWindow.mashableUnit, this.attributes ? (this.version = parseInt(this.attributes.version), this.prerender.all.call(this), this.prerender[this.attributes.type] && this.prerender[this.attributes.type].call(this), this.$parent = MashableUnit.build(this.$elem, this.attributes), this.postrender[this.attributes.type] && this.postrender[this.attributes.type].call(this), !0) : !1
}, TripleClick.prototype.handleMashableUnitLightbox = function (t) {
var e = this;
return this.$parent.find(t).on("click", function (t) {
var n;
return t.preventDefault(), clearTimeout(window.auto_refresh), null == e.lightbox && (e.lightbox = MashableUnit.buildLightbox(e.attributes), e.setSocialTrackers(e.lightbox.el), activateShareButtons($(e.lightbox.content)), $(e.lightbox.el).off("click").on("click", function (t) {
return -1 === $(t.target).parents().index($(".no-close")) ? e.lightbox.hide() : void 0
}).on("click", ".mash-lightbox-close", function () {
return e.lightbox.hide()
}), e.lightbox.on("closing", function () {
var t;
return e.$parent.find("." + e.attributes.type + "-ad").removeClass("inactive"), (t = e.lightboxEvents.close[e.attributes.type]) ? t.call(e) : void 0
})), (n = e.lightboxEvents.open[e.attributes.type]) && n.call(e, t), e.$parent.find("." + e.attributes.type + "-ad").addClass("inactive"), e.lightbox.show(), setTimeout(function () {
return e.lightbox.centerContent()
})
})
}, TripleClick.prototype.prerender = {
all: function () {
var t;
return this.version < 2 ? (t = this.attributes).sponsorship || (t.sponsorship = {
text: "Sponsored"
}) : void 0
},
twitterlift: function () {
var t, e, n, i;
return (t = this.attributes).favoriteTweetUrl || (t.favoriteTweetUrl = "https://twitter.com/intent/favorite?tweet_id=" + this.attributes.tweetId), (e = this.attributes).replyTweetUrl || (e.replyTweetUrl = "https://twitter.com/intent/favorite?tweet_id=" + this.attributes.tweetId), (n = this.attributes).retweetTweetUrl || (n.retweetTweetUrl = "https://twitter.com/intent/favorite?tweet_id=" + this.attributes.tweetId), (i = this.attributes).twitterAccountUrl || (i.twitterAccountUrl = "https://twitter.com/" + this.attributes.twitterHandle)
},
gallery: function () {
var t, e, n, i, r;
for (this.attributes.media[1] || (this.attributes.showThumbs = !1), e = this.attributes.media[0], (e.youtubeSrc || e.videoSrc || e.vineSrc || e.ustreamSrc) && (this.attributes.playOverlay = !0), this.version >= 3 && (this.attributes.playOverlay = !("image" === e.type)), this.attrib, r = [], t = n = 0, i = this.attributes.media.length - 1; i >= 0 ? i >= n : n >= i; t = i >= 0 ? ++n : --n) this.attributes.media[t].image = this.attributes.media[t].thumb || this.attributes.media[t].data || this.attributes.media[t].leadImageSrc, "image" === this.attributes.media[t].type ? r.push(this.attributes.media[t].image = this.attributes.media[t].data) : r.push(void 0);
return r
}
}, TripleClick.prototype.postrender = {
twitterlift: function () {
var t = this;
return Twitter.push(function (e) {
return e.events.bind("follow", function (e) {
var n;
return t.attributes.twitterHandle === e.data.screen_name && (n = t.attributes.twitterFollowTracker, null != n) ? t.$parent.append("<img style='width:0px;height:0px' src='" + n + "'/>") : void 0
})
}), this.$parent.append('<script src="//platform.twitter.com/widgets.js"></script>')
},
gallery: function () {
return this.handleMashableUnitLightbox(".thumb,.bigThumb,.overlay,.video-overlay"), this.setSocialTrackers(this.$parent)
}
}, TripleClick.prototype.setSocialTrackers = function (t) {
var e;
return e = this.attributes, t.one("mouseenter", function () {
return t.find(".social-share").on("click", function () {
var n, i;
if (n = $(this).attr("class"), -1 !== n.indexOf("facebook")) {
if (i = e.trackers.share.facebook, null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("twitter")) {
if (i = e.trackers.share.twitter, null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("linked_in")) {
if (i = e.trackers.share.linkedIn, null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("google_plus")) {
if (i = e.trackers.share.googlePlus, null != i) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
} else if (-1 !== n.indexOf("pinterest") && (i = e.trackers.share.pinterest, null != i)) return t.append("<img style='width:0px;height:0px;' src='" + i + "'/>")
})
})
}, TripleClick.prototype.lightboxEvents = {
open: {
gallery: function (t) {
var e, n, i, r, s, a, o = this;
if ((e = this.attributes.trackers.click).length)
for (i = Math.ceil(1e15 * Math.random()), s = 0, a = e.length; a > s; s++) r = e[s], r = r.replace(/ord=\d+/, "ord=" + i), this.$parent.append("<img style='width:0px;height:0px' src='" + r + "'/>");
return null == this.mediaCount && (this.mediaCount = this.attributes.media.length, 1 === this.mediaCount ? $(this.lightbox.el).find(".mash-lightbox-next,.mash-lightbox-prev").hide() : ($(this.lightbox.el).find(".mash-lightbox-next").on("click", function () {
var t;
return (t = o.lightboxEvents.next[o.attributes.type]) ? t.call(o) : void 0
}), $(this.lightbox.el).find(".mash-lightbox-prev").on("click", function () {
var t;
return (t = o.lightboxEvents.prev[o.attributes.type]) ? t.call(o) : void 0
}))), this.currentMedia = $(t.target).data("index") || 0, (n = this.lightboxEvents.update[this.attributes.type]) ? n.call(this) : void 0
}
},
close: {
gallery: function () {
var t;
return t = $(this.lightbox.el).find(".lightbox-lead"), t.empty()
}
},
next: {
gallery: function () {
var t, e;
return (e = this.attributes.trackers.next) && (e = e.replace(/ord=\d+/, "ord=" + Math.ceil(1e15 * Math.random())), this.$parent.append("<img style='width:0px;height:0px' src='" + e + "'/>")), this.currentMedia = (this.currentMedia + 1) % this.mediaCount, (t = this.lightboxEvents.update[this.attributes.type]) ? t.call(this) : void 0
}
},
prev: {
gallery: function () {
var t, e;
return (e = this.attributes.trackers.prev) && (e = e.replace(/ord=\d+/, "ord=" + Math.ceil(1e15 * Math.random())), this.$parent.append("<img style='width:0px;height:0px' src='" + e + "'/>")), this.currentMedia = (this.currentMedia + this.mediaCount - 1) % this.mediaCount, (t = this.lightboxEvents.update[this.attributes.type]) ? t.call(this) : void 0
}
},
update: {
gallery: function () {
var t, e, n, i, r, s, a, o;
if (console.log("Trying to update for media " + this.currentMedia), r = $(this.lightbox.el).find(".lightbox-lead"), t = this.attributes.media[this.currentMedia], this.version >= 3) switch (o = Math.min($(window).width() - 40, 480), i = parseInt(9 * (o / 16)), t.type) {
case "image":
r.html("<img src='" + t.data + "'>");
break;
case "vine":
r.html("<iframe frameBorder='0' width=" + o + " height=" + o + " scrolling='no' src='" + t.data + "'></iframe>");
break;
case "youtube":
s = t.data.match(/v=([^&$]+)/)[1], r.html("<iframe frameBorder='0' width=" + o + " height=" + i + " scrolling='no' src='http://www.youtube.com/embed/" + s + "?autoplay=1' allowfullscreen=true style='margin-top: 50px'></iframe>");
break;
case "video":
n = "" + o + "|" + t.data, r.html("<iframe frameBorder='0' width=" + o + " height=" + o + " scrolling='no' src='/video.html#" + n + "'></iframe>");
break;
case "ustream":
r.html("<iframe frameBorder='0' width=" + o + " height=" + i + " scrolling='no' src='" + t.data + "' style='margin-top: 50px'></iframe>");
break;
case "soundcloud":
i = parseInt(o / 2.8), r.html("<iframe frameBorder='0' width=" + o + " height=" + i + " scrolling='no' src='" + t.data + "' style='margin-top: 50px'></iframe>")
} else t.youtubeSrc ? (o = Math.min($(window).width() - 40, 480), i = parseInt(9 * (o / 16)), s = t.youtubeSrc.match(/v=([^&$]+)/)[1], r.html("<iframe frameBorder='0' width=" + o + " height=" + i + " scrolling='no' src='http://www.youtube.com/embed/" + s + "?autoplay=1' allowfullscreen=true style='margin-top: 50px'></iframe>")) : t.videoSrc ? (a = Math.min($(window).width() - 40, 480), n = "" + a + "|" + t.videoSrc, r.html("<iframe frameBorder='0' width=" + a + " height=" + a + " scrolling='no' src='/video.html#" + n + "'></iframe>")) : t.vineSrc ? (a = Math.min($(window).width() - 40, 480), r.html("<iframe frameBorder='0' width=" + a + " height=" + a + " scrolling='no' src='" + t.vineSrc + "'></iframe>")) : t.ustreamSrc ? (o = Math.min($(window).width() - 40, 480), i = parseInt(9 * (o / 16)), r.html("<iframe frameBorder='0' width=" + o + " height=" + i + " scrolling='no' src='" + t.ustreamSrc + "' style='margin-top: 50px'></iframe>")) : r.html("<img src='" + t.leadImageSrc + "' />");
return e = $(this.lightbox.el), e.find(".title").html(t.title || this.attributes.title), e.find(".description").html(t.leadText || this.attributes.leadText), e.find(".view-on").html(t.credit && t.credit.text || this.attributes.credit.text), e.find(".view-on").attr("href", t.credit && t.credit.url || this.attributes.credit.url), e.find(".social-stub").data("title", t.share && t.share.text || this.attributes.share.text), e.find(".social-stub").data("href", t.share && t.share.url || this.attributes.share.url), e.find(".social-stub.twitter").data("twitter-handle", t.twitterHandle || this.attributes.twitterHandle), e.find(".social-stub.pinterest").data("image", t.leadImageSrc), e.find(".social-stub.pinterest").data("description", t.share && t.share.text || this.attributes.share.text)
}
}
}, TripleClick.prototype.resizeElem = function () {
var t;
if (!(this.handleMashableUnit() || this.handleLenUnit() || this.handleSalesHub() || this.localIFrameBust() || this.createPublisherUnit() || this.createVideoLiftUnit() || this.createVineLiftUnit() || this.createLiftUnit() || this.createNetworkUnit() || this.createTwitterLiftUnit() || this.createImageLiftUnit() || this.createBrandUnit() || this.handleResponsiveAd() || this.hideEmpty())) return Modernizr.rgba || (t = this.$elem.parents().filter(function () {
var t;
return t = $(this).css("background-color"), "transparent" !== t && "rgba(0, 0, 0, 0)" !== t
}).first().css("background-color"), this.$elem.contents().find("html").css("background", t)), this.$elem.contents().find("html").css({
position: Modernizr.rgba ? "relative" : "absolute",
overflow: "hidden"
}), this.$elem.contents().find("input.mash-vert-rez").length ? (this.$elem.height(this.$elem.contents().find("input.mash-vert-rez").val()), this.$elem.width(this.$elem.contents().find("input.mash-hori-rez").val())) : (this.$elem.height(Math.max(this.$elem.height(), this.$elem.contents()[0].body.scrollHeight)), this.$elem.width(Math.max(this.$elem.width(), this.$elem.contents()[0].body.scrollWidth))), 0 === this.$elem.height() && this.$elem.css("margin-bottom", "0px"), this.$elem.trigger("loadedAndResized")
}, TripleClick.prototype.hideElem = function (t, e) {
return null == t && (t = !1), null == e && (e = !1), this.$elem.css("display", "none"), e || this.$elem.parent().css("display", "none"), t ? $("#body").css("border-top", "none") : void 0
}, TripleClick.prototype.loadAlias = function () {
var alias, key, largestMinWidth, params, span, value, _i, _len, _ref33, _ref34, _this = this;
if (alias = null, this.$elem.contents().find("span.tripleclick_option").length) {
for (largestMinWidth = 0, _ref33 = this.$elem.contents().find("span.tripleclick_option"), _i = 0, _len = _ref33.length; _len > _i; _i++) span = _ref33[_i], span = $(span), span.data("jsbool") && eval(span.data("jsbool")) === !1 || (span.data("minwidth") >= largestMinWidth && span.data("minwidth") <= document.body.clientWidth && (alias = span), null != alias && (largestMinWidth = alias.data("minwidth")));
if (null != alias) {
params = "", _ref34 = alias.data();
for (key in _ref34) value = _ref34[key], _.indexOf(["jsbool", "minwidth", "type"], key) > -1 || ("alias" === key ? this.type = value : params += "&" + key + "=" + value);
this.$elem.attr("src", "/tripleclick.html#type=" + this.type + params), "large_banner" === this.type && this.$elem.parent().addClass("ad970"), this.$elem.css({
height: TripleClick.ad_map[alias.data("alias")].height,
width: TripleClick.ad_map[alias.data("alias")].width
}), this.$elem[0].contentWindow.location.reload(), this.$elem.on("load", function () {
return _this.callResizeOrLoadAlias()
})
} else this.hideElem("banner" === this.$elem.attr("src").substring(13, 19));
return !0
}
return !1
}, TripleClick.prototype.incrementTitleAndOrd = function () {
var t, e;
return e = parseInt(this.$elem.contents().find("iframe", "script").attr("src").match(/tile=\d+/)[0].substring(5)), t = parseInt(this.$elem.contents().find("iframe", "script").attr("src").match(/ord=\d+/)[0].substring(4)), TripleClick.ord = t, TripleClick.tile = Math.max(e, TripleClick.tile)
}, TripleClick.prototype.callResizeOrLoadAlias = function () {
var t, e, n = this;
return e = every(100, function () {
var i, r;
try {
r = null != n.elem.contentDocument || null != n.elem.contentWindow && null != n.elem.contentWindow.document
} catch (s) {
i = s, r = !1
}
return r && n.$elem.contents().find(".load-indicator").length ? (clearInterval(e), clearInterval(t), n.$elem.contents().on("load", "img", function () {
return n.resizeElem()
}), n.loadAlias() || n.resizeElem()) : void 0
}), t = delay(1e4, function () {
return clearInterval(e), n.hideElem()
})
}, TripleClick.prototype.setLoadHook = function () {
var t = this;
return this.$elem.on("update", function () {
return t.update()
}), this.callResizeOrLoadAlias()
}, window.TripleClick = TripleClick, TripleClick
}(), $$(function () {
return Modernizr.rgba ? TripleClick.onDocumentReady() : void 0
}), $$(function () {
return TripleClick.newOrd()
}), $(document).on("page:cache", function (t, e) {
var n, i, r, s, a, o;
for (r = [], o = TripleClick.ads, s = 0, a = o.length; a > s; s++)
for (n = o[s], i = n.elem; i;) {
if (i === e) {
n.destroy(), r.push(n);
break
}
i = i.parentNode
}
return TripleClick.ads = _.difference(TripleClick.ads, r)
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o = {}.hasOwnProperty,
l = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) o.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
window.Handlebars.registerHelper("select", function (t, e) {
var n;
return n = $("<select />").html(e.fn(this)), n.find("[value=" + t + "]").attr({
selected: "selected"
}), n.html()
}), window.Handlebars.registerHelper("toggleMediaThumb", function (t, e) {
var n;
return n = $('<div class="thumb-input" />').html(e.fn(this)), "image" === (t || "image") && n.addClass("hidden"), n.wrap("<p>").parent().html()
}), e = function (t) {
function e() {
return r = e.__super__.constructor.apply(this, arguments)
}
return l(e, t), e
}(Backbone.Model), n = function (t) {
function e() {
return s = e.__super__.constructor.apply(this, arguments)
}
return l(e, t), e.prototype.template = "templates/quadratus/selection", e.prototype.replaceElement = !1, e
}(App.TemplateView), i = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return l(e, t), e.prototype.replaceElement = !1, e
}(App.TemplateView), t = function () {
function t() {}
return t.displayCode = function (t) {
return $.getJSON("/ads/" + t + ".json", function (t) {
var n, r;
return r = new App.Lightbox({
type: "fixed",
classes: "white-dialog quadratus",
contentClasses: "no-close"
}), n = new i({
model: new e({
json: "<script>mashableUnit=" + JSON.stringify(t.ad) + "</script>"
}),
el: r.content
}), n.template = "templates/quadratus/code_display", n.render(), r.show(), r.centerContent()
})
}, t.set = function (t, e) {
var n, i, r, s;
if (i = mashableUnit, t = t.split("."), t.length > 1)
for (n = r = 0, s = t.length - 2; s >= 0 ? s >= r : r >= s; n = s >= 0 ? ++r : --r) i[t[n]] || (i[t[n]] = t[n + 1].match(/^\d+$/) ? [] : {}), i = i[t[n]];
return i[t.pop()] = e
}, t.presentSelections = function () {
return $("#builder").html("<h1>Select a template:</h1>"), $("#toolbox").hide(), new n({
el: $("#ad-container")
}).render(), $(".quad").each(function () {
return TripleClick.preview($(this).find("span"), $(this).data("defaults"))
}), $(".overlay").one("click", function () {
var e;
return e = $(this).parents(".quad"), $("#toolbox").show(), $("#ad-container").html('<div id="ad"></div>'), t.loadDefaults(e.data("defaults")), t.loadEditor(e.data("metatype"))
})
}, t.defaults = {
twitterImage: {
version: 2,
type: "twitterlift",
hashtagColor: "#f6f",
usernameColor: "#66f",
textColor: "#333",
leadText: 'Can <a class="username">@BabySense</a> Turn Its Facebook Fans Into Paying Customers? <a class="hashtag">#SocialMakeover</a>',
leadImageSrc: "https://o.twimg.com/2/proxy.jpg?t=HBh-aHR0cDovL3JhY2suMC5tc2hjZG4uY29tL21lZGlhL1pna3lNREV6THpBNEx6QTRMemsyTDJKaFlua3lMbVUxTm1VNExuQnVad3B3Q1hSb2RXMWlDVFUyTUhnM05UQUtaUWxxY0djLzZhOGJjNDE4LzJkMi9iYWJ5LTIuanBnFJADFKwCABYAEgA&s=CRlpWUy465ssd8RDI07A2pQEp4DexrDiCtPBv0hfB4A",
twitterHandle: "mashable",
tweetId: "365695809544650753",
twitterAvatarSrc: "https://si0.twimg.com/profile_images/3690637553/5c348fee8afbcefa1978004a864a51ce_bigger.png",
twitterName: "Mashable",
sponsorship: {
text: "Sponsored"
}
},
twitter: {
version: 2,
type: "twitterlift",
hashtagColor: "#666",
usernameColor: "#00f",
textColor: "#33f",
leadText: "Join us right now! We're talking back-to-school tips and tech for today's <a class='hashtag'>#MashLifeChat</a> on the <a href='username'>@MashLifestyle</a> account!",
twitterHandle: "mashable",
tweetId: "365519722135035905",
twitterAvatarSrc: "https://si0.twimg.com/profile_images/3690637553/5c348fee8afbcefa1978004a864a51ce_bigger.png",
twitterName: "Mashable",
sponsorship: {
text: "Sponsored"
}
},
vineGallery: {
version: 3,
type: "gallery",
twitterHandle: "nissanusa",
showThumbs: !0,
leadText: 'Wanna see your video in a TV commercial? Check out the #VersaNote Your Door To More Video Contest. Read more at <a href="http://www.yourdoortomore.com" target="_blank">yourdoortomore.com</a>',
title: "@nissanusa",
share: {
text: "Wanna see your video in a TV commercial? Check out the #VersaNote Your Door To More Video Contest. yourdoortomore.com #VersaVid",
url: "http://instagram.com/p/a16SJRjjgi/"
},
credit: {
text: "Enter the Contest",
url: "yourdoortomore.com"
},
sponsorship: {
text: "Sponsored"
},
media: [{
type: "vine",
data: "https://vine.co/v/h7OKuhmJxbz/card",
thumb: "http://distilleryimage7.s3.amazonaws.com/b96866dee42f11e2ad5622000a1f98e5_6.jpg"
}, {
type: "vine",
data: "https://vine.co/v/h7MdP9OD05B/card",
thumb: "http://distilleryimage5.s3.amazonaws.com/967c33b8e01e11e2816722000a1f93c3_6.jpg"
}, {
type: "vine",
data: "https://vine.co/v/hWAmV6ei0Yg/card",
thumb: "http://distilleryimage1.s3.amazonaws.com/646b756ae29811e2990322000a9f192c_6.jpg"
}, {
type: "vine",
data: "https://vine.co/v/hBIb2bq5gLn/card",
thumb: "http://distilleryimage3.s3.amazonaws.com/1f91e5d8de9111e28fa722000a1fbcea_6.jpg"
}],
trackers: {
impression: [],
click: [],
share: {
facebook: "",
twitter: "",
linkedIn: "",
googlePlus: "",
pinterest: ""
},
follow: "",
prev: "",
next: ""
}
}
}, t.loadDefaults = function (t) {
return window.mashableUnit = this.defaults[t]
}, t.loadEditor = function (n) {
var r, s;
return mashableUnitMeta.metatype = n, s = new e(mashableUnit), s.attributes.adTitle = mashableUnitMeta.title, s.attributes.id = mashableUnitMeta.id, r = new i({
model: s,
el: $("#builder")
}), r.template = "templates/quadratus/" + n, r.render(), t.preview(), t.save(), this.setBuilderHooks()
}, t.onFieldChange = function () {
var e, n;
return e = $(this), (n = e.attr("name")) ? ("adTitle" === n ? mashableUnitMeta.title = e.val() : t.set(n, e.val()), t.preview(), t.save()) : void 0
}, t.setBuilderHooks = function () {
return $("#builder").on("blur", "input", this.onFieldChange), $("#builder").on("change", "select", function () {
var e;
return t.onFieldChange.call(this), e = $(this), "image" === e.val() ? e.siblings(".thumb-input").addClass("hidden") : e.siblings(".thumb-input").removeClass("hidden")
}), $(".add-impression").on("click", function () {
var t;
return t = parseInt($(".impression").last().data("index")) + 1, t || (t = 0), $(this).before("<div class='impression-tracker'><label>Impression Tracker</label><input class='impression' name='trackers.impression." + t + "' data-index='" + t + "'><div class='remove' data-index='" + t + "'></div></div>")
}), $(".add-click").on("click", function () {
var t;
return t = parseInt($(".click").last().data("index")) + 1, t || (t = 0), $(this).before("<div class='click-tracker'><label>Click Tracker</label><input class='click' name='trackers.click." + t + "' data-index='" + t + "'><div class='remove' data-index='" + t + "'></div></div>")
}), $(".add-media").on("click", function () {
var t, e;
return t = parseInt($(".gallery-media").last().data("index")) + 1, t || (t = 0), (e = mashableUnit.media)[t] || (e[t] = {}), mashableUnit.media[t].type = "image", $(this).before("<div class='gallery-media' data-index='" + t + "'><label>Media</label><select name='media." + t + ".type'><option value='image'>Image</option><option value='vine'>Vine</option><option value='youtube'>YouTube</option><option value='video'>Instagram Video</option><option value='ustream'>Ustream</option><option value='soundcloud'>SoundCloud</option></select><input name='media." + t + ".data'><div class='thumb-input hidden'><label>Thumbnail</label><input name='media." + t + ".thumb'></div><div class='remove' data-index='" + t + "'></div></div>")
}), $("#builder").on("click", ".impression-tracker .remove", function () {
return mashableUnit.trackers.impression.splice(parseInt($(this).data("index")), 1), t.loadEditor(mashableUnitMeta.metatype)
}), $("#builder").on("click", ".click-tracker .remove", function () {
return mashableUnit.trackers.click.splice(parseInt($(this).data("index")), 1), t.loadEditor(mashableUnitMeta.metatype)
}), $("#builder").on("click", ".gallery-media .remove", function () {
return mashableUnit.media.splice(parseInt($(this).data("index")), 1), t.loadEditor(mashableUnitMeta.metatype)
}), $("#preview").on("click", ".export", function (e) {
return e.stopPropagation(), t.displayCode($(this).data("id")), !1
}), $("#preview").on("click", ".delete", function (e) {
return e.stopPropagation(), t["delete"]($(this).data("id")), $(this).parents(".quad").remove(), window.location = "/ads", !1
})
}, t.preview = function () {
return TripleClick.preview($("#preview").find("#ad-container").children().first())
}, t.save = function () {
return $.ajax({
type: "POST",
url: "/ads/" + mashableUnitMeta.id,
data: {
_method: "PUT",
ad: {
title: mashableUnitMeta.title,
metatype: mashableUnitMeta.metatype,
params: JSON.stringify(mashableUnit)
}
}
})
}, t["delete"] = function (t) {
var e;
return e = "/ads/" + t, $.ajax({
type: "POST",
url: e,
dataType: "json",
data: {
_method: "delete"
}
})
}, t.onDocumentReady = function () {
var e;
return "undefined" != typeof mashableUnitMeta && null !== mashableUnitMeta ? (e = mashableUnitMeta.metatype) ? this.loadEditor(e) : this.presentSelections() : ($(".export").on("click", function (e) {
return e.stopPropagation(), t.displayCode($(this).data("id")), !1
}), $(".delete").on("click", function (e) {
return e.stopPropagation(), t["delete"]($(this).data("id")), $(this).parents(".quad").remove(), !1
}))
}, t
}(), $$(function () {
return t.onDocumentReady()
}), window.Quadratus = t
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d = function (t, e) {
return function () {
return t.apply(e, arguments)
}
}, h = {}.hasOwnProperty,
p = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) h.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = window.jQuery, e = t(window), a = function (t, e) {
return setTimeout(e, t)
}, l = function (t, e) {
return setInterval(e, t)
}, o = function (t) {
return clearInterval(t), null
}, i = function (n) {
function i() {
return this.handleKeys = d(this.handleKeys, this), this.omnomnom = d(this.omnomnom, this), c = i.__super__.constructor.apply(this, arguments)
}
return p(i, n), i.prototype.events = {
click: "hide",
"click .mash-lightbox-close": "hide",
"click .no-close": "omnomnom"
}, i.prototype.animations = {
pop: {
open: function (t) {
var e;
return e = this.el, this.origin && e.css({
transformOrigin: this.origin
}), e.show().addClass("shown").css({
scale: this.sourceScale || .15
}).transition({
scale: 1
}, function () {
return e.css({
scale: "",
transform: ""
}), t ? t() : void 0
})
},
close: function (t) {
var e;
return e = this.el, e.transition({
opacity: 0,
scale: this.sourceScale || .15
}, function () {
return e.css({
opacity: 1,
scale: 1
}).hide(), t ? t() : void 0
})
}
},
puff: {
open: function (t) {
var e;
return e = this.el, this.origin && e.css({
transformOrigin: this.origin
}), e.show().addClass("shown").css({
scale: 1.55
}).transition({
scale: 1
}, function () {
return e.css({
scale: "",
transform: ""
}), t ? t() : void 0
})
},
close: function (t) {
var e;
return e = this.el, e.transition({
opacity: 0,
scale: 1.55
}, function () {
return e.css({
opacity: 1,
scale: 1
}).hide(), t ? t() : void 0
})
}
},
slideY: {
open: function (t) {
return this.el.css({
y: "-120%"
}).transition({
y: 0
}, t)
},
close: function (t) {
var e;
return e = this.el, e.transition({
y: "-120%"
}, function () {
return e.hide(), t ? t() : void 0
})
}
},
slideX: {
open: function (t) {
return this.el.css({
x: "-120%"
}).transition({
x: 0
}, t)
},
close: function (t) {
var e;
return e = this.el, e.transition({
x: "-120%"
}, function () {
return e.hide(), t ? t() : void 0
})
}
}
}, i.prototype.initialize = function () {
var e = this;
return this.setElement(t(Handlebars.templates["templates/lightbox"]())), this.$el.find(".mash-lightbox-close").on("click", function () {
return e.hide()
}), this.el = this.$el, this.content = this.el.find(".mash-lightbox-content"), this.options.type && this.setType(this.options.type), this.options.classes && this.el.addClass(this.options.classes), this.options.contentClasses && this.content.addClass(this.options.contentClasses), this.el.hide()
}, i.prototype.show = function (n) {
var i = this;
return null == n && (n = {}), this.open = !0, t("body").append(this.el), this.animation = n.animation || "pop", t(".mash-lightbox").not(this.el).hide(), n.content && this.showContent(n.content), this.el.show(), "fixed" !== this.positionType ? (this.el.css({
"padding-top": e.scrollTop() + 80
}), this.el.css({
"min-height": e.height()
})) : this.el.css({
height: "",
top: ""
}), this.el.addClass("shown"), this.origin = n.origin, this.sourceScale = n.sourceScale, this.trigger("opening"), this._open(function () {
return i.trigger("opened")
}), "fixed" === this.positionType && t("body").addClass("noscroll"), e.on("keydown.shown", this.handleKeys)
}, i.prototype.getOrigin = function (n) {
var i, r, s, a, o;
return n = t(n), r = n.offset(), s = n.width(), i = n.height(), a = r.left + s / 2, o = r.top + i / 2, a -= e.scrollLeft(), o -= e.scrollTop(), "" + a + "px " + o + "px"
}, i.prototype.hide = function () {
var n, i = this;
return this.open = !1, this.el.hasClass("shown") && (t("body").removeClass("noscroll"), this.el.removeClass("shown"), n = this.el, this.trigger("closing"), this._close(function () {
return i.trigger("closed")
}), e.off("keydown.shown")), !1
}, i.prototype.showContent = function (t) {
return this.content.html(t)
}, i.prototype.centerContent = function () {
return this.content.css({
marginTop: (this.el.height() - this.content.outerHeight()) / 2
})
}, i.prototype.setType = function (t) {
var e;
return this.positionType = t, e = this.el.data("last-class"), this.el.data("last-class", "mash-lightbox-" + t), e && this.el.removeClass(e), this.el.addClass("mash-lightbox-" + t), "fixed" === t ? (this.$el.on("mousewheel", this.omnomnom), this.$el.on("touchmove", this.omnomnom)) : void 0
}, i.prototype.omnomnom = function (t) {
return this.open ? (t.stopPropagation(), t.preventDefault(), !1) : !0
}, i.prototype._open = function (t) {
return i.prototype.animations[this.animation] ? i.prototype.animations[this.animation].open.call(this, t) : (this.el.show(), t ? t() : void 0)
}, i.prototype._close = function (t) {
return i.prototype.animations[this.animation] ? i.prototype.animations[this.animation].close.call(this, t) : (this.el.hide(), t ? t() : void 0)
}, i.prototype.handleKeys = function (t) {
return this.open && 27 === t.keyCode ? (this.hide(), !1) : void 0
}, i
}(Backbone.View), r = function (e) {
function n() {
return u = n.__super__.constructor.apply(this, arguments)
}
return p(n, e), n.prototype.initialize = function () {
var t = this;
return this.lightbox = new i, this.options.type && this.lightbox.setType(this.options.type), this.lightbox.bind("opening", function () {
return t.trigger("opening")
}), this.lightbox.bind("closing", function () {
return t.trigger("closing")
}), this.lightbox.bind("opened", function () {
return t.trigger("opened"), t.is_open = !0
}), this.lightbox.bind("closed", function () {
return t.element.before(t.origElement), t.element.remove(), t.trigger("closed"), t.is_open = !1
}), this.popIn(), this.popped = !1
}, n.prototype.popOut = function (e) {
var n, i, r = this;
if (!this.popped) return this.popped = !0, this.origElement = e, this.element = e.clone(), n = this.lightbox.getOrigin(this.origElement), i = e.width() / t(window).width(), requestAnimFrame(function () {
return e.before(r.element), r.lightbox.show({
content: r.origElement,
origin: n,
sourceScale: i
})
})
}, n.prototype.popIn = function () {
return this.popped ? (this.popped = !1, this.lightbox.hide()) : void 0
}, n
}(Backbone.View), n = {
open: function (e, n) {
var r;
return this.lightbox || (this.lightbox = new i({
type: "fixed",
classes: "white-dialog",
contentClasses: "no-close"
})), r = this.lightbox, r.show({
animation: "slideY"
}), t.ajax({
url: e,
data: n,
dataType: "html",
success: function (t) {
return r.showContent(t), r.centerContent()
},
error: function () {
return r.hide()
}
}), this
}
}, s = {
show: function () {
return this.lightbox || (this.lightbox = new i({
type: "fixed",
classes: "white-loading",
contentClasses: "no-close"
})), this.lightbox.show({
animation: "puff"
}), this.lightbox.showContent("<div class='loader-inline visible'></div>"), this.lightbox.centerContent()
}
}, this.provides({
Lightbox: i,
Popout: r,
AjaxDialog: n,
WaitDialog: s
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d = {}.hasOwnProperty,
h = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) d.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = $(window), n = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.urlRoot = "/stories.json", e
}(Backbone.Model), s = function (t) {
function e() {
return o = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.template = "templates/posts/post", e.prototype.getCanvas = function () {
var t, e;
return this.canvas || (this.canvas = this.$el.find("canvas.velocity"), this.canvas ? (e = this.canvas.width(), t = this.canvas.height()) : (this.canvas = $("<div class='velocity'></div>"), this.$el.append(this.canvas))), this.canvas
}, e.prototype.hideVelocity = function () {
return this.$el.find(".velocity-graph").hide()
}, e.prototype.renderVelocity = function (t) {
var e, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g, v, y, w, b, x, k, C, S, T, $, E;
if (e = this.getCanvas(), t) {
if (t = _.select(t, function (t) {
return "number" == typeof t && !isNaN(t)
}), t.unshift(0), t.length <= 3) return this.hideVelocity(), void 0;
if (e.length) {
for (i = e.get(0), y = e.data("width") || e.width(), o = e.data("height") || e.height(), i.width = y, i.height = o, u = null, p = 1, c = T = 0, E = t.length; E > T; c = ++T) v = t[c], u && (t[c] = u + (v - u) * p, p *= 1.12), u = v;
if (i.getContext) {
for (n = i.getContext("2d"), n.lineCap = "round", n.lineWidth = 2.5, g = 1, r = 4, 100 > y && (n.lineWidth = 2, g = 1, r = 2), d = 1.1 * _.max(t), h = _.min(t) / 1.1, h > 0 && (h = 0), a = n.createLinearGradient(0, 0, y, o), a.addColorStop("0", "#58b3cb"), a.addColorStop("0.6", "#fcbb3b"), a.addColorStop("1.0", "#f80"), n.strokeStyle = a, y -= 10, o -= 10, n.beginPath(), s = t.length - 3, 0 > s && (s = 0), l = $ = 0; g > 0 ? s >= $ : $ >= s; l = $ += g) f = t[l], m = t[l + 1], b = y / t.length * l + 5, x = y / t.length * (l + 1) + 5, C = o - (f - h) / (d - h) * o + 5, S = o - (m - h) / (d - h) * o + 5, w = (b + x) / 2, k = (C + S) / 2, 0 === l && n.moveTo(b, C), n.quadraticCurveTo(b, C, w, k);
return b = y / t.length * (t.length - 2) + 5, x = y + 5, C = o - (t[t.length - 2] - h) / (d - h) * o, S = o - (t[t.length - 1] - h) / (d - h) * o, n.quadraticCurveTo(b, C, x, S), n.stroke(), n.closePath(), n.beginPath(), k = o - (t[0] - h) / (d - h) * o + 5, n.arc(5, k, r, 0, 2 * Math.PI, !0), n.fillStyle = "#58b3cb", n.fill(), n.closePath(), n.beginPath(), n.arc(x, S, r, 0, 2 * Math.PI, !0), n.fillStyle = "#f80", n.fill(), n.closePath()
}
}
}
}, e
}(App.TemplateView), i = function (t) {
function e() {
return l = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.model = n, e.prototype.url = "/stories.json", e.prototype.initialize = function (t, e) {
return null == e && (e = {}), this.opts = e
}, e
}(Backbone.Collection), e = function (e) {
function n() {
return c = n.__super__.constructor.apply(this, arguments)
}
return h(n, e), n.prototype.initialize = function (t) {
var e, n, r, a, o, l;
for (this.collections = {}, this.loader = new i, this.options = t, this.exhausted = {}, l = this, this.loaded = !1, this.loader.parse = function (e) {
var n, i, r, s;
for (s = t.collections, i = 0, r = s.length; r > i; i++) n = s[i], l.collections[n.key].cache.add(e[n.key]);
return l.fillAll()
}, a = t.collections, o = [], n = 0, r = a.length; r > n; n++) e = a[n], o.push(function () {
var t, n, r;
return e.active !== !1 && (e.active = !0), e.pageSize || (e.pageSize = 10), e.lastPage || (e.lastPage = null), e.maxStories || (e.maxStories = 200), n = $(e.container), n.empty(), this.collections[e.key] = {
el: n,
key: e.key,
view: new App.FragmentView({
el: n
}),
cache: new i(e.data || []),
active: e.active,
options: e,
display: new i,
indicator: new App.LoadingIndicator,
heightCheck: e.heightCheck,
heightPerElement: e.estHeight,
elements: 0,
lastHeight: 0
}, t = this.collections[e.key], t.addElementToAverage = function (e) {
return t.lastHeight += e, t.elements += 1
}, t.heightCheck || (t.heightCheck = function (t) {
var e;
return e = t.el[0].getBoundingClientRect().bottom, e < document.documentElement.clientHeight + l.options.loadDistance
}), r = e.key, t.display.on("add", function (e) {
var i, a, o;
return a = t.heightPerElement, i = n.height(), t.lastColumnHeight !== i && i > 0 ? (t.lastHeight = i + a, t.lastColumnHeight = n.height()) : t.lastHeight += a, t.elements += 1, t.heightPerElement = t.lastHeight / t.elements, o = new s({
model: e
}).render(), e.attributes.velocity && e.attributes.velocity.length >= 3 && o.renderVelocity(e.attributes.velocity), t.view.append(o.$el), l.trigger("show", r, t, t.lastHeight)
})
}.bind(this)());
return o
}, n.prototype.activate = function (t) {
return t.active = !0, this.fillCollection(t)
}, n.prototype.deactivate = function (t) {
return t.active = !1
}, n.prototype.start = function () {
var e, n, i = this;
if (!this.started) return (n = this.options).loadDistance || (n.loadDistance = .35 * t.height()), this.started = !0, this.checkFill(), this.loaded = !0, e = -1, this.scrollable = scrollContainer(), this.scrollable.on("scroll.infiniteScroll", function () {
var t;
return t = window.pageYOffset || window.document.documentElement.scrollTop, t > e && !i.filling && isAttachedToDom(i.el) && $.throttle("checkIfShouldfill", 50, function () {
return i.checkFill()
}), e = t
})
}, n.prototype.exhaust = function (t) {
return this.anyExhausted = !0, this.exhausted[t] = !0, this.exhaustAll(), this.trigger("exhausted", t)
}, n.prototype.exhaustAll = function () {
return this.allExhausted = !0, this.scrollable.off("scroll.infiniteScroll"), this.trigger("exhaustedAll")
}, n.prototype.checkFill = function () {
var t, e, n, i, r, s;
n = !1, r = !1, s = this.collections;
for (i in s) e = s[i], e.active && (this.exhausted[i] || (t = this.fillCollection(e), t > 0 && (n = !0), 0 === e.cache.length && 0 === t && (r = !0)));
return n && this.trigger("rendered"), n || r ? this.refillBuffers() : void 0
}, n.prototype.fillCollection = function (t) {
var e, n;
return e = t.heightCheck(t), e ? (n = this.fill(t), n === t.options.pageSize && this.fillCollection(t), n) : -1
}, n.prototype.fill = function (t) {
var e, n, i, r, s, a;
for (n = 0, e = !1, i = s = 1, a = t.options.pageSize; a >= 1 ? a >= s : s >= a; i = a >= 1 ? ++s : --s)
if (!this.exhausted[t.key]) {
if (!(r = t.cache.shift())) break;
n += 1, (!t.options.filter || t.options.filter(r)) && (e = !0, t.display.add(r))
}
return t.view.commit(), n
}, n.prototype.fillAll = function () {
var t, e, n, i, r;
i = this.collections, r = [];
for (n in i) e = i[n], e.active && (this.exhausted[n] || (t = this.fillCollection(e), t < e.options.pageSize && t >= 0 && 0 === e.cache.length && this.exhaust(n), e.display.length >= e.options.maxStories ? r.push(this.exhaust(n)) : r.push(void 0)));
return r
}, n.prototype.refillBuffers = function () {
var t, e, n, i, r, s, a, o = this;
s = {
hot_per_page: 0,
new_per_page: 0,
rising_per_page: 0
}, r = !1, a = this.collections;
for (n in a) e = a[n], s = $.extend(s, e.options.query), this.exhausted[n] ? s[n + "_per_page"] = 0 : e.cache.length < e.options.pageSize ? (e.indicator.show(), r = !0, s[n + "_per_page"] = 2 * e.options.pageSize, t = e.cache.length > 0 ? "cache" : "display", i = e[t].at(e[t].length - 1), i && (s[n + "_after"] = i.attributes.sort_key, this.collections[n].lastPage = i.attributes.sort_key)) : s[n + "_per_page"] = e.options.pageSize;
return r && !this.lastRequest ? (o = this, this.lastRequest = this.loader.fetch({
add: !0,
data: s,
error: function () {
return o.doneLoading()
},
success: function () {
return o.doneLoading()
}
})) : void 0
}, n.prototype.doneLoading = function () {
var t, e, n, i;
this.lastRequest = null, n = this.collections, i = [];
for (e in n) t = n[e], i.push(t.indicator.hide());
return i
}, n
}(Backbone.View), r = function (t) {
function e() {
return u = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.collectionClass = i, e.prototype.viewClass = s, e
}(App.CollectionView), this.provides({
PostView: s,
PostCollection: i,
PostCollectionView: r,
Post: n,
CachingMultiPostCollectionView: e
})
}.call(this),
function () {
var t = {}.hasOwnProperty,
e = function (e, n) {
function i() {
this.constructor = e
}
for (var r in n) t.call(n, r) && (e[r] = n[r]);
return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e
};
$$("posts/show", function (t) {
var n, i, r, s, a, o, l, c;
for (i = function (t) {
function n() {
return l = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.initialize = function () {
return this.template = Handlebars.templates["templates/posts/brightcove"]
}, n.prototype.render = function () {
var t;
return t = this.template(this.model), this.$el.html(t)
}, n
}(Backbone.View), c = t(".content-brightcove"), a = 0, o = c.length; o > a; a++) r = c[a], new i({
model: t(r).data(),
el: r
}).render();
return n = t("article.post.full .article-content, article.post.full figure.article-image"), s = function () {
var e, i, r, s, a;
for (e = t("object.BrightcoveExperience"), a = [], r = 0, s = e.length; s > r; r++) i = e[r], a.push(t(i).attr({
width: n.width(),
height: .5625 * n.width()
}));
return a
}, t(window).off("resize-width.updateBrightcove").on("resize-width.updateBrightcove", function () {
return t.throttle("resize.updateBrightcove", 700, s)
}), t("object.BrightcoveExperience").length > 0 ? t.getScript("http://admin.brightcove.com/js/BrightcoveExperiences.js", function () {
return brightcove.createExperiences(), s()
}) : void 0
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l = {}.hasOwnProperty,
c = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) l.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = function (t) {
function e() {
return r = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e
}(Backbone.Model), i = function (t) {
function e() {
return s = e.__super__.constructor.apply(this, arguments)
}
return c(e, t), e
}(App.TemplateView), e = function (e) {
function n() {
return a = n.__super__.constructor.apply(this, arguments)
}
return c(n, e), n.prototype.model = t, n
}(Backbone.Collection), n = function (t) {
function n() {
return o = n.__super__.constructor.apply(this, arguments)
}
return c(n, t), n.prototype.collectionClass = e, n.prototype.viewClass = i, n
}(App.CollectionView), this.provides({
User: t,
UserView: i,
UserCollectionView: n
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d = {}.hasOwnProperty,
h = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) d.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = $(window), e = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e
}(Backbone.Model), s = function (t) {
function e() {
return o = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.template = "templates/topics/search_topic", e
}(App.TemplateView), n = function (t) {
function n() {
return l = n.__super__.constructor.apply(this, arguments)
}
return h(n, t), n.prototype.model = e, n
}(Backbone.Collection), i = function (t) {
function e() {
return c = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.collectionClass = n, e.prototype.viewClass = s, e
}(App.CollectionView), r = function (t) {
function e() {
return u = e.__super__.constructor.apply(this, arguments)
}
return h(e, t), e.prototype.template = "templates/posts/topic_post", e
}(App.PostView), this.provides({
Topic: e,
TopicView: s,
TopicCollectionView: i,
TopicPostView: r
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c = {}.hasOwnProperty,
u = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) c.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = $(window), e = function (t) {
function e() {
return s = e.__super__.constructor.apply(this, arguments)
}
return u(e, t), e.prototype.template = "templates/posts/topic_post", e
}(App.PostView), r = function (t) {
function e() {
return a = e.__super__.constructor.apply(this, arguments)
}
return u(e, t), e.prototype.template = "templates/users/search_user", e
}(App.UserView), i = function (t) {
function e() {
return o = e.__super__.constructor.apply(this, arguments)
}
return u(e, t), e.prototype.template = "templates/topics/search_topic", e
}(App.TopicView), n = function (t) {
function e() {
return l = e.__super__.constructor.apply(this, arguments)
}
return u(e, t), e.prototype.url = "/search.json", e
}(Backbone.Collection), this.provides({
PostSearchView: e,
UserSearchView: r,
TopicSearchView: i,
SearchCollection: n
})
}.call(this),
function () {
var t;
t = function () {
function t(t) {
var e, n, i, r, s, a;
r = Handlebars.templates["templates/header/flash"], this.$el || (this.$el = $("<div id='flash-message'></div>"), this.$el.appendTo("#sticky"), a = this.$el, this.$el.on("click", ".close", function () {
return a.transition({
y: "-100%"
}, 150, function () {
return a.hide()
}), !1
})), e = 0, i = function () {
var i;
e += 1, i = [];
for (n in t) s = t[n], i.push({
k: n,
v: s
});
return i
}(), e > 0 && this.$el.html(r(i)).css({
position: "absolute",
top: 0,
left: 0,
right: 0,
y: "-100%"
}).show().transition({
y: 0,
delay: 700,
duration: 250
}).find(".flash-message").delay(1500).queue(function (t) {
return $(this).addClass("highlight"), t()
}).delay(450).queue(function (t) {
return $(this).removeClass("highlight"), t()
})
}
return t
}(), this.provides({
Flash: t
})
}.call(this),
function () {
$(function () {
return $(window).on("page:change", function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h;
if ("undefined" != typeof metaData && null !== metaData) {
for ($("head link[data-page-subject], head meta[data-page-subject]").remove(), c = metaData.link, i = 0, a = c.length; a > i; i++) t = c[i], $("head").append("<link rel='" + t[0] + "' href='" + t[1] + "' data-page-subject='true'/>");
for (u = metaData.meta_property, r = 0, o = u.length; o > r; r++) n = u[r], $("head").append("<meta property='" + n[0] + "' content='" + n[1] + "' data-page-subject='true'/>");
for (d = metaData.meta_name, h = [], s = 0, l = d.length; l > s; s++) e = d[s], h.push($("head").append("<meta name='" + e[0] + "' content='" + e[1] + "' data-page-subject='true'/>"));
return h
}
})
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g, v, y, w = {}.hasOwnProperty,
b = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) w.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
}, _ = function (t, e) {
return function () {
return t.apply(e, arguments)
}
};
t = window.jQuery, n = t(window), e = null, i = 44, a = 20, f = null, h = null, u = null, d = c = null, p = function () {
var e, n, i, r;
return i = t("#site-header .main-menu"), r = null, n = !1, i.on("mouseleave", function () {
return n = !1
}), Modernizr.touch && i.find(".collapsable").hide(), d = function (t, e) {
var r, s;
if (null == e && (e = !1), n = !0, t.trigger("open"), r = i.find(".submenu.active, .submenu.locked").length > 0, e) {
if (i.find(".submenu").removeClass("active locked"), t.addClass("active locked").trigger("openMenu", [t]), !r) return t.find(".submenu-content").css({
y: -500
}).transition({
y: ""
}, 290)
} else if (s = i.find(".submenu"), 0 === s.filter(".locked").length && (s.removeClass("active locked"), t.addClass("active").trigger("openMenu", [t]), !r)) return t.find(".submenu-content").css({
y: -500
}).transition({
y: 0
}, 290)
}, c = function (t, e) {
return null == t && (t = !1), null == e && (e = null), t ? i.find(".submenu").removeClass("active locked") : i.find(".submenu:not(.locked)").removeClass("active")
}, e = {
on: ".submenu",
sensitivity: 4,
interval: 50,
over: function (e) {
return d(t(e.currentTarget))
},
out: function (t) {
var e;
return e = t.currentTarget, clearTimeout(r), r = delay(50, function () {
return n ? void 0 : c()
})
}
}, i.hoverIntent(e), t(document).on("click", function () {
return c(!0)
})
}, s = function (e) {
function n() {
return m = n.__super__.constructor.apply(this, arguments)
}
return b(n, e), n.prototype.events = {
"mouseover .subnav-channel": "renderChannelPosts",
"touchstart .subnav-channel": "renderChannelPosts",
"click .submenu": "forceRenderChannel"
}, n.prototype.initialize = function () {
var t = this;
return this.injected = {}, this.domcache = {}, this.$toggles = this.$el.find("li.submenu.channel"), this.$toggles.on("openMenu", function (e, n) {
return t.forceRenderChannel(null, n)
})
}, n.prototype.forceRenderChannel = function (e, n) {
var i;
return n || (n = t(e.currentTarget)), i = n.find(">a"), this.content = n.find(".submenu-content"), this.renderChannel(n.data("tags"), i.text(), i.attr("href"))
}, n.prototype.renderChannelPosts = function (e) {
var n, i;
return n = t(e.currentTarget), n.parents("ul.channels").find("li a.active").removeClass("active"), n.addClass("active"), i = n.data("tag"), e.stopPropagation(), this.content.find(".subnav-posts").html(Handlebars.partials["templates.posts.subnav_posts"]({
posts: this.cache.posts[i]
})), Modernizr.touch || this.crop(), !1
}, n.prototype.renderChannel = function (e, n, i) {
var r;
if (this.cache) {
if (!this.cache.posts[e]) return;
return this.injected[e] || (this.cache.channels[e].unshift({
url: i,
name: "All " + n,
slug: e
}), this.injected[e] = !0), r = {
channels: this.cache.channels[e],
posts: this.cache.posts[e]
}, this.domcache[e] || (this.domcache[e] = t("<div></div>"), this.domcache[e].html(Handlebars.templates["templates/posts/subnav"](r))), this.content.html(this.domcache[e]), Modernizr.touch || this.crop(), this.content.find(".subnav-channel:eq(0)").trigger("touch")
}
return this.content.html('<div class="progress progress-striped active"><div class="bar" style="width: 100%"></div></div>'), this.fetchChannelData(e, n, i), this.fetchChannelData = function () {}
}, n.prototype.crop = function () {
var e, n, i, r, s, a, o, l;
for (i = ".subnav-post, ul.columns ul.column-list", r = t(".navbar-inner").get(0).getBoundingClientRect(), o = this.content.find(i).show(), l = [], s = 0, a = o.length; a > s; s++) e = o[s], n = e.getBoundingClientRect(), n.right > r.right ? l.push(t(e).hide()) : l.push(void 0);
return l
}, n.prototype.fetchChannelData = function (e, n, i) {
var r, s, a;
return a = this, this.all_tags = function () {
var t, e, n, i;
for (n = this.$toggles, i = [], t = 0, e = n.length; e > t; t++) s = n[t], i.push(s.getAttribute("data-tags"));
return i
}.call(this).join(";"), r = window.readSession("subnav_json"), r ? (this.cache = r, this.renderChannel(e, n, i)) : t.getJSON("/stories/subnav.json", {
tag: this.all_tags
}, function (t) {
return window.writeSession("subnav_json", t, 6e5), a.cache = t, a.renderChannel(e, n, i)
})
}, n.prototype.hide = function () {
return this.$toggles.not(".locked").removeClass("active")
}, n.prototype.justeatit = function () {
return !1
}, n
}(Backbone.View), l = function (e) {
function i() {
return this.handleKeys = _(this.handleKeys, this), g = i.__super__.constructor.apply(this, arguments)
}
return b(i, e), i.prototype.initialize = function () {
var e, i, r, s = this;
return this.$el.addClass("mash-lightbox-side-menu needsclick").hide(), this.$peek = t("#peek"), e = t("#site-header .main-menu"), this.$peek.append(this.$el), e.find("li.menu a").on("click", function (t) {
return s.toggle(), t.target.blur(), !1
}), this.menu = e.clone().toggleClass("inline flyout"), this.menu.append(this.menu.find(".for-flyout-bottom")), this.container = t("#flyout-container").append(this.menu).hide(), this.targetWidth = this.container.width(), n.on("orientationchange", function () {
return s.targetWidth = s.container.width()
}), this.$inline_target = t(".navbar-inner"), this.$body = t(document.body), i = null, r = null, this.touchOffset = null, this.$el.on("click", function (t) {
return t.preventDefault(), s.toggle(), !1
}), this.$el.on("touchstart", function (t) {
return this.touchOffset = 0, t.preventDefault(), i = t.clientX || t.originalEvent.touches[0].clientX, !1
}), this.$el.on("touchmove", function (t) {
var e, n;
return n = t.clientX || t.originalEvent.touches[0].clientX, s.touchOffset = i - n, e = s.targetWidth - s.touchOffset, 0 > e && (e = 0), e > s.targetWidth && (e = s.targetWidth), s.$peek.css({
x: e
}), t.preventDefault(), !1
}), this.$el.on("touchend", function (t) {
return t.preventDefault(), s.touchOffset < 60 && 0 !== s.touchOffset ? s.$peek.transit({
x: s.targetWidth
}) : s.hide(), !1
})
}, i.prototype.toggle = function () {
return this.popped ? this.hide() : this.show(), !1
}, i.prototype.show = function () {
return this.popped ? void 0 : (this.popped = !0, this.$el.show(), this.container.show(), this.$peek.transition({
x: this.targetWidth
}, 450), n.on("keydown.flyout", this.handleKeys))
}, i.prototype.hide = function () {
var t, e, i, r = this;
if (this.popped) return this.popped = !1, t = this.menu, this.$el.hide(), e = 450 * ((this.targetWidth - this.touchOffset) / this.targetWidth), n.off("keydown.flyout"), i = this.$peek, this.$peek.transition({
x: "0"
}, e, function () {
return r.container.hide(), i.css({
transform: ""
}), t.css({
height: "",
opacity: 0
}).transition({
opacity: ""
}, 150)
})
}, i.prototype.handleKeys = function (t) {
return this.popped && 27 === t.keyCode ? (this.hide(), t.stopPropagation(), !1) : void 0
}, i.prototype.omnomnom = function (t) {
return t.preventDefault(), !0
}, i
}(Backbone.View), r = function (e) {
function r() {
return this.onScroll = _(this.onScroll, this), this.onMove = _(this.onMove, this), this.onEnd = _(this.onEnd, this), this.onStart = _(this.onStart, this), v = r.__super__.constructor.apply(this, arguments)
}
return b(r, e), r.prototype.initialize = function () {
var e = this;
return this.currentScrollTop = -1, this.startDownAt = 0, this.lastScrollTop = n.scrollTop(), this.iOS = /iP(hone|od|ad)/.test(window.navigator.userAgent), Modernizr.touch && (n.on("touchstart", function (t) {
return e.onStart(t)
}), n.on("touchmove", function (t) {
return e.onMove(t)
}), n.on("touchend", function (t) {
return e.onEnd(t)
})), window.matchMedia && window.matchMedia("max-device-width: 1024px").matches && n.on("scroll", function (t) {
return e.onScroll(t)
}), this.menu = t("#site-header .main-menu")
}, r.prototype.onStart = function (t) {
return 1 !== t.originalEvent.touches.length || this.iOS && this.menu.hasClass("flyout") ? void 0 : (this.scrollStart = t.originalEvent.touches[0].pageY, this.lastPosition = this.scrollStart, this.lastScrollTop = n.scrollTop(), this.moveEventWindow = [])
}, r.prototype.onEnd = function () {
return this.scrollStart = null, this.iOS ? this.lastDirection > 0 ? this.$el.css({
opacity: 0
}) : this.$el.css({
opacity: 1
}) : void 0
}, r.prototype.onMove = function (t) {
var e, n, i, r, s, o, l;
if (this.scrollStart && 1 === t.originalEvent.touches.length) {
for (r = t.originalEvent.touches[0].pageY, this.moveEventWindow.push(this.lastPosition - r), this.moveEventWindow.length > a && this.moveEventWindow.shift, n = 0, l = this.moveEventWindow, s = 0, o = l.length; o > s; s++) i = l[s], n += i;
if (this.lastDirection = n, 0 !== n) return this.lastPosition = r, e = r - this.scrollStart, this.setScrollTop(n, this.lastScrollTop + e)
}
}, r.prototype.onScroll = function () {
var t, e;
return e = n.scrollTop(), t = e - this.lastScrollTop, this.setScrollTop(t, this.lastScrollTop), this.lastScrollTop = e
}, r.prototype.step = function (t, e, n, i) {
var r, s;
return r = parseFloat(this.$el.css(t)), s = Math.min(Math.max(r + e, n), i), this.$el.css(t, s), s
}, r.prototype.setScrollTop = function (t, e) {
var n, r;
if (t > 0) {
if (this.startDownAt || (this.startDownAt = e), this.iOS) {
if (this.step("opacity", -(1 / a), 0, !1)) return this.$el.hide()
} else if (null !== this.startUpAt) return this.startUpAt = null, this.$el.css({
top: e / parseFloat(this.$el.css("zoom")),
position: "absolute"
})
} else if (0 > t) {
if (this.startUpAt || (this.startUpAt = e), this.iOS) return this.$el.show(), this.step("opacity", 1 / a, 0, 1);
if (null !== this.startDownAt) return this.startDownAt = null, n = this.$el.offset().top - e, -i > n && (n = -i), n > 0 && (n = 0), r = this.$el, this.$el.css({
top: 0,
position: "fixed",
y: n
}).transition({
y: 0
}, 150, function () {
return r.css({
transform: ""
})
})
}
}, r
}(Backbone.View), o = function (e) {
function i() {
return y = i.__super__.constructor.apply(this, arguments)
}
return b(i, e), i.prototype.events = {
keydown: "omnomnom",
keyup: "omnomnom",
keypress: "omnomnom",
click: "omnomnom",
"click .search-trigger": "justeatit",
"click .header-search-form": "omnomnom",
"click .header-search-results li": "gotoFirstLink",
"focus input": "lockOpen"
}, i.prototype.initialize = function () {
var e, n = this;
return this.input = this.$el.find(".header-search"), this.results = this.$el.find(".header-search-results"), e = this.input, this.lastTerm = null, this.selectedIndex = -1, this.selectedColumn = 0, this.selectedLi = null, this.columnCount = 2, this.handleChange = function () {
var e;
if (Modernizr.mq("(min-width:640px)")) return e = n.input.val(), e !== n.lastTerm && e.length > 2 ? (n.lastTerm = e, clearTimeout(n.lastTimer), n.lastTimer = delay(550, function () {
return n.lastRequest && n.lastRequest.abort(), n.lastRequest = t.getJSON("/search", {
q: e,
per_page: 5,
t: "all",
i: "130x75:-1"
}, function (t) {
return n.parseResults(t)
})
})) : void 0
}, this.activate()
}, i.prototype.activate = function () {
var t = this;
return this.input.on("change.search_autocomplete", this.handleChange), this.input.on("keyup.search_autocomplete", this.handleChange), n.on("keydown.search_autocomplete", function (e) {
var n;
if (document.activeElement && (n = document.activeElement.tagName.toLowerCase(), "input" !== n && "textarea" !== n)) switch (e.keyCode) {
case 191:
return e.stopPropagation(), t.show(), !1;
case 27:
return t.hide()
}
}), n.on("click.search_autocomplete", function () {
return t.hide()
}), this.input.on("keydown.search_autocomplete", function (e) {
var n;
switch (n = e.keyCode) {
case 191:
if (!t.$el.hasClass(".active")) return t.show(), e.preventDefault();
break;
case 38:
return t.selectPrevious();
case 40:
return t.selectNext();
case 37:
return t.switchColumn(-1);
case 39:
return t.switchColumn(1);
case 27:
return t.hide();
case 13:
return t.doSelected(e)
}
})
}, i.prototype.deactivate = function () {
return this.input.off(".search_autocomplete"), n.off(".search_autocomplete")
}, i.prototype.lockOpen = function () {
return d(this.$el, !0)
}, i.prototype.updateSelection = function () {
var e, n, i, r;
return e = this.selectedColumn % this.columnCount + 1, r = this.results.find(".col" + e + " li"), this.selectedLi && this.selectedLi.removeClass("highlighted"), i = this.selectedIndex % r.length, n = i >= 0 ? r.get(i) : r.get(r.length - i), this.selectedLi = t(n), this.selectedLi.addClass("highlighted")
}, i.prototype.switchColumn = function (e) {
var n, i, r, s, a, o, l, c, u, d;
if (this.selectedColumn += e, this.selectedIndex = 0, this.selectedLi) {
for (n = this.selectedColumn % this.columnCount + 1, s = this.results.find(".c" + n + " li"), a = null, o = null, d = t(this.selectedLi).offset(), i = c = 0, u = s.length; u > c; i = ++c) r = s[i], l = t(r).offset(), e = Math.abs(d.top - l.top), (null === a || a > e) && (a = e, o = i);
this.selectedIndex = o
}
return this.updateSelection()
}, i.prototype.selectPrevious = function () {
return this.selectedIndex -= 1, this.updateSelection()
}, i.prototype.selectNext = function () {
return this.selectedIndex += 1, this.updateSelection()
}, i.prototype.parseResults = function (t) {
var e;
return e = Handlebars.templates["templates/header/search_results"](t), this.results.show().html(e), picturefill(this.results.find("span._pf")), this.results.find("time").relatizeDate()
}, i.prototype.toggle = function (t) {
return this.$el.hasClass("active") ? this.hide() : this.show(), t.preventDefault(), !1
}, i.prototype.show = function () {
return this.$el.addClass("active locked"), this.input.focus().select()
}, i.prototype.hide = function () {
return this.$el.removeClass("active locked")
}, i.prototype.gotoFirstLink = function (e) {
return t(e.delegateTarget).find("a").first().click()
}, i.prototype.doSelected = function (e) {
return this.selectedLi ? (window.location = t(this.selectedLi.find("a").get(0)).attr("href"), e.stopPropagation(), !1) : void 0
}, i.prototype.justeatit = function () {
return !1
}, i.prototype.omnomnom = function (t) {
return t.stopPropagation(), !0
}, i
}(Backbone.View), t(function () {
var e;
return f = new s({
el: t(".main-menu")
}), h = new o({
el: t(".navbar .nav-search"),
flyout: e
}), e = new l, p(), t("#site-header .submenu.follow").on("open", function () {
return loadScriptAsync("twitter"), window.activateShareButtons(".pull-right.follow")
}), t("#site-header").on("click", function (e) {
return (e.srcElement || e.target).tagName.match(/div|ul/i) ? t("#scrollable").animate({
scrollTop: 0
}) : void 0
})
})
}.call(this),
function () {
var t;
t = $(window), $$(function () {})
}.call(this),
function () {
Handlebars.templates = {}
}.call(this), Handlebars.templates["templates/gallery/gallery"] = Handlebars.compile("<div class='popout'>\n <section class='gallery interactive width-exempt no-close show-info' data-id='{{slug}}'>\n <header class='gallery-header'>\n <h1 class='title'>{{title}}</h1>\n <div class='actions'>\n <a class='close' href='#'>\n Close\n </a>\n <a class='all' href='#'>\n <i class='icon-th icon-white'></i>\n See All\n </a>\n <a class='slideshow' href='#'>\n <i class='icon-play icon-white'></i>\n Slideshow\n </a>\n <div class='progress progress-info slideshow-timer'>\n <div class='bar'></div>\n </div>\n </div>\n </header>\n <div class='content'>\n <div class='gallery-content'>\n <div class='slide-container'>\n <div class='slides transitional'></div>\n <div class='thumbs transparent'>\n <div class='thumbs-inner'>\n {{#slides}}<a class='thumb' href='#'><img src='{{thumb}}'></a>{{/slides}}\n </div>\n </div>\n </div>\n <div class='meta'>\n <div class='buttons'>\n <a class='open-gallery' href='#'>\n Open Gallery\n </a>\n <a class='prev' href='#'>\n Previous\n </a>\n <span class='slides'>\n <span class='current'></span>\n <span class='total'></span>\n </span>\n <a class='next' href='#'>\n Next\n </a>\n </div>\n <h2 class='title'></h2>\n <div class='caption'></div>\n <div class='credit'></div>\n </div>\n </div>\n <div class='sidebar'>\n <div class='ad'></div>\n </div>\n </div>\n <a class='as-list' href='#'>Show As List</a>\n </section>\n</div>"), Handlebars.templates["templates/gallery/list"] = Handlebars.compile("<section class='gallery list'>\n {{#if show_list_title}}<header>\n <h1 class='title'>{{title}}</h1>\n </header>{{/if}}\n <div class='content'>\n <ul class='slides'></ul>\n </div>\n <a class='as-gallery' href='#'>Show As Gallery</a>\n</section>"), Handlebars.templates["templates/gallery/list_slide"] = Handlebars.compile("<figure>{{{content}}}</figure>\n<div class='meta'>\n <h2 class='title'>{{{title}}}</h2>\n <div class='caption'>{{{description}}}</div>\n <div class='credit'>{{{credit}}}</div>\n</div>"), Handlebars.templates["templates/gallery/slide"] = Handlebars.compile("<div class='slide-wrapper'>{{{content}}}</div>"), Handlebars.templates["templates/header/flash"] = Handlebars.compile("<a class='close btn btn-light' href='#'></a>\n{{#each .}}<div class='flash-message flash-{{k}}'>{{v}}</div>{{/each}}"), Handlebars.templates["templates/header/no_user_menu"] = Handlebars.compile("<li class='submenu collapsable pull-right' id='sign-in'><a href='/login/'><span><span class=\"translation_missing\" title=\"translation missing: en.header.user.sign_in\">Sign In</span></span></a></li>"), Handlebars.templates["templates/header/search_results"] = Handlebars.compile("<div class='col1'>\n <div class='search-results story-results'>\n <h1>Stories</h1>\n <ul>\n {{#each posts}}\n <li class='s-p' data-score='{{score}}' data-url='{{link}}'>\n <a data-turbo-target='post-slider' href='{{link}}'>\n {{> templates.shared.responsive_images}}\n </a>\n <a data-turbo-target='post-slider' href='{{link}}'>{{{title}}}</a>\n <time datetime='{{post_date_rfc}}'>{{post_date_rfc}}</time>\n </li>\n {{/each}}\n <li class='more'><a href=\"/search/?t=stories&amp;q={{query}}\">More stories about &quot;{{query}}&quot;</a></li>\n </ul>\n </div>\n</div>\n<div class='col2'>\n <div class='search-results topic-results'>\n <h1>Topics</h1>\n <ul>\n {{#each topics}}\n <li class='s-t' data-url='{{url}}'>\n <a href='{{url}}'>{{name}}</a>\n </li>\n {{/each}}\n <li class='more'><a href=\"/search/?t=topics&amp;q={{query}}\">More topics for &quot;{{query}}&quot;</a></li>\n </ul>\n </div>\n <div class='search-results people-results'>\n <h1>People</h1>\n <ul>\n {{#each users}}\n <li class='s-u' data-url='{{url}}'>\n <a href='{{url}}'>{{display_name}}</a>\n </li>\n {{/each}}\n <li class='more'><a href=\"/search/?t=people&amp;q={{query}}\">More people for &quot;{{query}}&quot;</a></li>\n </ul>\n </div>\n</div>"), Handlebars.templates["templates/header/user_menu"] = Handlebars.compile("<li class='user-submenu submenu pull-right'><a class='profile dropdown-toggle' href='#'><img src='{{picture}}'></a><div class='dropdown-menu pull-right'>\n <div class='extra-content'>\n <a href='/me/'>\n <img class='profile-image' src='{{picture}}'>\n {{display_name }}\n </a>\n </div>\n <ul class='user-menu'>\n <li>\n <a href='/me/'>\n My Stories\n <span class='indicator'>{{story_count}}</span>\n </a>\n </li>\n <li class='for-flyout-bottom separator'>\n <a href='/me/edit/'>Settings</a>\n </li>\n <li class='for-flyout-bottom'>\n <a href=\"/logout/\">Sign Out</a> </li>\n </ul>\n</div></li>"), Handlebars.templates["templates/lightbox"] = Handlebars.compile("<div class='mash-lightbox'>\n <div class='mash-lightbox-content-wrap'>\n <a class='mash-lightbox-close' href='#'></a>\n <div class='mash-lightbox-content'></div>\n </div>\n</div>"), Handlebars.registerPartial("templates.posts.single_post", "<div class='article-container sharable'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n <a data-turbo-target='post-slider' href='{{link}}'>\n {{> templates.shared.responsive_images}}\n </a>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n {{#if choice}}<div class='choice-overlay-container'>\n <a data-turbo-target='post-slider' href='{{link}}'>\n <div class='choice-overlay'></div>\n </a>\n </div>{{/if}}\n {{#if channel}}<a class='article-category' href='{{channel_link}}'>{{channel}}</a>{{/if}}\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='{{link}}'>{{{title}}}</a>\n </h1>\n <div class='article-byline'>{{author}}</div>\n <p class='article-excerpt'>{{excerpt}}</p>\n </div>\n <footer>\n <div class='article-shares-stub'>\n <a class='num' href='{{link}}'>\n <b>{{share_count shares.total}}</b>\n shares\n </a>\n </div>\n <time class='article-date' datetime='{{post_date_rfc}}'>{{post_date_rfc}}</time>\n {{#if velocity}}<canvas class='velocity' data-height='25' data-width='60'></canvas>{{/if}}\n <div class='article-shares-links'>\n <a class='social-stub social-share facebook' data-href='{{link}}' data-shares='{{share_count shares.facebook}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share twitter' data-href='{{link}}' data-shares='{{share_count shares.twitter}}' data-shorturl='{{short_url}}' data-title='{{title}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share google_plus' data-href='{{link}}' data-shares='{{share_count shares.google_plus}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share linked_in' data-href='{{link}}' data-shares='{{share_count shares.linked_in}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n </footer>\n </div>\n </article>\n</div>"), Handlebars.registerPartial("templates.posts.subnav_post", "<li class='subnav-post'>\n <a data-turbo-target='post-slider' href='{{url}}'>\n <img src='{{image}}'>\n </a>\n <a data-turbo-target='post-slider' href='{{url}}'>{{{title}}}</a>\n</li>"), Handlebars.registerPartial("templates.posts.subnav_posts", "{{#each posts}}{{> templates.posts.subnav_post}}{{/each}}"), Handlebars.templates["templates/posts/brightcove"] = Handlebars.compile("<object class='BrightcoveExperience' id='myExperienceBCpost_{{video}}'>\n <param name='bgcolor' value='FFFFFF'>\n <param name='width' value='525'>\n <param name='height' value='295'>\n <param name='playerID' value='1265504713001'>\n <param name='publisherID' value='AQ~~,AAABBzUwv1E~,xP-xFHVUstiMFlNYfvF4G9yFnNaqCw_9'>\n <param name='isVid' value='true'>\n <param name='wmode' value='opaque'>\n <param name='isUI' value='true'>\n <param name='videoID' value='{{video}}'>\n <param name='dynamicStreaming' value='true'>\n <param name='autoStart' value='false'>\n</object>"), Handlebars.templates["templates/posts/microcontent"] = Handlebars.compile("<div class='personalizedShare'>\n <a href='{{url}}' target='{{target}}'>\n <img src='{{picture}}'>\n </a>\n <a href='{{url}}' target='{{target}}'>\n {{display_name}}\n </a>\n shared this with you\n <span class='via'>{{network}}</span>\n <a class='discussThis' href='#'>Discuss with {{display_name}}</a>\n</div>"), Handlebars.templates["templates/posts/microcontent_image"] = Handlebars.compile("<a name='{{fragment}}'></a>\n<div class='microcontent-wrapper'>\n <div class='microcontent-shares' data-description='{{description}}' data-fragment='{{fragment}}' data-image='{{image}}' data-url='{{url}}'>\n {{#each networks}}<a class='social-share microcontent-share-badge network-badge network-badge-{{.}} {{.}}' href='#'></a>{{/each}}\n </div>\n</div>"), Handlebars.templates["templates/posts/microcontent_quote"] = Handlebars.compile("<a name='{{fragment}}'></a>\n<blockquote class='microcontent-wrapper pullquote'>\n <div class='microcontent-shares' data-description='{{description}}' data-fragment='{{fragment}}' data-url='{{url}}'>\n {{#each networks}}<a class='social-share microcontent-share-badge network-badge network-badge-{{.}} {{.}}' href='#'></a>{{/each}}\n </div>\n</blockquote>"), Handlebars.templates["templates/posts/post"] = Handlebars.compile("{{> templates.posts.single_post }}"), Handlebars.templates["templates/posts/search_post"] = Handlebars.compile("<div class='article-container sharable'><article class='post clearfix short' id='post-{{id}}'><div class='article-img-container'>\n <a data-turbo-target='post-slider' href='{{permalink}}'>\n {{> templates.shared.responsive_images}}\n </a>\n </div>\n <div class='article-content'>\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='{{permalink}}'>\n {{{title}}} </a>\n </h1>\n <footer>\n <div class='article-byline'>{{{byline}}}</div>\n <div class='article-date'>\n <time datetime='{{post_date_rfc}}'>{{time_ago}}</time>\n </div>\n </footer>\n <p class='article-excerpt'>{{excerpt}}</p>\n </div></article></div>"), Handlebars.templates["templates/posts/series"] = Handlebars.compile("<section id='series-pane'>\n <div class='sponsorship'></div>\n <h4>{{name}}</h4>\n <div class='series-strip'>\n <div class='series'>\n {{#each posts}}{{> templates.posts.single_post}}{{/each}}\n </div>\n </div>\n <div class='indexArrow'></div>\n</section>\n<div id='series-nav'>\n <span id='series-info'>\n Use your <span class='caret-left'></span> <span class='caret-right'></span> keys to browse more stories\n </span>\n <div class='navblock'>\n <a href='#' id='series-prev'>Prev</a><span id='current_page'>1</span><span id='total_pages'>{{posts_count}}</span><a href='#' id='series-next'>Next</a>\n </div>\n</div>"), Handlebars.templates["templates/posts/subnav"] = Handlebars.compile("<div class='page-container'>\n <ul class='channels'>\n {{#each channels}}<li>\n <a class='subnav-channel' data-tag='{{slug}}' href='{{url}}'>{{{name}}}</a>\n </li>{{/each}}\n </ul>\n <ul class='subnav-posts'>\n {{> templates.posts.subnav_posts}}\n </ul>\n</div>"), Handlebars.templates["templates/posts/topic_post"] = Handlebars.compile("<div class='article-container sharable'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n <a data-turbo-target='post_slider' href='{{link}}'>\n {{> templates.shared.responsive_images}}\n </a>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category' href='javascript: void(0);'>{{channel}}</a>\n <h1 class='article-title'>\n <a data-turbo-target='post_slider' href='{{link}}'>{{{title}}}</a>\n </h1>\n <div class='article-byline'>{{author}}</div>\n <time class='article-date' datetime='{{post_date_rfc}}'>{{post_date_rfc}}</time>\n <p class='article-excerpt'>{{excerpt}}</p>\n </div>\n <footer>\n <div class='article-shares-stub'>\n <a class='num' href='{{link}}'>\n <b>{{share_count shares.total}}</b>\n shares\n </a>\n </div>\n <div class='article-shares-links'>\n <a class='social-stub social-share facebook' data-href='{{link}}' data-shares='{{shares.facebook}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share twitter' data-href='{{link}}' data-shares='{{shares.twitter}}' data-title='{{title}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share linked_in' data-href='{{link}}' data-shares='{{shares.linked_in}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share google_plus' data-href='{{link}}' data-shares='{{shares.google_plus}}' data-title='{{title}}' href='javascript:void(0);'>\n +1\n </a>\n </div>\n </footer>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/quadratus/article"] = Handlebars.compile("<input name='adTitle' value='{{adTitle}}'>\n<hr>"), Handlebars.templates["templates/quadratus/code_display"] = Handlebars.compile("<div class='mash-lightbox-close'></div>\n<h1>\n Traffic the following code:\n</h1>\n<textarea>{{json}}</textarea>"), Handlebars.templates["templates/quadratus/gallery"] = Handlebars.compile("<input name='adTitle' value='{{adTitle}}'>\n<hr>\n<h2>Basic Information</h2>\n<label>Title</label>\n<input name='title' value='{{title}}'>\n<label>Lead Text</label>\n<input name='leadText' value='{{leadText}}'>\n<label>Twitter Handle</label>\n<input name='twitterHandle' value='{{twitterHandle}}'>\n<hr>\n<h2>Credit</h2>\n<label>Credit Text</label>\n<input name='credit.text' value='{{credit.text}}'>\n<label>Credit Url</label>\n<input name='credit.url' value='{{credit.url}}'>\n<hr>\n<h2>Sponsorship</h2>\n<label>Sponsorship Text</label>\n<input name='sponsorship.text' value='{{sponsorship.text}}'>\n<label>Sponsorship Url</label>\n<input name='sponsorship.url' value='{{sponsorship.url}}'>\n<hr>\n<h2>Sharing</h2>\n<label>Share Text</label>\n<input name='share.text' value='{{share.text}}'>\n<label>Share Url</label>\n<input name='share.url' value='{{share.url}}'>\n<hr>\n<h2>Media</h2>\n{{#each media}}<div class='gallery-media' data-index='{{@index}}'>\n <label>Media</label>\n <select name='media.{{@index}}.type' value='{{this.type}}'>\n {{#select this.type}}<option value='image'>Image</option>\n <option value='vine'>Vine</option>\n <option value='youtube'>YouTube</option>\n <option value='video'>Instagram Video</option>\n <option value='ustream'>Ustream</option>\n <option value='soundcloud'>SoundCloud</option>{{/select}}\n </select>\n <input name='media.{{@index}}.data' value='{{this.data}}'>\n {{#toggleMediaThumb this.type}}<label>Thumbnail</label>\n <input name='media.{{@index}}.thumb' value='{{this.thumb}}'>{{/toggleMediaThumb}}\n <div class='remove' data-index='{{@index}}'></div>\n</div>\n<hr>{{/each}}\n<a class='add-media'>Add Media</a>\n<hr>\n<h2>Tracking Information</h2>\n<label>Facebook Tracker</label>\n<input name='trackers.share.facebook' value='{{trackers.share.facebook}}'>\n<label>Twitter Tracker</label>\n<input name='trackers.share.twitter' value='{{trackers.share.twitter}}'>\n<label>Pinterest Tracker</label>\n<input name='trackers.share.pinterest' value='{{trackers.share.pinterest}}'>\n<label>LinkedIn Tracker</label>\n<input name='trackers.share.linkedin' value='{{trackers.share.linkedin}}'>\n<label>Google Plus Tracker</label>\n<input name='trackers.share.googlePlus' value='{{trackers.share.googlePlus}}'>\n<label>Next Tracker</label>\n<input name='trackers.next' value='{{trackers.next}}'>\n<label>Next Tracker</label>\n<input name='trackers.prev' value='{{trackers.prev}}'>\n{{#each trackers.click}}<div class='click-tracker'>\n <label>Click Tracker</label>\n <input class='click' data-index='{{@index}}' name='trackers.click.{{@index}}' value='{{this}}'>\n <div class='remove' data-index='{{@index}}'></div>\n</div>{{/each}}\n<a class='add-click'>Add Click Tracker</a>\n{{#each trackers.impression}}<div class='impression-tracker'>\n <label>Impression Tracker</label>\n <input class='impression' data-index='{{@index}}' name='trackers.impression.{{@index}}' value='{{this}}'>\n <div class='remove' data-index='{{@index}}'></div>\n</div>{{/each}}\n<a class='add-impression'>Add Impression Tracker</a>"), Handlebars.templates["templates/quadratus/selection"] = Handlebars.compile("<div class='quad' data-defaults='twitterImage' data-metatype='twitter'>\n <div class='preview'>\n <div class='overlay'></div>\n <div class='ad'>\n <span></span>\n </div>\n </div>\n</div>\n<div class='quad' data-defaults='vineGallery' data-metatype='gallery'>\n <div class='preview'>\n <div class='overlay'></div>\n <div class='ad'>\n <span></span>\n </div>\n </div>\n</div>"), Handlebars.templates["templates/quadratus/twitter"] = Handlebars.compile("<input name='adTitle' value='{{adTitle}}'>\n<hr>\n<h2>Basic Information</h2>\n<label>Tweet Text</label>\n<input name='leadText' value='{{leadText}}'>\n<label>Tweet Image Src</label>\n<input name='leadImageSrc' value='{{leadImageSrc}}'>\n<label>Tweet ID</label>\n<input name='tweetId' value='{{tweetId}}'>\n<label>Twitter Avatar Src</label>\n<input name='twitterAvatarSrc' value='{{twitterAvatarSrc}}'>\n<label>Twitter Handle</label>\n<input name='twitterHandle' value='{{twitterHandle}}'>\n<label>Twitter Name</label>\n<input name='twitterName' value='{{twitterName}}'>\n<hr>\n<h2>Sponsorship</h2>\n<label>Sponsorship Text</label>\n<input name='sponsorship.text' value='{{sponsorship.text}}'>\n<label>Sponsorship Url</label>\n<input name='sponsorship.url' value='{{sponsorship.url}}'>\n<hr>\n<h2>Style Information</h2>\n<label>Hashtag Color</label>\n<input name='hashtagColor' value='{{hashtagColor}}'>\n<label>Username Color</label>\n<input name='usernameColor' value='{{usernameColor}}'>\n<label>Text Color</label>\n<input name='textColor' value='{{textColor}}'>\n<hr>\n<h2>Tracking Information</h2>\n<label>Follow Tracker</label>\n<input name='twitterFollowTracker' value='{{twitterFollowTracker}}'>\n<label>Twitter Account URL</label>\n<input name='twitterAccountUrl' value='{{twitterAccountUrl}}'>\n<label>Reply URL</label>\n<input name='replyTweetUrl' value='{{replyTweetUrl}}'>\n<label>Retweet URL</label>\n<input name='retweetTweetUrl' value='{{retweetTweetUrl}}'>\n<label>Favorite URL</label>\n<input name='favoriteTweetUrl' value='{{favoriteTweetUrl}}'>\n{{#each trackers.impression}}<div class='impression-tracker'>\n <label>Impression Tracker</label>\n <input class='impression' data-index='{{@index}}' name='trackers.impression.{{@index}}' value='{{this}}'>\n <div class='remove' data-index='{{@index}}'></div>\n</div>{{/each}}\n<a class='add-impression'>Add Impression Tracker</a>"), Handlebars.templates["templates/search/search_header"] = Handlebars.compile("<ul>\n <li>\n <a href='#'>{{stories}} Stories</a>\n </li>\n <li>\n <a href='#'>{{topics}} Topics</a>\n </li>\n <li>\n <a href='#'>{{people}} People</a>\n </li>\n</ul>"), Handlebars.registerPartial("templates.shared.responsive_images", "<span class='_pf'>\n {{#each responsive_images}}<span data-q='{{query}}' data-s='{{image}}' data-z='{{size}}'></span>{{/each}}\n</span>"), Handlebars.templates["templates/shared/like_us_on_facebook"] = Handlebars.compile("<div id='like-encourager'>\n <hgroup>\n <h1 class='first'>Enjoy this story?</h1>\n <h1>Like us on Facebook to get more!</h1>\n </hgroup>\n <div class='fb-like' data-href='http://www.facebook.com/mashable' data-layout='box_count' data-send='false' data-show-faces='false' data-width='58'></div>\n <div class='opt-out'>\n I'm already a Mashable fan,\n <a href='javascript:void(0);'>don't show this box again.</a>\n </div>\n</div>"), Handlebars.templates["templates/shared/loading"] = Handlebars.compile("<div class='loading-dots'>\n <span class='dot'></span>\n <span class='dot'></span>\n <span class='dot'></span>\n</div>"), Handlebars.templates["templates/topics/search_topic"] = Handlebars.compile("<div class='topic-container'><article class='topic clearfix short' id='topic={{id}}'><div class='topic-img-container'>\n <a href='{{url}}'>\n {{> templates.shared.responsive_images}}\n </a>\n </div>\n <div class='topic-content-wrapper'>\n <div class='topic-content'>\n <div class='topic-name'>\n <h2 class='title'><a href=\"{{url}}\">{{name}}</a></h2>\n </div>\n <div class='topic-meta'>\n <span class='topic-stories'>\n {{posts_count}} Stories\n </span>\n <span class='topic-followers'>\n {{follower_count}} Followers\n </span>\n </div>\n </div>\n <a href=\"{{url}}\" class=\"btn btn-success\">Follow</a> </div></article></div>"), Handlebars.templates["templates/tripleclick/brand_unit"] = Handlebars.compile("<div class='mash-brand-unit'>\n {{#if prefixHTML}}{{{prefixHTML}}}{{/if}}\n {{#if followUrl}}<h1>{{title}}</h1>\n <a href='{{imageUrl}}'>\n <img class='logo' src='{{imageSrc}}'>\n </a>\n <div class='description'>{{{description}}}</div>\n <a class='btn btn-success follow' href='{{followUrl}}'>Follow</a>\n <div class='social-streams'>\n {{#if facebookHandle}}<div class='facebook'>\n <iframe src='//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F{{facebookHandle}}&amp;width=298&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;border_color=%23dbdbdb&amp;stream=false&amp;header=false' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:298px; height:258px;' allowTransparency='true'></iframe>\n </div>{{/if}}\n {{#if twitterHandle}}<div class='twitter'></div>{{/if}}\n </div>{{/if}}\n {{#unless followUrl}}<div class='social-streams noborder'>\n {{#if facebookHandle}}<div class='facebook'>\n <iframe src='//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F{{facebookHandle}}&amp;width=298&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;border_color=%23dbdbdb&amp;stream=false&amp;header=false' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:298px; height:258px;' allowTransparency='true'></iframe>\n </div>{{/if}}\n {{#if twitterHandle}}<div class='twitter'></div>{{/if}}\n </div>{{/unless}}\n {{#if postfixHTML}}{{{postfixHTML}}}{{/if}}\n</div>"), Handlebars.templates["templates/tripleclick/image_lift_lightbox"] = Handlebars.compile("<div class='mash-lightbox-close'></div>\n<div class='mash-lightbox-next'></div>\n<div class='mash-lightbox-prev'></div>\n<img class='lightbox-image-lead' src='{{images.0.imageSrc}}'>\n<div class='article-shares-links persistent'>\n <a class='social-stub social-share no-count facebook' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{shareUrl}}' data-shorturl='{{shareUrl}}' data-title='{{shareText}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count pinterest' data-description='{{{description}}}' data-href='{{shareUrl}}' data-image='{{images.0.imageSrc}}' data-title='{{shareText}}' href='javascript:void(0);'></a>\n <a class='social-stub social-share no-count linked_in' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='view-on' href='{{viewOnUrl}}' target='_blank'>{{viewOnText}}</a>\n</div>\n<footer>\n <div class='title'>{{title}}</div>\n <div class='description'>{{{description}}}</div>\n <a class='article-category'>Sponsored</a>\n</footer>"), Handlebars.templates["templates/tripleclick/image_lift_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit image-lift'>\n <article class='post short'>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <div class='lead-image'>\n <div class='overlay'></div>\n <img src='{{images.0.imageSrc}}'>\n </div>\n {{#if gallery}}<div class='thumbs'>\n <img class='thumb' data-index='1' src='{{images.1.imageSrc}}'>\n <img class='thumb' data-index='2' src='{{images.2.imageSrc}}'>\n <img class='thumb' data-index='3' src='{{images.3.imageSrc}}'>\n </div>{{/if}}\n <div class='article-shares-links persistent'>\n <a class='social-stub social-share no-count facebook' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{shareUrl}}' data-shorturl='{{shareUrl}}' data-title='{{shareText}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count pinterest' data-description='{{{description}}}' data-href='{{shareUrl}}' data-image='{{images.0.imageSrc}}' data-title='{{shareText}}' href='javascript:void(0);'></a>\n <a class='social-stub social-share no-count linked_in' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n </div>\n <footer>\n <div class='title'>{{title}}</div>\n <div class='description'>{{{description}}}</div>\n <a class='article-category'>Sponsored</a>\n </footer>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/len_unit"] = Handlebars.compile("<div class='mash-len-unit'>\n <div class='social-streams'>\n <div class='twitter'></div>\n </div>\n {{#if postfixHTML}}{{{postfixHTML}}}{{/if}}\n</div>"), Handlebars.templates["templates/tripleclick/lift_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n {{#if vineUrl}}<div class='play-overlay'></div>{{/if}}\n <a data-turbo-target='post-slider' href='{{imageUrl}}'>\n <img src='{{imageSrc}}'>\n <div class='bgimage' style=\"background-image:url('{{imageSrc}}')\"></div>\n </a>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category' href='{{bylineUrl}}'>{{byline}}</a>\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='{{titleUrl}}'>{{title}}</a>\n </h1>\n <div class='article-byline'></div>\n <p class='article-excerpt'>\n {{description}}\n </p>\n {{#each adTracker}}<img src='{{this}}' style='width:1px;height:1px'>{{/each}}\n </div>\n <footer>\n <div class='article-shares-stub'>\n <a class='num' href='{{titleUrl}}'>\n <b>{{share_count shares.total}}</b>\n shares\n </a>\n </div>\n <div class='attribution'>{{attribution}}</div>\n <div class='article-shares-links'>\n <a class='social-stub social-share facebook' data-href='{{shareUrl}}' data-shares='{{share_count shares.facebook}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share twitter' data-href='{{shareUrl}}' data-shares='{{share_count shares.twitter}}' data-shorturl='{{shareUrl}}' data-title='{{title}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share google_plus' data-href='{{shareUrl}}' data-shares='{{share_count shares.google_plus}}' data-title='{{title}}' href='javascript:void(0);'>\n +1\n </a>\n <a class='social-stub social-share linked_in' data-href='{{shareUrl}}' data-shares='{{share_count shares.linked_in}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n </footer>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/mashable_units/article"] = Handlebars.compile("<article class='quadratus article-lift'>\n <div class='ad-content'>\n <div class='lead-image'>\n {{#if media.0.vineSrc}}<div class='play-overlay'></div>{{/if}}\n <a href='{{trackers.clickthrough.leadImage}}'>\n <img src='{{media.0.leadImageSrc}}'>\n </a>\n </div>\n {{#each trackers.impression}}<img src='{{this}}' style='width:0px;height:0px'>{{/each}}\n <a class='sponsorship'>{{sponsorship}}</a>\n <a class='lead-text' href='{{trackers.clickthrough.leadText}}'>{{leadText}}</a>\n <footer>\n <div class='article-shares-links persistent'>\n <a class='social-stub social-share facebook' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share twitter' data-href='{{share.url}}' data-title='{{share.text}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share pinterest' data-description='{{{description}}}' data-href='{{share.url}}' data-image='{{images.0.imageSrc}}' data-title='{{share.text}}' href='javascript:void(0);'></a>\n <a class='social-stub social-share linked_in' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n </footer>\n </div>\n</article>"), Handlebars.templates["templates/tripleclick/mashable_units/gallery"] = Handlebars.compile("<article class='quadratus gallery-lift'>\n <div class='ad-content'>\n <div class='lead-image'>\n {{#if playOverlay}}<div class='video-overlay'></div>\n {{else}}\n <div class='overlay'></div>{{/if}}\n <img class='bigThumb' src='{{media.0.image}}'>\n </div>\n {{#if showThumbs}}<div class='thumbs'>\n <img class='thumb' data-index='1' src='{{media.1.image}}'>\n <img class='thumb' data-index='2' src='{{media.2.image}}'>\n <img class='thumb' data-index='3' src='{{media.3.image}}'>\n </div>{{/if}}\n <div class='article-shares-links persistent'>\n <a class='social-stub social-share no-count facebook' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{share.url}}' data-shorturl='{{share.url}}' data-title='{{share.text}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count pinterest' data-description='{{{share.text}}}' data-href='{{share.url}}' data-image='{{media.0.image}}' data-title='{{share.text}}' href='javascript:void(0);'></a>\n <a class='social-stub social-share no-count linked_in' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n <footer>\n <div class='title'>{{title}}</div>\n <div class='lead-text'>{{{leadText}}}</div>\n {{#if sponsorship.url}}<a class='sponsorship' href='{{sponsorship.url}}'>{{sponsorship.text}}</a>\n {{else}}\n <div class='sponsorship'>{{sponsorship.text}}</div>{{/if}}\n </footer>\n {{#each trackers.impression}}<img src='{{this}}' style='width:0px;height:0px'>{{/each}}\n </div>\n</article>"), Handlebars.templates["templates/tripleclick/mashable_units/lightbox/gallery"] = Handlebars.compile("<div class='mash-lightbox-close'></div>\n<div class='mash-lightbox-next'></div>\n<div class='mash-lightbox-prev'></div>\n<div class='lightbox-lead'></div>\n<div class='article-shares-links persistent'>\n <a class='social-stub social-share no-count facebook' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{share.url}}' data-shorturl='{{share.url}}' data-title='{{share.text}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count pinterest' data-description='{{share.text}}' data-href='{{share.url}}' data-image='{{media.0.image}}' data-title='{{share.text}}' href='javascript:void(0);'></a>\n <a class='social-stub social-share no-count linked_in' data-href='{{share.url}}' data-title='{{share.text}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='view-on' href='{{credit.url}}' target='_blank'>{{credit.text}}</a>\n</div>\n<footer>\n <div class='title'>{{title}}</div>\n <div class='description'>{{{leadText}}}</div>\n {{#if sponsorship.url}}<a class='sponsorship' href='{{sponsorship.url}}'>{{sponsorship.text}}</a>\n {{else}}\n <div class='sponsorship'>{{sponsorship.text}}</div>{{/if}}\n</footer>"), Handlebars.templates["templates/tripleclick/mashable_units/twitterlift"] = Handlebars.compile("<article class='quadratus twitter-lift' id='tweet{{tweetId}}'>\n <style>\n #tweet{{tweetId}} a.hashtag {\n color: {{hashtagColor}} !important;\n }\n #tweet{{tweetId}} a.username {\n color: {{usernameColor}} !important;\n }\n #tweet{{tweetId}} .lead-text {\n color: {{textColor}} !important;\n }\n </style>\n <div class='ad-content'>\n {{#each trackers.impression}}<img src='{{this}}' style='width:0px;height:0px'>{{/each}}\n {{#if sponsorship.url}}<a class='sponsorship' href='{{sponsorship.url}}'>{{sponsorship.text}}</a>\n {{else}}\n <div class='sponsorship'>{{sponsorship.text}}</div>{{/if}}\n <h1 class='lead-text'>\n <div class='openQuote'>&ldquo;</div>\n {{{leadText}}}\n <div class='closeQuoteWrapper'>\n <div class='closeQuote'>&rdquo;</div>\n </div>\n </h1>\n {{#if leadImageSrc}}<div class='tweetPic'>\n <img src='{{leadImageSrc}}'>\n </div>{{/if}}\n <div class='account-details'>\n <a class='avatar' href='{{twitterAccountUrl}}' style='background: url(\"{{twitterAvatarSrc}}\")' target='_blank'></a>\n <a class='user' href='{{twitterAccountUrl}}' target='_blank'>{{twitterName}}</a>\n <a class='handle' href='{{twitterAccountUrl}}' target='_blank'>@{{twitterHandle}}</a>\n </div>\n <footer>\n <div class='twitter-follow'>\n <a class='twitter-follow-button' data-show-count='false' href='https://twitter.com/{{twitterHandle}}'>\n Follow @{{twitterName}}\n </a>\n </div>\n <div class='twitter-intents'>\n <a class='twitter-reply' href='{{replyTweetUrl}}' target='_blank'></a>\n <a class='twitter-retweet' href='{{retweetTweetUrl}}' target='_blank'></a>\n <a class='twitter-favorite' href='{{favoriteTweetUrl}}' target='_blank'></a>\n </div>\n </footer>\n </div>\n</article>"), Handlebars.templates["templates/tripleclick/mobile_brand_unit"] = Handlebars.compile("<div class='mash-mobile-brand-unit'>\n <h1>{{title}}</h1>\n <a href='{{imageUrl}}'>\n <img class='logo' src='{{imageSrc}}'>\n </a>\n <div class='description'>{{{description}}}</div>\n <a class='btn btn-success follow' href='{{followUrl}}'>Follow</a>\n {{#if facebookHandle}}<a class='icon-facebook' href='http://facebook.com/{{facebookHandle}}'></a>{{/if}}\n {{#if twitterHandle}}<a class='icon-twitter' href='http://twitter.com/{{twitterHandle}}'></a>{{/if}}\n</div>"), Handlebars.templates["templates/tripleclick/network_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n <a data-turbo-target='post-slider' href='{{titleUrl}}' target='_blank'>\n {{#if brightcoveId}}<div class='play-overlay'></div>{{/if}}\n <img src='{{imageSrc}}'>\n <div class='bgimage' style=\"background-image:url('{{imageSrc}}')\"></div>\n </a>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n {{#if brightcoveId}}<div class='article-shares-links persistent brightcove-ad'>\n <a class='social-stub social-share no-count facebook' data-href='{{titleUrl}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{titleUrl}}' data-shorturl='{{titleUrl}}' data-title='{{title}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count google_plus' data-href='{{titleUrl}}' data-title='{{title}}' href='javascript:void(0);'>\n +1\n </a>\n <a class='social-stub social-share no-count linked_in' data-href='{{titleUrl}}' data-title='{{title}}' href='javascript:void(0);'>\n Share\n </a>\n </div>{{/if}}\n <a class='article-category network' href='{{bylineUrl}}' target='_blank'>{{byline}}</a>\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='{{titleUrl}}' target='_blank'>\n {{title}}\n <div class='company'>{{company}}</div>\n </a>\n </h1>\n <div class='article-byline'></div>\n <p class='article-excerpt'>\n {{description}}\n </p>\n {{#each adTracker}}<img src='{{this}}' style='width:1px;height:1px'>{{/each}}\n </div>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/publisher_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit'>\n <article class='post short'>\n <div class='article-img-container'>\n <a href='{{link}}' target='_blank'>\n <img src='{{imageSrc}}'>\n </a>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category' href='{{url}}' target='_blank'>{{publisher}}</a>\n <h1 class='article-title'>\n <a href='{{link}}' target='_blank'>{{title}}</a>\n </h1>\n </div>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/sales_hub_unit"] = Handlebars.compile("<div class='mash-sales-hub-unit'>\n <img src='{{imageSrc}}'>\n <div class='text-content'>\n <div class='description' style='color:{{descriptionColor}}'>\n {{{description}}}\n <div class='follow' style='color:{{followColor}}'>\n <a href='{{titleUrl}}' style='color:{{followColor}}'>{{followText}}</a>\n {{#if facebookUrl}}<a class='facebook icon' href='{{facebookUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if twitterUrl}}<a class='icon twitter' href='{{twitterUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if youtubeUrl}}<a class='icon youtube' href='{{youtubeUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if pinterestUrl}}<a class='icon pinterest' href='{{pinterestUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if linkedinUrl}}<a class='icon linkedin' href='{{linkedinUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if googlePlusUrl}}<a class='googleplus icon' href='{{googlePlusUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n {{#if rssUrl}}<a class='icon rss' href='{{rssUrl}}' style='color:{{outerColor}};background:{{followColor}}'></a>{{/if}}\n </div>\n </div>\n </div>\n {{#each imageTrackers}}<img src='{{imageSrc}}' style='display:none'>{{/each}}\n {{#each impressionTags}}<img alt='' border='0' height='0' src='{{imageSrc}}' width='0'>{{/each}}\n {{#each scriptTags}}<script src='{{src}}'></script>{{/each}}\n <div class='clearfix'></div>\n</div>"), Handlebars.templates["templates/tripleclick/sponsored_brand_unit"] = Handlebars.compile("<div class='mash-sponsored-brand-unit'>\n <a class='image' href='{{imageUrl}}'>\n <img class='logo' src='{{imageSrc}}'>\n </a>\n <div class='textblock'>\n <h1 class='sponsored'>{{title}}</h1>\n <div class='description'>{{{description}}}</div>\n </div>\n</div>"), Handlebars.templates["templates/tripleclick/twitter_lift_lightbox"] = Handlebars.compile("<div class='mash-lightbox-close'></div>\n<img class='tweetPic' src='{{imageSrc}}'>\n<div class='twitter-shares'>\n <div class='twitter-follow'>\n <a class='twitter-follow-button' data-show-count='false' href='https://twitter.com/{{twitterHandle}}'>\n Follow @{{twitterHandle}}\n </a>\n </div>\n <div class='twitter-intents'>\n <a class='twitter-reply' href='{{replyUrl}}' target='_blank'></a>\n <a class='twitter-retweet' href='{{retweetUrl}}' target='_blank'></a>\n <a class='twitter-favorite' href='{{favoriteUrl}}' target='_blank'></a>\n </div>\n</div>\n<footer>\n <div class='account-details'>\n <a class='avatar' href='{{accountUrl}}' style='background: url(\"{{twitterAvatar}}\")' target='_blank'>\n <a class='user' href='{{accountUrl}}' target='_blank'>{{twitterUser}}</a>\n </a>\n <a class='handle' href='{{accountUrl}}' target='_blank'>@{{twitterHandle}}</a>\n <p class='tweet'>{{{tweet}}}</p>\n </div>\n <a class='article-category'>Sponsored</a>\n</footer>"), Handlebars.templates["templates/tripleclick/twitter_lift_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit twitter-lift' id='tweet{{tweetId}}'>\n <article class='post short'>\n <style>\n #tweet{{tweetId}} a.hashtag {\n color: {{hashtagColor}} !important;\n }\n #tweet{{tweetId}} a.username {\n color: {{usernameColor}} !important;\n }\n #tweet{{tweetId}} .article-title {\n color: {{textColor}} !important;\n }\n </style>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category'>Sponsored</a>\n <h1 class='article-title'>\n <div class='openQuote'>&ldquo;</div>\n {{{tweet}}}\n <div class='closeQuoteWrapper'>\n <div class='closeQuote'>&rdquo;</div>\n </div>\n </h1>\n {{#each renderTracker}}<img src='{{this}}' style='width:1px;height:1px'>{{/each}}\n {{#if imageSrc}}<div class='tweetPic'>\n <img src='{{imageSrc}}'>\n </div>{{/if}}\n <div class='account-details'>\n <a class='avatar' href='{{accountUrl}}' style='background: url(\"{{twitterAvatar}}\")' target='_blank'></a>\n <a class='user' href='{{accountUrl}}' target='_blank'>{{twitterUser}}</a>\n <a class='handle' href='{{accountUrl}}' target='_blank'>@{{twitterHandle}}</a>\n </div>\n </div>\n <footer>\n <div class='twitter-follow'>\n <a class='twitter-follow-button' data-show-count='false' href='https://twitter.com/{{twitterHandle}}'>\n Follow @{{twitterHandle}}\n </a>\n </div>\n <div class='twitter-intents'>\n <a class='twitter-reply' href='{{replyUrl}}' target='_blank'></a>\n <a class='twitter-retweet' href='{{retweetUrl}}' target='_blank'></a>\n <a class='twitter-favorite' href='{{favoriteUrl}}' target='_blank'></a>\n </div>\n </footer>\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/video_lift_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit video-lift'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n <img class='iframe-expander' src='/assets/16x9.png'>\n <div class='overlay'></div>\n <div class='video-thumbnail' style=\"background-image:url('{{imageSrc}}')\"></div>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category' href='{{bylineUrl}}'>{{byline}}</a>\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='{{titleUrl}}'>{{title}}</a>\n </h1>\n {{#each renderTracker}}<img src='{{this}}' style='width:1px;height:1px'>{{/each}}\n </div>\n {{#unless suppressShares}}<footer>\n <div class='article-shares-links persistent'>\n {{#if subscribe}}<a class='subscribe' href='{{subscribe}}' target='_blank'></a>{{/if}}\n <a class='social-stub social-share no-count facebook' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n <a class='social-stub social-share no-count twitter' data-href='{{shareUrl}}' data-shorturl='{{shareUrl}}' data-title='{{shareText}}' data-twitter-handle='{{twitterHandle}}' href='javascript:void(0);'>\n Tweet\n </a>\n <a class='social-stub social-share no-count google_plus' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n +1\n </a>\n <a class='social-stub social-share no-count linked_in' data-href='{{shareUrl}}' data-title='{{shareText}}' href='javascript:void(0);'>\n Share\n </a>\n </div>\n</footer>{{/unless}}\n </div>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/vine_embed"] = Handlebars.compile("<img class='iframe-expander' src='http://placehold.it/1x1'>\n<iframe allowfullscreen class='force-expanded' frameborder='0' src='{{url}}'></iframe>"), Handlebars.templates["templates/tripleclick/vine_lift_unit"] = Handlebars.compile("<div class='article-container sharable ad-unit video-lift'>\n <article class='post short' id='post-{{id}}'>\n <div class='article-img-container'>\n <div class='overlay'></div>\n <img src='{{imageSrc}}'>\n <div class='bgimage' style=\"background-image:url('{{imageSrc}}')\"></div>\n </div>\n <div class='article-content-wrapper'>\n <div class='article-content'>\n <a class='article-category' href='#'>{{byline}}</a>\n <h1 class='article-title'>\n <a data-turbo-target='post-slider' href='#'>{{title}}</a>\n </h1>\n </div>\n </div>\n <footer class='vine'>\n <div class='vine-follow'>\n <a class='twitter-follow-button' data-show-count='false' href='https://twitter.com/{{twitterHandle}}'>\n Follow @{{twitterHandle}}\n </a>\n </div>\n <div class='vine-intents'>\n <a class='vine-reply' href='{{replyUrl}}' target='_blank'></a>\n <a class='vine-retweet' href='{{retweetUrl}}' target='_blank'></a>\n <a class='vine-favorite' href='{{favoriteUrl}}' target='_blank'></a>\n </div>\n </footer>\n </article>\n</div>"), Handlebars.templates["templates/tripleclick/youtube_embed"] = Handlebars.compile("<img class='iframe-expander' src='/assets/16x9.png'>\n<iframe allowfullscreen frameborder='0' src='http://www.youtube.com/embed/{{videoShortcode}}?autoplay=1'></iframe>"), Handlebars.templates["templates/users/feed/comment"] = Handlebars.compile("<article class='feed-tile feed-comment'>\n <div class='feed-tile-inner'>\n <section class='content'>\n <div class='feed-comment-body'>{{{body}}}</div>\n </section>\n <aside class='metadata'>\n <time datetime='{{created_at}}'>{{created_at}}</time>\n <div class='action'>on</div>\n <a href=\"{{owner_link}}\" class=\"feed-source\">{{owner_title}}</a>\n </aside>\n </div>\n</article>"), Handlebars.templates["templates/users/feed/post"] = Handlebars.compile("<article class='feed-tile feed-post'>\n <a class='feed-post-image' href='{{link}}'>\n <img src='{{image}}'>\n </a>\n <div class='feed-tile-inner'>\n <a href=\"{{link}}\" class=\"feed-source\">{{title}}</a>\n <section class='content'>\n <div class='feed-post-body'>{{{excerpt}}}</div>\n </section>\n <aside class='metadata'>\n <time datetime='{{created_at}}'>{{created_at}}</time>\n <div class='comments-count'>{{comments_count}} comments</div>\n </aside>\n </div>\n</article>"), Handlebars.templates["templates/users/search_user"] = Handlebars.compile("<div class='user-container'><article class='user clearfix short' id='user-{{id}}'><div class='user-img-container'>\n <a href='{{url}}'>\n {{> templates.shared.responsive_images}}\n </a>\n </div>\n <div class='user-content-wrapper'>\n <div class='user-content'>\n <div class='user-username'>\n <h2 class='title'><a href=\"{{url}}\">{{display_name}}</a></h2>\n </div>\n <div class='user-meta'>\n <span class='user-followers'>\n <i class='icon-user'></i>\n {{follower_count}} </span>\n <span class='user-comments'>\n <i class='icon-comment'></i>\n {{comments_count}} </span>\n <span class='user-shares'>\n <i class='icon-share'></i>\n {{shares_count}} </span>\n </div>\n </div>\n <a href=\"{{url}}\" class=\"btn btn-success\">Follow</a> </div></article></div>"), Handlebars.templates["templates/videos/video"] = Handlebars.compile("<li class='video' data-desc='{{desc}}' data-id='{{id}}' data-thumbnail='{{thumbnail}}' data-title='{{title}}' data-video-id='{{videoId}}'>\n <a href='javascript: void(0);'>\n <img alt='{{title}}' src='{{thumbnail}}'>\n <p>{{title}}</p>\n </a>\n</li>"),
function () {
var t, e, n, i, r, s = {}.hasOwnProperty,
a = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) s.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
};
t = $(window), e = function (t) {
function e() {
return i = e.__super__.constructor.apply(this, arguments)
}
return a(e, t), e.prototype.url = function () {
return "/series/" + this.attributes.id + ".json"
}, e
}(Backbone.Model), n = function (n) {
function i() {
return r = i.__super__.constructor.apply(this, arguments)
}
return a(i, n), i.prototype.events = {
"click .series article": "clickArticle",
"click #series-next": "next",
"click #series-prev": "prev",
click: "toggleStrip"
}, i.prototype.template = "templates/posts/series", i.prototype.replaceElement = !1, i.load = function (t) {
var n;
return t ? (n = new e({
id: t
}), this.singleton || (this.singleton = new i({
el: $("#series").get(0),
model: n
})), this.singleton.model.set({
id: t
}, {
silent: !0
}), this.singleton.model.fetch(), this.singleton.show()) : this.create(null)
}, i.create = function (t) {
return this.singleton && t ? this.singleton._id === t._id ? this.singleton.show() : (this.singleton.model.set(t), this.singleton.show()) : t ? (this.singleton = new i({
el: $("#series").get(0)
}), this.singleton.model.set(t), this.singleton) : this.singleton && !t ? this.singleton.hide() : void 0
}, i.prototype.initialize = function () {
var t = this;
return this.el.id = "series", this.model || (this.model = new App.Series), this.model.bind("change", function () {
return t.changeData()
})
}, i.prototype.changeData = function () {
return this._id = this.model.attributes._id, this.render(), -1 !== _.indexOf(["sponsored", "supported"], this.model.attributes.series_type) && this.$el.find("#series-pane .sponsorship").append(TripleClick.tripleclickAd("series_sponsor")), this.$pane = this.$el.find(".series-strip"), this.setup(), t.off(".seriesStrip").on("keydown.seriesStrip", this.keyDown.bind(this)), delay(1, this.setDefaultStory.bind(this)), this
}, i.prototype.show = function () {
return this.$el.animate({
height: "show",
opacity: "show"
}, "normal"), this
}, i.prototype.hide = function () {
return this.$el.animate({
height: "hide",
opacity: "hide"
}, "normal"), this
}, i.prototype.render = function () {
return this.model.attributes.posts_count = this.model.attributes.posts.length, this.model.attributes.posts_count > 1 ? (i.__super__.render.apply(this, arguments), this.$currentPage = this.$el.find("#current_page"), window.picturefill(this.$el.find("span._pf"))) : this.$el.hide()
}, i.prototype.setup = function () {
return Modernizr.touch ? this.setupMobile() : this.setupDesktop(), this.setup = function () {}
}, i.prototype.setDefaultStory = function () {
var t, e, n, i, r, s, a;
for (t = $("#story").data("id"), s = this.model.attributes.posts, a = [], e = i = 0, r = s.length; r > i; e = ++i) {
if (n = s[e], n._id === t) {
this.$el.find("article:eq(" + e + ")").addClass("current"), this.updateActiveArticle(!1);
break
}
a.push(void 0)
}
return a
}, i.prototype.updateActiveArticle = function (t) {
return null == t && (t = !0), this.currentArticle = this.$el.find("article.current").first(), this.currentIndex = this.$el.find("article").index(this.currentArticle), this.$currentPage = this.$el.find("#current_page"), this.$currentPage.text(this.currentIndex + 1), this.currentArticle.length > 0 ? this.shiftSeriesStrip(t) : void 0
}, i.prototype.setupDesktop = function () {
return this.updateActiveArticle(), $("#post-content").before(this.$el)
}, i.prototype.setupMobile = function () {
return $("#post-content").before(this.$el)
}, i.prototype.toggleStrip = function () {
return Modernizr.mq("(max-width: 748px)") ? (this.$el.find("#series-pane").toggleClass("open"), $("#post-content").toggleClass("invisible"), $(document.body).toggleClass("noscroll")) : void 0
}, i.prototype.next = function () {
return this.click(this.currentArticle.parent().next().find("article h1.article-title a"))
}, i.prototype.prev = function () {
return this.click(this.currentArticle.parent().prev().find("article h1.article-title a"))
}, i.prototype.click = function (t) {
var e;
if (0 !== t.length) return e = jQuery.Event("click"), t.trigger(e), e.isDefaultPrevented() || (window.location.href = t.attr("href")), !1
}, i.prototype.clickArticle = function (t) {
return this.currentArticle[0] === t.currentTarget ? !1 : (this.currentArticle.removeClass("current"), $(t.currentTarget).addClass("current"), this.updateActiveArticle())
}, i.prototype.keyDown = function (t) {
if ($(t.target).is(":not(input textarea)")) switch (t.keyCode) {
case 39:
return this.next();
case 37:
return this.prev()
}
}, i.prototype.shiftSeriesStrip = function (t) {
var e, n, i, r;
return e = this.$pane[0].getBoundingClientRect(), i = this.currentArticle.parent()[0].getBoundingClientRect(), r = null, i.left < e.left ? r = i.left - e.left + this.$pane[0].scrollLeft : i.right > e.right && (r = i.right - e.right + this.$pane[0].scrollLeft + 60), n = this.currentArticle.parent(), t ? null !== r ? this.$pane.animate({
scrollLeft: r
}, 200, "easeOutCubic", function () {
return $(".indexArrow").transition({
x: n.position().left - 38
}, 200)
}) : $(".indexArrow").transition({
x: n.position().left - 38
}, 200) : (this.$pane[0].scrollLeft = r, $(".indexArrow").css({
x: n.position().left - 38
}))
}, i
}(App.TemplateView), this.provides({
SeriesView: n,
Series: e
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h;
t = $(window), n = function (t) {
return base64.encode(t).replace(/\=+$/, "")
}, e = function (t) {
return base64.decode(_.str.rpad(t, 4 * Math.ceil(t.length / 4), "="))
}, o = function (t) {
var n;
return n = {}, null != t && (n = JSON.parse(e(t))), [n.s, n.i]
}, d = null, i = function () {
return "_" + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15) + "_"
}, this.socialRef = {
payload: function (t, e) {
return n(JSON.stringify({
s: t,
i: e
}))
},
identifier: function () {
return null == d && (d = window.gPlusUserId || $.cookie("socref") || i(), $.cookie("socref", d, {
expires: 3650,
path: "/"
})), d
},
personalizeURL: function (t, e, n) {
var i, r;
return i = null != n ? window.socialRef.payload(e, n) : window.socialRef.payload(e, window.socialRef.identifier()), r = [t], r.push(":" + i), t.match("#") ? r.join("") : r.join("#")
}
}, a = {
g: "Google+"
}, r = function (t, e) {
var n, i, r;
return n = window.getShareMetadata(t), r = n.url, i = {
callback: "gPlusSigninCallback",
contenturl: r,
contentdeeplinkid: r,
calltoactionurl: r,
calltoactiondeeplinkid: r,
clientid: "713601546503.apps.googleusercontent.com",
cookiepolicy: "single_host_origin",
calltoactionlabel: "DISCUSS",
recipients: e
}, t.off("click").on("click", function () {
return !1
}), window.gapi.interactivepost.render(t.get(0), i)
}, h = function (t, e, n, i) {
var s, o, l;
return t.network = a[n], s = $("#body > .page-header.channel h2"), s.replaceWith(e(t)), null != i && i.length > 0 && i.append(e(t)), o = null, null != (null != (l = t.social_ids) ? l.google_oauth2 : void 0) ? o = t.social_ids.google_oauth2 : null != t.g && (o = t.g), r($(".personalizedShare .discussThis"), o)
}, l = function (t, e, n) {
var i;
return i = Handlebars.templates["templates/posts/microcontent"], $.getJSON("/people/find", {
s: t,
i: e
}, function (r) {
var s;
return r && null != r.display_name ? h(r, i, t, n) : (s = r.g ? r.g : e, $.getJSON("https://www.googleapis.com/plus/v1/people/" + s + "?key=AIzaSyDOACg_f2QoYqLV6_IhZIP6pNGbpJw67Mg", function (r) {
var s;
return s = {
url: r.url,
picture: r.image.url,
display_name: r.displayName,
target: "_blank",
g: e
}, h(s, i, t, n)
}))
})
}, s = function (t) {
var e;
return e = t.data(), e.networks = ["facebook", "twitter", "google_plus", "pinterest"], e
}, u = function (t) {
var e, n, i, r, a, o, l, c;
for (a = Handlebars.templates["templates/posts/microcontent_image"], c = [], o = 0, l = t.length; l > o; o++) i = t[o], e = $(i), n = s(e), r = $(a(n)), e.before(r), e.data("micro", ""), c.push(r.find(".microcontent-shares").after(e));
return c
}, c = function (t) {
var e, n, i, r, a, o, l, c;
for (a = Handlebars.templates["templates/posts/microcontent_quote"], c = [], o = 0, l = t.length; l > o; o++) r = t[o], e = $(r), n = s(e), i = $(a(n)), e.before(i), e.data("micro", ""), c.push(i.find(".microcontent-shares").after(e.clone()));
return c
}, this.wrapMicrocontentImages = u, this.wrapMicrocontentBlockquotes = c, $$("posts/show", function (t) {
var e, n, i, r, s, a, d, h;
return e = window.location.hash, u(t("article.full img[data-micro='1']")), c(t("article.full span.microcontent[data-micro='1']")), i = t(".microcontent-wrapper"), r = {}, e.length > 0 && (s = e.slice(1).split(":"), a = null, s[0].length > 0 && (a = i.filter("[data-fragment='" + s[0] + "']")), s[1]) ? (h = o(s[1]), d = h[0], n = h[1], n && l(d, n, a), window.omniCallback(function (t) {
return t.eVar28 = (window.location.pathname || "") + (window.location.hash || ""), t.events = "event29"
})) : void 0
})
}.call(this),
function () {
var t;
t = $(window), $$("posts/show", function () {
var e, n, i, r;
return i = new App.Popout({
type: "inline",
clone: !0
}), i.lightbox.bind("closed", function () {
return i.lightbox.el.removeClass("centered-content"), i.popped = !1
}), n = $("section.article-content"), n.on("click", ".for-lightbox", function (t) {
return t.stopImmediatePropagation(), i.lightbox.el.addClass("centered-content"), i.popOut($(t.target)), !1
}), r = function (t) {
var e;
return void 0 === t.prop("naturalWidth") && (e = new Image, e.src = t.get(0).src, t.prop("naturalWidth", e.width), t.prop("naturalHeight", e.height)), t.prop("naturalWidth") > 500 && t.width() < .85 * t.prop("naturalWidth") && 0 === $(".gallery").find(t).length ? (t.data("wrapped-for-lightbox") || (t.wrap("<span class='lightbox-expand'></span>"), t.data("wrapped-for-lightbox", !0)), t.parent().addClass("for-lightbox")) : t.data("wrapped-for-lightbox") ? t.parent().removeClass("for-lightbox") : void 0
}, e = function () {
var t, e, i, s, a;
for (s = n.find("img"), a = [], e = 0, i = s.length; i > e; e++) t = s[e], a.push(r($(t)));
return a
}, delay(500, e), window.makePostImagesPoppable = e, t.off("resize-width.imageLightbox").on("resize-width.imageLightbox", function () {
return $.throttle("imageLightbox", 500, e)
})
})
}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g, v, y = [].indexOf || function (t) {
for (var e = 0, n = this.length; n > e; e++)
if (e in this && this[e] === t) return e;
return -1
};
t = $(window), r = null, i = "new", n = 15, h = [], p = null, l = 1400, a = 300, c = l - a, e = 300,
function () {
var t, e;
return t = function (t, e) {
return null == e && (e = 0), Math.floor((t + e) / l)
}, e = {}, p = function (n, i) {
var r, s;
return r = t(i, c), 0 > r ? !1 : (s = e["" + n + r], e["" + n + r] = r, s ? null : r)
}
}(), g = {}, m = function (t) {
var e, n, i, r;
for (e = "#", n = r = 1; 3 >= r; n = ++r) i = Math.floor(255 * Math.random()).toString(16), 1 === i.length && (i = "0" + i), e += i;
return g[t] || (g[t] = e)
}, window.location.toString().match(/ad_overlay/) && $(function () {
var t, e, n, i;
for (i = [], e = n = 0; 9 >= n; e = ++n) t = $("<div></div>"), t.addClass("layerOverlay"), t.css("background-color", m(e + 1)), t.css("top", l * e + a), t.css("height", l), i.push($(".slide-window").append(t));
return i
}), u = {}, f = function (t) {
var e, n;
return n = null, e = Math.floor((t - 1) / 2), 0 === e ? u[e] = TripleClick._ord : u[e] ? (n = TripleClick._ord, TripleClick._ord = u[e]) : u[e] = TripleClick.newOrd(), n
}, s = function (t, r, s) {
var a, o, l, c, u, d, g;
return null == r && (r = [0, 1, 2]), $(function () {
return $("#site-footer-wrapper").css({
opacity: 0
})
}), window.postData || (window.postData = {
hot: [],
rising: [],
"new": []
}), l = $("div.columns"), 0 === l.length || (g = l[0], y.call(h, g) >= 0) ? void 0 : (h.push(l[0]), o = {}, t && (u = {
channel: t
}), c = [{
key: "new",
data: window.postData["new"],
query: u,
trigger: "#column-new",
pageSize: 10,
container: "#column-new .column-content",
estHeight: 100
}, {
key: "rising",
data: window.postData.rising,
query: u,
trigger: "#column-rising",
pageSize: 3,
container: "#column-rising .column-content",
estHeight: 330
}, {
key: "hot",
data: window.postData.hot,
query: u,
trigger: "#column-hot",
pageSize: 2,
container: "#column-hot .column-content",
estHeight: 530
}], c = [c[r[0]], c[r[1]], c[r[2]]], a = {
"new": {
tile: 1,
name: "left_column"
},
rising: {
tile: 2,
name: "middle_column"
},
hot: {
tile: 3,
name: "right_column"
}
}, d = new App.CachingMultiPostCollectionView({
el: l,
loadDistance: 200,
collections: c
}).on("show", function (t, r, l) {
var c, u, d, h, g, v, y, w;
return h = r.display.length, t === i && 0 === (h - 1) % n && (omni($.extend({
isPostView: !1
}, s, {
page_number: Math.ceil(h / n)
})), ga(), comscoreBeacon()), u = a[t], o[w = u.name] || (o[w] = 1), v = {
escnotcategory: ["iframe"],
tile: u.tile
}, (d = p(u.name, l)) && (g = f(d), v.bg = m(d), v.adnum = o[u.name]++, v.adnum > 2 && (v.escnotcategory.push("infinite"), v.infi = "y"), r.view.append(TripleClick.tripleclickAd(u.name, v)), r.addElementToAverage(e), g && (TripleClick._ord = g)), (y = p("partners", l) && "new" === t) && 0 === y % 8 && y > 0 ? (TripleClick.newOrd(), c = $("<div>").addClass("left_column_ad_block"), c.append(TripleClick.tripleclickAd("left_column_ad_block_ad", {
tile: 1,
adnum: ad_num_counter.left_column++
})), c.append(TripleClick.tripleclickAd("left_column_ad_block_ad", {
tile: 2,
adnum: ad_num_counter.left_column++
})), r.view.append(c)) : void 0
}).on("exhaustedAll", function () {
return $("#site-footer-wrapper").transition({
opacity: 1
}, 500)
}).on("rendered", function () {}), l.data("CachingMultiPostCollectionView", d), l = ["new", "rising", "hot"], l = [l[r[0]], l[r[1]], l[r[2]]], $(".slide-window").mobileScroll({
children: $(".slide-window").find(".column"),
offset: $("#body-container").position().top
}).bind("snapped", function (t, e) {
var n, i;
for (n = $(".column-headers .header").removeClass("active"), i = n.eq(e); i.length > 0 && !i.is(":visible");) e += 1, i = n.eq(e);
return i.addClass("active")
}).bind("activateColumn", function (t, e) {
var n;
return n = d.collections[l[e]], d.activate(n)
}).bind("deactivateColumn", function (t, e) {
var n;
return n = d.collections[l[e]], d.deactivate(n)
}).mobileScroll("checkColumns"), $(function () {
return $(".slide-window").mobileScroll("activate")
}), d.start(), null)
}, o = function () {
var t, e, n, i, r, s;
return r = $("#column-new"), s = $("#column-rising"), t = $("#column-hot"), t.insertBefore(s), r.insertAfter(s), e = $(".header1"), n = $(".header2"), i = $(".header3"), i.insertBefore(e), e.insertAfter(n)
}, v = function (t) {
var e;
return null == t && (t = [2, 1, 0]), e = [0, 1, 2], Modernizr.mq("(max-device-width: 640px)") && (o(), e = t, i = "hot", n = 4), e
}, d = function () {
var t, e;
return t = $("div[data-livefyre-wall]"), t.length > 0 ? (loadScriptAsync(window.assetMap["livefyre-wall"], "livefyre_wall"), e = every(500, function () {
return window.Livefyre ? (clearInterval(e), $("head").append('<link rel="stylesheet" href="http://livefyre-cdn.s3.amazonaws.com/libs/sdk/v1.1.0-build.201/streamhub-sdk.gz.css" /></link>'), Livefyre.require("streamhub-sdk/stream-helpers/livefyre-helper"), Livefyre.require("streamhub-sdk/stream-manager").create.livefyreStreams({
articleId: "custom-" + t.data("livefyre-wall"),
siteId: 312274,
network: "mashable.fyre.co"
}).bind(new(Livefyre.require("streamhub-wall"))({
el: t.get(0)
})).start()) : void 0
})) : void 0
}, $$("posts/index", "posts/channel", function (t) {
var e, n, i, r, a, o, l, c;
for (Modernizr.touch && (screen.width > 728 && screen.height > 728 ? t(".box970").waypoint({
offset: -100
}, function (e, n) {
return "down" === n ? (t("#sticky").append(t("#column-headers .column-headers")), t("#scrollable").css({
"padding-top": "79px"
}), t(".fixable-wrapper").css({
display: "none"
}), t(document).on("page:cache", function () {
return t("#column-headers").append(t("#sticky .column-headers"))
})) : (t(".fixable-wrapper").css({
display: "block"
}), t(".fixable-wrapper").append(t("#sticky .column-headers")), t("#scrollable").css({
"padding-top": "44px"
}))
}) : (t("#sticky").append(t("#column-headers .column-headers")), t("#scrollable").css({
"padding-top": "79px"
}), t(".fixable-wrapper").css({
display: "none"
}), t(document).on("page:cache", function () {
return t("#column-headers").append(t("#sticky .column-headers"))
}))), i = v(), t(".column-headers a").on("click", function () {
var e, n, i;
return e = t(this).parent(), i = e.parents(".headers"), n = i.find("div").index(e), t(".slide-window").mobileScroll("moveToIndex", n), !1
}), t(".column-headers .header:eq(0)").addClass("active"), c = t("#column-rising .post.short"), o = 0, l = c.length; l > o; o++) e = c[o], a = new App.PostView({
el: e
});
return Modernizr.touch || t("#column-headers").waypoint({
offset: 46
}, function (e, n) {
return t(".column-headers").toggleClass("fixed", "down" === n)
}), n = t(".page-header.channel").data("channel"), r = {
page_type: "Infi-Index",
channel: n,
top_channel: n,
content_type: "Channel",
isPostView: !1,
content_source_type: null,
content_source_name: null,
author_name: null,
pub_month: null,
pub_year: null,
pub_date: null,
pub_day: null,
age: null,
embedded_content: null,
campaign: null,
v_buy: null,
v_cur: null,
v_max: null,
h_pub: null,
h_buy: null,
h_pub_buy: null,
v_buy_i: null,
v_cur_i: null,
v_max_i: null,
events: null
}, s(n, i, r)
}), $$(function (t) {
return function () {
return Modernizr.touch ? void 0 : t("#scrollable").hoverIntent({
over: function () {
var e;
return e = t(this).find(".article-shares-links").not(".persistent"), e.show().css({
opacity: 0
}).transition({
opacity: 1
}, 200).find(".google_plus, .facebook").trigger("mouseover")
},
out: function () {
var e;
return e = t(this).find(".article-shares-links").not(".persistent"), e.transition({
opacity: 0
}, 200, function () {
return e.hide()
})
},
interval: 100,
sensitivity: 5,
on: ".sharable"
})
}()
}), $$("posts/show", function (e) {
var n, i, a, o, l, c, u, h, p, f, m, g, y, w, b;
if (w = {
right_rail_lift: 1,
right_rail: 1
}, l = e("#post-head").data("channel"), m = {
page_type: "Infi-Article",
channel: l,
top_channel: l,
content_type: "Channel",
location: "/" + l + "/",
isPostView: !1,
content_source_type: null,
content_source_name: null,
author_name: null,
pub_month: null,
pub_year: null,
pub_date: null,
pub_day: null,
age: null,
embedded_content: null,
campaign: null,
v_buy: null,
v_cur: null,
v_max: null,
h_pub: null,
h_buy: null,
h_pub_buy: null,
v_buy_i: null,
v_cur_i: null,
v_max_i: null,
events: null,
content_source: null
}, e(".column-headers").removeClass("fixed"), f = v(), e("#more-in-channel").length > 0 && s(e("#post-head").data("channel"), f, m), e("#newsletter-signup").length > 0 && (_gaq.push(["_trackEvent", "Newsletter Signup", "Signup Visible", "After Article - Daily"]), e("#newsletter-signup form").on("submit", function (t) {
return t.stopImmediatePropagation(), t.stopPropagation(), e.ajax({
type: "POST",
url: "/me/subscribe/",
data: e(this).serialize(),
success: function () {
return e("#newsletter-signup-wrapper h2").removeClass("failure").addClass("success").text("Success! Thanks for signing up.")
},
error: function () {
return e("#newsletter-signup-wrapper h2").removeClass("success").addClass("failure").text("Oops, that didn't work. Please try again.")
}
}), _gaq.push(["_trackEvent", "Newsletter Signup", "Signup Success", "After Article - Daily"]), !1
})), p = function () {
return 0 === e(".fyre-widget").length && (e(".load-comments").hide(), e("#livefyre_comments").html(e("<div class='loader-inline visible'></div>")), delay(1e3, function () {
return e("#powered_by_livefyre_new").show()
}), window.commentsLoaded = !0, App.loadComments.bind(window)(), every(250, function () {
return e(".article-comments .fyre").length > 0 ? e(".article-comments .loader-inline").remove() : void 0
})), !1
}, e(".load-comments").off("click").on("click", p), window.commentsLoaded || Modernizr.touch || e("footer.article-topics").waypoint({
offset: 550,
handler: p
}), window.seriesData && window.seriesData._id) {
App.SeriesView.create(window.seriesData), window.seriesData = void 0;
try {
delete window.seriesData
} catch (x) {
h = x
}
} else App.SeriesView.load(e("#story").data("series-id")); if (e(".follow-buttons .twitter").on("click", function () {
return popupCenter(e(this).attr("href"), 550, 415, "twitter-popup"), !1
}), d(), c = e("#livefyre_comments"), b = c.data("site-id"), o = e("#story").data("id"), b && o && window.Livefyre && window.Livefyre.widget) try {
e("#livefyre_comments").show(), window.Livefyre.widget.changeCollection({
siteId: b,
articleId: o
})
} catch (x) {
u = x, e("#livefyre_comments").hide()
}
return function () {
return e("article.fullwidth").length > 0 ? void 0 : onceQueryIs("updatePostSidebar", "(min-width: 970px)", function () {
return delay(250, function () {
var t, n, i, r, s;
return s = e("#story").data("id"), r = function (t) {
return t.attributes._id !== s
}, n = e("#story"), i = new App.CachingMultiPostCollectionView({
el: e("aside.sidebar"),
loadDistance: 0,
collections: [{
key: "hot",
data: [],
query: {
hot_i: "364x130:-1"
},
active: !0,
filter: r,
pageSize: 3,
container: "#big-stories",
heightCheck: function (t) {
return t.view.el.getBoundingClientRect().bottom < n[0].getBoundingClientRect().bottom
}
}]
}), t = e("article.full"), i.on("show", function (t, e) {
var n;
return 1 === e.display.length && (n = {
adnum: w.right_rail_lift++
}, e.view.append(TripleClick.tripleclickAd("right_rail_lift", n))), e.display.length > 3 && e.display.length < 14 && 0 === e.display.length % 4 && (n = {
adnum: w.right_rail_lift++
}, e.view.append(TripleClick.tripleclickAd("right_rail_lift", n))), 0 === (e.display.length - 2) % 4 ? (n = {
adnum: w.right_rail++,
ord: Math.ceil(1e15 * Math.random())
}, e.view.append(TripleClick.tripleclickAd("right_rail", n))) : void 0
}), i.start()
})
})
}(),
function () {
var n, i, s, a, o, l, c, u, d;
for (i = e("article.post.full"), o = 0, n = null, s = 0, c = function () {
var t, i, r, s, a, o, l, c, u, d, h, p, f, m, g, v, y, w, b, x;
for (s = " iframe.twitter-tweet, iframe.dnr, iframe.ad ", h = " div.popout embed, div.popout iframe, iframe[src*='youtube.com'], iframe[src*='vimeo.com'], iframe[src*='brightcove.com'], object.BrightcoveExperience ", i = e("article.post.full figure.article-image"), u = i.find("iframe,embed").not(s), f = 0, y = u.length; y > f; f++) a = u[f], a.sizeParent = i;
for (t = e("article.post.full section.article-content"), l = t.find("section.gallery").find(h).not(s), m = 0, w = l.length; w > m; m++) a = l[m], a.sizeParent = e(a).parents(".slide");
for (d = t.find("iframe,embed").not(l).not(s), p = t.find(h).not(l).not(s), c = _.groupBy(p, function (t) {
return e(t).parents(".no-microcontent").length > 0 ? "nonWrap" : "wrap"
}), p = p.not(c.nonWrap), d = d.add(c.nonWrap), g = 0, b = d.length; b > g; g++) a = d[g], r = e(a), a.sizeParent = r.closest("div,.article-content");
for (v = 0, x = p.length; x > v; v++) a = p[v], r = e(a), r.parents(".popout").length > 0 || r.wrap("<div class='popout'></div>"), a.sizeParent = r.parents(".popout");
return n = function () {
var t, n, i, r;
for (i = p.add(d).add(u).add(l), r = [], n = 0, t = i.length; t > n; n++) o = i[n], r.push(e(o));
return r
}()
}, l = function () {
var t, e, i, r, s, a, l, c;
for (l = 0, c = n.length; c > l; l++) t = n[l], a = t.width(), e = t.height(), s = t[0].sizeParent, s && (r = s.width(), i = e / a * r, t.css({
width: r,
height: i
}).attr({
width: r,
height: i
}));
return o = window.outerWidth
}, c(), l(), clearInterval(r), r = window.every(3e3, function () {
return s += 1, 5 === s && clearInterval(r), c(), l()
}), u = 0, d = n.length; d > u; u++) a = n[u], a.attr("src") && a.attr("src", a.attr("src"));
return t.off("resize-width.updateEmbeds").on("resize-width.updateEmbeds", function () {
return e.throttle("resize.updateEmbeds", 100, l)
})
}(), y = function (t) {
var n, i;
return i = function () {
var t, i, r, s;
for (r = (e(a).data("velocity") || "").toString().split(","), s = [], t = 0, i = r.length; i > t; t++) n = r[t], s.push(parseInt(n));
return s
}(), i && i.length > 0 && !isNaN(i[0]) ? t.renderVelocity(i) : t.hideVelocity()
}, g = function () {
var t, n, i, r;
for (i = e(".post.full"), r = [], t = 0, n = i.length; n > t; t++) a = i[t], r.push(new App.PostView({
el: a
}));
return r
}(), t.off("resize-width.velocity").on("resize-width.velocity", function () {
var t, e, n, i;
for (i = [], e = 0, n = g.length; n > e; e++) t = g[e], i.push(y(t));
return i
}), t.trigger("resize-width.velocity"), i = e(".shift-to-hero"), i.length > 0 && (n = e("figure.article-image"), n.children().remove(), n.append(e(".shift-to-hero").children()), i.remove()), Modernizr.touch || e("#column-headers").waypoint({
offset: 46
}, function (t, n) {
return e(".column-headers").toggleClass("fixed", "down" === n)
}),
function () {
var t, n;
return t = readSession("session"), t && t.roles && -1 !== _.indexOf(t.roles, "mashable_staff") ? (n = e("#story").data("wp-id"), e("a.edit-post").length < 1 ? e("h1.title").before("<a class=edit-post href='https://admin.mashable.com/wp-admin/post.php?post=" + n + "&action=edit'>Edit story</a>") : void 0) : e("a.edit-post").remove()
}()
})
}.call(this),
function () {
$$("posts/show", "publishers/show", function () {
var t, e, n, i;
return n = $(".publisher-info"), n.length > 0 ? (t = n.data("facebook-page"), i = n.data("twitter-handle"), e = n.data("pub-slug"), Facebook.push(function (i) {
return i.Event.subscribe("edge.create", function (n) {
return t === n ? _gaq.push(["_trackEvent", e, "FB Like", window.location.pathname]) : void 0
}), i.Event.subscribe("edge.remove", function (e) {
return t === e ? _gaq.push(["_trackEvent", n, "FB Unlike", window.location.pathname]) : void 0
})
}), Twitter.push(function (t) {
return t.events.bind("follow", function (t) {
return i === t.data.screen_name ? _gaq.push(["_trackEvent", e, "Twitter Follow", window.location.pathname]) : void 0
})
})) : void 0
})
}.call(this),
function () {
$$("publishers/show", function () {
var t, e;
return t = new App.PostCollection, t.url = "/publishers/" + window.__bootstrap.publisher.slug + "?format=json", t.hasMore = function (t) {
return t.data.length > 0
}, t.parse = function (t) {
return t.data
}, e = new App.PostCollectionView({
collection: t,
el: $(".story-stream"),
view: App.TopicPostView,
data: window.__bootstrap.data,
manualStart: !0,
infiniteScroll: {
maxPages: 10,
startPage: window.__bootstrap.page
}
}), e.on("add", function (t) {
return 0 === t % 10 ? (TripleClick.newPage(), this.append(TripleClick.tripleclickAd("topic_center"))) : void 0
}), e.on("addView", function (t) {
var n;
return n = e.page, t.$el.waypoint({
continuous: !1,
onlyOnScroll: !0,
handler: function () {
var t, i;
return t = null, i = 1 === n ? "/publishers/" + window.__bootstrap.publisher.slug + "/" : "/publishers/" + window.__bootstrap.publisher.slug + "/page/" + n + "/", setUrl(i, !0) ? (omni($.extend({
isPostView: !1
}, {
page_number: e.page,
page_type: "Infini-Publisher"
})), comscoreBeacon(), ga()) : void 0
}
})
}), e.start()
})
}.call(this),
function () {
var t = {}.hasOwnProperty,
e = function (e, n) {
function i() {
this.constructor = e
}
for (var r in n) t.call(n, r) && (e[r] = n[r]);
return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e
};
$$("video_categories/index", "video_categories/show", "videos/index", "videos/show", function () {
var t, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g;
return o = function (n) {
function i() {
return c = i.__super__.constructor.apply(this, arguments)
}
return e(i, n), i.prototype.initialize = function (t, e, n, i, s, a) {
return null == a && (a = {}), this.set(_.extend({
player: t,
videoPlayerModule: e,
experienceModule: n,
contentModule: i,
playlist: s,
currentVideo: new r($("#current-video-info").data())
}, a)), this.resetSize(), n.addEventListener(brightcove.api.events.ExperienceEvent.TEMPLATE_READY, $.proxy(function () {
return e.addEventListener(brightcove.api.events.MediaEvent.COMPLETE, $.proxy(this.mediaComplete, this))
}, this))
}, i.prototype.loadNextVideo = function () {
var t;
return t = this.get("playlist"), t.shift(), t.isEmpty() ? void 0 : (setUrl("video-categories/" + t.tag + "/videos/" + t.first().get("videoId"), !0), window.VideoHub.router.navigate(), this.play(t.first()))
}, i.prototype.resetSize = function () {
var t, e, n, i;
return n = $("#player").width(), t = Math.floor(n / (16 / 9)), e = $("#myExperience"), e.attr("height", t), e.attr("width", n), this.get("experienceModule").setSize(n, t), i = $(window).width(), i > 1024 ? ($("#sidebar-limiter").height($("#size-container").height()), $("#sidebar-limiter").css("width", "")) : i > 480 ? ($("#sidebar-limiter").width(150 * this.get("playlist").length + 42), $("#sidebar-limiter").css("height", "")) : $("#sidebar-limiter").css({
height: "",
width: ""
})
}, i.prototype.mediaComplete = function () {
return this.loadNextVideo()
}, i.prototype.play = function (e) {
var n;
return this.set("currentVideo", e), new t({
model: e
}).render(), n = e.get("videoId") || e.get("video-id"), this.get("videoPlayerModule").loadVideoByID(n), $("body").animate({
scrollTop: 100
}), $("#sidebar-limiter").animate({
scrollTop: 0
})
}, i
}(Backbone.Model), r = function (t) {
function n() {
return u = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.fromElement = function (t, e) {
var i, r, s;
return i = $(t), null != e && i.data("playlist", e), r = new n(i.data()), s = new l({
el: t,
model: r
}), r.view = s, window.VideoHub.videos[r.get("videoId")] = r, r
}, n
}(Backbone.Model), n = function (t) {
function n() {
return d = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.model = r, n.prototype.retrieveVideosFromPlaylist = function () {
var t, e, n, i, s;
for (i = this.view.$el.find("li.video"), s = [], e = 0, n = i.length; n > e; e++) t = i[e], s.push(this.push(r.fromElement(t, this)));
return s
}, n.prototype.url = function () {
return "/video-categories/" + this.tag + ".json"
}, n.prototype.parse = function (t) {
return t.videos
}, n.prototype.jumpTo = function (t) {
var e;
return this !== window.VideoHub.mainPlaylist ? n.replaceMainPlaylist(t) : (e = this.indexOf(t), this.removeTo(e), window.VideoHub.router.navigate("video-categories/" + t.get("playlist").tag + "/videos/" + t.get("videoId")), window.VideoHub.videoPlayer.play(t))
}, n.prototype.removeTo = function (t) {
var e, n, i, r;
if (t > 0) {
for (n = [], e = i = 0, r = t - 1; r >= 0 ? r >= i : i >= r; e = r >= 0 ? ++i : --i) n.push(this.at(e));
return this.remove(n)
}
}, n.fromElement = function (t) {
var e, r, a, o, l;
return e = $(t), r = new n, r.tag = e.data("tag"), r.page = e.data("page"), l = new i({
collection: r,
el: t
}), r.view = l, r.retrieveVideosFromPlaylist(), window.VideoHub.playlists[r.tag] = r, a = e.parents(".video-group"), 1 === a.length && (o = new s({
el: a,
collection: r
}), o.addChooser()), r
}, n.replaceMainPlaylist = function (t) {
var e, n;
return e = $(t.get("playlist").view.render()), t.get("playlist").indexOf(t) > 0 && (e = e.filter(":gt(" + (t.get("playlist").indexOf(t) - 1) + ")")), $("#playlist").html(e), n = window.VideoHub.mainPlaylist, n.models = [], n.retrieveVideosFromPlaylist(), window.VideoHub.videoPlayer.play(t)
}, n
}(Backbone.Collection), t = function (t) {
function n() {
return h = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.render = function () {
var t;
return t = $("#current-video-info"), t.find("#video-title").text(this.model.get("title")), t.find("#video-description").text(this.model.get("desc"))
}, n
}(Backbone.View), l = function (t) {
function n() {
return p = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.tagName = "li", n.prototype.className = "video", n.prototype.events = {
click: "jumpToVideo"
}, n.prototype.jumpToVideo = function (t) {
return t.stopImmediatePropagation(), this.model.get("playlist").jumpTo(this.model), !1
}, n.prototype.render = function () {
return n.template(this.model.attributes)
}, n.prototype.slideAndRemove = function () {
var t, e, n;
return e = this, t = e.$el, n = $(window).width(), n > 1024 ? t.transition({
"margin-top": -1 * t.height()
}, function () {
return t.remove()
}) : n > 480 ? t.transition({
"margin-left": -1 * t.width()
}, function () {
return t.remove()
}) : t.remove()
}, n.template = Handlebars.templates["templates/videos/video"], n
}(Backbone.View), i = function (t) {
function n() {
return f = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.tagName = "li", n.prototype.className = "playlist", n.prototype.render = function () {
var t, e, n, i, r, s;
for (t = [], e = function (e) {
return null == e.view && (e.view = new l({
model: e
})), t.push(e.view.render())
}, s = this.collection.models, i = 0, r = s.length; r > i; i++) n = s[i], e(n);
return t.join("")
}, n
}(Backbone.View), s = function (t) {
function n() {
return m = n.__super__.constructor.apply(this, arguments)
}
return e(n, t), n.prototype.events = {
"click .video-group-title": "toggleChooserMenu",
"click .video-chooser li": "choosePlaylist",
"click a.expand-link": "expandToggle",
"click a.collapse-link": "expandToggle",
"change .mobile-playlist-select": "selectPlaylist"
}, n.prototype.addChooser = function () {
var t, e, n, i, r, s;
if (this.$el.find(".video-chooser").length < 1) {
for (n = this.$el.find(".video-group-title"), e = $('<ul class="video-chooser"></ul>'), s = n.data("subcategories"), i = 0, r = s.length; r > i; i++) t = s[i], e.append("<li data-tag='" + t[1] + "'>" + t[0] + "</li>");
return n.after(e)
}
}, n.prototype.toggleChooserMenu = function (t) {
return t.stopImmediatePropagation(), this.$el.find(".video-group-title").hasClass("active") ? $(".video-chooser, .video-group-title").removeClass("active") : ($(".video-chooser, .video-group-title").removeClass("active"), this.$el.find(".video-chooser, .video-group-title").addClass("active"))
}, n.prototype.choosePlaylist = function (t) {
var e;
return e = $(t.target), this.$el.find(".video-chooser, .video-group-title").removeClass("active"), this.loadPlaylist(e.data("tag"), e.text())
}, n.prototype.loadPlaylist = function (t, e) {
var n;
return this.collection.tag = t, n = this.$el.find(".video-group-title"), this.collection.fetch({
success: function (t) {
var i, r, s, a, o, l, c;
for (l = t.models, s = 0, o = l.length; o > s; s++) i = l[s], i.set("playlist", t);
for (t.view.$el.html(t.view.render()), r = a = 0, c = t.length - 1; c >= 0 ? c >= a : a >= c; r = c >= 0 ? ++a : --a) t.models[r].view.setElement(t.view.$el.find(".video")[r]);
return n.find("h3").length > 0 ? n.find("h3").text(e) : n.append("<h3>" + e), $(window).width() < 480 ? t.jumpTo(t.models[0]) : void 0
}
})
}, n.prototype.expandToggle = function (t) {
var e, n;
return t.stopImmediatePropagation(), n = this.$el, e = n.find(".playlist"), "110px" !== e.css("height") ? (e.css("height", "110px"), n.find("a.expand-link").text("See all â–¾"), n.find("a.collapse-link").hide()) : (e.css("height", "auto"), n.find("a.expand-link").text("Show less â–´"), n.find("a.collapse-link").show())
}, n.prototype.selectPlaylist = function () {
var t;
return t = this.$el.find(".mobile-playlist-select").find(":selected"), this.loadPlaylist(t.val(), t.text())
}, n
}(Backbone.View), a = function (t) {
function i() {
return g = i.__super__.constructor.apply(this, arguments)
}
return e(i, t), i.prototype.routes = {
"videos/:video": "video",
"videos/": "videoCategory",
"video-categories": "videoCategory",
"video-categories/:category": "videoCategory",
"video-categories/:category/videos": "videoCategory",
"video-categories/:category/videos/:video": "videoCategory"
}, i.prototype.video = function (t) {
return n.jumpTo(t)
}, i.prototype.videoCategory = function (t, e) {
var n, i;
return n = window.VideoHub.playlists[t], i = n.get(e), n.jumpTo(i)
}, i
}(Backbone.Router), window.VideoHub = {
playlists: {},
videos: {}
}, window.videoTemplateLoaded = function (t) {
var e, i, r, s, l, c, u;
for (r = brightcove.api.getExperience(t), i = n.fromElement($("#playlist")[0]), s = new o(r, r.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER), r.getModule(brightcove.api.modules.APIModules.EXPERIENCE), r.getModule(brightcove.api.modules.APIModules.CONTENT), i), i.on("remove", function (t) {
return t.view.slideAndRemove()
}), $(window).on("resize", function () {
return s.resetSize()
}), window.VideoHub.mainPlaylist = i, window.VideoHub.videoPlayer = s, u = $("#video-categories .playlist"), l = 0, c = u.length; c > l; l++) e = u[l], n.fromElement(e);
return window.VideoHub.router = new a, Backbone.history.start({
pushState: !0,
hashChange: !1
})
}
})
}.call(this),
function () {
var t;
t = $(window), $$("topics/show", function () {
var t, e, n;
return t = new App.PostCollection, t.url = "/category/" + window.__bootstrap.topic.id + "?format=json", t.hasMore = function (t) {
return t.data.length > 0
}, t.parse = function (t) {
return t.data
}, n = new App.PostCollectionView({
collection: t,
el: $(".story-stream"),
view: App.TopicPostView,
data: window.__bootstrap.data,
manualStart: !0,
infiniteScroll: {
maxPages: 10,
startPage: window.__bootstrap.page
}
}), null == $("#topics-header").data("posts") && n.on("add", function (t) {
return t > 8 && 0 === (t - 10) % 9 ? (TripleClick.newOrd(), this.append(TripleClick.tripleclickAd("topic_center"))) : void 0
}), e = 1, n.on("addView", function () {
var t;
return t = n.page, e !== t ? (e = t, omni($.extend({
isPostView: !1
}, {
page_number: n.page,
page_type: "Infini-Topic",
channel: "Category"
})), comscoreBeacon(), ga()) : void 0
}), n.start(), onceQueryIs("topicSidebar", App.VISIBLE_SIDEBAR, function () {
var t, e;
return t = new App.PostCollection, e = new App.PostCollectionView({
el: $("#hot-stories")
}), t.parse = function (t) {
var n;
return e.collection.add(function () {
var e, i, r, s;
for (r = t.rising, s = [], e = 0, i = r.length; i > e; e++) n = r[e], s.push(new App.Post(n));
return s
}()), []
}, t.fetch({
data: {
rising_per_page: 15,
hot_per_page: 0,
new_per_page: 0
},
complete: function () {
return e.commit()
}
})
})
}), $$("topics/edit", function () {
return $("#freebase_search").suggest({}).bind("fb-select", function (t, e) {
return $.getJSON("http://api.freebase.com/api/experimental/topic/basic?callback=?&id=" + e.id, function (t) {
var n;
return n = t[e.id].result, $("#freebase_result .name").text(n.text), $("#freebase_result .article").text(n.description), $("#freebase_result input").val("freebase-" + e.id).click(), n.thumbnail ? $("#freebase_result .img").html($("<img>").attr("src", n.thumbnail)) : $("#freebase_result .img").html("")
})
})
})
}.call(this),
function () {
$$("users/edit", "users/update", function () {
return $(".network-picture").on("click", function () {
return $("#user_image_url").val($(this).attr("src"))
}), Modernizr.touch ? $(".profile-menu a").on("click", function () {
return $("body,html").animate({
scrollTop: $(".profile-content").position().top + "px"
})
}) : void 0
}), $$("users/show", function () {
return App.reloadUserData()
}), $$("users/show", "authors/show", function () {
var t, e, n, i, r;
return t = $("section.profile-info"), e = $(window), i = !1, r = 1, n = !0, $(document).scroll(function () {
var s;
return !i && e.height() + e.scrollTop() >= t.offset().top + .8 * t.height() && (i = !0, s = 0, r += 1, n) ? $.get(window.location.pathname, {
page: r,
format: "json",
include_feed: "true"
}, function (t) {
return "undefined" != typeof recommendedStoriesFeed && null !== recommendedStoriesFeed && t.recommended_stories && t.recommended_stories.length > 0 ? recommendedStoriesFeed.add(t.recommended_stories) : s += 1, "undefined" != typeof recommendedCommentsFeed && null !== recommendedCommentsFeed && t.recommended_comments && t.recommended_comments.length > 0 ? recommendedCommentsFeed.add(t.recommended_comments) : s += 1, "undefined" != typeof userStoriesFeed && null !== userStoriesFeed && t.user_stories && t.user_stories.length > 0 ? userStoriesFeed.add(t.user_stories) : s += 1, "undefined" != typeof userCommentsFeed && null !== userCommentsFeed && t.user_comments && t.user_comments.length > 0 ? userCommentsFeed.add(t.user_comments) : s += 1, 4 === s && (n = !1), i = !1
}) : void 0
})
})
}.call(this),
function () {}.call(this),
function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m, g, v, y, w = {}.hasOwnProperty,
b = function (t, e) {
function n() {
this.constructor = t
}
for (var i in e) w.call(e, i) && (t[i] = e[i]);
return n.prototype = e.prototype, t.prototype = new n, t.__super__ = e.prototype, t
}, x = function (t, e) {
return function () {
return t.apply(e, arguments)
}
};
t = $(window), l = function (t, e) {
return setTimeout(e, t)
}, h = function (t, e) {
return setInterval(e, t)
}, d = function (t) {
return clearInterval(t), null
}, o = 1e4, u = !1, i = function (t) {
function e() {
return p = e.__super__.constructor.apply(this, arguments)
}
return b(e, t), e.prototype.routes = {
"gallery/:gallery": "gallery",
"gallery/:gallery/:slide": "slide"
}, e.prototype.gallery = function (t) {
var e;
return e = window.galleries[t], e ? e.open() : void 0
}, e.prototype.slide = function (t, e) {
var n;
return n = window.galleries[t], n && !n.is_open() ? n.open(e) : void 0
}, e
}(Backbone.Router), c = new i, e = function (t) {
function e() {
return f = e.__super__.constructor.apply(this, arguments)
}
return b(e, t), e
}(Backbone.Model), a = function (i) {
function a() {
return this.updateSlideWidth = x(this.updateSlideWidth, this), this.handleKeys = x(this.handleKeys, this), m = a.__super__.constructor.apply(this, arguments)
}
return b(a, i), a.prototype.events = {
"click .interactive": "open",
"click .slide-container": "nextOrPause",
"click .open-gallery": "open",
"click .next": "next",
"click .prev": "prev",
"click .meta a": "openLink",
"click .thumbs": "toggleThumbs",
"click .thumbs a": "index",
"click .actions .all": "toggleThumbs",
"click .actions .close": "close",
"click .actions .slideshow": "startSlideshow",
"click .as-list": "renderAsListAndScroll",
"click .as-gallery": "renderAsGalleryAndScroll"
}, a.prototype.initialize = function () {
var t, n, i, r = this;
return $(document).on("page:before_change", function () {
return r.close()
}), this.model || (i = function () {
var e, n, i, r;
for (i = this.$el.find(".slide"), r = [], e = 0, n = i.length; n > e; e++) t = i[e], t = $(t), r.push({
id: t.data("id"),
title: t.find(".meta .title").html(),
description: t.find(".meta .caption").html(),
credit: t.find(".meta .credit").html(),
content: t.find("figure").html(),
thumb: t.data("thumb"),
content_source: t.data("content-source"),
skip_rerender: t.data("skip-rerender")
});
return r
}.call(this), this.model = new e({
id: this.$el.data("id"),
slug: this.$el.data("slug"),
display_mode: this.$el.data("display-mode"),
show_list_title: this.$el.data("display-title"),
slide_title_pos: this.$el.data("slide-title-pos"),
post_id: $("article.post.full").data("id"),
title: this.$el.find("header h1").text(),
slides: i
})), this.popout = new App.Popout({
type: "fixed"
}), n = this.popout, n.lightbox.$el.off("mousewheel"), n.lightbox.$el.off("touchmove"), this.popout.bind("closed", function () {
return r.close
}), this.render()
}, a.prototype.render = function () {
return "list" === this.displayMode() ? this.renderAsList() : this.renderAsGallery()
}, a.prototype.displayMode = function () {
return this.renderMode || this.model.attributes.display_mode
}, a.prototype.omnomnom = function (t) {
return t.preventDefault(), !1
}, a.prototype.scrollTo = function () {
return $("html,body").animate({
scrollTop: this.$el.offset().top - 100
})
}, a.prototype.renderAsListAndScroll = function () {
return omni({
track_link: !0,
events: "event35",
gallery_view: "Gal | " + this.model.attributes.id + " | " + this.model.attributes.title
}), this.renderAsList(), this.scrollTo(), !1
}, a.prototype.renderAsGalleryAndScroll = function () {
return this.renderAsGallery(), this.prime(!0), this.scrollTo(), !1
}, a.prototype.openLink = function (t) {
return t.stopImmediatePropagation(), !0
}, a.prototype.renderAsList = function () {
var t, e, i, s = this;
return this.renderMode = "list", e = $(Handlebars.templates["templates/gallery/list"](this.model.attributes)), this.$el.replaceWith(e), this.setElement(e.get(0)), t = this.$el.find(".slides"), this.slides = new Backbone.Collection, this.slides.bind("add", function (e) {
return e.view = new n({
model: e,
gallery: s
}), e.view.render(), t.append(e.view.el)
}), this.slides.add(function () {
var t, e, n, s;
for (n = this.model.attributes.slides, s = [], t = 0, e = n.length; e > t; t++) i = n[t], s.push(new r(i));
return s
}.call(this)), this.$el.find(".twitter-tweet").length > 0 && ("undefined" != typeof twttr && null !== twttr && null != twttr.widgets && twttr.widgets.loaded ? twttr.widgets.load(this.el) : loadScriptAsync("twitter")), this.$el.find(".vine-embed").length > 0 && ("undefined" == typeof VINE_EMBEDS || null === VINE_EMBEDS) && loadScriptAsync("//platform.vine.co/static/scripts/embed.js", "vine"), !1
}, a.prototype.renderAsGallery = function () {
var e, n, i, a, o, l, c = this;
for (this.renderMode = "gallery", t.off("resize.gallery").on("resize.gallery", function () {
return $.throttle("resize.gallery", 50, function () {
return c.updateSlideWidth(!0, !0)
})
}), this.slides = new Backbone.Collection, this.slides.bind("add", function (t) {
return t.view = new s({
model: t,
gallery: c
})
}), this.slides.add(function () {
var t, e, i, s;
for (i = this.model.attributes.slides, s = [], t = 0, e = i.length; e > t; t++) n = i[t], s.push(new r(n));
return s
}.call(this)), e = $(Handlebars.templates["templates/gallery/gallery"](this.model.attributes)), this.$el.replaceWith(e), this.setElement(e.get(0)), i = this.$el.find(".thumbs"), this.thumbs = i, this.thumbs.hide(), this.slideContainer = this.$el.find(".slide-container"), this.slideWindow = this.$el.find(".slide-container .slides"), this.ad = this.$el.find(".sidebar .ad"), l = this.slides.models, a = 0, o = l.length; o > a; a++) n = l[a], this.slideWindow.append(n.view.el);
return this.slideWindow.on("touchstart", function (t) {
return c.is_open() ? (c.touchStartX = t.clientX || t.originalEvent.touches[0].clientX, c.touchStartY = t.clientY || t.originalEvent.touches[0].clientY, c.startTransform = parseInt(c.slideWindow.css("transform")._translateX || "0", 10), c.movingHorizontal = null) : !0
}), this.slideWindow.on("touchmove", function (t) {
var e, n, i, r, s, a, o;
return c.is_open() && c.movingHorizontal !== !1 ? (r = t.clientX || t.originalEvent.touches[0].clientX, e = c.touchStartX - r, c.movingHorizontal || (a = t.clientY || t.originalEvent.touches[0].clientY, n = c.touchStartY - a, s = e * e, o = n * n, i = e * e + n * n, i > 400 && (c.movingHorizontal = s > o)), c.movingHorizontal === !0 ? (t.preventDefault(), c.moveDelta = e, c.slideWindow.css({
x: c.startTransform - c.moveDelta
})) : void 0) : !0
}), this.slideWindow.on("touchend", function (t) {
return c.is_open() && c.movingHorizontal !== !1 ? (c.movingHorizontal = null, c.moveDelta < -50 ? (c.prev(), t.preventDefault()) : c.moveDelta > 50 ? (c.next(), t.preventDefault()) : c.nav(0)) : void 0
}), this.content = this.$el.find(".content"), this.actions = this.$el.find(".actions"), this.metaContainer = this.$el.find(".meta"), this.titleContainer = this.$el.find(".meta .title"), this.descriptionContainer = this.$el.find(".meta .caption"), this.creditContainer = this.$el.find(".meta .credit"), this.slideCounter = this.$el.find(".meta .slides .current"), this.$el.find(".meta .slides .total").text(this.slides.length), this.slideList = this.$el.find(".slides .slide"), this.slideList.addClass("inactive"), this.updateSlideWidth(), t.bind("fullscreen", function (t, e) {
return e ? c.$el.addClass("fullscreen") : (c.$el.removeClass("fullscreen"), c.stopSlideshow()), c.updateSlideWidth(!1, !0)
}), !1
}, a.prototype.prime = function (t) {
return null == t && (t = !1), "list" === this.displayMode() || !t && null != this.active ? void 0 : this.nav(null, 0)
}, a.prototype.getSlideIndex = function (t) {
var e;
return e = _.find(this.slides.models, function (e) {
return e.id === t
}), e ? this.slides.models.indexOf(e) : 0
}, a.prototype.renderSlide = function (t, e, n) {
var i, r, s, a;
return null == e && (e = !1), null == n && (n = !1), null != this.slideCounter && this.slideCounter.text(t + 1), i = $(this.slideList[t]), r = this.currentSlide, !this.currentSlide || this.currentSlide[0] !== i[0] || e ? (this.currentSlide = i, i.removeClass("inactive"), s = this.slides, a = this, this.updateWindow(n, function () {
var n, i, o;
for (r && r.addClass("inactive"), a.currentSlideModel = s.at(t), a.currentSlideModel.view.render(e), a.currentSlideModel.view.$el.removeClass("inactive"), a.updateAd(), a.registerPageView(), a.isSetup = !0, o = [], n = i = 1; 2 >= i; n = ++i) null == s.at(t + n) || s.at(t + n).attributes.skip_rerender ? o.push(void 0) : o.push(s.at(t + n).view.prerender());
return o
})) : void 0
}, a.prototype.updateAd = function () {
return this.is_open() ? (null == this.gallery_adnum && (this.gallery_adnum = 0), this.gallery_adnum++, TripleClick.newOrd(), this.ad.html(TripleClick.tripleclickAd("gallery", {
sec2: "gallery",
tile: 1,
adnum: this.gallery_adnum
})), null) : void 0
}, a.prototype.registerPageView = function () {
var t, e, n, i, r;
return this.is_open() ? (r = this.currentSlideModel, t = this.model.attributes.id, e = this.model.attributes.title, n = r.attributes.id, i = this.model.attributes.post_id, window._gaq.push(["_trackPageview"]), window._gaq.push(["_trackEvent", "gallery", "/gallery/" + t + "/post/" + i, n]), omni({
display_mode: null,
content_type: "Gallery",
content_source: r.attributes.content_source,
page_type: "Ajax-Gallery",
page_number: null,
embedded_content: "Gal | " + t + " | " + e
}), comscoreBeacon(), null) : void 0
}, a.prototype.is_open = function () {
return this.popout.popped
}, a.prototype.open = function (e) {
var n = this;
return null == e && (e = null), this.is_open() ? !1 : (this.popout.popOut(this.$el), this.updateSlideWidth(!1, !0), e && (this.active = this.getSlideIndex(e)), this.$el.find(".slide-container").css({
opacity: 0
}), l(300, function () {
return n.updateSlideWidth(!1, !0), n.renderSlide(n.active, !0, !0), n.$el.find(".slide-container").transition({
opacity: ""
}, 200)
}), t.bindFirst("keydown.gallery", this.handleKeys), !1)
}, a.prototype.close = function () {
var e = this;
return this.popout.element.find(".slide-container").css({
opacity: 0
}), this.$el.find(".slide-container").css({
opacity: 0
}), this.popout.popIn(), this.stopSlideshow(), l(10, function () {
return e.updateSlideWidth("", !0)
}), l(475, function () {
return e.updateWindow(!0), e.$el.find(".slide-container").transition({
opacity: ""
}, 200), e.renderSlide(e.active, !0, !0)
}), this.toggleThumbs(!1), this.slideshowStartedOnce = !1, t.off(".gallery"), c.navigate("_", {
replace: !0
}), !1
}, a.prototype.stopVideo = function () {
var t;
return void 0 === this.active || (t = this.slides.at(this.active), t.attributes.skip_rerender) ? void 0 : l(1e3, function () {
return t.view.rerender()
})
}, a.prototype.nav = function (t, e) {
return this.stopVideo(), void 0 !== e ? this.active = e : this.active += t, this.active < 0 && (this.active = 0), this.active >= this.slides.length && (this.active = this.slides.length - 1, this.slideshowTimer && this.stopSlideshow()), this.renderSlide(this.active), this.updateSlideWidth()
}, a.prototype.prev = function () {
var t = this;
return this.is_open() ? this.nav(-1) : (this.open(), l(200, function () {
return t.nav(-1)
})), this.stopSlideshow(), !1
}, a.prototype.next = function () {
var t = this;
return this.is_open() ? this.nav(1) : (this.open(), l(500, function () {
return t.nav(1)
})), this.resetTimer(), !1
}, a.prototype.nextOrPause = function (t) {
return this.is_open() ? this.slideshowPlaying ? this.stopSlideshow() : this.slideshowStartedOnce ? this.startSlideshow() : t.offsetX < .25 * this.slideContainer.outerWidth() ? this.prev() : t.offsetX > .75 * this.slideContainer.outerWidth() ? this.next() : this.toggleInfo(t) : this.open(), !1
}, a.prototype.toggleInfo = function (t) {
return this.$el.toggleClass("show-info"), t && t.stopPropagation(), !1
}, a.prototype.resetTimer = function () {
var t, e = this;
if (this.slideshowPlaying) return d(this.slideshowTimer), this.slideshowTimer = h(o, function () {
return e.next()
}), t = this.$el.find(".slideshow-timer .bar"), t.stop().animate({
width: "0%"
}, 1, function () {
return t.animate({
width: "100%"
}, o - 20, "linear")
})
}, a.prototype.index = function (t) {
return this.open(), this.toggleThumbs(!1), this.nav(null, this.thumbs.find("a").index(t.currentTarget)), !1
}, a.prototype.toggleThumbs = function (t) {
var e, n = this;
return e = this.thumbs, t !== !0 && t !== !1 && !this.thumbsVisible || t === !0 ? (this.$el.find(".actions .all").addClass("active"), this.thumbs.css({
opacity: "0",
scale: 1.3
}).show().transition({
opacity: 1,
scale: 1
}), this.thumbsVisible = !0) : t !== !0 && (this.$el.find(".actions .all").removeClass("active"), this.thumbs.transition({
opacity: 0,
scale: 2.5
}, function () {
return n.thumbsVisible = !1, n.thumbs.hide(), n.updateSlideWidth()
})), !1
}, a.prototype.startSlideshow = function () {
var t;
return window.screenfull && window.screenfull.request(this.el), this.slideshowPlaying ? this.stopSlideshow() : (this.slideshowPlaying = !0, this.slideshowStartedOnce || this.nav(null, 0), this.slideshowStartedOnce = !0, this.resetTimer(), this.$el.addClass("slideshow"), this.$el.find(".actions .slideshow").addClass("active"), t = this.$el.find(".actions .slideshow .icon-white"), t.removeClass("icon-play").addClass("icon-pause")), !1
}, a.prototype.stopSlideshow = function () {
var t;
return this.slideshowPlaying ? (this.slideshowPlaying = !1, this.slideshowTimer = d(this.slideshowTimer), this.$el.removeClass("slideshow"), this.$el.find(".actions .slideshow").removeClass("active"), t = this.$el.find(".actions .slideshow .icon-white"), t.removeClass("icon-pause").addClass("icon-play")) : void 0
}, a.prototype.handleKeys = function (t) {
if (this.is_open()) switch (t.which) {
case 38:
return this.toggleThumbs(!0), t.stopImmediatePropagation(), !1;
case 40:
return this.thumbsVisible ? this.startSlideshow() : this.toggleThumbs(!1), t.stopImmediatePropagation(), !1;
case 37:
return this.prev(), t.stopImmediatePropagation(), !1;
case 39:
return this.next(), t.stopImmediatePropagation(), !1;
case 27:
return this.close(), t.stopImmediatePropagation(), !1
}
}, a.prototype.updateTitle = function (t) {
return this.titleContainer.html(t)
}, a.prototype.updateDescription = function (t) {
return this.descriptionContainer.html(t)
}, a.prototype.updateCredit = function (t) {
return this.creditContainer.html(t)
}, a.prototype.resetMetaScroll = function () {
return this.metaContainer.scrollTop(0)
}, a.prototype.noop = function (t) {
return t.stopPropagation(), !1
}, a.prototype.updateSlideWidth = function (t, e) {
var n, i, r, s, a, o;
if (this.slideList.css({
width: this.slideContainer.width()
}), this.is_open() || t) {
for (n = t ? t : this.slideContainer.height(), this.updateWindow(e), a = this.slides.models, o = [], r = 0, s = a.length; s > r; r++) i = a[r], o.push(i.view.updateAspects());
return o
}
}, a.prototype.updateWindow = function (t, e) {
var n, i, r, s;
return null == t && (t = !1), null == e && (e = null), i = this.slideContainer.outerWidth() * -this.active, null === e && (e = function () {}), t ? (Modernizr.csstransforms ? this.slideWindow.stop().css({
x: i
}) : this.slideWindow.stop().css({
marginLeft: i
}), e()) : (s = this.slideWindow, Modernizr.touch ? s.stop().transition({
x: i
}, 250, "ease-in", e) : Modernizr.csstransforms ? s.stop().transition({
x: i
}, 850, "cubic-bezier(.96,-0.33,0,1)", e) : (s.stop().css({
marginLeft: i
}), e && e())), Modernizr.flexbox || Modernizr.legacyflexbox || !(r = this.actions.position()) ? void 0 : (n = parseInt(r.top, 10) + this.actions.outerHeight(), this.$el.find(".content").css({
top: n
}))
}, a
}(Backbone.View), r = function (t) {
function e() {
return g = e.__super__.constructor.apply(this, arguments)
}
return b(e, t), e
}(Backbone.Model), s = function (t) {
function e() {
return this.updateAspects = x(this.updateAspects, this), this.render = x(this.render, this), this.prerender = x(this.prerender, this), this.rerender = x(this.rerender, this), this._render = x(this._render, this), v = e.__super__.constructor.apply(this, arguments)
}
return b(e, t), e.prototype.initialize = function () {
return this.el.className = "slide", this.on("renderedSlide", this.afterRender)
}, e.prototype._render = function () {
return this.$el.html(this.model.attributes.content), this.trigger("renderedSlide")
}, e.prototype.rerender = function () {
return this.$el.find("iframe,embed,object").length > 0 ? this._render() : void 0
}, e.prototype.prerender = function (t) {
return this.rendered && t ? this.rerender() : this.rendered ? this.afterRender() : (this._render(), this.rendered = !0)
}, e.prototype.render = function (t) {
return this.prerender(t), this.updateAspects(), this.options.gallery.updateTitle(this.model.attributes.title), this.options.gallery.updateDescription(this.model.attributes.description), this.options.gallery.updateCredit(this.model.attributes.credit), this.options.gallery.resetMetaScroll(), this.options.gallery.is_open() && c.navigate("gallery/" + this.options.gallery.model.attributes.slug + "/" + this.model.id, {
replace: !0
}), null
}, e.prototype.updateAspects = function () {
var t, e, n, i, r, s, a;
for (e = this.options.gallery.slideContainer.height(), n = this.options.gallery.slideContainer.height() * (16 / 9), this.options.gallery.slideContainer.width() < n && (n = this.options.gallery.slideContainer.width()), s = this.$el.find(".aspect-16x9, .aspect-1x1"), a = [], i = 0, r = s.length; r > i; i++) t = s[i], a.push($(t).css({
width: n,
height: e,
padding: 0
}));
return a
}, e.prototype.afterRender = function () {
return this.$el.find(".twitter-tweet").not(".twitter-tweet-rendered").length > 0 && ("undefined" != typeof twttr && null !== twttr && null != twttr.widgets && twttr.widgets.loaded ? twttr.widgets.load(this.el) : loadScriptAsync("twitter")), this.$el.find(".vine-embed").length > 0 ? loadScriptAsync("//platform.vine.co/static/scripts/embed.js", "vine") : void 0
}, e
}(Backbone.View), n = function (t) {
function e() {
return this.render = x(this.render, this), y = e.__super__.constructor.apply(this, arguments)
}
return b(e, t), e.prototype.initialize = function () {
return this.setElement($("<li class='slide'></li>")[0])
}, e.prototype.render = function () {
return this.$el.html(Handlebars.templates["templates/gallery/list_slide"](this.model.attributes)), this.trigger("renderedList"), "top" === this.options.gallery.model.attributes.slide_title_pos && this.$el.addClass("top").find(".meta .title").insertBefore(this.$el.find("figure")), makePostImagesPoppable()
}, e
}(Backbone.View), provides({
GalleryView: a
}), window.galleries = {}, $$("posts/show", function (t) {
var e, n, i;
t("section.gallery").each(function () {
var t;
return t = new a({
el: this
}), window.galleries[t.model.attributes.slug] = t
}), Backbone.history.start(), i = window.galleries;
for (n in i) e = i[n], e.prime();
return null
})
}.call(this),
function () {
var t, e, n, i, r;
e = function (t) {
var e, n, i, r;
e = new fyre.conv.RemoteAuthDelegate, r = t.auth;
for (n in r) i = r[n], e[n] = i;
return e
}, n = null,
function () {
var t, e;
return e = [], t = null, n = function (n, i, r) {
var s, a, o;
if (!document.getElementById(i) && !e[i]) {
if (e[i] = !0, t || (t = document.getElementsByTagName("script")[0]), s = document.createElement("script"), s.id = i, s.async = !0, s.src = n, r)
for (a in r) o = r[a], s[a] = o;
return t.parentNode.insertBefore(s, t), s
}
}
}(), t = function (t) {
var e;
return e = document.cookie.match(new RegExp(t + "=([^;]+)")), e ? e[1] : null
}, i = function (e) {
var i;
return i = {
load: n,
startLogin: function (t, e, n, i, r) {
var s, a, o;
return null == e && (e = 600), null == n && (n = 400), null == i && (i = null), null == r && (r = null), s = screen.width / 2 - e / 2, o = screen.height / 2 - n / 2, a = window.open(t, r, "menubar=no,toolbar=no,status=no,width=" + e + ",height=" + n + ",toolbar=no,left=" + s + ",top=" + o), this.finishCallback = i, this.startLoginPopup(a)
},
startLoginPopup: function (t) {
var e = this;
return this.tries = 0, this.popup = t, this.timer = setInterval(function () {
return e.__checkLogin()
}, 100)
},
__checkLogin: function () {
var n;
if (n = t(e.cookie_name || "livefyre_utoken"), n && this.timer) return clearInterval(this.timer), this.popup && this.popup.close(), this.popup = null, this.timer = null, this.finishCallback && this.finishCallback(), window.fyre.conv.login(n);
if (this.popup && this.popup.closed) try {
if (this.tries += 1, this.tries > 30) return clearInterval(this.timer), this.timer = null, this.popup = null
} catch (i) {}
}
}
}, r = !1, this.initLivefyre = function (s) {
var a, o, l;
if (r && !s.force) throw "Livefyre has already been initialized";
return r = !0, a = document.getElementById(s.element_id || "livefyre_comments"), a ? (s.config || (s.config = {
checksum: a.getAttribute("data-checksum"),
collectionMeta: a.getAttribute("data-collection-meta"),
articleId: a.getAttribute("data-article-id"),
siteId: a.getAttribute("data-site-id"),
el: a.id
}), s.network || (s.network = a.getAttribute("data-network")), s.domain || (s.domain = a.getAttribute("data-domain")), s.root || (s.root = a.getAttribute("data-root")), l = i(s), this.FYRE_LOADED_CB = function () {
var n;
return s.preLoad && s.preLoad(fyre), n = {
network: s.network,
authDelegate: s.delegate || e(s)
}, fyre.conv.load(n, [s.config], function (e) {
var n;
if (l.widget = e, n = t(s.cookie_name || "livefyre_utoken")) try {
return fyre.conv.login(n)
} catch (i) {
if (window.console) return window.console.log("Error logging in:", a)
}
})
}, s.manualLoad || (o = n("http://" + s.root + "/wjs/v3.0/javascripts/livefyre.js", null, {
"data-lf-domain": s.network
})), l) : null
}
}.call(this),
function () {
var t;
t = $(window), $$("search/search", function () {
var t, e, n, i, r, s, a, o, l, c, u, d, h, p, f, m;
if ($("#search-results .pagination").remove(), u = new App.SearchCollection, u.parse = function (t) {
return t.posts
}, i = {
stories: [App.PostCollectionView, "#search-posts", App.PostSearchView, "posts"],
topics: [App.TopicCollectionView, "#search-topics", App.TopicSearchView, "topics"],
people: [App.UserCollectionView, "#search-users", App.UserSearchView, "users"]
}, c = window.__bootstrap || {}, c.verticals) {
e = null, n = null;
for (a in i)
if (d = i[a], -1 !== _.indexOf(window.__bootstrap.verticals, a)) {
h = a, s = d[3], t = 15, r = 0, e = new App.SearchCollection, e.parse = function (t) {
return t[s]
}, n = new d[0]({
el: $(d[1]),
view: d[2],
collection: e,
data: c[d[3]],
manualStart: !0,
infiniteScroll: {
startPage: c.page,
maxPages: 10,
data: {
q: c.query,
t: c.verticals[0]
}
}
}), n.on("addView", function (e) {
var n;
return r += 1, n = Math.floor(r / t) + parseInt(c.page), e.$el.waypoint({
continuous: !1,
onlyOnScroll: !0,
offset: .5 * document.documentElement.clientHeight,
handler: function () {
var t;
return t = 1 === n ? "/search/?t=" + h + "&q=" + c.query : "/search/?t=" + h + "&q=" + c.query + "&page=" + n, setUrl(t, !0) ? (omni($.extend({
isPostView: !1
}, {
page_number: n,
page_type: "Infi-Search"
})), comscoreBeacon(), ga()) : void 0
}
})
}), n.start();
break
}
o = $("#body #q").val(), l = null, $("#body #q").on("keyup", function () {
return d = $(this).val(), d !== o && d.length > 2 ? (o = d, clearTimeout(l), l = delay(350, function () {
var t;
return t = "/search/?t=" + h + "&q=" + encodeURIComponent(d), setUrl(t, !0), n.reset({
q: d
})
})) : void 0
})
}
return function () {
var t, e, n;
return t = new App.PostCollection, n = new App.PostCollectionView({
el: $("#hot-stories")
}), e = new App.PostCollectionView({
el: $("#big-stories")
}), t.parse = function (t) {
var i;
return n.collection.add(function () {
var e, n, r, s;
for (r = t.rising, s = [], e = 0, n = r.length; n > e; e++) i = r[e], s.push(new App.Post(i));
return s
}()), e.collection.add(function () {
var e, n, r, s;
for (r = t.hot, s = [], e = 0, n = r.length; n > e; e++) i = r[e], s.push(new App.Post(i));
return s
}()), []
}, t.fetch({
data: {
rising_per_page: 5,
hot_per_page: 5,
new_per_page: 0
},
complete: function () {
return n.commit(), e.commit()
}
})
}(), (null != (p = window.google) ? null != (f = p.ads) ? null != (m = f.search) ? m.Ads : void 0 : void 0 : void 0) ? window.search_ads = new google.ads.search.Ads({
pubId: "pub-9942038924324175",
query: window.search && window.search.query || "",
hl: "en",
channel: "4864897929"
}, {
container: "search-ad",
colorText: "555555",
colorDomainLink: "0c74a6",
colorTitleLink: "0c74a6",
number: "1"
}) : void 0
})
}.call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment