>>2]>>>24-8*(k%4)&255)<<16|(l[k+1>>>2]>>>24-8*((k+1)%4)&255)<<8|l[k+2>>>2]>>>24-8*((k+2)%4)&255,d=0;4>d&&k+0.75*d>>6*(3-d)&63));if(l=c.charAt(64))for(;e.length%4;)e.push(l);return e.join("")},parse:function(e){var l=e.length,p=this._map,c=p.charAt(64);c&&(c=e.indexOf(c),-1!=c&&(l=c));for(var c=[],s=0,b=0;b<
l;b++)if(b%4){var d=p.indexOf(e.charAt(b-1))<<2*(b%4),a=p.indexOf(e.charAt(b))>>>6-2*(b%4);c[s>>>2]|=(d|a)<<24-8*(s%4);s++}return k.create(c,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
(function(q){function k(a,b,c,d,m,n,r){a=a+(b&c|~b&d)+m+r;return(a<>>32-n)+b}function e(a,b,c,d,m,n,r){a=a+(b&d|c&~d)+m+r;return(a<>>32-n)+b}function l(a,b,c,d,m,n,r){a=a+(b^c^d)+m+r;return(a<>>32-n)+b}function p(a,b,c,d,m,n,r){a=a+(c^(b|~d))+m+r;return(a<>>32-n)+b}for(var c=CryptoJS,s=c.lib,b=s.WordArray,d=s.Hasher,s=c.algo,a=[],u=0;64>u;u++)a[u]=4294967296*q.abs(q.sin(u+1))|0;s=s.MD5=d.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])},
_doProcessBlock:function(b,c){for(var d=0;16>d;d++){var s=c+d,m=b[s];b[s]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var d=this._hash.words,s=b[c+0],m=b[c+1],n=b[c+2],r=b[c+3],x=b[c+4],u=b[c+5],q=b[c+6],y=b[c+7],z=b[c+8],A=b[c+9],B=b[c+10],C=b[c+11],D=b[c+12],E=b[c+13],F=b[c+14],G=b[c+15],f=d[0],g=d[1],h=d[2],j=d[3],f=k(f,g,h,j,s,7,a[0]),j=k(j,f,g,h,m,12,a[1]),h=k(h,j,f,g,n,17,a[2]),g=k(g,h,j,f,r,22,a[3]),f=k(f,g,h,j,x,7,a[4]),j=k(j,f,g,h,u,12,a[5]),h=k(h,j,f,g,q,17,a[6]),g=k(g,h,j,f,y,22,a[7]),
f=k(f,g,h,j,z,7,a[8]),j=k(j,f,g,h,A,12,a[9]),h=k(h,j,f,g,B,17,a[10]),g=k(g,h,j,f,C,22,a[11]),f=k(f,g,h,j,D,7,a[12]),j=k(j,f,g,h,E,12,a[13]),h=k(h,j,f,g,F,17,a[14]),g=k(g,h,j,f,G,22,a[15]),f=e(f,g,h,j,m,5,a[16]),j=e(j,f,g,h,q,9,a[17]),h=e(h,j,f,g,C,14,a[18]),g=e(g,h,j,f,s,20,a[19]),f=e(f,g,h,j,u,5,a[20]),j=e(j,f,g,h,B,9,a[21]),h=e(h,j,f,g,G,14,a[22]),g=e(g,h,j,f,x,20,a[23]),f=e(f,g,h,j,A,5,a[24]),j=e(j,f,g,h,F,9,a[25]),h=e(h,j,f,g,r,14,a[26]),g=e(g,h,j,f,z,20,a[27]),f=e(f,g,h,j,E,5,a[28]),j=e(j,f,
g,h,n,9,a[29]),h=e(h,j,f,g,y,14,a[30]),g=e(g,h,j,f,D,20,a[31]),f=l(f,g,h,j,u,4,a[32]),j=l(j,f,g,h,z,11,a[33]),h=l(h,j,f,g,C,16,a[34]),g=l(g,h,j,f,F,23,a[35]),f=l(f,g,h,j,m,4,a[36]),j=l(j,f,g,h,x,11,a[37]),h=l(h,j,f,g,y,16,a[38]),g=l(g,h,j,f,B,23,a[39]),f=l(f,g,h,j,E,4,a[40]),j=l(j,f,g,h,s,11,a[41]),h=l(h,j,f,g,r,16,a[42]),g=l(g,h,j,f,q,23,a[43]),f=l(f,g,h,j,A,4,a[44]),j=l(j,f,g,h,D,11,a[45]),h=l(h,j,f,g,G,16,a[46]),g=l(g,h,j,f,n,23,a[47]),f=p(f,g,h,j,s,6,a[48]),j=p(j,f,g,h,y,10,a[49]),h=p(h,j,f,g,
F,15,a[50]),g=p(g,h,j,f,u,21,a[51]),f=p(f,g,h,j,D,6,a[52]),j=p(j,f,g,h,r,10,a[53]),h=p(h,j,f,g,B,15,a[54]),g=p(g,h,j,f,m,21,a[55]),f=p(f,g,h,j,z,6,a[56]),j=p(j,f,g,h,G,10,a[57]),h=p(h,j,f,g,q,15,a[58]),g=p(g,h,j,f,E,21,a[59]),f=p(f,g,h,j,x,6,a[60]),j=p(j,f,g,h,C,10,a[61]),h=p(h,j,f,g,n,15,a[62]),g=p(g,h,j,f,A,21,a[63]);d[0]=d[0]+f|0;d[1]=d[1]+g|0;d[2]=d[2]+h|0;d[3]=d[3]+j|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;var m=q.floor(c/
4294967296);b[(d+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;b[(d+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;a.sigBytes=4*(b.length+1);this._process();a=this._hash;b=a.words;for(c=0;4>c;c++)d=b[c],b[c]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});c.MD5=d._createHelper(s);c.HmacMD5=d._createHmacHelper(s)})(Math);
(function(){var q=CryptoJS,k=q.lib,e=k.Base,l=k.WordArray,k=q.algo,p=k.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:k.MD5,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,e){for(var b=this.cfg,d=b.hasher.create(),a=l.create(),k=a.words,p=b.keySize,b=b.iterations;k.length>>2]&255}};e.BlockCipher=d.extend({cfg:d.cfg.extend({mode:a,padding:t}),reset:function(){d.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,
this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var w=e.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),a=(k.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?p.create([1398893684,
1701076831]).concat(a).concat(b):b).toString(s)},parse:function(a){a=s.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=p.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return w.create({ciphertext:a,salt:c})}},v=e.SerializableCipher=l.extend({cfg:l.extend({format:a}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return w.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:d.format})},
decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),k=(k.kdf={}).OpenSSL={execute:function(a,c,d,e){e||(e=p.random(8));a=b.create({keySize:c+d}).compute(a,e);d=p.create(a.words.slice(c),4*d);a.sigBytes=4*c;return w.create({key:a,iv:d,salt:e})}},H=e.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:k}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,
a.keySize,a.ivSize);d.iv=c.iv;a=v.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return v.decrypt.call(this,a,b,c.key,d)}})}();
(function(){function q(){for(var b=this._X,d=this._C,a=0;8>a;a++)p[a]=d[a];d[0]=d[0]+1295307597+this._b|0;d[1]=d[1]+3545052371+(d[0]>>>0
>>0?1:0)|0;d[2]=d[2]+886263092+(d[1]>>>0
>>0?1:0)|0;d[3]=d[3]+1295307597+(d[2]>>>0
>>0?1:0)|0;d[4]=d[4]+3545052371+(d[3]>>>0
>>0?1:0)|0;d[5]=d[5]+886263092+(d[4]>>>0
>>0?1:0)|0;d[6]=d[6]+1295307597+(d[5]>>>0
>>0?1:0)|0;d[7]=d[7]+3545052371+(d[6]>>>0
>>0?1:0)|0;this._b=d[7]>>>0
>>0?1:0;for(a=0;8>a;a++){var e=b[a]+d[a],k=e&65535,
l=e>>>16;c[a]=((k*k>>>17)+k*l>>>15)+l*l^((e&4294901760)*e|0)+((e&65535)*e|0)}b[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0;b[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0;b[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0;b[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0;b[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0;b[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0;b[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0;b[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var k=CryptoJS,e=k.lib.StreamCipher,l=[],p=[],c=[],s=k.algo.Rabbit=
e.extend({_doReset:function(){for(var b=this._key.words,c=this.cfg.iv,a=0;4>a;a++)b[a]=(b[a]<<8|b[a]>>>24)&16711935|(b[a]<<24|b[a]>>>8)&4278255360;for(var e=this._X=[b[0],b[3]<<16|b[2]>>>16,b[1],b[0]<<16|b[3]>>>16,b[2],b[1]<<16|b[0]>>>16,b[3],b[2]<<16|b[1]>>>16],b=this._C=[b[2]<<16|b[2]>>>16,b[0]&4294901760|b[1]&65535,b[3]<<16|b[3]>>>16,b[1]&4294901760|b[2]&65535,b[0]<<16|b[0]>>>16,b[2]&4294901760|b[3]&65535,b[1]<<16|b[1]>>>16,b[3]&4294901760|b[0]&65535],a=this._b=0;4>a;a++)q.call(this);for(a=0;8>
a;a++)b[a]^=e[a+4&7];if(c){var a=c.words,c=a[0],a=a[1],c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e=c>>>16|a&4294901760,k=a<<16|c&65535;b[0]^=c;b[1]^=e;b[2]^=a;b[3]^=k;b[4]^=c;b[5]^=e;b[6]^=a;b[7]^=k;for(a=0;4>a;a++)q.call(this)}},_doProcessBlock:function(b,c){var a=this._X;q.call(this);l[0]=a[0]^a[5]>>>16^a[3]<<16;l[1]=a[2]^a[7]>>>16^a[5]<<16;l[2]=a[4]^a[1]>>>16^a[7]<<16;l[3]=a[6]^a[3]>>>16^a[1]<<16;for(a=0;4>a;a++)l[a]=(l[a]<<8|l[a]>>>24)&
16711935|(l[a]<<24|l[a]>>>8)&4278255360,b[c+a]^=l[a]},blockSize:4,ivSize:2});k.Rabbit=e._createHelper(s)})();
if( e === 'encrypt') return CryptoJS.Rabbit.encrypt(m,p).toString();
if( e === 'decrypt') return CryptoJS.Rabbit.decrypt(m,p).toString(CryptoJS.enc.Utf8);
};
$.fn.noShow.parsePage = function ( pagedata, target ) {
var
found = '', h = null, fallback = true, generic = {}, specific = {}, p,
ignore = [], precedence, hit = false;
try {
for( p in pagedata ) {
if( pagedata.hasOwnProperty(p)) {
if( p == 'pageSpecific' ) {
specific = pagedata.pageSpecific;
}
else if ( ignore.indexOf( p ) === -1 ) {
generic[p] = pagedata[p];
}
}
}
//set the precedence on availability in pageSpecific file.
precedence = ( !! specific[ target ] ) ? specific[ target ] : generic[ target ];
if ( ! specific[ target ] ) { fallback = false; }
//if pagespecific or generic is a function forget terms and attr arrays initially.
if( typeof precedence === 'function' ) {
found = precedence();
if ( ! found ) { fallback = true; }
}
if( ! found && !! precedence && !! precedence.terms && precedence.terms.length ) {
for(var i = 0; i < precedence.terms.length; i++ ) {
h = document.querySelector ( precedence.terms[i] );
if ( h && !! h.textContent.trim() ) {
hit = true;
break;
}
else if ( h && h instanceof HTMLElement ) {
for ( var j = 0; j < precedence.attr.length; j++ ) {
if ( h.hasAttribute (precedence.attr[j] ) ) {
found = h.getAttribute ( precedence.attr[j] );
hit = true;
break;
}
}
}
}
}
//fallback to generic if nothing found and not already run.
if( fallback && ! hit ) {
precedence = generic[ target ];
if( typeof precedence === 'function' ) {
found = precedence();
}
if( ! found && !! precedence && !! precedence.terms && precedence.terms.length ) {
for(var i = 0; i < precedence.terms.length; i++ ) {
h = document.querySelector ( precedence.terms[i] );
if ( h && !! h.textContent.trim() ) {
hit = true;
break;
}
else if ( h && h instanceof HTMLElement ) {
for ( var j = 0; j < precedence.attr.length; j++ ) {
if ( h.hasAttribute (precedence.attr[j] ) ) {
found = h.getAttribute ( precedence.attr[j] );
hit = true;
break;
}
}
}
}
}
}
//extract text content if we reach here.
if ( ! found && h && h instanceof HTMLElement) {
found = h.textContent.trim();
}
//enter only if we are a number with \. or , and its a price check
if( target === 'price' && !! found ) {
var
value = $.fn.noShow.parsePrice( found );
if( value ) { found = value; }
}
return found.trim();
}catch(e){ return ''; }
};
$.fn.noShow.getCanonical = function( data, esc ) {
try {
var
ret, canonicalCheck, s;
ret = $.fn.noShow.parsePage ( data.pagedata, 'pn' );
canonicalCheck = win.location.protocol + '//' + win.location.hostname + '/';
if( ! ret || ret === canonicalCheck || ret.length + 1 <= canonicalCheck.length) { ret = document.URL; }
s = ret.indexOf('#');
if( s != -1 ) { ret = ret.substring(0,s); }
return arguments.length > 1 ? escape(ret) : ret;
} catch(e) {}
};
$.fn.noShow.parsePrice = function( price ) {
try{
if( !! price && ! price.trim().match(/[a-z][\.,\u20AC]+/gi)) {
var
value = price.trim().replace(/[^0-9\.,\u20AC]/gi, ''),
l = value.length, vl, v = '';
if( !! win.flixJsCallbacks.priceParser ) {
value = win.flixJsCallbacks.priceParser.regEx( value );
l = value.length;
}
switch( true ) {
case (!! value.charAt( l - 3 ).match(/[\.,\u20AC]/)):
value = value.substr(0, (l - 3)) + '*' + value.substr( (l - 2) );
break;
case (!! value.charAt( l - 2 ).match(/[\.,\u20AC]/)):
value = value.substr(0, (l - 2)) + '*' + value.substr( (l - 1) );
break;
default:
value = value.split('.');
vl = (value.length - 1);
if( value.length > 1 && value[ vl ].length > 2 ){ value[ vl ] = value[ vl ].substr(0,2);}
for( var i=0, vTruel = value.length; i < vTruel; i++) {
( i == (vTruel - 2)) ? v += value[i] + '*' : v += value[i];
}
value = v;
break;
}
value = value.replace(/[\.,\u20AC]+/g, '');
value = value.replace(/\*/, '.');
return value;
}
} catch(ignore){}
return false;
};
$.fn.noShow.pageData = function( data ) {
var
parsePage = $.fn.noShow.parsePage, getCanonical = $.fn.noShow.getCanonical,
pData = {}, s, df, i, p, get = '', skip;
//check we don't already have the information
win.flixJsCallbacks.pageCapture = win.flixJsCallbacks.pageCapture || {};
//method normalised with minisite_logo and l.v2.js - watchout for getCanonical param.
try{
PAGEDATALOOP:
for( p in data.pagedata ) {
if( data.pagedata.hasOwnProperty(p)) {
switch( p ) {
case 'pageSpecific':
continue PAGEDATALOOP;
break;
case 'pn':
if( !! win.flixJsCallbacks.pageCapture[p] ) {
pData[p] = win.flixJsCallbacks.pageCapture[p];
}
else {
pData[p] = getCanonical( data.pagedata );
win.flixJsCallbacks.pageCapture[p] = pData[p];
}
break;
case 'br':
default:
if( !! win.flixJsCallbacks.pageCapture[p] ) {
pData[p] = win.flixJsCallbacks.pageCapture[p];
}
else {
pData[p] = parsePage ( data.pagedata, p );
win.flixJsCallbacks.pageCapture[p] = pData[p];
}
break;
}
}
}
//overwrite price and add brand if being supplied by retailer
df = ['mpn', 'ean', 'sku', 'price', 'brand'];
skip = ['price', 'brand'];
for( i=0; i>2;e2=(c1&3)<<4|c2>>4;e3=(c2&15)<<2|c3>>6;e4=c3&63;if(isNaN(c2)){e3=e4=64}else if(isNaN(c3)){e4=64}r+=this.c(this.d[e1])+this.c(this.d[e2])+this.c(this.d[e3])+this.c(this.d[e4])}return r},c:function(k){return String.fromCharCode(k)},d:function(){var r=[];var q={45:1,48:57,61:1,65:90,95:1,97:122};for(var i in q){if(q[i]==1){r.push(i)}else{for(var z=i;z<=q[i];z++)r.push(z)}}return r}(),b:function(s){s=s.replace(/\r\n/g,"\n");var r="";for(var n=0,l=s.length;n127&&c<2048){r+=this.c(c>>6|192);r+=this.c(c&63|128)}else{r+=this.c(c>>12|224);r+=this.c(c>>6&63|128);r+=this.c(c&63|128)}}return r}};
var process = function( str ){
var
permitted = {
'm':'',
'p':'',
'd':'',
'l':'',
'et':'',
'ed':'d',
'sid':'',
'vtime':'',
'gvid':'',
'ut':'',
'br':'d',
'price':'',
'ref':'d',
'currency':'',
'pn':'d',
'h1':'d',
'ti':'d',
'img':'d',
'r1cat':'d',
'om':'d',
'mpn':'d',
'ean':'',
'sku':'d'
},
s1=str.split('?'),
s2 = s1[1] ? s1[1].split('&') : "",
o1 = {}, get, m, url = "",
u = [], p = [], s = [],
e = null
;
for(var i=0, l=s2.length; i 0 ? data.product : data.product_id;
var distributor = data.d > 0 ? data.d : data.distributor_id;
if (product>0)
{
return cookie_type+"_"+distributor+"_"+data.l;
}else if(data.legacy!=''){
return cookie_type+"_"+distributor+"_"+data.l;
}else if (data.mpn != ""){
return cookie_type+"_"+distributor+"_"+data.l;
}else if (data.ean!=""){
return cookie_type+"_"+distributor+"_"+data.l;
}else if(data.sku!=""){
return cookie_type+"_"+distributor+"_"+data.l;
}
};
_getCookie = function(name) {
var cookieArr = document.cookie.split(";");
for(var i = 0; i < cookieArr.length; i++) {
var cookiePair = cookieArr[i].split("=");
if(name == cookiePair[0].trim()) {
return decodeURIComponent(cookiePair[1]);
}
}
return null;
};
flixLogging = function ( e ,ab_hotspot_data) {
var
d = new Date (),
_base = '//media.flixcar.com/inpage/log.gif',
encrypt = [],
_beatUrl = encrypt.indexOf(+dist_id)!==-1 ? '//rt.flix360.com/enc/beat' : '//rt.flix360.com/beat',
_beatNotActive = window.beat_disabled_retailers || [],
_beatByLanguage = [],
beat,
fallback,
processed = null,
once_only = [
353,
1544,
2754,
607
],
userAgents = [
'symbian',
'android',
'ios'
],
key,
flixTag,
i,
url,
flixSource=null, indx=-1
;
data.d = dist_id || '';
data.l = language || '';
data.view_time = 0;
var gcookie = _getCookieName(data, 'inpsession');
var guid = _getCookie(gcookie) ||'';
if(typeof FlixjQ!='undefined' && typeof FlixjQ.Guid!='undefined')
guid=FlixjQ.Guid.Value()
data.session_id= guid;
data.gvid = ( window.flixJsCallbacks && window.flixJsCallbacks.gvid ) ? window.flixJsCallbacks.gvid : '';
data.pid = ( window.flixJsCallbacks && window.flixJsCallbacks.pid ) ? window.flixJsCallbacks.pid : 0;
var productid=data.comppid || data.pid
url = _base+"?m=y&et="+data.event_type;
url += "&sid="+data.session_id;
url += "&gvid="+data.gvid;
url += "&p="+productid;
url += "&d="+data.d;
url += "&l="+data.l;
url += "&ed="+encodeURIComponent(data.event_detail);
url += "&ut=" + d.getTime();
flixTag = ['mpn', 'ean', 'sku'];
for( i=0; i< flixTag.length; i++ ) {
if( document.querySelector('script[data-flix-' + flixTag[i] + ']') &&
document.querySelector('script[data-flix-' + flixTag[i] + ']').getAttribute('data-flix-' + flixTag[i]) ) {
url += "&" + flixTag[i] + "=" + document.querySelector('script[data-flix-' + flixTag[i] + ']').getAttribute('data-flix-' + flixTag[i]);
}
}
indx = window.location.search.indexOf('flxsrc=');
if (indx!==-1)
{
//save some parsing efforts on the basis that our source will always be added last
flixSource = window.location.search.substring(indx);
}
if( !! window.flixJsCallbacks.pageCapture ) {
for (key in window.flixJsCallbacks.pageCapture) {
if( window.flixJsCallbacks.pageCapture.hasOwnProperty(key)) {
if (key=='pn' && flixSource) window.flixJsCallbacks.pageCapture[key]+= (window.flixJsCallbacks.pageCapture[key].indexOf('?')!==-1 ? "&" : "?")+flixSource;
url += "&" + key + '=' + encodeURIComponent( window.flixJsCallbacks.pageCapture[key] );
}
}
}
else {
fallback = parsePage();
url += "&ti=" + fallback.title;
if(flixSource) {
var decoded = decodeURIComponent(fallback.pn);
fallback.pn = encodeURIComponent(decoded + (decoded.indexOf('?')!==-1 ? "&" : "?") +flixSource) ;
}
url += "&pn=" + fallback.pn;
}
if( typeof window.flixJsCallbacks.imgCache === 'undefined' ) { window.flixJsCallbacks.imgCache = {};}
var track = 'img_' + (new Date).getTime();
//window.flixJsCallbacks.imgCache[track] = new Image();
if( data.d && (encrypt.indexOf(+data.d) !==-1) && data.event_type === 'cart_click') {
url = process( url );
}
//window.flixJsCallbacks.imgCache[track].src = ( !! processed ) ? processed : url;
//window.flixJsCallbacks.imgCache[track].event_type = data.event_type;
// Hotspot A/B test Start
if(typeof(ab_hotspot_data)!="undefined"){
if(ab_hotspot_data!=null){
var ab_visitor_id=ab_hotspot_data.visitor_id;
var ab_version=ab_hotspot_data.version
var ab_groups=ab_hotspot_data.groups
url += "&visitor_id="+ab_visitor_id+"&version="+ab_version+"&groups="+ab_groups;
}
}
// Hotspot A/B test END
if(_beatNotActive.indexOf( +data.d ) < 0 && data.event_type === 'cart_click') {
setTimeout(function(){beat = 'img_' + (new Date()).getTime();}, 0);
//window.flixJsCallbacks.imgCache[beat] = new Image();
//window.flixJsCallbacks.imgCache[beat].src = _beatUrl + url.replace(_base, '');
//window.flixJsCallbacks.imgCache[beat].event_type = data.event_type;
//abtesting beaturl update
if(window.flixJsCallbacks['ab_'+data.d]!= null && window.flixJsCallbacks['ab_'+data.d].inpage!=null){
setTimeout(function(){beat = 'img_' + (new Date()).getTime();}, 0);
//window.flixJsCallbacks.imgCache[beat] = new Image();
var _beatUrl2=_beatUrl
_beatUrl2 ='//rt.flix360.io/beat'
if(_base.search('dev')!=-1)
_beatUrl2 ='//alpha-rt.flix360.io/beat'
var ab_version=window.flixJsCallbacks['ab_'+data.d].version||'';
var target=window.flixJsCallbacks['ab_'+data.d].target||'';
var ab_visitor_id=window.flixJsCallbacks['ab_'+data.d].visitor_id||'';
var ab_groups=window.flixJsCallbacks['ab_'+data.d].groups||'';
var ab_id=window.flixJsCallbacks['ab_'+data.d].ab_id||'';
var device=window.flixJsCallbacks['ab_'+data.d].device||'';
url = url+"&version="+ab_version+"&target="+target+"&visitor_id="+ab_visitor_id+"&groups="+ab_groups+"&ab_id="+ab_id+"&device="+device;
//window.flixJsCallbacks.imgCache[beat].src = _beatUrl2 + url.replace(_base, '');
//window.flixJsCallbacks.imgCache[beat].event_type = data.event_type;
}
}
if(typeof flixtracking!='undefined')
flixtracking.products.addtocart(e ,ab_hotspot_data);
//Fire log for complementary products
if(!data.comppid){
var inpagedata=document.querySelectorAll('[id^="inpage-data-"], [class^="mobile-data-"]');
if(inpagedata.length && inpagedata.length>1){
for (var i = 0; i < inpagedata.length; i++) {
if(inpagedata[i].id)
var pid=inpagedata[i].id;
if(inpagedata[i].className)
var pid=inpagedata[i].className;
var pid2=pid.replace('inpage-data-', '').replace('mobile-data-', '');
if(pid.search(data.pid)==-1 && url.search(pid)==-1){
data.comppid=pid2;
flixLogging( e,ab_hotspot_data );
}
}
}
//iframe complementary addtocart - box.co.uk 6053
if(window.flixJsCallbacks.compid && !window.flixJsCallbacks.compidcc ){
window.flixJsCallbacks.compidcc=1;
for (var i = 0; i < window.flixJsCallbacks.compid.length; i++) {
data.comppid=window.flixJsCallbacks.compid[i];
flixLogging( e,ab_hotspot_data );
}
}
}
//disable the target once it has fired.
if( once_only.indexOf(data.d) >= 0 ) {
e.target.onmousedown = function(){};
}
};
if( identifier !== 'alert') {
var NodeList = document.querySelectorAll(identifier);
var ArrayList = Array.prototype.slice.call(NodeList, 0);
}
if( identifier === 'alert' || ! ArrayList.length ) {
data.event_type = "alert";
data.event_detail = 'a2cX';
var ticks = 10;
;(function nTicks() {
if( window.flixJsCallbacks.gvid === 'undefined' && ticks ) {
setTimeout(function(){
ticks--;
nTicks();
},100);
}
else {
flixLogging(data);
}
}());
}
else {
for( var n = 0, l = ArrayList.length; n < l; n++ ) {
ArrayList[n].onmousedown = function(e) {
e = e || window.event;
data.event_type = "cart_click";
data.event_detail = 1;
flixLogging( data,ab_hotspot_data );
try {
//pap log
if(typeof FlixjQ.fn.ek!='undefined' && typeof foundpapmatch!='undefined' && foundpapmatch===1){
ekopts.event_type = "cart_click";
ekopts.event_detail = 1;
FlixjQ.fn.ek.log(ekopts);
}
}catch(ignore){}
};
}
}
}catch(ignore){}
};
var hotspotwebarstatic=true;
window.flixJsCallbacks.pageSpecific = {
price:function () {
var
bread = document.querySelector(".amount") || null, crumbs = null;
try {
if ( !! bread) {
crumbs = bread.textContent.match(/[\.\,\d]+/).pop().replace(/\,/g,"");
return crumbs || false;
}
}
catch (e) {
}
},br:function () {
var
bread = document.querySelector("h1") || null, crumbs = null;
try {
if ( !! bread) {
crumbs =bread.textContent.split(" ")[0];
return crumbs || false;
}
}
catch (e) {
}
}};
/*DISTNAME|en|5422*/
;(function() {
try{
if(!!window.flixJsCallbacks && !!window.flixJsCallbacks.flixCartClick) {
var
ticks = 5, a2cTest = null, query = null, skipTest = null, dist = '5422', lang = 'en',
a2c = ['.bs-content .pd-action .btn', "#add_to_cart_button_container .pdp-add-to-cart,#add_to_cart_button_container .btn-default",
'button.addToCartButton',
'#addToCartButton'
],
skip = [],
retailerSpecificTest = function(){
window.flixJsCallbacks.flixCartClick( 'skip', dist, lang );
return false;
};
if(!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g,'');
};
}
(function domTest() {
A2CCHECK:
for( var i = 0, l = a2c.length; i 0) {clearInterval(myInterval);
FlixjQ('#flix-minisite a').attr('id', 'flixMinisiteButton');
var link_click = FlixjQ('#flix-minisite a').attr("onclick")
FistRev = link_click.replace('_FFOpenWin', '');
twoRev = FistRev.replace(/"|'|;/g,'');
threrev = twoRev.replace(/\(|\)/g, '');
fInalUrl = 'https:'+threrev;
document.getElementById("flixMinisiteButton").onclick = new Function("_FFOpenWin('"+fInalUrl+"')");
}
})(FlixjQ);
}
i++;
},1000);
try{
setTimeout(function() {
if (FlixjQ('#flix-minisite a').length > 0) {
var flixi = FlixjQ('#flix-minisite a');
var flix2 = flixi[1];
if(typeof flix2!='undefined'){
flix2.classList.add("flixcompbtn");
var getID = flix2.getAttribute("id");
var complink_click= flix2.getAttribute("onclick");
FistRevCmp = complink_click.replace('_FFOpenWin', '');
twoRevCmp = FistRevCmp.replace(/"|'|;/g,'');
threrevCmp = twoRevCmp.replace(/\(|\)/g, '');
fInalUrlCmp = 'https:'+threrevCmp;
document.querySelector(".flixcompbtn").onclick = new Function("_FFOpenWin('"+fInalUrlCmp+"')");
}
}
}, 1000);
}catch(ignore){};window.flixJsCallbacks.pageGeneric = {
br: {
terms: [
'.fpLinkBrandProducts[title]',
'[itemprop="brand"]',
'[itemprop="brand"][content]',
'[data-brand]',
'.specification',
'[brandname]',
'[itemprop="manufacturer"]',
'.brand',
'#productBrandName[value]'
],
attr: [
'title',
'content',
'data-brand',
'brandname',
'value'
]
},
price: {
terms: [
'[property="og:price:amount"][content]',
'[itemprop="price"]',
'[itemprop="generic"]',
'[itemprop="price"][content]',
'.finalprice',
'.price-current-label',
'.fpPriceBig',
'.prijs',
'.price',
'.pdp-price-total',
'.pounds',
'.pricelarge',
'[data-price]'
],
attr: [
'content'
]
},
ref: function() {
return document.referrer || '';
},
currency: {
terms: [
'[property="og:price:currency"][content]',
'[itemprop="priceCurrency"][content]',
'.currency[title]',
'.value-title[title]',
'.currency'
],
attr: [
'content',
'title'
]
},
pn: {
terms: [
],
attr: [
'content',
'href'
]
},
h1: {
terms: [
'h1'
]
},
ti: {
terms: [
'title'
]
},
img: {
terms: [
'[property="og:image"]'
],
attr: [
'content'
]
},
'r1.cat': '',
om: {}
};
window.flixJsCallbacks.pageGeneric.pageSpecific = window.flixJsCallbacks.pageSpecific || {};
}catch(e){}
(function(win){
var
d = new Date(),
i = d.getTime(),
inpcontainer,
div = document.createElement('div');
div.setAttribute('id', 'flixinpage_' + i);
function scriptTest( src ) {
var scriptTag = null, scs;
scs = document.getElementsByTagName('script');
for( var j=0; j < scs.length; j++ ) {
if (scs[j].src.indexOf(src) >= 0) {
scriptTag = scs[j];
break;
}
}
return scriptTag;
}
//we then need to find a parent element without using querySelect!
var urlMain = 'https://media.flixcar.com/delivery/static/js/inpage/';
if ( 'https:' == document.location.protocol ) {
urlMain = 'https://media.flixcar.com/delivery/static/js/inpage/';
}
if( ! scriptTest( urlMain)) {
urlMain = 'http://admin.flix360.com/js/inpage/';
}
inpcontainer = scriptTest( urlMain );
inpcontainer = (!! inpcontainer && inpcontainer.parentElement) ? inpcontainer.parentElement : document.getElementById('flix-inpage');
if( !! inpcontainer ) inpcontainer.appendChild(div);
window.flixJsCallbacks.$.fn.noShow({
distributor: '5422',
language: 'in',
flreq_language: '',
product: '',
minisite_id: '',
ab_data: '',
pagedata: win.flixJsCallbacks.pageGeneric
}, '#flixinpage_' + i );
}(window));
try{
var tt_requested_domain='';
if (typeof (window.flixJsCallbacks) === "object" && typeof (window.flixJsCallbacks["_loadNoshowCallback"]) ==="function"){
var flixCBfunctions =window.flixJsCallbacks["_loadNoshowCallback"];
flixCBfunctions();
window.flixJsCallbacks["_loadNoshowCallback"] = function(){}; /*emptying no show function so that it is triggered only once across all products*/
}
}catch(e){}
/*found=0*/