mmcore.SetCookie('mmid','1865072169|AQAAAArrl749EA4AAA==',365,1);mmcore.SetCookie('pd','1865072169|AQAAAArrl749EA4AAA==',365);mmcore.SetCookie('srv','nycvwcgeu04',365);(function(){mmcore.custAttrs = {};if(typeof(mmcore.GenInfo)!='object')mmcore.GenInfo={};mmcore.EH=function(e){var s=e.message+'\r\n';if(!window.mm_error)window.mm_error=s;else window.mm_error+=s;};
mmcore.GenInfo['T48_T49_Master']={'element1':'t48_notifications'};
try{
//Essentials

// Maxymiser Core - Try Catch v0.0.0 http://gitlab.maxymiser.net/gts/mmcore-try-catch/tree/master
(function(){'use strict';mmcore.tryCatch=function(){return function b(c,d){var e=arguments.length;return function(){try{return c.apply(this,arguments)}catch(a){try{mmcore.EH(a)}finally{1<e&&b(d)(a)}}}}}()})();

/**
 * Essentials - Deferred
 *
 * A handy tool for organizing waiting for something.
 *
 * @version 0.0.2
 *
 *
 * @author a.porohnya@gmail.com (Aleksey Porokhnya)
 * 
 * 27.08.2014 by Tytskiy
 *     Fixed issue with [].reduce() when this method was overwriten by Prototype.js.
 *     Changed native [].reduce() to own reduce() implementation. 
 *     Note: Own reduce() is not compatible with ECMAScript5!
 */
!function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n=[].slice;b="pending",d="resolved",c="rejected",h=function(a,b){return null!=a?a.hasOwnProperty(b):void 0},j=function(a){return h(a,"length")&&h(a,"callee")},k=function(a){return h(a,"promise")&&"function"==typeof(null!=a?a.promise:void 0)},i=function(a,b,c){null==a&&(a=[]);for(var d=0,e=a.length;e>d;d++)c=b(c,a[d]);return c},g=function(a){return j(a)?g(Array.prototype.slice.call(a)):Array.isArray(a)?i(a,function(a,b){return Array.isArray(b)?a.concat(g(b)):(a.push(b),a)},[]):[a]},e=function(a,b){return 0>=a?b():function(){return--a<1?b.apply(this,arguments):void 0}},l=function(a,b){return function(){var c;return c=[a].concat(Array.prototype.slice.call(arguments,0)),b.apply(this,c)}},f=function(a,b,c){var d,e,f,h,i;for(h=g(a),i=[],e=0,f=h.length;f>e;e++)d=h[e],i.push(d.call.apply(d,[c].concat(n.call(b))));return i},a=function(){var e,h,i,j,l,m,o;return o=b,j=[],l=[],m=[],i={resolved:{},rejected:{},pending:{}},this.promise=function(e){var h,p;return e=e||{},e.state=function(){return o},p=function(a,c,d){return function(){return o===b&&c.push.apply(c,g(arguments)),a()&&f(arguments,i[d]),e}},e.done=p(function(){return o===d},j,d),e.fail=p(function(){return o===c},l,c),e.progress=p(function(){return o!==b},m,b),e.always=function(){var a;return(a=e.done.apply(e,arguments)).fail.apply(a,arguments)},h=function(b,c,d){var f,g;return g=new a,f=function(a,b,c){return c?e[a](function(){var a,d;return a=1<=arguments.length?n.call(arguments,0):[],d=c.apply(null,a),k(d)?d.done(g.resolve).fail(g.reject).progress(g.notify):g[b](d)}):e[a](g[b])},f("done","resolve",b),f("fail","reject",c),f("progress","notify",d),g},e.pipe=h,e.then=h,null==e.promise&&(e.promise=function(){return e}),e},this.promise(this),e=this,h=function(a,c,d){return function(){return o===b?(o=a,i[a]=arguments,f(c,i[a],d),e):this}},this.resolve=h(d,j),this.reject=h(c,l),this.notify=h(b,m),this.resolveWith=function(a,b){return h(d,j,a).apply(null,b)},this.rejectWith=function(a,b){return h(c,l,a).apply(null,b)},this.notifyWith=function(a,c){return h(b,m,a).apply(null,c)},this},m=function(){var b,c,d,f,h,i,j;if(c=g(arguments),1===c.length)return k(c[0])?c[0]:(new a).resolve(c[0]).promise();if(h=new a,!c.length)return h.resolve().promise();for(f=[],d=e(c.length,function(){return h.resolve.apply(h,f)}),c.forEach(function(a,b){return k(a)?a.done(function(){var a;return a=1<=arguments.length?n.call(arguments,0):[],f[b]=a.length>1?a:a[0],d()}):(f[b]=a,d())}),i=0,j=c.length;j>i;i++)b=c[i],k(b)&&b.fail(h.reject);return h.promise()},mmcore.Deferred=function(){return new a},mmcore.when=m}.call(this);

// Maxymiser Essentials - Wait for v0.1.1
!function(){"use strict";mmcore.waitFor=function(e,t){var i,o;return o=mmcore.Deferred(),o.isComplete=function(){return"pending"!==o.state()},t=t||{},t.interval=t.interval||50,t.isNotStoppedOnDocumentReadiness=t.isNotStoppedOnDocumentReadiness||!1,t.isNotPeriodicallyChecked=t.isNotPeriodicallyChecked||!1,i=function(){o.isComplete()||(e.call(o)&&o.resolve(),o.isComplete()||(!t.isNotStoppedOnDocumentReadiness&&(mmcore.$&&mmcore.$.isReady||!mmcore.$&&"complete"===document.readyState)?o.reject():t.isNotPeriodicallyChecked||setTimeout(i,t.interval)))},t.hasOwnProperty("initializer")&&t.initializer.call(o),i(),o.isComplete()||(t.hasOwnProperty("timeout")&&!function(){var e=setTimeout(o.reject,t.timeout);o.always(function(){clearTimeout(e)})}(),t.isNotStoppedOnDocumentReadiness||mmcore.AddDocLoadHandler(t.isNotPeriodicallyChecked?o.reject:i)),o.promise()}}();

// Maxymiser Core - Campaign v0.3.0 http://gitlab.maxymiser.net/gts/mmcore-campaign/tree/master
(function(){"use strict";function e(e,t){var n=false;for(var r=0;r<t.length;r++){if(t[r]===e){n=true}}return n}function n(e,t,n){this.name=e;this.maxyboxNames=t;this.prefix=n;this.preventDefaultRendering();this.preventDefaultHiding()}mmcore.Campaign=n;var t=function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++){r=!!t(e[s],s);if(n!==r){i.push(e[s])}}return i};n.prototype.preventDefaultRendering=function(){var e=mmcore._r_mbs;var t=this.maxyboxNames;var n=t.length;while(n--){e[t[n]]=1}};n.prototype.preventDefaultHiding=function(){var n=this;mmcore.HideMaxyboxes=function(r){return function(){var i=arguments;mmcore.tryCatch(function(){i=t(i,function(t){return e(t,n.maxyboxNames)})})();if(i.length){return r.apply(this,i)}}}(mmcore.HideMaxyboxes)};n.prototype.hideContent=function(e,t){var n;var r;var i;var s;var o=document.getElementsByTagName("html")[0];var u=o.getAttribute("class");this.hidingClass=this.prefix+"-hidden-content";if(u!==null&&u===""){u=this.hidingClass}else if(u==null){u=this.hidingClass}else{u=u+" "+this.hidingClass}o.setAttribute("class",u);if(arguments.length<2){t="left: -33554430px!important; position: absolute!important; top: -33554430px;!important"}n=this.hidingClass;s=e.split(",");i=s.length;r="";while(i--){r+="."+n+" "+s[i]+"{"+t+"}"}mmcore.AttachStyle(r)};n.prototype.showContent=function(){if(this.hasOwnProperty("hidingClass")){var e=document.getElementsByTagName("html")[0];var t=e.getAttribute("class");if(t!==null&&t!==""){t=t.replace(this.hidingClass,"");e.setAttribute("class",t)}}};n.prototype.getExperience=function(){return mmcore.GenInfo.hasOwnProperty(this.name)?mmcore.GenInfo[this.name]:null};n.prototype.hasNonDefaultExperience=function(){var e,t;e=this.getExperience();if(!e){return false}t=false;for(var n in e){if(e.hasOwnProperty(n)&&e[n]!=="Default"){t=true;return false}}return t};n.prototype.hasMaxybox=function(){return this.hasNonDefaultExperience()};n.prototype.renderMaxyboxes=function(){var n;var r;var i;r=this.maxyboxNames;if(arguments.length){r=t(arguments,function(t){return!e(t,r)})}n=this;for(i in mmcore._renderers){if(e(i,r)&&typeof mmcore._renderers[i]==="function"){mmcore._renderers[i].call(n)}}}})();

/*// Maxymiser Essentials - Request 0.2.0
(function(){"use strict";var t="event";var n=2250;var r;var i=function(){r=mmcore.Deferred();mmcore.request.promise=r.promise()};mmcore.request=function(e,s){var o=r;i();if(!arguments.length){e=t}mmcore.SetPageID(e);mmcore._async=!s;mmcore.CGRequest(o.resolve);setTimeout(mmcore.tryCatch(o.reject),n);return o.promise()};i()})();*/

// Maxymiser Essentials - Request 0.3.1
!function(){"use strict";function e(){o=mmcore.Deferred(),mmcore.request.promise=o.promise()}var o,r=Object.prototype.toString,t="[object Object]";mmcore.request=function(c,m,n){var s,i=3500,u=o,a=m||!1;return c=c||"event",m=m||!1,n="boolean"==typeof n?n:!1,s=Number(n)===n?n:i,e(),mmcore.SetPageID(c),r.call(a)===t?(mmcore._async="async"in a?Boolean(a.async):!0,s=a.timeout||s):mmcore._async=!m,mmcore.CGRequest(u.resolve),n||setTimeout(mmcore.tryCatch(function(){u.reject("timeout error")}),s),u.promise()},e()}();

