checkAppVersion = (function(){ var popup, overlay; var validVersionCookie = superfish.b.vvCookie; var uninstallCookie = superfish.b.uninstCookie; var minVersion = 1207; //1.2.0.7 var $, setCookieFn, _uid, _sessId, _actSrc, _clientVersion, _dlsource, _browser, _ip; var modalLoaded = false; //popup vars: var w = 840; var h = 430; var vh = window.innerHeight || document.body.clientHeight; vh = parseInt(vh); var top = (vh - h)/2 - 10; top = (top < 0 || top > h) ? 75 : top; var left = (screen.availWidth / 2) - w/2; var css = { overlay: { 'opacity': '0.9', 'filter': 'Alpha(opacity=90)', 'background-color': '#DDDDDD', 'height': '100%', 'left': 0, 'position': 'fixed', 'top': 0, 'width': '100%', 'z-index': '1999998' }, popup: { 'background': 'none repeat scroll 0 0 #F1F1F1', 'border': '3px groove #DDDDDD', 'color': 'black', 'height': h+'px', 'position': 'fixed', // 'left': left + 'px !important', setting this inline below... // 'top': '75px !important', setting this inline below... 'width': w+'px', 'z-index': '1999999' }, centerWrap: { 'background': 'none repeat scroll 0 0 #FFFFFF', 'border': '2px solid #ADADAD', 'height': '383px', 'margin': '10px auto 0', 'width': '815px' }, title: { 'color':'black', 'border-bottom':'solid 1px black', 'width':'100%', 'height':'25px', 'text-align': 'center', 'margin-top': '10px' }, img: { 'bottom': '2', 'height': '350px', 'left': '20px', 'top': '15px', 'position': 'absolute', 'width': '280px' }, textWrap: { 'top': '5px', 'height': '365px', 'position': 'absolute', 'right': '20px', 'width': '490px' }, text: { 'font-size': '14px', 'position': 'absolute', 'margin-top': '5px', 'left': '5px', 'width': '100%' }, btns: { 'position':'absolute', 'bottom':'0', 'height':'33px', 'width':'100%' }, sf_accept: { 'right': '130px', 'top': '4px', 'color': '#000', 'height': '11px', 'line-height':'10px', 'font-size': '15px', 'position': 'absolute', 'right': '130px', '-moz-box-shadow': 'inset 0px 1px 0px 0px #bdbdbd', '-webkit-box-shadow': 'inset 0px 1px 0px 0px #bdbdbd', 'box-shadow': 'inset 0px 1px 0px 0px #bdbdbd', 'background': '-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #c9c9c9) )', 'background': '-moz-linear-gradient( center top, #ededed 5%, #c9c9c9 100% )', 'filter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#ededed\', endColorstr=\'#c9c9c9\')', 'background-color': '#ededed', '-moz-border-radius': '6px', '-webkit-border-radius': '6px', 'border-radius': '6px', 'border': '1px solid #0f0f0f', 'display': 'inline-block', 'padding': '6px 24px', 'text-decoration': 'none', 'text-shadow': '1px 1px 0px #d4d4d4' }, uninstall: { 'bottom': '8px', 'color': 'black', 'font-size': '14px', 'position': 'absolute', 'right': '45px' }, a: { 'color': '#0078AE', 'text-decoration': 'none' } }; var uninstallHref = 'http://wwws.superfish.com/window-shopper/uninstall'; var popupText = 'Thank you for being a loyal and valued user of the WindowShopper add-on.'+ 'We have made some improvements and changes and hope you continue using our service.

'+ 'As a reminder, WindowShopper is a free browser add-on brought to you by Superfish, Inc. '+ 'When shopping at your favorite stores, you can click on the “See Similar” icon or receive suggested results for great deals. '+ 'Results are based on the country you’re in.

'+ 'WindowShopper works in the U.S., UK, Germany, France, and Australia.

'+ 'For Internet Explorer users, you can uninstall WindowShopper via Add/Remove Programs in your Control Panel.'+ 'For Firefox, go to Add-ons > Extensions > WindowShopper > Remove or Disable.

'+ 'By clicking "Accept", you agree to abide by the Terms of Use and Privacy Policy.'; var popupTitle = "Continue to get great shopping deals with WindowShopper"; function reportEvent(msg, lvl, src) { if(window.spsupport) { window.spsupport.events.reportEvent(msg, lvl, src); } else if(window.reportEvent) { window.reportEvent(msg, lvl, src); } else if(window.console) { window.console.log(msg+','+lvl+','+src); } }; function isValidVersion(v){ if (!superfish.b.checkAppVersion || v == '-1') { return true; } v = parseInt(v.replace(/\./g, ''), 10); if(!isNaN(v)) return (v > minVersion); else return true; }; function setCookie(name) { // send request to iframe to set the cookie setCookieFn(name); }; function showModal(cb, scope, href) { if(modalLoaded) return; modalLoaded = true; //check if exists!! reportStats('truste_impression'); overlay = $("
"); popup = $("
"+ "
"+ "
"+ "

"+popupTitle+"

"+ "

"+popupText+"

"+ "
"+ "
"+ "Accept"+ "Uninstall"+ "
"+ "
"); if(typeof href == 'string') { $('.sf_accept', popup).attr('href', href); } $('.uninstall', popup).click(function(){ overlay.remove(); popup.remove(); reportStats('truste_uninstall', function() { window.location.href = window.location.href; //refresh host after reporting stats }); setCookie(uninstallCookie); }); $('.sf_accept', popup).click(function(e) { overlay.remove(); popup.remove(); setCookie(validVersionCookie); reportStats('truste_accept'); if(cb && typeof cb == 'function') { if(typeof href != 'string') e.preventDefault(); if(scope) { cb.apply(scope); } else { cb.call(); } } }); overlay.css(css.overlay); //overlay[0].style.zIndex = '1989999 !important'; popup.css(css.popup); //popup[0].style.zIndex = '1989999 !important'; $('.textWrap', popup).css(css.textWrap); $('.centerWrap', popup).css(css.centerWrap); $('h3', popup).css(css.title); $('img', popup).css(css.img); $('p', popup).css(css.text); $('.btns', popup).css(css.btns) $('a', popup).css(css.a); $('.sf_accept', popup).css(css.sf_accept); $('.uninstall', popup).css(css.uninstall); $('body').append(overlay); $('body').append(popup); $(popup).show(); }; function reportStats(action, cb){ //truste_impression (showModal) //truste_accept (Accept click) //truste_uninstall (Uninstall click) //sfuninstall - serverside abort cb = cb || null; spsupport.api.jsonpRequest( spsupport.p.sfDomain_ + spsupport.p.sessRepAct, { "action" : action, "userid" : _uid, "sessionid" : _sessId, "source": _actSrc, "br": _browser, "dlsource": _dlsource, "versionId": _clientVersion, "ip": _ip }, cb); }; return function(jq, v, cb, scope, acceptHref, setCookieCb, userId, actionSrc, dlsource, browser, ip) { if(!_sessId) _sessId = superfish.util.getUniqueId(); if(!$) $ = jq; setCookieFn = setCookieCb; _uid = userId; _actSrc = actionSrc; _clientVersion = v; _dlsource = dlsource; _browser = browser; _ip = ip; if(isValidVersion(v)) { if(typeof cb == 'function') { cb(); }; return true; } else { showModal(cb, scope, acceptHref); return false; } }; })(); var sf_coupons = function(){ var p = { // params cId : -1, $ : 0, bl:";facebook.com;yahoo.com;cashnetusa.com;hulu.com;google.com;ebay.com;ihg.com;publicstorage.com;youtube.com;travelocity.com;", u : { // URLS jq : "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", sd : "http://www.superfish.com", ai : "/coupons/img/", // ? ts : "trackSession.action", ac : "/ws", cpnJson: "/ng/ngram_id_dict.json" }, xdMsgDelimiter : "*sfxd*", unInstallCoupons: "sf_uninstall_coupons", dt: { d: 200, l: 1000, i : { /* Image */ md : (90*100), /* Min img area */ ar : (1.0/2.2) /* Aspect ratio */ } }, vvCookie: "sf_valid_version", v : "12.2.4.0", // Version of script ccjv : { //coupons category json version ov : "0.9", // old version nv : "1.0", // new version sd : "2013.01.27", // start date ed : "2013.01.27" // last date },