>>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< >>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