(function(n){var p=function(a){this.init(a)};n.extend(p.prototype,{init:function(a){if(window.Lens){var e=function(c){var b="www.collect.stg.stratus.qa.ebay.com/collect";if(c==="prod"||c==="preprod"){var d=a.hostName?a.hostName:window.location.hostname;b=/\.ebay.com$|\.ebay.co.uk$|\.ebay.de$/i.test(d)?d.replace(/[a-zA-Z0-9\.-]*\.ebay\./,"svcs.ebay.")+"/buying":"svcs.ebay.com/buying"}return b},i=function(){var c="&srt="+encodeURIComponent(a.csrfToken?a.csrfToken:"")+"&siteId="+encodeURIComponent(a.siteId?
a.siteId:"EBAY-US")+"&countryId="+encodeURIComponent(a.countryId?a.countryId:"US")+"&localeId="+encodeURIComponent(a.localeId?a.localeId:"en-US");return c};new window.Lens({sid:a.pageId?a.pageId:"",delegator:a.delegator?a.delegator:"",trigger:a.className?"."+a.className:".clnw-collect",restBase:{qa:"http://"+e("qa")+"/collections/v1/collected?method=post"+i(),prod:"http://"+e("prod")+"/collections/v1/collected?method=post"+i(),preprod:"http://"+e("preprod")+"/collections/v1/collected?method=post"+
i()},resourceData:{mainTemplate:"template.collectItem",jsURL:"http://ir.ebaystatic.com/z/au/rmo02kxjqiyntbglr254k1hxq.js",styleTemplates:["template.collectWidgetStyle"],containerMarkup:'<div id="colwContainer" class="clnwItemTempl"></div>'},url:function(c,b,d){var j=d["var"]?d["var"]:0;return c+"&itemId="+b+"&variationId="+j},actionVerifier:function(c){var b=["clnw-collect"],d,j=b.length;for(d=0;d<j;d++)if(b[d]===c)return true;return false},cache:false,dataMassager:function(c){var b=a?a:{};return window.CollectWidget(b,
c)}})}}});var o=null;n.CollectWidgetInit=function(a){o||(o=new p(a));return o};n(document).ready(function(a){var e=document.createElement("style");e.type="text/css";var i=".colw-tooltip {background: none repeat scroll 0 0 #ffffff;border: 1px solid #dddddd;border-radius: 3px 3px 3px 3px;box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.35);font-size: 13px;padding: 20px;position: absolute;top: 36px;width: 340px;line-height: 17px;z-index:999;color:#333333;margin-top: 5px;font-family: arial;}.clnw-icn .colw-tooltip {top: 42px;}.clnw-lk .colw-tooltip {top: 22px;}",
c='.colw-tooltip:before {border-bottom: 7px solid #ffffff;border-left: 7px solid transparent;border-right: 7px solid transparent;border-color: #dddddd transparent;content: "";display: inline-block;left: 10px;position: absolute;top: -7px;}.colw-tooltip:after {border-bottom: 6px solid #ffffff;border-left: 6px solid transparent;border-right: 6px solid transparent;content: "";display: inline-block;left: 11px;position: absolute;top: -6px;}.colw-tooltip.tor:before {left: 92%;}.colw-tooltip.tor:after {left: 92.5%;}',
b;b=a.browser.msie&&parseFloat(a.browser.version)<9?i:i+c;if(e.styleSheet)e.styleSheet.cssText=b;else e.appendChild(document.createTextNode(b));var d=document.getElementsByTagName("head")[0];d.appendChild(e);var j=a("body"),q=j.find("#clnw-txt");j.on("mouseenter",".clnw",function(){var f=a(this),v=f.find(".clnw-c"),r=f.find(".colw-tooltip"),s=function(w){var k=a("<div>",{"class":"colw-tooltip"}).text(q.data("cd")),x=a("<div>",{"class":"colw-tooltip"}).text(q.data("c"));k=w?k:x;r.length&&r.remove();
f.append(k);k.show()};v.length?s(false):s(true);if(f.hasClass("fx-clnw")&&f.find(".colw-tooltip").css("position")=="fixed"){var g=f.offset(),h=f.height();h=g.top+(h+5)+"px";g=g.left+"px";f.find(".colw-tooltip").css({top:h,left:g})}else{g=a(document.body).width();h=a(this).offset().left;var y=a(this).width(),t=false;if(a(this).closest("#stage").length!==0){var z=a(window).width()-(a(this).offset().left+a(this).outerWidth());if(a("#stage")){var A=a(window).width()-(a("#stage").offset().left+a("#stage").outerWidth());
t=z-A<=340?true:false}}if(g&&h){var u=g-h,l=f.find(".colw-tooltip"),m=l.width()+15;if(u<=m&&y+h>m||t){l.addClass("tor");l.css("right","0")}else if(g<=m||u<=m)l.hide()}}}).on("mouseleave",".clnw",function(){a(this).find(".colw-tooltip").hide().removeClass("tor")})})})(window.jQuery);