//Maxymiser Essentials - Mediator 0.2.0
(function(){"use strict";function e(){var e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function t(n,r,i){if(!(this instanceof t)){return new t(n,r,i)}this.id=e();this.fn=n;this.options=r;this.context=i;this.channel=null}function n(e,t){if(!(this instanceof n)){return new n(e)}this.namespace=e||"";this._subscribers=[];this._channels=[];this._parent=t;this.stopped=false}function r(){if(!(this instanceof r)){return new r}this._channels=new n("")}t.prototype={update:function(e){if(e){this.fn=e.fn||this.fn;this.context=e.context||this.context;this.options=e.options||this.options;if(this.channel&&this.options&&this.options.priority!==undefined){this.channel.setPriority(this.id,this.options.priority)}}}};n.prototype={addSubscriber:function(e,n,r){var i=new t(e,n,r);if(n&&n.priority!==undefined){n.priority=n.priority>>0;if(n.priority<0){n.priority=0}if(n.priority>=this._subscribers.length){n.priority=this._subscribers.length-1}this._subscribers.splice(n.priority,0,i)}else{this._subscribers.push(i)}i.channel=this;return i},stopPropagation:function(){this.stopped=true},getSubscriber:function(e){var t=0,n=this._subscribers.length;for(t,n;t<n;t++){if(this._subscribers[t].id===e||this._subscribers[t].fn===e){return this._subscribers[t]}}},setPriority:function(e,t){var n=0,r=0,i,s,o,u;for(r=0,u=this._subscribers.length;r<u;r++){if(this._subscribers[r].id===e||this._subscribers[r].fn===e){break}n++}i=this._subscribers[n];s=this._subscribers.slice(0,n);o=this._subscribers.slice(n+1);this._subscribers=s.concat(o);this._subscribers.splice(t,0,i)},addChannel:function(e){this._channels[e]=new n((this.namespace?this.namespace+":":"")+e,this)},hasChannel:function(e){return this._channels.hasOwnProperty(e)},returnChannel:function(e){return this._channels[e]},removeSubscriber:function(e){var t=this._subscribers.length-1;if(!e){this._subscribers=[];return}for(t;t>=0;t--){if(this._subscribers[t].fn===e||this._subscribers[t].id===e){this._subscribers[t].channel=null;this._subscribers.splice(t,1)}}},publish:function(e){var t=0,n=this._subscribers.length,r=false,i,s,o,u;for(t,n;t<n;t++){r=false;if(!this.stopped){i=this._subscribers[t];if(i.options!==undefined&&typeof i.options.predicate==="function"){if(i.options.predicate.apply(i.context,e)){i.fn.apply(i.context,e);r=true}}else{o=this._subscribers.length;i.fn.apply(i.context,e);u=this._subscribers.length;n=u;if(u===o-1){t--}r=true}}if(r&&i.options&&i.options!==undefined){i.options.calls--;if(i.options.calls<1){this.removeSubscriber(i.id);n--;t--}}}if(this._parent){this._parent.publish(e)}this.stopped=false}};r.prototype={getChannel:function(e){var t=this._channels,n=e.split(":"),r=0,i=n.length;if(e===""){return t}if(n.length>0){for(r,i;r<i;r++){if(!t.hasChannel(n[r])){t.addChannel(n[r])}t=t.returnChannel(n[r])}}return t},subscribe:function(e,t,n,r){var i=this.getChannel(e);n=n||{};r=r||{};return i.addSubscriber(t,n,r)},once:function(e,t,n,r){n=n||{};n.calls=1;return this.subscribe(e,t,n,r)},getSubscriber:function(e,t){return this.getChannel(t||"").getSubscriber(e)},remove:function(e,t){this.getChannel(e).removeSubscriber(t)},publish:function(e){var t=Array.prototype.slice.call(arguments,1),n=this.getChannel(e);t.push(n);this.getChannel(e).publish(t)}};r.prototype.on=r.prototype.subscribe;r.prototype.bind=r.prototype.subscribe;r.prototype.emit=r.prototype.publish;r.prototype.trigger=r.prototype.publish;r.prototype.off=r.prototype.remove;r.Channel=n;r.Subscriber=t;mmcore.mediator=new r})();
}catch(err){mmcore.EH(err);}
try{
/**
 * Defines methods: mmcore.isB2B, mmcore.isB2C
 * 04.02.2015
 * Alexander Tytskiy
 */
;(function(mmcore) {
	mmcore.siteTools = mmcore.siteTools || {};

	function isInvalidAYSCcookie() {
		var cookieAYSC = mmcore.GetCookie('AYSC', true);

		if(!cookieAYSC || cookieAYSC === "\"\"" || !cookieAYSC.match(/\S*/)){
			return true;
		}

		return false;
	}

	function getFormattedAyscCookie() {
		var ayscCookie = mmcore.GetCookie('AYSC', 1),
			arr = ayscCookie.split('_'),
			i = arr.length,
			AYSC = {},
			sub = '';

		while (i--) {
			if (arr[i]) {
				sub = arr[i].substr(0, 2);
				AYSC[sub] = arr[i].replace(/(\d+){2}/, '');
			}
		}

		return AYSC;
	}

	//update Kate Nikolaeva 26.11.2015 return value of specified field
	function getAYSCCookieField(fieldNumber) {
		var AYSC = getFormattedAyscCookie();

		return AYSC[fieldNumber];
	}

	function getUserType() {
		var AYSC = getFormattedAyscCookie();

		var userType = (!AYSC['27'] || AYSC['27'] === 'PVT') ? 'B2C' : 'B2B';

		return isInvalidAYSCcookie() ? '' : userType;
	}

	// Detects if user is of B2B type.
	function isB2B() {
		return getUserType() === 'B2B';
	}

	// Detects if user is of B2C type.
	function isB2C() {
		return getUserType() === 'B2C';
	}

	// Define session by campaign name.
	// Doesn't handle new or subsequent cookie state.
	// onceStartFunc callback will be executed only if it's session start.
	//
	// Function to be call on first request and after generation done.
	// This will be tracked just once.
	// So first time we are starting session it will be started only after
	// generation done.
	//
	// This can be done by creating separated script and mapping it to very first
	// page (Whole site) and campaign generation page.
	//
	// Quick example:
	// mmcore.siteTools.startSession('T21_TimeFormat', function () {
	//     mmcore.SetAction('T21_Sessions', 1, '');
	//     mmcore.request();
	// });
	//
	// campaignName - campaign name as per admin UI, case sensitive
	// onceStartFunc - optional callback
	function startSession(campaignName, onceStartFunc) {
		var cookieName = 'mm_' + campaignName + '_',
			cookie = mmcore.GetCookie(cookieName, true),
			buffer = mmcore.GetCookie('mm_ses', true),
			generated = buffer.indexOf('|' + campaignName) > -1;

		if (
		    !cookie &&
		    (generated || mmcore.GenInfo[campaignName])
		) {
			if (!generated) {
				buffer = buffer + '|' + campaignName;
				mmcore.SetCookie('mm_ses', buffer, 364/2, true);
			}

			mmcore.SetCookie(cookieName, 1, 0, true);

			try {
                // Clean request URL.
                delete mmcore._vars[cookieName];
                delete mmcore._vars.mm_ses;

				if (typeof onceStartFunc === 'function') {
					onceStartFunc.call(null);
				}
			} catch (err) {
				mmcore.EH(new Error('Plugin_SiteTools.js. Message: ' + err));
			}
		}
	}

	// Debug.
	mmcore.isInvalidAYSCcookie = isInvalidAYSCcookie;

	////////////////////////////////////////////////////////////////////////////
	//                                                                        //
	//  DEPRECATED.                                                           //
	//  Now we use mmcore.siteTools namespace.                                //
	//  Remove bordered code once all campaigns using this code finished.     //
	//                                                                        //
	mmcore.isB2B = isB2B;
	mmcore.isB2C = isB2C;
	//                                                                        //
	////////////////////////////////////////////////////////////////////////////

	// API.
	mmcore.siteTools.isB2B = isB2B;
	mmcore.siteTools.isB2C = isB2C;
	mmcore.siteTools.getAYSCCookieField = getAYSCCookieField;
	mmcore.siteTools.startSession = startSession;
}(window.mmcore));

}catch(err){mmcore.EH(err);}
try{
// PCs:
//   Trial_Propens
//   Any_Propens
//   B2BorB2C
//   Discount
//   MarketoEmail

// Client Cookies:
//   SIVISITOR

// MM Cookies:
//   mm_pc_marketo_email (0)

/*
 * TEST_VISITOR_ID = 'synthetic_123_987'
 * 123 becomes any subscription probability (0.123).
 * 987 becomes trial subscription probability (0.987).
 */

;(function PCs_WholeSite(mmcore) {

	if (typeof(mmcore.SetPersistentCriterion) == 'function' && typeof(mmcore.GetPersistentCriterion) == 'function') {

		(function PC_Propensity() {
			
			var visitorId = mmcore.GetCookie('SIVISITOR', 1);
			var FT_User = mmcore.GetCookie('FT_User', 1);
			var isPCChecked = mmcore.GetCookie('mm_pc_propensity_checked', 1);

			if (visitorId.length && !FT_User.length && !isPCChecked) {

				function getPCValueForAny_Propensity(currentValue) {
					var pcValue;
					if (0 <= currentValue && currentValue < 0.3) {
						pcValue = '<0.3';
					} else if (0.3 <= currentValue && currentValue <= 0.5) {
						pcValue = '0.3 - 0.5';
					} else if (0.5 < currentValue && currentValue <= 0.8) {
						pcValue = '0.5 - 0.8';
					} else if (0.8 < currentValue && currentValue <= 1) {
						pcValue = '0.8 - 1.00';
					}
					return pcValue;
				}

				function getPCValueForTrial_Propensity(currentValue) {
					var pcValue;
					if (0 <= currentValue && currentValue < 0.8) {
						pcValue = '<0.8';
					} else if (0.8 <= currentValue && currentValue <= 1) {
						pcValue = '0.8 - 1.00';
					}
					return pcValue;
				}

				function setPC(numberObj) {
					var trialPropensity = numberObj.trialSubscriptionProbability;
					var anyPropensity = numberObj.anySubscriptionProbability;
					mmcore.SetPersistentCriterion('Trial_Propens', getPCValueForTrial_Propensity(trialPropensity));
					mmcore.SetPersistentCriterion('Any_Propens', getPCValueForAny_Propensity(anyPropensity));
				}

				function getPropensityNumbers(userId) {

					var mm_response;
					var xhr = new XMLHttpRequest();
					var url = 'https://api.ft.com/hui/visitors/' + userId;

					xhr.open('GET', url, true);
					xhr.onreadystatechange = function () {
						if (xhr.readyState === 4 && xhr.status === 200) {
							mm_response = JSON.parse(xhr.responseText || '{}').anonymousPropensity;
							if (mm_response) {
								setPC(mm_response);
								mmcore.mediator.trigger('mm_PCs_propensity', mm_response);
							}
						}
					};
					xhr.send();
					//set cookie to refresh PC and send request to HUI API just once per day
					mmcore.SetCookie('mm_pc_propensity_checked', 'true', 1, 1);
				}

				getPropensityNumbers(visitorId);
			}
		})();

		(function PC_b2c_b2b() {
			//B2BorB2C
			var userType = 'B2C';
			if (mmcore.siteTools.isB2B()) {
				userType = 'B2B';
			}
			mmcore.SetPersistentCriterion('B2BorB2C', userType);

			//Discount
			var discountValue = 'No';
			if ((location.hostname.indexOf('sub.ft.com') !== -1 && location.pathname.indexOf('spa_2') !== -1)
				|| (location.hostname.indexOf('sub.ft.com') !== -1 && location.pathname.indexOf('spa_7') !== -1 && location.search.indexOf('country=US') !== -1)
				|| (location.hostname.indexOf('sub.ft.com') !== -1 && location.pathname.indexOf('spa_6') !== -1)
				|| (location.hostname.indexOf('sub.ft.com') !== -1 && location.pathname.indexOf('spa_4') !== -1)) {
				discountValue = 'Yes';
			}
			if (mmcore.GetPersistentCriterion('Discount') !== 'Yes') {
				mmcore.SetPersistentCriterion('Discount', discountValue);
			}

			//MarketoEmail
			var marketoValue = 'NoMarketoEmail';

			if (location.search.indexOf('mkt_tok=') + 1) {
				marketoValue = 'MarketoEmail';
			}

			//reset value PC each session
			if (!mmcore.GetCookie('mm_pc_marketo_email', 1)) {
				mmcore.SetPersistentCriterion('MarketoEmail', marketoValue);
				mmcore.SetCookie('mm_pc_marketo_email', 1, 0, 1);
			}
		})();
	}
}(window.mmcore));
}catch(err){mmcore.EH(err);}
try{
;(function Plugin_iJentoCustom(){
	mmcore.trackiJentoCustom = function(name){
		var genInfo = mmcore.GenInfo[name],
			experience = '';

		if( genInfo ){
			for(var p in genInfo){
				if( genInfo.hasOwnProperty(p) ){
					experience += genInfo[p];
				}
			}

			document.body.dispatchEvent(
				new CustomEvent('oTracking.event', {
						detail: {
							category: 'maxymiser',
							action: 'campaign',
							campaign_id: name,
							variant_id: experience
						},
						bubbles: true
					}
				)
			);
		}
		else{
			mmcore.EH(new Error('script Plugin_iJentoCustom: Campaign ' + name + ' is undefined!'));
		}
	};
})();
}catch(err){mmcore.EH(err);}
try{
;(function Event_FloodlightTag() {
    var create_iframe = function (num_value) {
        num_value = num_value || 1;
        var new_iframe = document.createElement('iframe');
        new_iframe.src = 'https://4235225.fls.doubleclick.net/activityi;src=4235225;type=homeo886;cat=ft-ne0;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=1;num=' + num_value + '?';
        new_iframe.width = '1';
        new_iframe.height = '1';
        new_iframe.frameborder = '0';
        new_iframe.style.display = 'none';
        return new_iframe;
    };

    mmcore.waitFor(function() {
        return (document.body);
    }, {
        isNotStoppedOnDocumentReadiness: true,
        timeout: 5000
    }).done(function() {
        var axel = Math.random() + "";
        var a = axel * 10000000000000;

        var frame = create_iframe(a);
        document.body.appendChild(frame);

    });

})();
}catch(err){mmcore.EH(err);}
try{
// Maxymiser Core - Attach Style v0.0.0 http://gitlab.maxymiser.net/gts/mmcore-attach-style/tree/master
(function(){'use strict';mmcore.AttachStyle=function(){var c={STYLE_ID:"mm-style",createStyle:function(){var b=document.createElement("style");b.type="text/css";return b},appendCssToStyle:function(){var b,a;"styleSheet"in c.createStyle()?(b=function(a){return a.styleSheet.cssText},a=function(a,b){a.styleSheet.cssText=b}):(b=function(a){return a.innerHTML},a=function(a,b){a.innerHTML=b});return(c.appendCssToStyle=function(c,d){a(d,b(d)+c)}).apply(this,arguments)}};return function(b){var a=document.getElementById(c.STYLE_ID);a||(a=c.createStyle(),a.id=c.STYLE_ID,function(){this.parentNode.insertBefore(a,this)}.call(document.getElementsByTagName("head")[0].lastChild));c.appendCssToStyle(b,a)}}()})();
}catch(err){mmcore.EH(err);}
try{
!function(){var e=window.mmcore,t=1e3,n=function(){return(new Date).getTime()},a={_stack:[],_preventeds:{},_timestamp:n(),_timeout:5*t,_oldOnunloadFn:window.onunload,_isLocalStorageAvailable:!1,_storage:window.localStorage,_keyName:"mm_prevent_f5",getCurrentTimestamp:n,oncePerPageLoad:function(e,t,n){var r;return e="fn_"+e,n=n||0,a._preventeds[e]||t.call(null),r=a._constructItem(e,n),a._stack.push(r),a},initialize:function(){a._isLocalStorageAvailable=a.testLocalStorage(),a._fillPreventeds()._cleanExpired()._bindEvents()},testLocalStorage:function(){var e="mm_test";try{return a._storage.setItem(e,e),a._storage.removeItem(e),!0}catch(t){return!1}},isEmptyObj:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},_fillPreventeds:function(){try{a._preventeds=a._isLocalStorageAvailable?JSON.parse(a._storage.getItem(a._keyName))||{}:JSON.parse(e.GetCookie(a._keyName,!0))||{}}catch(t){a._preventeds={}}return a},_bindEvents:function(){return window.onunload=function(){for(var t,n=0,r=a._stack.length;r>n;n++)t=a._stack[n].split(":"),t[1]=parseInt(t[1],10),a._preventeds[t[0]]=t[1]?{timestamp:a.getCurrentTimestamp(),timeout:t[1]}:{timestamp:a.getCurrentTimestamp()};return a.isEmptyObj(a._preventeds)?a._isLocalStorageAvailable?a._storage.removeItem(a._keyName):e.SetCookie(a._keyName,"",-1,!0):a._isLocalStorageAvailable?a._storage.setItem(a._keyName,JSON.stringify(a._preventeds)):e.SetCookie(a._keyName,JSON.stringify(a._preventeds),0,!0),a._oldOnunloadFn?a._oldOnunloadFn.apply(this,arguments):void 0},a},_cleanExpired:function(){var e=!1,t=0;for(var n in a._preventeds)a._preventeds.hasOwnProperty(n)&&(t=a._preventeds[n].timeout||a._timeout,e=Boolean(+a._preventeds[n].timestamp+t<a._timestamp),e&&delete a._preventeds[n]);return a},_constructItem:function(e,t){return e+":"+t},_cleanRefreshManager:function(){a._preventeds={},a._stack=[],a._isLocalStorageAvailable?a._storage.removeItem(a._keyName):e.SetCookie(a._keyName,"",-1,!0)}};try{a.initialize(),e.oncePerPageLoad=a.oncePerPageLoad,e._cleanRefreshManager=a._cleanRefreshManager}catch(r){e.oncePerPageLoad=function(t,n){n.call(null),e.EH(new Error("Plugin_Refresh.js: something went wrong on plugin initialization. Executed possible prevented action. Possible reason: "+r))}}}();
}catch(err){mmcore.EH(err);}
try{
/*
* Plugin which clear cookies from paused or completed campaigns
* */
;(function () {
	var cookiesNames = [
		'mm_T21_full_art_read',
		'mm-t20-page-reload'
	];
	for (var i = 0; i < cookiesNames.length; i++) {
		mmcore.SetCookie(cookiesNames[i], '', -1, true);
	}
}());
}catch(err){mmcore.EH(err);}
try{
//      IntegrationFactory.js 2.1.1
//      2015 Vitaliy Sobur
//      vitaliy.sobur@maxymiser.com
mmcore.IntegrationFactory = mmcore.IntegrationFactory || {
    // Current version
    VERSION: '2.1.1',

    // Registered integrations
    integrations: {},

    // __Register__ new integration
    // `name`: integration name
    // `options`: integration options

    register: function (name, options) {
        // Add new integration to `integrations` object
        this.integrations[name] = {
            // Define input data validation
            validate: options.validate  || function () {return true;},
            // Define when to execute integration
            check: options.check        || function () {return true;},
            // Define time inteval for check performing
            interval: options.interval  || 50,
            // Define default properties
            defaults: options.defaults  || {},
            // Define integration execution
            exec: options.exec
        };
    },


    // __Initialize__ target integration
    // `name`: integration name
    // `data`: campaign data
    initialize: function (name, data) {
        // Get target integration
        var integration = this.integrations[name],
            helpers = this._helpers,
            validationError;

        // Check if integration `name` is defined
        if (!name) return helpers.logError(errorMessages[0], name);

        // Check if integration execution method is defined
        if (!integration.exec) return helpers.logError(errorMessages[1], name);

        // Check whether the campaign is redirect campaign
        if (data.redirect &&
            // Check whether current page is generation page
            helpers.isGenerationPage(data.campaign) &&
            // Check whether there is non-default experience
            helpers.hasNoneDefaultExperience(data)) {
                // Save target campaign experience in case of redirect campaign
                helpers.saveCampaignExperience(data);
        } else {
            // Add target campaign info to the `data` object if doesn't exist
            data.campaignInfo = data.campaignInfo || helpers.getCampaignInfo(data);

            // Check if target campaign info exists
            if (data.campaignInfo) {
                // Add production check info to the `data` object
                data.isProduction = helpers.isProduction();
                // Validate entry data and get possible errors
                validationError   = helpers.isValidData.call(integration, name, data);
                // Check if `validationError` variable contains error message
                if (typeof validationError === 'string') {
                    // Log validation error
                    helpers.logError(validationError, name);
                } else {
                    // Execute defined modifiers
                    helpers.executeModifieres.call(integration, data, integration);
                    // Send target campaign information to third-party
                    helpers.sendIntegrationData.call(integration, data);
                }
            }
        }

    },

    // ### Helper methods ###
    _helpers: {
        // List of possible integration error messages
        errorMessages: [
            'Invalid integration build, name is required.',
            'Invalid integration build, exec is required.'
        ],

        // __Log errors__
        logError: function (message, integrationName) {
            mmcore.EH(
                {message: '[' + (integrationName ? integrationName : 'Integration') + '] ' + message}
            );
        },

        isGenerationPage: function (campaignName) {
            return mmcore.GenInfo[campaignName];
        },

        hasNoneDefaultExperience: function (data) {
            var experience = this.getCampaignExperience(data),
                hasNonDefaultExperience = false,
                key;

            for (key in experience) {
                if (experience.hasOwnProperty(key) &&
                    (experience[key] !== 'Default')) {
                    hasNonDefaultExperience = true;
                    break;
                }
            }

            return hasNonDefaultExperience;
        },

        // __Get__ target campaign __experience__
        getCampaignExperience: function (data) {
            // Get info from `mmcore.GenInfo` object
            var experience = mmcore.GenInfo[data.campaign];

            // Get campaign info from the cookie if campaign type is redirect
            if (data.redirect && !experience) {
                experience = JSON.parse(mmcore.GetCookie('mm_redir_' + data.campaign, 1) || '{}');
            }

            return experience;
        },

        // __Save__ target campaign __experience__ to cookies
        saveCampaignExperience: function (data) {
            // Get campaign name
            var campaignName = data.campaign,
            // Get campaign experience
                experience = mmcore.GenInfo[data.campaign];
            // Save campaign experince
            mmcore.SetCookie('mm_redir_' + campaignName, JSON.stringify(experience), 0, 1);
        },

        // __Get campaign info__ in client-friendly format
        // `MyCampaign_=element1:variant|element2:variant`
        getCampaignInfo: function (data) {
            var experience = this.getCampaignExperience(data),
                campaignInfo = [],
                element;

            // Log error if target campaign isn't generated
            if (!experience) return this.logError(data.campaign + ' is not found.');

            // Collect campaign experience
            for (var element in experience) {
                campaignInfo.push(element + ':' + experience[element]);
            }

            // Format and return campaign info
            return data.campaign + '=' + campaignInfo.join('|');
        },

        // __Check__ whether the page in __production mode__
        isProduction: function () {
            var params = ['cfgid', 'opc.enabled', 'opc.vis', 'pt.enabled', 'un'],
                i = 0;

            for(; i < params.length; i ++) {
                if (mmcore.GetParam(params[i])) {
                    return false;
                }
            }

            return true;
        },

        // __Check__ whether provided target camapaign __data is valid__
        isValidData: function (name, data) {
            return this.validate.call(this, data);
        },

        // __Execute__ defined __modifier__ methods
        executeModifieres: function (data, integration) {
            var modifiers = this.defaults.modifiers,
                modifier;

            if (modifiers) {
                for(modifier in modifiers) {
                    modifiers[modifier].call(integration, data, integration);
                }
            }
        },

        // __Execution__ of `exec` method defined in target integration
        sendIntegrationData: function (data) {
            var integration = this;

            // Check if third-party end point is available on the page
            (function checker() {
                if (integration.check(data)) {
                    // Execute integration
                    integration.exec(data);
                } else {
                    // Countinue checking if `isStopOnDocEnd` equals true
                    // or `DOM` isn't loaded yet
                    if (!integration.defaults.isStopOnDocEnd || !mmcore._docEnd) {
                        setTimeout(checker, integration.interval);
                    }
                }
            })();
        }
    }
};
}catch(err){mmcore.EH(err);}
try{
;
(function t24b2b_check() {

	mmcore.AddDocLoadHandler(function () {});

	var campaign = new mmcore.Campaign('T24_B2B_NikkeiTrial', ['A_NikkeiBarr', 'B_NikkeiSubs'], 't24_b2b'),
		attachStyle = function (text) {
			var css = text,
				head = document.head || document.getElementsByTagName('head')[0],
				style = document.createElement('style');

			style.type = 'text/css';
			if (style.styleSheet) {
				style.styleSheet.cssText = css;
			} else {
				style.appendChild(document.createTextNode(css));
			}

			head.appendChild(style);
			return style;
		},
		showContent = function (styleName) {
			if (styleName && styleName.parentNode) {
				styleName.parentNode.removeChild(styleName);
			}
		},
		mm_t24_style,
		UNLOAD_COOKIE_NAME = 'mm_t24b2b_ts';

	function setCookieOnUnload() {
		window.addEventListener('unload', function () {
			mmcore.SetCookie(UNLOAD_COOKIE_NAME, 1, 15 / 86400, 1);
		});
		window.addEventListener('pagehide', function () {
			mmcore.SetCookie(UNLOAD_COOKIE_NAME, 1, 15 / 86400, 1);
		});
	}

	var is_barrier = /Authorised\=false/gi.test(window.location.href),
		is_logged_out = !mmcore.GetCookie('FT_User', 1),
		is_nikkei_trial = (window.location.href.indexOf('FTCamp=engage/CAPI/webapp/Channel_NikkeiTelecom//B2B') > -1);

	if (/67d73ce1-f516-4d3a-b752-d6d9b24f2976/.test(location.href) && mmcore.GetCookie('mm_t24b2b', 1)) {
		//Element B on load:
		mm_t24_style = attachStyle('#main {left: -33554430px; position: relative;}');

		setCookieOnUnload();

		mmcore
			.request('T24_B2B_JoinPage', {
				timeout: 5000
			})
			.done(function () {
				mmcore.AddDocLoadHandler(function () {
					campaign.renderMaxyboxes();
					showContent(mm_t24_style);
				});
			})
			.fail(function () {
				showContent(mm_t24_style);
			});

	} else if (/join\.ft\.com\/login/i.test(location.href) && mmcore.GetCookie(UNLOAD_COOKIE_NAME, 1)) {

		setCookieOnUnload();

		mm_t24_style = attachStyle('#main {left: -33554430px; position: relative;}');
		mmcore.waitFor(function () {
				return (document.querySelectorAll('#signup, #login').length > 1);
			})
			.done(function () {
				mmcore
					.request('T24_B2B_JoinPage', {
						timeout: 5000
					})
					.done(function () {
						mmcore.AddDocLoadHandler(function () {
							campaign.renderMaxyboxes();
							showContent(mm_t24_style);
						});
					})
					.fail(function () {
						showContent(mm_t24_style);
					});

			})
			.fail(function () {
				showContent(mm_t24_style);
			});

	} else if (is_nikkei_trial && is_barrier && is_logged_out) {
		mm_t24_style = attachStyle('.barrier-dialogue, #barrier-dialogue,   #assanka_mockingbird{left: -33554430px !important; position: relative !important;}');

		mmcore.waitFor(function () {


				var is_not_corporate_barrier = (function () {
					var p = null;
					if (!window.jQuery) {
						return null;
					}
					if (jQuery('#barrier-dialogue[data-barrier-type="CORPORATE"]').length) {
						//false means: element IS present
						p = false;
					} else if (jQuery('.barrier-dialogue').length) {
						//true means: element IS NOT present
						p = true;
					}
					if (jQuery('#assanka_mockingbird').length) {
						try {
							if (jQuery('#assanka_mockingbird').length && jQuery('#assanka_mockingbird').contents().find('#barrier-dialogue[data-barrier-type="CORPORATE"]').length) {
								//false means: element IS present
								p = false;
							} else if (jQuery('#assanka_mockingbird').contents().find('.barrier-dialogue').length) {
								//true means: element IS NOT present
								p = true;
							}
						} catch (err) {
							//null means: We don't know exacly is element is present
							p = null;
						}
					}
					return p;
				}());

				var is_nikkei_logo_not_present = (function () {
					var p = null;
					if (!window.jQuery) {
						return null;
					}
					if (jQuery('.barrier-dialogue img[alt*="Nikkei"]').length) {
						//false means: logo IS present
						p = false;
					} else if (jQuery('.barrier-dialogue + *').length) {
						//true means: logo IS NOT present
						p = true;
					}
					if (jQuery('#assanka_mockingbird').length) {
						try {
							if (jQuery('#assanka_mockingbird').length && jQuery('#assanka_mockingbird').contents().find('.barrier-dialogue img[alt*="Nikkei"]').length) {
								//false means: logo IS present
								p = false;
							} else if (jQuery('#assanka_mockingbird').contents().find('.barrier-dialogue + *').length) {
								//true means: logo IS NOT present
								p = true;
							}
						} catch (err) {
							//null means: We don't know exacly is Nikkei logo is present
							p = null;
						}
					}
					return p;
				}());

				return window.jQuery && window.jQuery('#barrier-dialogue, .barrier-dialogue, #assanka_mockingbird').length && is_nikkei_logo_not_present && is_not_corporate_barrier;
			}, {
				isNotStoppedOnDocumentReadiness: true,
				timeout: 12000
			})
			.then(function () {
				return mmcore
					.request('T24_B2B_Page', {
						timeout: 5000
					});
			})
			.done(function () {
				mmcore.SetCookie('mm_t24b2b', '1', 60, 1);
				campaign.renderMaxyboxes();
			})
			.always(function () {
				setTimeout(function () {
					showContent(mm_t24_style);
				}, 0);
			});
	}

}());
}catch(err){mmcore.EH(err);}
try{
/*
 * Created on 02.07.2015 by Kate Nikolaeva to determine If user b2b or b2c
 * */
;(function (mmcore) {
	var userType = 'B2C';

	if (mmcore.siteTools.isB2B()) {
		userType = 'B2B';
	}

	mmcore.SetPersistentCriterion('B2BorB2C', userType);

}(window.mmcore));
}catch(err){mmcore.EH(err);}
try{
mmcore.IntegrationFactory.register(
  'iJento', {
    defaults: {
      modifiers: {
        Persist: function(data, buildParams){
          if (data.persist && (data.persistentCount || this.defaults.persistentCount)) {
            try {
              var storedList = JSON.parse(mmcore.GetCookie('mm_iPersist', 1) || '[]');
            } catch (e) {
              var storedList = [];
            };

            var searchFor = data.campaign + '=';
            for (var i = storedList.length; i --;) {
              if(!(storedList[i].indexOf(searchFor))) {
                  storedList.splice(i, 1);
              }
            }
            storedList.push(data.campaignInfo);
            while(storedList.length > data.persistentCount)
              storedList.shift();

            mmcore.SetCookie('mm_iPersist', JSON.stringify(storedList), 365, 1);
            data.campaignInfo = storedList.join('&');
          }
        }
      },
      persistentCount: 5
    },
    validate: function (data) {  
      if(!data.campaign)
        return 'No campaign.';
      return true;  
    },
    check: function (data) {  
      return window.si && window.si.sendAdditionalTracer;
    },
    exec: function (data) {  
      var prodSand = data.isProduction ? 'MM_Prod' : 'MM_Sand',
          mvtData = prodSand + "_" + data.campaignInfo;
      window.si.sendAdditionalTracer("/MVT", "creativeID=" + mvtData);
      if (data.callback) data.callback();
      return true;
    }  
});
}catch(err){mmcore.EH(err);}
try{
(function() {

	var userCookie = mmcore.GetCookie('FT_User', 1),
		visitorID = (userCookie.match(/USERID=([^:]+)/) || [])[1];

	if (visitorID) {
		if(mmcore.SetPersistentVID) {
			mmcore.SetPersistentVID(visitorID);
		} else {
			mmcore.SetVisitorID(visitorID);
		}
	}

})();
}catch(err){mmcore.EH(err);}
try{
/**
 * 11.09.2014
 * Track all campaigns automatically
 * A. Tytskiy
 *
 * Dependencies: [Plugin_Essentials.js:mmcore.waitFor,
 * 				  Plugin_Helpers.js:mmcore.helpers]
 */
(function (mmcore) {
	'use strict';

	var TIMEOUT = 8000;
	var track = function () {

		mmcore.ijento = mmcore.ijento || {};

		mmcore.AddDocLoadHandler(function () {
			if (!mmcore.GenInfo || !mmcore.waitFor) {
				return;
			}

			if (mmcore.helpers && window.si && window.si.sendAdditionalTracer) {
				mmcore.helpers.iJentoTag();
			} else {
				mmcore
					.waitFor(function () {
						return mmcore.helpers && window.si && window.si.sendAdditionalTracer;
					}, { isNotStoppedOnDocumentReadiness: true, timeout: TIMEOUT })
					.done(function () {
						mmcore.helpers.iJentoTag();
					});
			}
		});
	};

	track();
	track = null;
}(window.mmcore));

}catch(err){mmcore.EH(err);}
try{
/**
 * 05.11.2014
 * Track article view without barrier on page
 * Alexander Tytskiy
 *
 * Dependencies: ['mmcore.waitFor', 'mmcore.mediator', 'mmcore.request', 'window.jQuery']
 */
(function () {
	'use strict';

	var mmcore = window.mmcore;
	var hostname = window.location.hostname;

	// don't waste time on registration/subscription domains
	if (hostname.indexOf('registration.ft.com') > -1 ||
		hostname.indexOf('sub.ft.com') > -1) {
		return;
	}

	var checkCommonConditions = function () {
		return window.jQuery && window.jQuery.fn.on;
	};

	var checkCorporateLiknkOnPlace = function () {
		return window.jQuery('#iaiBody a[href*="ftcorporate.ft.com"]').length;
	};

	var oncejQueryFound = function () {
		// use AddDocLoadHandler to not make browser calculation before actually page loaded
		// our barrier arrives asyncronously
		mmcore.AddDocLoadHandler(function () {
			try {
				bindCommonEvents();
			} catch (error) {
				if (typeof mmcore.EH === 'function') {
					mmcore.EH(new Error('Act_RegBarrierClicks.js: Cannot track an bind events. Possible reason: ' + error));
				}
			}

			mmcore
				.waitFor(checkCorporateLiknkOnPlace, {
					isNotStoppedOnDocumentReadiness: true,
					timeout: 7 * 1000
				})
				.done(onceCorporateLinkOnPlace);
		});
	};

	var oncejQueryNotFound = function () {
		if (typeof mmcore.EH === 'function') {
			mmcore.EH(new Error("Act_RegBarrierClicks.js: Cannot find jQuery. Don't care about this error if it's not the barrier page."));
		}
	};

	// common events means all events except Corporate click
	var bindCommonEvents = function () {
		var $ = window.jQuery;
		var $document = $(document);

		$document.on('mousedown', '#matrix a', function (event) {
			var isRegBarrier = window.HurdleType === 'h1';
			var $target = $(event.target).closest('a');
			var href = $target.attr('href');

			if (event.which === 1 && !event.metaKey && isRegBarrier && !$target[0].mmClicked) {
				var attr = '';
				var className = $target.attr('class');

				// map attr by default class name
				if (href.indexOf('//registration.ft.com/signup/register') > -1) {
					attr = 'Registration';
				} else if (className.indexOf('P1Signup') > -1) {
					attr = 'Standard';
				} else if (className.indexOf('P2Signup') > -1) {
					attr = 'Premium';
				} else if (className.indexOf('P4Signup') > -1) {
					attr = 'Bundle';
				}

				if (attr) {
					$target[0].mmClicked = true;
					mmcore.$Action('RegBarrierClicks', 1, attr);
				}
			}
		});

		$document.on('mousedown', '#iaiBody a[href*="www.ftsub.com/WWAAB"]', function (event) {
			var isRegBarrier = window.HurdleType === 'h1';
			var $target = $(event.target);

			if (event.which === 1 && !event.metaKey && isRegBarrier && !$target[0].mmClicked) {
				$target[0].mmClicked = true;
				mmcore.$Action('RegBarrierClicks', 1, 'Newspaper');
			}
		});
	};

	var onceCorporateLinkOnPlace = function () {
		var elem = window.jQuery('#iaiBody a[href*="ftcorporate.ft.com"]')[0];
		var oldOnclick = elem.onclick;
		var isTracked = false;
		var isAllow = false;

		elem.onclick = function (event) {
			if (!isTracked) {
				if (event.preventDefault) {
					event.preventDefault();
				}

				if (event.stopImmediatePropagation) {
					event.stopImmediatePropagation();
				}

				if (event.stopPropagation) {
					event.stopPropagation();
				}

				mmcore.SetAction('RegBarrierClicks', 1, 'Corporate');
				mmcore.request()
					.done(function () {
						var $elem = window.jQuery('#iaiBody a[href*="ftcorporate.ft.com"]');

						isTracked = true;
						isAllow = true;
						simulateNativeClick($elem[0]);
					})
					.fail(function () {
						var $elem = window.jQuery('#iaiBody a[href*="ftcorporate.ft.com"]');

						isAllow = true;
						simulateNativeClick($elem[0]);
					});

			}

			if (isAllow && typeof oldOnclick === 'function') {
				oldOnclick.apply(this, arguments);
			}
		};
	};

	var simulateNativeClick = function (element) {
	    if('createEvent' in document) {
	        var doc = element.ownerDocument,
	            evt = doc.createEvent('MouseEvents');
	        evt.initMouseEvent('click', true, true, doc.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
	        element.dispatchEvent(evt);
	    } else {
	        element.click(); // IE
	    }
	};

	mmcore
		.waitFor(checkCommonConditions)
		.done(oncejQueryFound)
		.fail(oncejQueryNotFound);
}());

}catch(err){mmcore.EH(err);}
try{
(function(){mmcore._async=true;mmcore.SetPageID('AsyncPageWS');mmcore.CGRequest()}());
}catch(err){mmcore.EH(err);}
try{
mmcore.AddDocLoadHandler(function ActBarrierClicks() {
	var isBarrierPresent = window.location.href.indexOf('Authorised=false.html') + 1,
		$ = window.jQuery;

	if (isBarrierPresent) {
		$(document).on('click', '.barrier-matrix a', function () {
			var attr = '',
				href = $(this).attr('href'),
				term = $(this).attr('data-subscription-term'),
				suffix = '';

			suffix = (term === 'annually') ? '_A' : '_M';

			if (href.indexOf('https://subscription.ft.com/?offerId=') + 1) {
				attr = 'Trial';
			} else if (href.indexOf('https://subscription.ft.com/signup/standard?') + 1) {
				attr = 'Standart' + suffix;
			} else if (href.indexOf('https://subscription.ft.com/signup/premium?') + 1) {
				attr = 'Premium' + suffix;
			} else if (href.indexOf('https://sub.ft.com/') + 1) {
				attr = 'PrintPremium' + suffix;
			}

			mmcore.$Action('BarrierClicks', 1, attr);
		});
	}
});
}catch(err){mmcore.EH(err);}
try{
;(function (m) {  
	'use strict';  
  
	function Campaign(config) {  
		this._objStyle = {};  
		this._config = config;  
		this.name = config.name;  
		this.mmPath = config.mmPath;  
	}  
	Campaign.prototype.addStyle = (function () {  
		var cg1 = document.getElementById(m.cprefix + '1'), st;  
		return function (css, name) {  
			st = this._objStyle[name];  
			name = name || "mm_style";  
			if (!st) {  
				st = document.createElement("style");  
				st.type = "text/css";  
				cg1.parentNode.insertBefore(st, cg1);  
				this._objStyle[name] = st;  
			}  
			if (st.styleSheet) {  
				st.styleSheet.cssText += css;  
			} else {  
				st.innerHTML += css;  
			}  
		};  
	}());  
	Campaign.prototype.removeStyle = function (name) {  
		var st = this._objStyle[name];  
		name = name || "mm_style";  
		if (st) {  
			st.parentNode.removeChild(st);  
		}  
		delete this._objStyle[name];  
	};  
	Campaign.prototype.preloadImages= function (tc) {  
		if (!tc) {  
			return false;  
		}  
		var self = this, mb, con, v, tcc, src, i, gi = m.GenInfo[self._config.name];  
		self.mb = {};  
		self._rmb = [];  
		for (mb in tc) {  
			if (tc.hasOwnProperty(mb)) {  
				v = gi[mb.toLowerCase()];  
				self.mb[mb] = v;  
				if (!/undefined|default/i.test(v)) {  
					self._rmb.push(mb);  
					if (!self._config.mmPath) {  
						continue;  
					}  
					for (con in tc[mb]) {  
						if (tc[mb].hasOwnProperty(con)) {  
							tcc = tc[mb][con];  
							i = tcc.length;  
							while (i--) {  
								tc[mb][con][i] = tcc[i].replace(/\[mm_path\]([^)'"]+)/g, function (m, img) {  
									src = (new Image()).src = self._config.mmPath + img;  
									return src;  
								});  
							}  
						}  
					}  
				}  
			}  
		}  
		return self._rmb.length;  
	};  
	Campaign.prototype.render = function () {  
		var self = this,  
			isAsync = !!self._config.pageID,  
			content = {  
				show: function () {  
					self.removeStyle(self._config.name);  
				},  
				hide: function () {  
					self.addStyle(self._config.hide + '{position: relative; left:-10000px}', self._config.name);  
				}  
			},  
			checker = (function () {  
				var is_checker_set = typeof self._config.checker === 'function',  
					exit = (isAsync) ? false : m._docEnd;  
				return function () {  
					return is_checker_set ? (self._config.checker() || exit) : m._docEnd;  
				};  
			}()),  
			stopChecker = (function () {  
				var is_checker_set = typeof self._config.stopChecker === 'function',  
					exit = m._docEnd;  
				if (isAsync) {  
					exit = false;  
					setTimeout(function () { exit = true; }, self._config.checkerTimeout || 5000);  
				}  
				return function () {  
					return is_checker_set ? (self._config.stopChecker() || exit) : exit;  
				};  
			}());  
		if (isAsync || self.preloadImages(tc || null)) {  
			content.hide();  
		} else {  
			return;  
		}  
		(function waiter() {  
			if (checker()) {  
				if (isAsync) {  
					m._async = true;  
					m.SetPageID(self._config.pageID);  
					if (typeof self._config.beforeCGRequest === 'function') {  
						self._config.beforeCGRequest();  
					}  
					m.AddDocLoadHandler(function () {});  
					m.CGRequest(function () {  
						m.AddDocLoadHandler(function () {  
							if (typeof self._config.afterCGRequest === 'function') {  
								self._config.afterCGRequest();  
							}  
							content.show();  
						});  
					});  
					m.HideMaxyboxes = function () {};  
					setTimeout(content.show, self._config.emergencyOpenTimeout || 3000);  
				} else if (self._rmb.length) {  
					m.RenderMaxyboxes(self._rmb);  
					content.show();  
				}  
			} else if (!stopChecker()) {  
				setTimeout(waiter, 50);  
			} else {  
				content.show();  
			}  
		}());  
	};  
	m.initCampaign = function (config) {  
		return new Campaign(config);  
	};  
}(window.mmcore));  
}catch(err){mmcore.EH(err);}
try{
// Please DO NOT use this functionality anymore
// Current dependencies preventing this script from removing:
// - T6ArticleRefer (LIVE)
// - T7PaymentFailure (LIVE)
// - T5PremiumBarrier_wave2 (LIVE)
// - T29_ArticleRefer (PAUSED)

;(function ( m ) {
	m.initCampaignForUser = function(){};

	var cookie, usr, S;

	cookie = m.GetCookie( 'AYSC', 1 );

	if(!cookie || cookie === "\"\"" || !cookie.match(/\S*/)){
		return;
	}

	usr = cookie.match( /PVT_27[A-Za-z0-9]{4,13}/ )? 'B' :'C';

	S = (function () {
		var style, isStyle, mmcoreFR;
		mmcoreFR = document.getElementById( 'mmcore.1' );
		isStyle = function ( style ) { return style && style.nodeType === 1 && style.nodeName.toLowerCase() === 'style'; };
		return {
			attachStyle: function ( text, styleOut ) {
				if ( !text || typeof text !== 'string' || text === '' ) { return false; }
				if ( isStyle( styleOut ) ) { style = styleOut; } else {
					style = document.createElement( 'style' );
					style.type = 'text/css';
				}
				if ( style.styleSheet ) { style.styleSheet.cssText += text; } else { style.innerHTML += text;}
				mmcoreFR.parentNode.insertBefore( style, mmcoreFR );
				return style;
			},
			removeStyle: function ( styleOut ) {
				if ( !styleOut ) { styleOut = style; }
				if ( isStyle( styleOut ) && styleOut.parentNode ) { styleOut.parentNode.removeChild( styleOut ); } else { return false; }
				return true;
			}
		};
	}());


	m.initCampaignForUser = function ( user, testname, cssSelectorOrCustomRender, onWrongUser ) {
		var style, cssSelector, customRenderer;

		if ( user.toUpperCase() !== usr ) {
			if ( typeof onWrongUser === 'function' ) {
				onWrongUser.call(null, user, testname);
			}
			return;
		}

		if ( cssSelectorOrCustomRender ) {
			if ( typeof cssSelectorOrCustomRender === 'function' ) {
				customRenderer = cssSelectorOrCustomRender;
			} else {
				cssSelector = cssSelectorOrCustomRender;
				style = S.attachStyle( cssSelector + '{ position: relative !important; left: -9999px !important; }' );

				setTimeout( function () {
					S.removeStyle( style );
				}, 5000 );
			}
		}

		if ( typeof customRenderer === 'function' ) {
			customRenderer.call(null, user, testname);
		} else {
			m._async = true;
			m.HideMaxyboxes = function () {};
			m.SetPageID( testname + '_pageID' );
			m.CGRequest( function () {
				if ( cssSelector ) {
					m.AddDocLoadHandler( function () {
						setTimeout( function () {
							S.removeStyle( style );
						} );
					} );
				}
			} );
		}
	};

}( window.mmcore ));

}catch(err){mmcore.EH(err);}
try{
!function(o,e){var n;n=function(){this.props={price:{monthly:{newspaper:{europe:"&euro;98.15",GBR:"&pound;76.05",USA:"$64.68",AUS:"N/A",HKG:"$552.50",SGP:"$96.96",JPN:"&yen;13,520.00",CHE:"CHF 157.19",other:"N/A"},premium:{europe:"&euro;47.19",GBR:"&pound;40.95",USA:"$51.52",AUS:"$48.30",HKG:"$388.50",SGP:"$63.05",JPN:"&yen;6,088.00",CHE:"CHF 52.65",other:"$51.52"},standard:{europe:"&euro;33.00",GBR:"&pound;29.00",USA:"$35.00",AUS:"$33.00",HKG:"$270.00",SGP:"$43.00",JPN:"&yen;4,800.00",CHE:"CHF 36.00",other:"$35.00"},trial:{europe:"&euro;1",GBR:"&pound;1",USA:"$1",AUS:"$1",HKG:"$10",SGP:"$1",JPN:"&yen;100",CHE:"CHF 1",other:"$1"}},annual:{newspaper:{europe:"&euro;17.42",GBR:"&pound;13.50",USA:"$11.48",AUS:"N/A",HKG:"$98.08",SGP:"$17.21",JPN:"&yen;2,400.00",CHE:"CHF 27.90",other:"N/A"},premium:{europe:"&euro;8.39",GBR:"&pound;7.15",USA:"$8.99",AUS:"$8.59",HKG:"$68.99",SGP:"$11.15",JPN:"&yen;1,090.00",CHE:"CHF 9.25",other:"$8.99"},standard:{europe:"&euro;5.75",GBR:"&pound;5.19",USA:"$6.25",AUS:"$5.99",HKG:"$47.99",SGP:"$7.69",JPN:"&yen;849.00",CHE:"CHF 6.39",other:"$6.25"},trial:{europe:"&euro;1",GBR:"&pound;1",USA:"$1",AUS:"$1",HKG:"$10",SGP:"$1",JPN:"&yen;100",CHE:"CHF 1",other:"$1"}}},europe:["ALB","AUT","BEL","BGR","CYP","CZE","DNK","EST","FIN","FRA","PYF","DEU","GRC","HUN","IRL","ITA","LVA","LIE","LTU","LUX","MLT","MDA","MCO","MNE","NLD","NLD","NOR","POL","PRT","ROU","SRB","SVK","SVN","ESP","SWE","CHE","TUR"]}},n.prototype.iJento=function(o,n,r,t){var i,a,p,c,s,d,u,w,f,$,S,C;w="error",C="log",f=window.console&&"function"==typeof window.console[w],$=window.console&&"function"==typeof window.console[C],S=f&&t,i=window.mmcore.GenInfo,p="creativeID=",e.waitFor(function(){var o=window.si;return o&&o.sendAdditionalTracer}).done(function(){var e,f;if(!i)return void(S&&window.console[w]("iJento: ("+o+") Please wait mmcore.GenInfo"));if(!o)return void(S&&window.console[w]("iJento: ("+(o||"undefined")+") Please set campaign name as per admin UI for iJento tracking"));if(!n||!Object.prototype.toString.call(n).toLowerCase().match(" string"))return void(S&&window.console[w]("iJento: ("+o+") Please set campaign prefix for iJento tracking"));if(!r||!Object.prototype.toString.call(r).toLowerCase().match(" object"))return void(S&&window.console[w]("iJento: ("+o+") Please set variants mapping for iJento tracking"));if(a=i[o],!a)return void(S&&window.console[w]("iJento: ("+o+") Campaign wasn't generated"));p+=n.toUpperCase();for(e in r)if(r.hasOwnProperty(e)&&(s=e.split(" "),d=s[0].toUpperCase(),u=s[1].toLowerCase(),a[u]))for(f in r[e])if(r[e].hasOwnProperty(f)){if(c=f.toLowerCase(),"Default"===a[u]){p=p+"|"+d+1;break}if(a[u]===c){p=p+"|"+d+r[e][f];break}}return t&&$?void(p==="creativeID="+n.toUpperCase()?S&&window.console[w]("iJento: ("+o+") Something is wrong with variants mapping\n"+JSON.stringify(r)):window.console[C]("/MVT, "+p)):(window.si.sendAdditionalTracer("/MVT",p),"/MVT, "+p)})},n.prototype.objectForEach=function(o,e){for(var n in o)o.hasOwnProperty(n)&&"function"==typeof e&&e(o[n],n,o)},n.prototype.iJentoTag=function(){var o,n;e.GetCookie("opc.enabled")||"1"===e.GetCookie("cfgID")||(o=this,n=e.GetCookie("mm_ijento_sent",!0),this.objectForEach(e.GenInfo,function(r,t){if(!(n.indexOf(t+"|")>-1)){var i="creativeID="+t;o.objectForEach(r,function(o,e){i=i+"|"+e+" "+o}),window.si.sendAdditionalTracer("/MVT",i),n=n+t+"|",e.SetCookie("mm_ijento_sent",n,128,!0)}}))},e.helpers=new n}(window,window.mmcore);
}catch(err){mmcore.EH(err);}
try{
;(function() {
   mmcore.trackSessionCam = function(testName, cust_page) {

    mm_sc_info="";

      /*Analyse GenInfo and obtain Variants shown*/
      var gen = mmcore.GenInfo; 
      for (var element in gen[testName]) {
         if (gen[testName].hasOwnProperty(element)) {
            if (gen[testName][element] === "Default") {
            mm_sc_variant = element + '_' + gen[testName][element];
            }
            else {
            mm_sc_variant = gen[testName][element];
            }
            /*Check if OPC is installed or sandbox enabled. 
            If it is prefix experience with OPC so we know what sessions were QA sessions
            */
            if (mmcore.GetCookie('opc.enabled') || mmcore.GetCookie('cfgid')) {
            mm_sc_info += "OPC_" + mm_sc_variant + '|';
            }
            else {
            mm_sc_info += mm_sc_variant + '|';  
            }
         }
      }                       
                                    
      mm_sc_info=mm_sc_info.replace(/\|$/, "").toUpperCase();
      var mm_sc_page = document.location.pathname + '_Maxymiser_' + testName;
      mm_sc_page = mm_sc_page.replace(/^\//, "");

      /*Check if sessionCamRecorder is defined. If not we're executing before 
      sessioncam and can overwrite the page name for filtering within sessioncam*/
      mmcore.AddDocLoadHandler( function() {
         var mm_sc_timer = setInterval(function() {
            if(window.sessioncamConfiguration) {
               if (cust_page) {
                  if(window.sessionCamRecorder.createVirtualPageLoad) {
                  window.sessionCamRecorder.createVirtualPageLoad(mm_sc_page);
                  }
               }
               //Custom Variable Code
               if (!window.sessioncamConfiguration.customDataObjects) {
               window.sessioncamConfiguration.customDataObjects = new Array();
               }
               var item = { key: "MVT", value: mm_sc_info };
               window.sessioncamConfiguration.customDataObjects.push(item);
               clearInterval(mm_sc_timer);
            }
         }, 50);
      })    
   }
})();
}catch(err){mmcore.EH(err);}
try{
var value = mmcore.GetCookie('FT_User', 1); /*This gets cookie variable*/
//var value = typeof $ === 'function' && $.cookie && $.cookie("FT_User")
if (value){
if (value.indexOf("_P2_") > -1){ 
// Premium Subscriber

} 
else if (value.indexOf("_P1_") > -1){ 
// Standard Subscriber

} 

else if (value.indexOf("_P1_P0_Tools_P2") > -1){ 
// Some People

} 
else if (value.indexOf("PRODUCTS=_P0_Tools_:") > -1){ 
// Registered User 

} 
else { 
// Anonymous user with FT_USER cookie
mmcore.SetPageID('VC79HideRegisterLink') 
mmcore._async=true; 
mmcore.CGRequest(); 
}
} 

else {
// Anonymous user without FT_USER cookie
mmcore.SetPageID('VC79HideRegisterLink') 
mmcore._async=true; 
mmcore.CGRequest(); 
}
}catch(err){mmcore.EH(err);}
try{
/*Added by Julia Kolkatova 26.01.2016*/

mmcore.mediator.on('mmEvents:T25_Visit', function () {

	if (mmcore.GetCookie('mm_t25_test_generated', 1)) {
		mmcore.SetCookie('mm_t25_count_start', 1, 180, 1);
	}

	if (mmcore.GetCookie('mm_t25_session_started', 1) || !mmcore.GetCookie('mm_t25_count_start', 1)) {
		return;
	}

	mmcore.SetAction('T25Session', 1);
	mmcore._async = true;
	mmcore.SetPageID('mmevents');
	mmcore.CGRequest();

	mmcore.SetCookie('mm_t25_session_started', 1, 0, 1);
});

}catch(err){mmcore.EH(err);}
try{
(function T48_Render() {
  
		var isUserLoggedIn = mmcore.GetCookie('FT_User', 1) || mmcore.GetCookie('FT_Remember', 1);
		var isB2C = !mmcore.siteTools.getAYSCCookieField(97) || mmcore.siteTools.getAYSCCookieField(97).toLowerCase() !== 'c';
		var isPCsPresent = 'Trial_Propens' in mmcore.GetPersistentCriteria() || 'Any_Propens' in mmcore.GetPersistentCriteria();
		var isGeneration = !isUserLoggedIn && isB2C && isPCsPresent;

		if (isGeneration) {
			mmcore.waitFor(function () {
				return document.querySelectorAll('#ftLogin').length;
			}).done(function () {
				var campaign = new mmcore.Campaign('T48_Notifications', ['A_IconT48']);
				mmcore
					.request('T48')
					.done(function () {
						campaign.renderMaxyboxes();
					})
			});
		}
})();

}catch(err){mmcore.EH(err);}
try{
(function T27_Checker() {
    var getFormattedAyscCookie = function () {
        var ayscCookie = mmcore.GetCookie('AYSC', 1),
            arr = ayscCookie.split('_'),
            i = arr.length,
            AYSC = {},
            sub = '';
        while (i--) {
            if (arr[i]) {
                sub = arr[i].substr(0, 2);
                AYSC[sub] = arr[i].replace(/(\d+){2}/, '');
            }
        }

        return AYSC;
    };
    var AYSC = getFormattedAyscCookie();
    var field97 = AYSC['97'] || '';

    if ((!field97 || field97.toLowerCase() !== 'c') && location.href.indexOf('Authorised=false.html') == -1 && !window.HurdleType) {
		mmcore.waitFor(function () {
			return (window.jQuery && jQuery('#footer').length && window.siteMapTerm);
		}, {
			isNotStoppedOnDocumentReadiness : true,
			timeout : 15000
		}).done(function () {
			if (jQuery('#ft-article-comments').length) {
				mmcore.request('T27VidInArticlev2');
			}
		});
	}

}());

}catch(err){mmcore.EH(err);}
try{
/*Added by Julia Kolkatova 26.01.2016*/
(function T25SetPC() {
	mmcore.mediator.on('mmEvents:T25_CampaignGenerated', function () {
		var PCValue = 'URL';

		if (mmcore.GetCookie('mm_t25_test_generated', 1)) {
			return;
		}
		if (typeof(mmcore.GetPersistentCriterion) === 'function') {
			if (location.href.indexOf('ftcamp=engage/email/b2b_reset_password') !== -1 &&
				mmcore.GetPersistentCriterion('RFV') === '8.Unclassified') {
				PCValue = 'Both';
			} else if (mmcore.GetPersistentCriterion('RFV') === '8.Unclassified') {
				PCValue = 'RFV';
			}
		}

		mmcore.SetPersCriterion('T25_Generation', PCValue);
	});
}());

}catch(err){mmcore.EH(err);}
try{
;
(function ActLogin() {
	mmcore
		.waitFor(function () {
			return (mmcore.GetCookie('FT_User', 1) || mmcore.GetCookie('FT_remember', 1));
		}, {
			isNotStoppedOnDocumentReadiness: true,
			timeout: 2 * 1000
		})
		.done(function () {
			var loginTracked = mmcore.GetCookie('mm_login_tracked', 1);

			if (!loginTracked) {
				mmcore._async = true;
				mmcore.SetAction('Login', '1');
				mmcore.SetPageID('mmevents');
				mmcore.CGRequest(function () {
					mmcore.SetCookie('mm_login_tracked', true, 0, 1);
				});
			}
		})
		.fail(function () {
			mmcore.SetCookie('mm_login_tracked', true, -1, 1);
		});
}());
}catch(err){mmcore.EH(err);}
try{
;
(function t24_b2b_removeCookie() {

	var articleURL = mmcore.GetCookie('mm_t24b2barticle', 1);
	if (articleURL && !/join\.ft\.com/i.test(window.location.hostname)) {
		mmcore.SetCookie('mm_t24b2barticle', 0, -1, 1);
	}
}());
}catch(err){mmcore.EH(err);}
try{
(function T37_Checker() {
	var isUSLawyersPage = (/\/hub\/uslawyers\//).test(window.location.search) ||
		(window.location.href.indexOf('/hub/') + 1 && window.location.href.indexOf('/uslawyers') + 1);
	var isRetrieverPage = (/\/Channel_Retriever\/\/B2B/).test(window.location.href);
	//exclude generation with test 32 and test 31
	if (!isUSLawyersPage && !isRetrieverPage) {

		mmcore.objStyle = mmcore.objStyle || {};
		mmcore._MbStyle = function () {
		};
		mmcore.AttachStyleT37_v2 = function (t, name) {
			name = name || "style";
			var st = this.objStyle[name];
			if (!st) {
				st = document.createElement("style");
				st.type = "text/css";
				var mm = document.getElementById("mmcore.1");
				mm.parentNode.insertBefore(st, mm);
				this.objStyle[name] = st;
			}
			if (st.styleSheet) {
				st.styleSheet.cssText += t;
			} else {
				st.innerHTML += t;
			}
		};

        mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: none !important;}');

		var getFormattedAyscCookie = function () {
			var ayscCookie = mmcore.GetCookie('AYSC', 1),
				arr = ayscCookie.split('_'),
				i = arr.length,
				AYSC = {},
				sub = '';
			while (i--) {
				if (arr[i]) {
					sub = arr[i].substr(0, 2);
					AYSC[sub] = arr[i].replace(/(\d+){2}/, '');
				}
			}

			return AYSC;
		};

		var AYSC = getFormattedAyscCookie();
		var is_t20_will_generate = function () {
			var isMarketoPage = location.href.indexOf('?mkt_tok') + 1,
				isNeedPageVisited = mmcore.GetCookie('mm_t20_b2b', 1),
				isAnonymousUser = !mmcore.GetCookie('FT_remember', 1) && !mmcore.GetCookie('FT_User', 1),
				isUserHasKey = AYSC[27] === 'CjxNyNmdMcX2b' || AYSC[27] === 'eKmBpErRRjHQn' || AYSC[27] === 'bTBkczP0Z3ZEW';
			if ((isNeedPageVisited || isMarketoPage) && isAnonymousUser && !isUserHasKey) {
				return true;
			}
			return false;
		};

		var field97 = AYSC['97'] || '',
			isTest43Generated = mmcore.GetCookie('mm-gen-t43', 1);

		if (
			field97.toLowerCase() !== 'c' && !mmcore.GetCookie('FT_User', 1) &&
			location.href.indexOf('FTCamp=engage/CAPI/webapp/Channel_NikkeiTelecom//B2B') === -1
		) {
			mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: none !important;}');
			setTimeout(function () {
				mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: block !important;}');
			}, 10000);

			mmcore.waitFor(function () {
				return (document.querySelectorAll('.barrier-dialogue').length);
			}, {
				isNotStoppedOnDocumentReadiness: true,
				timeout: 10000
			}).done(function () {
				if (document.querySelectorAll('.barrier-dialogue').length && document.querySelectorAll('.barrier-matrix').length && !is_t20_will_generate()) {
					mmcore.request('T37v2')
						.done(function () {
							mmcore.RenderMaxyboxes('T37_AnonB_A', 'FastFTBarr', 'DigitalPage');
							setTimeout(function () {
								if (mmcore.GenInfo.T37_AnonBarrier_copy_v2.t37_anonb_a.toLowerCase() == 'default') {
									mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: block !important;}');
								}
							}, 0);
						});
				} else {
					mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: block !important;}');
				}
			});
		} else {
            mmcore.AttachStyleT37_v2('body #DRMUpsell .barrier-dialogue{display: block !important;}');
        }
	}
}());
}catch(err){mmcore.EH(err);}
try{
mmcore.AddDocLoadHandler(function () {


	var brightcove; // = window.brightcove;
	var $script;
	var playerObject;
	var playerInstance;
	var id;
	var rePlayerID = /createPlayerAsync\((?:'|")(.+)(?:'|")\)/;


	var preventFirstChangeFlag = false;


	function onMediaEventFired(event) {
		

		if (event && event.type === 'mediaBegin') {

			mmcore.SetAction('VCB_WidgetVidStart', 1);
			mmcore.request();


		} else if (event && event.type === 'mediaChange') {

			if (preventFirstChangeFlag) {

				mmcore.SetAction('VCB_WidgetVidChnge', 1);
				mmcore.request();

			} else {
				// change event fires at the init of player, not tracking it for the first time
				preventFirstChangeFlag = true;
			}


		};


	};



	function onInitPlayer() {

		brightcove = window.brightcove;
		playerObject = brightcove.api.getExperience(id);

		playerInstance = playerObject.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);

		playerInstance.addEventListener(brightcove.api.events.MediaEvent.BEGIN, onMediaEventFired);
		playerInstance.addEventListener(brightcove.api.events.MediaEvent.CHANGE, onMediaEventFired);

		/*playerInstance.addEventListener(brightcove.api.events.MediaEvent.COMPLETE, onMediaEventFired);
		playerInstance.addEventListener(brightcove.api.events.MediaEvent.ERROR, onMediaEventFired);
		playerInstance.addEventListener(brightcove.api.events.MediaEvent.PLAY, onMediaEventFired);
		playerInstance.addEventListener(brightcove.api.events.MediaEvent.STOP, onMediaEventFired);
		playerInstance.addEventListener(brightcove.api.events.MediaEvent.PROGRESS, onMediaEventFired);*/

	};


	if (window.jQuery && window.jQuery('script:contains("FTVideo.createPlayerAsync")').length && FTVideo && FTVideo.playerLoadHandler) {


		$script = window.jQuery('script:contains("FTVideo.createPlayerAsync")');
		scriptInner = $script.text();
		id = (scriptInner.match(rePlayerID) || [0, 0])[1];

		if (!id) {
			return;
		}


		var oldPlayerLoadHandler = FTVideo.playerLoadHandler;

		//decorating player init to add our function
		FTVideo.playerLoadHandler = function () {

			oldPlayerLoadHandler.apply(this, arguments);
			onInitPlayer();


		};


	};

});
}catch(err){mmcore.EH(err);}
try{
(function T27_ActsAll() {
	mmcore.AddDocLoadHandler(function () {
		setTimeout(function () {
			var isVideoPage = location.host === 'video.ft.com';
			var isArticlePage = location.host === 'www.ft.com' && document.getElementById('ft-article-comments');
			var isPageReloadedByF5 = mmcore.GetCookie('mm-t27-page-reload', 1) === location.pathname;
			var trackAction = function (actionName, actionValue, actionAttr, callback) {
				callback = callback || function () {};
				mmcore._async = true;
				mmcore.SetAction(actionName, actionValue, actionAttr);
				mmcore.SetPageID('mmevents');
				mmcore.CGRequest(callback);
			};
			if (isVideoPage) {
				var attrForRoute = '';
				if (mmcore.GetCookie('mm-t27-click-on-link', 1)) {
					attrForRoute = 'Link';
				}
				trackAction('T27_VidArrRoute', 1, attrForRoute);
				mmcore.SetCookie('mm-t27-click-on-link', '1', -1, 1);

				var videoCategory = mmcore.GetCookie('mm-t27-att-vid', 1);
				
				if (videoCategory) {
					trackAction('T27_VidArrCateg', 1, videoCategory);
					mmcore.mediator.on('mediaComplete', function () {
						trackAction('T27_VidComplete', 1, videoCategory);
					});
				}
				
			}

			if (isArticlePage) {
				mmcore.waitFor(function () {
					return (mmcore.GenInfo.T27_VidInArticlev2 && typeof(mmcore.T27_data_article) == 'object');
				}).done(function () {
					mmcore.SetCookie('mm-t27-att-vid', mmcore.T27_data_article.attr, 0, 1);
					if (!isPageReloadedByF5) {
						trackAction('T27_Article', 1, mmcore.T27_data_article.attr);
					}
					jQuery(document).on('click', '.mm-t27-half-width', function () {
						mmcore.SetCookie('mm-t27-click-on-link', '1', 0, 1);
					});
					
					(function waitFyreLoader() {
						if (window.FyreLoader && window.FyreLoader.apps && window.FyreLoader.apps[0] && window.FyreLoader.apps[0].on) {
							window.FyreLoader.apps[0].on('commentPosted', function () {
								trackAction('T27_Comment', 1);
							});
							return;
						}
						setTimeout(waitFyreLoader, 40);
					}());

				});
			}
			
			if(!isArticlePage && !isVideoPage){
				mmcore.SetCookie('mm-t27-att-vid', 'Other', 0, 1);
			}
			mmcore.SetCookie('mm-t27-page-reload', location.pathname, 0, 1);
		}, 0);

	});
}());

}catch(err){mmcore.EH(err);}
try{
;
(function () {

	window.$ && $(document).ready(function () {

        var preventFlag = false;


        $(document).on('focus', '#seriesLogic #series', function () {
            mmcore.SetAction('VCB_DropdownClicks', 1, 'Initial');
            mmcore.request();

            if (!preventFlag) {
                
                preventFlag = true;
                
                $('#seriesLogic #series').on('change', function () {

                    mmcore.SetAction('VCB_DropdownClicks', 1, 'Item');
                    mmcore.request();


                });

            }

        });
    });

})();
}catch(err){mmcore.EH(err);}
try{
;
(function T37_ActFormArrivals() {
	var attr_barr = mmcore.GetCookie('mm_barr_click', 1);
	mmcore.SetCookie('mm_barr_click', '', -1, 1);

	mmcore.AddDocLoadHandler(function () {
		setTimeout(function () {
			if (document.querySelector('#signUp-form') || document.querySelector('#orderform') || location.href == 'http://ftcorporate.ft.com/free-trial/') {
				var attr = '',
					subs_text = '';
				if (document.querySelector('.mp-order-summary__product-name')) {
					var subs_text = document.querySelector('.mp-order-summary__product-name').innerHTML;
					if (subs_text.indexOf('Premium FT.com') != -1) {
						attr = 'PremDig';
						if (document.querySelector('.mp-order-summary__step-up-details') && document.querySelector('.mp-order-summary__step-up-details').innerHTML.indexOf('trial') != -1) {
							attr = 'Trial';
						}
					} else if (subs_text.indexOf('Standard FT.com') != -1) {
						attr = 'StanDig';
					} else if (subs_text.indexOf('FT Weekend App Edition') != -1) {
						attr = 'App';
					}
				}
				if (window.jQuery) {
					var bullet_text = jQuery('#benefitBulletsTitleID strong').text();
					if (bullet_text.indexOf('Print + Digital') != -1) {
						attr = 'NewsPrem';
					} else if (bullet_text.indexOf('FT Print') != -1) {
						attr = 'Newspaper';
					}

					if (jQuery('.main h1 strong').text().indexOf('trial for your team or organisation') != -1) {
						attr = 'Corporate';
					}

				}
				if (attr) {
					if (attr_barr) {
						mmcore.SetCookie('mm_t37_direct_sub', '1', 0, 1);
					}
					mmcore._async = true;
					mmcore.SetAction('T37_FormArrivals', '1', attr);
					mmcore.SetPageID('mmevents');
					mmcore.CGRequest();
				}
			} else {
				// some extra step before subcription form.
				// for Corporate, Newspaper and App types
				if (window.jQuery) {
					var needed_btn = '';
					jQuery('.free-trial-btn.form-popup-link').click(function () {
						mmcore.SetAction('T37_FormArrivals', '1', 'Corporate');
						mmcore.request();
					});
					if (attr_barr == 'Corporate') {
						needed_btn = jQuery('#plan-guide .free-trial-btn');

					} else if (attr_barr == 'Newspaper') {
						jQuery('#country_selector').change(function () {
							mmcore.SetCookie('mm_barr_click', attr_barr, 0, 1);
						});
						var arr_attrs = ['StanDig', 'PremDig', 'NewsPrem', 'Newspaper'];
						jQuery('h1.primary_product_item').each(function (index) {
							var t = jQuery(this);
							t.parents('div[class*="product_container"]').find('.ft_standard').click(function () {
								mmcore.SetCookie('mm_barr_click', arr_attrs[index], 0, 1);
							});
						});
					} else if (attr_barr == 'App') {
						needed_btn = jQuery('.ft_standard');
					}
					if (needed_btn.length) {
						needed_btn.click(function () {
							mmcore.SetCookie('mm_barr_click', attr_barr, 0, 1);
						});
					}
					mmcore.SetCookie('mm_t37_direct_sub', '', -1, 1);
				}
			}
		}, 1000);
		// update for ajax form types by Eugene Glazkov
		if (window.jQuery) {
			jQuery(window).ajaxComplete(function (e, xhr) {
				if (xhr.responseText) {
					var resp = JSON.parse(xhr.responseText);
					var isProperMessage = resp.message && resp.message.indexOf('showing form');
					var isTrial = resp.general_repo && resp.general_repo.subtype && resp.general_repo.subtype.indexOf('trial');
					if (isProperMessage && isTrial) {
						var attr;
						var package = resp.general_repo.packagetype;
						
						if (/trial/ig.test(resp.general_repo.subtype)) {
							attr = "Trial"
						} else if (package.indexOf('Print + Digital') + 1) {
							attr = 'NewsPrem';
						} else if (package.indexOf('Print') + 1) {
							attr = 'Newspaper';
						} else if (package.indexOf('Premium Digital') + 1) {
							attr = 'PremDig';
						} else if (package.indexOf('Standard Digital') + 1) {
							attr = 'StanDig';
						}

						mmcore._async = true;
						mmcore.SetAction('T37_FormArrivals', '1', attr);
						mmcore.SetPageID('mmevents');
						mmcore.CGRequest();
					}
				}
			});
		}
	});
})();

}catch(err){mmcore.EH(err);}
try{
/*Added by Julia Kolkatova 26.01.2016*/
(function T25_Rendering() {
	var campaign = new mmcore.Campaign('T25_PasswordReset', ['A_PassReset'], 'mm-t25-hidden'),
		isT38Generated = mmcore.GetCookie('mm_t38_generated', 1),
		isT42Generated = mmcore.GetCookie('mm_t42_generated', 1),
		isT31Generated = mmcore.GetCookie('mm_t31_generated', 1),
		checkerSettings = {
			isNotStoppedOnDocumentReadiness: true,
			timeout: 5 * 1000
		};

	if (location.href.indexOf('Authorised=false') + 1) {
		mmcore.mediator.trigger('mmEvents:T25_Visit');
		return false;
	}

	mmcore
		.waitFor(function () {
			var	isPageInScope = window.jQuery && jQuery('meta[content="article"]').length ||
					(window.FT && window.FT.isPage && (window.FT.isPage.Section || window.FT.isPage.Front)),
				isGenerationAllowed = mmcore.GetCookie('mm_t25_test_generated', 1) ||
					location.href.indexOf('ftcamp=engage/email/b2b_reset_password') !== -1 ||
					(typeof(mmcore.GetPersistentCriterion) === 'function' &&
					mmcore.GetPersistentCriterion('RFV') === '8.Unclassified');

			return isPageInScope && isGenerationAllowed;

		}, checkerSettings)
		.done(function () {
			//NOTE: trigger event for PC T25_Generate setting up
			mmcore.mediator.trigger('mmEvents:T25_CampaignGenerated', {});
			//set ccookie for excluding generation with test
			mmcore.SetCookie('mm_t25_generated', 'true', 0, 1);

			if (!isT38Generated && !isT31Generated && !isT42Generated) {
				mmcore
					.request('T25_B2B')
					.done(function () {
						campaign.renderMaxyboxes();
						mmcore.SetCookie('mm_t25_test_generated', 1, 0, 1);
						mmcore.mediator.trigger('mmEvents:T25_Visit');
					});
			}
		})
		.fail(function () {
			mmcore.mediator.trigger('mmEvents:T25_Visit');
		});

}());

}catch(err){mmcore.EH(err);}
if(typeof mmcore._callback=='object'&&typeof mmcore._callback[1]=='function'){try{mmcore._callback[1]();}catch(err){mmcore.EH(err);}
finally{mmcore._callback[1]=null;}}
})();