try { /*! Sizzle v1.9.4-pre | (c) 2013 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){function n(e,t,n,r){var o,i,u,l,a,c,f,s,h,g;if((t?t.ownerDocument||t:F)!==R&&I(t),t=t||R,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if($&&!r){if(o=vt.exec(e))if(u=o[1]){if(9===l){if(i=t.getElementById(u),!i||!i.parentNode)return n;if(i.id===u)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(u))&&O(t,i)&&i.id===u)return n.push(i),n}else{if(o[2])return et.apply(n,t.getElementsByTagName(e)),n;if((u=o[3])&&E.getElementsByClassName&&t.getElementsByClassName)return et.apply(n,t.getElementsByClassName(u)),n}if(E.qsa&&(!q||!q.test(e))){if(s=f=k,h=t,g=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){for(c=p(e),(f=t.getAttribute("id"))?s=f.replace(xt,"\\$&"):t.setAttribute("id",s),s="[id='"+s+"'] ",a=c.length;a--;)c[a]=s+d(c[a]);h=pt.test(e)&&t.parentNode||t,g=c.join(",")}if(g)try{return et.apply(n,h.querySelectorAll(g)),n}catch(m){}finally{f||t.removeAttribute("id")}}}return x(e.replace(ct,"$1"),t,n,r)}function r(){function e(n,r){return t.push(n+=" ")>T.cacheLength&&delete e[t.shift()],e[n]=r}var t=[];return e}function o(e){return e[k]=!0,e}function i(e){var t=R.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function u(e,t){for(var n=e.split("|"),r=e.length;r--;)T.attrHandle[n[r]]=t}function l(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Q)-(~e.sourceIndex||Q);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function f(e){return o(function(t){return t=+t,o(function(n,r){for(var o,i=e([],n.length,t),u=i.length;u--;)n[o=i[u]]&&(n[o]=!(r[o]=n[o]))})})}function s(){}function p(e,t){var r,o,i,u,l,a,c,f=U[e+" "];if(f)return t?0:f.slice(0);for(l=e,a=[],c=T.preFilter;l;){(!r||(o=ft.exec(l)))&&(o&&(l=l.slice(o[0].length)||l),a.push(i=[])),r=!1,(o=st.exec(l))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ct," ")}),l=l.slice(r.length));for(u in T.filter)!(o=mt[u].exec(l))||c[u]&&!(o=c[u](o))||(r=o.shift(),i.push({value:r,type:u,matches:o}),l=l.slice(r.length));if(!r)break}return t?l.length:l?n.error(e):U(e,a).slice(0)}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=j++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,u){var l,a,c,f=z+" "+i;if(u){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||o)if(c=t[k]||(t[k]={}),(a=c[r])&&a[0]===f){if((l=a[1])===!0||l===w)return l===!0}else if(a=c[r]=[f],a[1]=e(t,n,u)||w,a[1]===!0)return!0}}function g(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,o){for(var i,u=[],l=0,a=e.length,c=null!=t;a>l;l++)(i=e[l])&&(!n||n(i,r,o))&&(u.push(i),c&&t.push(l));return u}function y(e,t,n,r,i,u){return r&&!r[k]&&(r=y(r)),i&&!i[k]&&(i=y(i,u)),o(function(o,u,l,a){var c,f,s,p=[],d=[],h=u.length,g=o||b(t||"*",l.nodeType?[l]:l,[]),y=!e||!o&&t?g:m(g,p,e,l,a),v=n?i||(o?e:h||r)?[]:u:y;if(n&&n(y,v,l,a),r)for(c=m(v,d),r(c,[],l,a),f=c.length;f--;)(s=c[f])&&(v[d[f]]=!(y[d[f]]=s));if(o){if(i||e){if(i){for(c=[],f=v.length;f--;)(s=v[f])&&c.push(y[f]=s);i(null,v=[],c,a)}for(f=v.length;f--;)(s=v[f])&&(c=i?nt.call(o,s):p[f])>-1&&(o[c]=!(u[c]=s))}}else v=m(v===u?v.splice(h,v.length):v),i?i(null,u,v,a):et.apply(u,v)})}function v(e){for(var t,n,r,o=e.length,i=T.relative[e[0].type],u=i||T.relative[" "],l=i?1:0,a=h(function(e){return e===t},u,!0),c=h(function(e){return nt.call(t,e)>-1},u,!0),f=[function(e,n,r){return!i&&(r||n!==L)||((t=n).nodeType?a(e,n,r):c(e,n,r))}];o>l;l++)if(n=T.relative[e[l].type])f=[h(g(f),n)];else{if(n=T.filter[e[l].type].apply(null,e[l].matches),n[k]){for(r=++l;o>r&&!T.relative[e[r].type];r++);return y(l>1&&g(f),l>1&&d(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(ct,"$1"),n,r>l&&v(e.slice(l,r)),o>r&&v(e=e.slice(r)),o>r&&d(e))}f.push(n)}return g(f)}function N(e,t){var r=0,i=t.length>0,u=e.length>0,l=function(o,l,a,c,f){var s,p,d,h=[],g=0,y="0",v=o&&[],N=null!=f,b=L,x=o||u&&T.find.TAG("*",f&&l.parentNode||l),C=z+=null==b?1:Math.random()||.1;for(N&&(L=l!==R&&l,w=r);null!=(s=x[y]);y++){if(u&&s){for(p=0;d=e[p++];)if(d(s,l,a)){c.push(s);break}N&&(z=C,w=++r)}i&&((s=!d&&s)&&g--,o&&v.push(s))}if(g+=y,i&&y!==g){for(p=0;d=t[p++];)d(v,h,l,a);if(o){if(g>0)for(;y--;)v[y]||h[y]||(h[y]=Z.call(c));h=m(h)}et.apply(c,h),N&&!o&&h.length>0&&g+t.length>1&&n.uniqueSort(c)}return N&&(z=C,L=b),v};return i?o(l):l}function b(e,t,r){for(var o=0,i=t.length;i>o;o++)n(e,t[o],r);return r}function x(e,t,n,r){var o,i,u,l,a,c=p(e);if(!r&&1===c.length){if(i=c[0]=c[0].slice(0),i.length>2&&"ID"===(u=i[0]).type&&E.getById&&9===t.nodeType&&$&&T.relative[i[1].type]){if(t=(T.find.ID(u.matches[0].replace(Ct,Et),t)||[])[0],!t)return n;e=e.slice(i.shift().value.length)}for(o=mt.needsContext.test(e)?0:i.length;o--&&(u=i[o],!T.relative[l=u.type]);)if((a=T.find[l])&&(r=a(u.matches[0].replace(Ct,Et),pt.test(i[0].type)&&t.parentNode||t))){if(i.splice(o,1),e=r.length&&d(i),!e)return et.apply(n,r),n;break}}return D(e,c)(r,t,!$,n,pt.test(e)),n}var C,E,w,T,A,S,D,L,B,I,R,P,$,q,H,M,O,k="sizzle"+-new Date,F=e.document,z=0,j=0,G=r(),U=r(),V=r(),X=!1,J=function(e,t){return e===t?(X=!0,0):0},K=typeof t,Q=1<<31,W={}.hasOwnProperty,Y=[],Z=Y.pop,_=Y.push,et=Y.push,tt=Y.slice,nt=Y.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},rt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ot="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ut=it.replace("w","w#"),lt="\\["+ot+"*("+it+")"+ot+"*(?:([*^$|!~]?=)"+ot+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ut+")|)|)"+ot+"*\\]",at=":("+it+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+lt.replace(3,8)+")*)|.*)\\)|)",ct=RegExp("^"+ot+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ot+"+$","g"),ft=RegExp("^"+ot+"*,"+ot+"*"),st=RegExp("^"+ot+"*([>+~]|"+ot+")"+ot+"*"),pt=RegExp(ot+"*[+~]"),dt=RegExp("="+ot+"*([^\\]'\"]*)"+ot+"*\\]","g"),ht=RegExp(at),gt=RegExp("^"+ut+"$"),mt={ID:RegExp("^#("+it+")"),CLASS:RegExp("^\\.("+it+")"),TAG:RegExp("^("+it.replace("w","w*")+")"),ATTR:RegExp("^"+lt),PSEUDO:RegExp("^"+at),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ot+"*(even|odd|(([+-]|)(\\d*)n|)"+ot+"*(?:([+-]|)"+ot+"*(\\d+)|))"+ot+"*\\)|)","i"),bool:RegExp("^(?:"+rt+")$","i"),needsContext:RegExp("^"+ot+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ot+"*((?:-\\d)?\\d*)"+ot+"*\\)|)(?=[^-]|$)","i")},yt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Nt=/^(?:input|select|textarea|button)$/i,bt=/^h\d$/i,xt=/'|\\/g,Ct=RegExp("\\\\([\\da-f]{1,6}"+ot+"?|("+ot+")|.)","ig"),Et=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{et.apply(Y=tt.call(F.childNodes),F.childNodes),Y[F.childNodes.length].nodeType}catch(wt){et={apply:Y.length?function(e,t){_.apply(e,tt.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}S=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},E=n.support={},I=n.setDocument=function(e){var n=e?e.ownerDocument||e:F,r=n.defaultView;return n!==R&&9===n.nodeType&&n.documentElement?(R=n,P=n.documentElement,$=!S(n),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){I()}),E.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),E.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),E.getElementsByClassName=i(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),E.getById=i(function(e){return P.appendChild(e).id=k,!n.getElementsByName||!n.getElementsByName(k).length}),E.getById?(T.find.ID=function(e,t){if(typeof t.getElementById!==K&&$){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(Ct,Et);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(Ct,Et);return function(e){var n=typeof e.getAttributeNode!==K&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=E.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==K?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},T.find.CLASS=E.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==K&&$?n.getElementsByClassName(e):t},H=[],q=[],(E.qsa=yt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||q.push("\\["+ot+"*(?:value|"+rt+")"),e.querySelectorAll(":checked").length||q.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&q.push("[*^$]="+ot+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(E.matchesSelector=yt.test(M=P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(e){E.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),H.push("!=",at)}),q=q.length&&RegExp(q.join("|")),H=H.length&&RegExp(H.join("|")),O=yt.test(P.contains)||P.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=P.compareDocumentPosition?function(e,t){if(e===t)return X=!0,0;var r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return r?1&r||!E.sortDetached&&t.compareDocumentPosition(e)===r?e===n||O(F,e)?-1:t===n||O(F,t)?1:B?nt.call(B,e)-nt.call(B,t):0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,o=0,i=e.parentNode,u=t.parentNode,a=[e],c=[t];if(e===t)return X=!0,0;if(!i||!u)return e===n?-1:t===n?1:i?-1:u?1:B?nt.call(B,e)-nt.call(B,t):0;if(i===u)return l(e,t);for(r=e;r=r.parentNode;)a.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;a[o]===c[o];)o++;return o?l(a[o],c[o]):a[o]===F?-1:c[o]===F?1:0},n):R},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==R&&I(e),t=t.replace(dt,"='$1']"),!(!E.matchesSelector||!$||H&&H.test(t)||q&&q.test(t)))try{var r=M.call(e,t);if(r||E.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return n(t,R,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==R&&I(e),O(e,t)},n.attr=function(e,n){(e.ownerDocument||e)!==R&&I(e);var r=T.attrHandle[n.toLowerCase()],o=r&&W.call(T.attrHandle,n.toLowerCase())?r(e,n,!$):t;return o===t?E.attributes||!$?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o},n.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],r=0,o=0;if(X=!E.detectDuplicates,B=!E.sortStable&&e.slice(0),e.sort(J),X){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return e},A=n.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=A(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r];r++)n+=A(t);return n},T=n.selectors={cacheLength:50,createPseudo:o,match:mt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ct,Et),e[3]=(e[4]||e[5]||"").replace(Ct,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return mt.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&ht.test(r)&&(n=p(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ct,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=G[e+" "];return t||(t=RegExp("(^|"+ot+")"+e+"("+ot+"|$)"))&&G(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(o){var i=n.attr(o,e);return null==i?"!="===t:t?(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i+" ").indexOf(r)>-1:"|="===t?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),u="last"!==e.slice(-4),l="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,a){var c,f,s,p,d,h,g=i!==u?"nextSibling":"previousSibling",m=t.parentNode,y=l&&t.nodeName.toLowerCase(),v=!a&&!l;if(m){if(i){for(;g;){for(s=t;s=s[g];)if(l?s.nodeName.toLowerCase()===y:1===s.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[u?m.firstChild:m.lastChild],u&&v){for(f=m[k]||(m[k]={}),c=f[e]||[],d=c[0]===z&&c[1],p=c[0]===z&&c[2],s=d&&m.childNodes[d];s=++d&&s&&s[g]||(p=d=0)||h.pop();)if(1===s.nodeType&&++p&&s===t){f[e]=[z,d,p];break}}else if(v&&(c=(t[k]||(t[k]={}))[e])&&c[0]===z)p=c[1];else for(;(s=++d&&s&&s[g]||(p=d=0)||h.pop())&&((l?s.nodeName.toLowerCase()!==y:1!==s.nodeType)||!++p||(v&&((s[k]||(s[k]={}))[e]=[z,p]),s!==t)););return p-=o,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var r,i=T.pseudos[e]||T.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return i[k]?i(t):i.length>1?(r=[e,e,"",t],T.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,n){for(var r,o=i(e,t),u=o.length;u--;)r=nt.call(e,o[u]),e[r]=!(n[r]=o[u])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=D(e.replace(ct,"$1"));return r[k]?o(function(e,t,n,o){for(var i,u=r(e,null,o,[]),l=e.length;l--;)(i=u[l])&&(e[l]=!(t[l]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),!n.pop()}}),has:o(function(e){return function(t){return n(e,t).length>0}}),contains:o(function(e){return function(t){return(t.textContent||t.innerText||A(t)).indexOf(e)>-1}}),lang:o(function(e){return gt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(Ct,Et).toLowerCase(),function(t){var n;do if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===R.activeElement&&(!R.hasFocus||R.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return bt.test(e.nodeName)},input:function(e){return Nt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:f(function(){return[0]}),last:f(function(e,t){return[t-1]}),eq:f(function(e,t,n){return[0>n?n+t:n]}),even:f(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:f(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:f(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:f(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[C]=a(C);for(C in{submit:!0,reset:!0})T.pseudos[C]=c(C);s.prototype=T.filters=T.pseudos,T.setFilters=new s,D=n.compile=function(e,t){var n,r=[],o=[],i=V[e+" "];if(!i){for(t||(t=p(e)),n=t.length;n--;)i=v(t[n]),i[k]?r.push(i):o.push(i);i=V(e,N(o,r))}return i},E.sortStable=k.split("").sort(J).join("")===k,E.detectDuplicates=X,I(),E.sortDetached=i(function(e){return 1&e.compareDocumentPosition(R.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||u("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),E.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||u("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||u(rt,function(e,n,r){var o;return r?t:(o=e.getAttributeNode(n))&&o.specified?o.value:e[n]===!0?n.toLowerCase():null}),"function"==typeof define&&define.noamd?define(function(){return n}):e.cbar_Sizzle=n})(window); // #4322 //if (typeof window.cbar_Sizzle =='undefined') window.cbar_Sizzle=jQuery.find; var cbar_url= window.location.href; var cbar_url_en = encodeURIComponent(cbar_url); var cbar_dynamic_url = '//www.barilliance.net/'; var cbar_static_url = '//s3.amazonaws.com/static.barilliance.com/'; var cbar_userimages = '//s3.amazonaws.com/userimages.barilliance.com/'; var cbar_wl = false; var cbar_debug=1; var cbar_startearly=false; var cbar_ui_t=''; var cbar_ui_n=''; var cbar_ui_s=''; var cbar_urls_update=false; var cbar_md= false; var cbar_ro= false; var cbar_force_li= false; var cbar_uro= false; var cbar_add_data=false; var cbar_cid=''; var cbar_pid2cid=''; var cbar_cname=''; var cbar_c_from_p=false; var cbar_cattree=false; var cbar_cat_cids=[]; var cbar_cat_level =0; var cbar_cids_cur=''; var cbar_cids_p=''; var cbar_cats_l=[]; var cbar_cats_c=[]; var cbar_lnk=5; var cbar_pid=''; var cbar_pid_unique=1; var cbar_qty=1; var cbar_hidden_mode=true; var cbar_logo="star16.png"; var cbar_results = null; var cbar_str1; var cbar_str2; var cbar_str1_w=90; var cbar_str2_w=90; var cbar_strs_fsize =15; var cbar_strs= null; var cbar_sid=0; var cbar_uid; var cbar_nuid=0; var cbar_pic=''; var cbar_name=''; var cbar_purl=''; var cbar_auto_curl=''; var cbar_auto_cname=''; var cbar_auto_curl_p=''; var cbar_catmode=1; var cbar_cm2_update=false; var cbar_pri=''; var cbar_bgcolor='white'; var cbar_bordercolor='gray'; var cbar_icon_bordercolor='orange'; var cbar_color='darkgray'; var cbar_pop_bgcolor='#CAE1FF'; var cbar_pop_bordercolor='gray'; var cbar_pop_color='#050505'; var cbar_pop_pri_color='green'; var cbar_pop_width=250; var cbar_pop_show_clk = false; var cbar_details_template=''; var cbar_rss = false; var cbar_is_add=false;// obsolete var cbar_is_pur=false; var cbar_is_checkout=false; var cbar_pur_pids=[]; var cbar_pur_qtys=[]; var cbar_pur_imgs=[]; var cbar_pur_names=[]; var cbar_pur_urls=[]; var cbar_pur_prices=[]; var cbar_pur_subttls=[]; var cbar_pur_xtr1s=[]; var cbar_pur_xtr2s=[]; var cbar_pur_xtr3s=[]; var cbar_pur_xtr4s=[]; var cbar_pur_add=false; var cbar_pur_pid_add=''; var cbar_pur_qty_add=0; var cbar_crt=''; var cbar_crst=''; var cbar_crtn=''; var cbar_shp=''; var cbar_pur_com=false; var cbar_pur_mode =0; var cbar_home=false; var cbar_other=false; var cbar_brand=false; var cbar_switchto=null; var cbar_encode = false; //false means utf-8 var cbar_lang= false; var cbar_block_bt=false; var cbar_cookiedomain = ''; var cbar_user_attributes= new Object(); var cbar_user_attribute= new Object(); var cbar_product_attributes= new Object(); var cbar_del_user_attributes= new Object(); var cbar_del_product_attributes= new Object(); var cbar_userinfo= new Object(); var cbar_rtl=false; var cbar_height =60; var cbar_width =0; var cbar_round_corners=false; var cbar_showprice=false; var cbar_showiconprice=false; var cbar_showicontext1 = false; var cbar_showicontext2 = false; var cbar_icontext_width1 = 0; var cbar_icontext_width2 = 0; var cbar_showiconprice1=false; var cbar_showiconprice2=false; var cbar_showicontext_price=true; var cbar_showicontext_text = true; var cbar_numicons1 = 6; var cbar_numicons2 = 4; var cbar_iconspace=5; var cbar_dynamic = true; var cbar_ratio = 0.2; var cbar_currency = '$'; var cbar_pcm = 0; var cbar_icontext_col = 'red'; var cbar_iconwidth_small= 55; var cbar_iconheight_small= 49; var cbar_iconwidth_large= 110; var cbar_iconheight_large= 125; var cbar_icontext_len = 35; var cbar_icontext_fsize=13; var cbar_icontext_template ; var cbar_spacers_width = 110; var cbar_flash_mode =0; var cbar_PositionFixedSupported = true; // default var cbar_abt=0; var cbar_abt_key=1; var cbar_pagetype="U"; var cbar_log=''; var cbar_elog=''; var cbar_logg=''; var cbar_log_hov=false; var cbar_popup_link='more details'; var cbar_pop_add2cart =''; var cbar_global_temp; var cbar_oos = 0; var cbar_norecs=null; var cbar_oos_page = 0; var cbar_auto_oos =true; var cbar_ne = null; var cbar_ne_html=''; var cbar_sa = null; var cbar_sa_html=''; var cbar_bs = null; var cbar_bs_html=''; var cbar_pd = null; var cbar_pd_html=''; var cbar_fl1 = null; var cbar_fl1_html=''; var cbar_fl2 = null; var cbar_fl2_html=''; var cbar_questionmark = true; var cbar_demo_mode = false; var cbar_img_search =''; var cbar_img_replace =''; var ie7u =false; var cbar_shf = false; var cbar_ipuid_save=false; var cbar_ipuid_get=false; var cbar_live_stock=''; var cbar_span_template =''; var cbar_span_width = 300; var cbar_span_bg_t= "span/popup_top.png"; var cbar_span_bg= "span/popup_middle.png"; var cbar_span_bg_b= "span/popup_bottom.png"; var ie6_small_icons_shift = false; var cbar_extra1=''; var cbar_extra2=''; var cbar_extra3=''; var cbar_xtxt=''; var cbar_filter_val=''; var cbar_flow =''; var cbar_num_widgets =2; var cbar_search=''; var cbar_e_clk=false; var cbar_ctr1=0; var cbar_ctr2=0; var cbar_ctr3=0; var cbar_liX=1; var cbar_liP=1; var cbar_liL=1; var cbar_new_mode_enabled = false; var cbar_widget_show = false; var cbar_widget_to_draw=0; //1,2,0=all var cbar_widget=false; var cbar_w_template_head= []; var cbar_w_item_template=[]; var cbar_w_linebreak_template=[]; var cbar_w_iconsperline=[]; var cbar_w_template_bottom=[]; var cbar_w_anchor = []; var cbar_w_insert_where=[]; // 0=after 1=before 2=child 3= overwrite var cbar_w_title_len= 199; var cbar_w_scrollbuttons = []; var cbar_w_numshowicons = []; var cbar_w_next_html= []; var cbar_w_prev_html= []; var cbar_dups_ok=false; // facebook fan_page var cbar_fb_fanpage=false; // for facebook widget (obsolete) var cbar_fb_show = false; var cbar_fb=false; var cbar_fb_iniframe=true; var cbar_fb_api_key = ''; var cbar_fb_channel_path = "xd_receiver.htm";//todo- move to def file var cbar_fb_api = null; var cbar_fb_id =null; var cbar_fb_anchor=null; var cbar_fb_width=400; var cbar_fb_url_sep ='&'; var cbar_fb_wantit='tbd...'; var cbar_fb_isconnected =null; var cbar_fb_template_loggedout=''; var cbar_fb_template_loggedin=''; var cbar_fb_template_loggedinuser=''; var cbar_fb_feed_template=''; var cbar_fb_actionlink=''; var cbar_fb_insert_where=0; // 0=after 1=before 2=child 3= overwrite var cbar_fb_wl_item_template =''; var cbar_fb_wl_bottom_template =''; var cbar_fb_wl_head_template =''; var cbar_fb_wl_empty=''; var cbar_fb_wl_width=400; var cbar_fb_wl_height = 300; var cbar_fb_wl_offset = -100; var cbar_fb_get_random = false; var cbar_fb_get_emails_perm=false; var cbar_fb_ref=''; var cbar_fb_clk=false; var cbar_shortlist_show= false; var cbar_LP=false; // internal var cbar_preview_rules=""; var cbar_datajs='data.js.php'; var cbar_override_titles=[]; var rule_title_index= []; var cbar_recstep_titles =[]; var cbar_new_mode = false; var cbar_suppress_rules=[]; var cbar_user_wantit = false; var cbar_fb_total_wantit =0; var cbar_fb_friends=[]; var cbar_fb_friends_str=''; var cbar_fb_wantit_friends=[]; var cbar_fb_wantit_nonfriends=[]; var cbar_fb_total_wantit_friends =0; var cbar_fb_random_users =[]; var cbar_wl_items = []; var cbar_lvt=0; var cbar_sess=0; var cbar_sess_pv=0; var cbar_date = new Date(); var cbar_abt_str =''; var cbar_scrolltimeout =0; var cbar_resizetimeout =0; var cbar_ban_resizetimeout =0; var cbar_ban_scrolltimeout =0; var cbar_ban_retrytimeout =0; var cbar_banners=[]; var cbar_coups=[]; var cbar_e_input=[]; var cbar_e_last=''; var cbar_e_com=false; var cbar_e_checkbox=[]; var cbar_cou_input=''; var cbar_rules_str=''; var cbar_popups=[]; var cbar_pop_scrolltimeout =0; var cbar_img_overlay_show_params=[]; var cbar_ba=false; var cbar_trust_outdiv_css='position:absolute'; var cbar_subproducts_attrib =''; var cbar_cat_personalization = false; var cbar2url ={ cbar_cid: "cid", cbar_pid2cid: "pid2cid", cbar_pic: "pic", cbar_name: "name", cbar_purl: "purl", cbar_auto_curl: "acurl", cbar_auto_curl_p: "acurl_p", cbar_auto_cname: "acname", cbar_pri: "pri", cbar_log: "lo", cbar_elog: "elo", cbar_logg: "logg", cbar_crt: "crt", cbar_crtn: "crtn", cbar_crst: "crst", cbar_shp: "shp", cbar_extra1: "xtr1", cbar_extra2: "xtr2", cbar_extra3: "xtr3", cbar_extra4: "xtr4", cbar_xtxt: "xtxt", cbar_filter_val: "fltr", cbar_oos:"oos", cbar_live_stock:"stk", cbar_subproducts_attrib:'subattr' } //ret var cbar_pub_only=false; //true= only publisher var cbar_adv=false; function cbar_findPos(obj) { var curleft = curtop =curright= 0; var objwidth= obj.scrollWidth; var objheight= obj.scrollHeight; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curleft,curtop,window.document.body.scrollWidth- curleft- objwidth, curtop+objheight]; } } // widget file var cbar_curricon = [0,0,0,0]; var action_text=''; var cbar_w_shownext =[false,false,false,false]; var cbar_w_showprev=[false,false,false,false]; function cbar_w_init () { return; } function cbar_data_returned_widget(){ // if (typeof (cbar_after_load) =='function') cbar_after_load('widget'); for (var i=0; i < cbar_results.length; i++ ){ if ((cbar_widget_to_draw >0) && (cbar_widget_to_draw-1) !=i) continue; if (( cbar_results[i].length ==0) || (cbar_w_anchor.length 0) cbar_w_showprev[i]=true; else cbar_w_showprev[i]=false; } if (typeof cbar_w_numshowicons[i] !='number') cbar_w_numshowicons[i] = 99; if (typeof cbar_override_titles[i] !='undefined') title_index= cbar_override_titles[i] ; else title_index=cbar_recstep; if (typeof rule_title_index[i] !='undefined') title_index = rule_title_index[i]; cbar_widget_html= cbar_w_template_head[i].replace(/%group_title%/g, cbar_recstep_titles[title_index]); var cbar_numicons=eval ('cbar_numicons'+(i+1)); for (var t=cbar_curricon[i]; (t < cbar_results[i].length) && ( t < cbar_numicons)&& ((t-cbar_curricon[i]) 0) &&((t % cbar_w_iconsperline[i])==0 ) && (typeof cbar_w_linebreak_template[i] !='undefined')) cbar_widget_html+=cbar_w_linebreak_template[i]; try {//#231 var cbar_short_title = decodeURIComponent(cbar_results[i][t][2].replace (/\+/g, ' ')); }catch (err){ var cbar_short_title=unescape(cbar_results[i][t][2]).replace (/\+/g, ' '); } cbar_short_title=cbar_short_title.substring(0, cbar_w_title_len); if (cbar_short_title.length == cbar_w_title_len) cbar_short_title+='...'; try{ //#231 var cbar_tmp_xtr1=decodeURIComponent(cbar_results[i][t][16].replace (/\+/g, ' ')); }catch (err){ var cbar_tmp_xtr1=unescape(cbar_results[i][t][16]); } try{ var cbar_tmp_xtr2=decodeURIComponent(cbar_results[i][t][17].replace (/\+/g, ' ')); }catch (err){ var cbar_tmp_xtr2=unescape(cbar_results[i][t][17]); } try{ var cbar_tmp_xtr3=decodeURIComponent(cbar_results[i][t][18].replace (/\+/g, ' ')); }catch (err){ var cbar_tmp_xtr3=unescape(cbar_results[i][t][18]); } try{ var cbar_tmp_xtr4=decodeURIComponent(cbar_results[i][t][23].replace (/\+/g, ' ')); }catch (err){ var cbar_tmp_xtr4=unescape(cbar_results[i][t][23]); } var cbar_clk_js = ' return cbar_click(document.getElementById(\'cbar_div_'+(i+1)+(t+1)+'\'))'; // taken from bar. needs check if (cbar_recstep ==19) { try{ action_text=eval('ra_action_texts.'+eval('cbar_ra_data_'+cbar_results[i][t][0]+'.activity'));} catch(error){action_text='';}; } var cbar_recs_live=''; var cbar_notifications = JSON.parse(cbar_results[i][t][22]); if (cbar_notifications.length >0) { cbar_recs_live="
"; for(var key=0; key< cbar_notifications.length ; key++) { cbar_recs_live+="
"+cbar_notifications[key]+"
"; } cbar_recs_live+="
"; } cbar_widget_html+= cbar_w_item_template[i].replace(/%picture%/g, decodeURIComponent(cbar_results[i][t][1].replace (/\+/g, ' '))) .replace(/%idx%/g, cbar_results[i][t][0]) .replace(/%rectype%/g, cbar_recstep) .replace(/%title%/g, cbar_short_title) .replace(/%ra_action%/g, action_text ) .replace(/%url%/g, decodeURIComponent(cbar_results[i][t][3].replace (/\+/g, ' '))) .replace(/%price%/g, decodeURIComponent(cbar_results[i][t][4].replace (/\+/g, ' '))) .replace(/%price_clean%/g, decodeURIComponent(cbar_results[i][t][5].replace (/\+/g, ' '))) .replace(/%pid%/g, decodeURIComponent(cbar_results[i][t][6].replace (/\+/g, ' '))) .replace(/%clicks%/g, decodeURIComponent(cbar_results[i][t][7].replace (/\+/g, ' '))) .replace(/%hoovers%/g, decodeURIComponent(cbar_results[i][t][8].replace (/\+/g, ' '))) .replace(/%onclick%/g, cbar_clk_js) .replace(/%new%/g, (cbar_results[i][t][10]=='1') ? cbar_ne_html:'') .replace(/%sale%/g, (cbar_results[i][t][11]=='1') ? cbar_sa_html:'') .replace(/%bestseller%/g, (cbar_results[i][t][12]=='1') ? cbar_bs_html:'') .replace(/%pricedrop%/g, (cbar_results[i][t][13]=='1') ? cbar_pd_html:'') .replace(/%flag1%/g, (cbar_results[i][t][14]=='1') ? cbar_fl1_html:'') .replace(/%flag2%/g, (cbar_results[i][t][15]=='1') ? cbar_fl2_html:'') .replace(/%xtr1%/g, cbar_tmp_xtr1) .replace(/%xtr2%/g, cbar_tmp_xtr2) .replace(/%xtr3%/g, cbar_tmp_xtr3) .replace(/%xtr4%/g, cbar_tmp_xtr4) .replace(/%live_notifications%/g, cbar_recs_live) .replace(/%perc_purchased%/g, decodeURIComponent(cbar_results[i][t][19].replace (/\+/g, ' '))) .replace(/%subproducts%/g, decodeURIComponent(cbar_results[i][t][25].replace (/\+/g, ' '))) .replace(/%t%/g, t); } cbar_widget_html+= cbar_w_template_bottom[i]; cbar_w_prev_html_tmp=''; if (typeof cbar_w_prev_html =='object' && typeof cbar_w_prev_html[i]!='undefined') cbar_w_prev_html_tmp= cbar_w_prev_html[i]; if (typeof cbar_w_prev_html =='string') cbar_w_prev_html_tmp = cbar_w_prev_html; cbar_widget_html=cbar_widget_html.replace(/%prevbutton%/g, (cbar_w_showprev[i])?cbar_w_prev_html_tmp:""); cbar_w_next_html_tmp=''; if (typeof cbar_w_next_html =='object' && typeof cbar_w_next_html[i]!='undefined') cbar_w_next_html_tmp= cbar_w_next_html[i]; if (typeof cbar_w_next_html =='string') cbar_w_next_html_tmp = cbar_w_next_html; cbar_widget_html=cbar_widget_html.replace(/%nextbutton%/g, (cbar_w_shownext[i])?cbar_w_next_html_tmp:""); var cbar_tmp = document.createElement('div'); cbar_tmp.innerHTML = cbar_widget_html.replace(/%i%/g, i); var cbar_new_w = cbar_tmp.firstChild; var parent = cbar_w_anchor[i].parentNode; if (cbar_w_insert_where[i]==2) cbar_w_anchor[i].appendChild(cbar_new_w); else if (cbar_w_insert_where[i]==1) parent.insertBefore(cbar_new_w, cbar_w_anchor[i]); else if (cbar_w_insert_where[i]==3) parent.replaceChild(cbar_new_w, cbar_w_anchor[i]); else if (cbar_w_insert_where[i]==0) { if (parent.lastchild == cbar_w_anchor[i]) parent.appendChild(cbar_new_w); else parent.insertBefore(cbar_new_w, cbar_w_anchor[i].nextSibling); } } if (typeof (cbar_after_show) =='function') cbar_after_show('widget'); } function cbar_del_widgets(){ for (var i=0; i "; //body html+="
"; // bottom html+="
"+sl_by_barilliance+"
"; html+=""; // wrapper tmp=window.document.createElement('div'); tmp.innerHTML=html; window.document.body.appendChild(tmp.childNodes[0]); if (!cbar_PositionFixedSupported) { window.sl_element=document.getElementById('sl_wrapper');; // quicker positioning when fixed not supported sl_position_callback(); } loadjscssfile (cbar_shortlist_url+'shortlist.php?a=g&sid='+cbar_sid+'&uid='+cbar_uid+"&ts="+Math.ceil(10000*Math.random()),'js'); } /////////////////// // sl_fill_content function sl_fill_content() { var content_div=document.getElementById('sl_content'); products = window.sl_products; var html="
"; for (i=0; i< products.length; i++){ html+=sl_render_product (products[i]); } html+="
"; content_div.innerHTML=html; } /////////////////// // sl render product function sl_render_product (product){ var img_div_width=((sl_box_w-50)*0.4 -5); var info_div_width= ((sl_box_w-50)*0.6 -2) var short_title = decodeURIComponent(product.p_name).substring(0, sl_title_len); if (short_title.length == sl_title_len) short_title+='...'; var html="
"; html+=""; html+="
"; html+=" "; html+="
"; html+="
"; html+="
"+short_title+"
"; html+="
"+decodeURIComponent(product.p_price)+"
"; //html+=""+sl_button_html+""; html+="
"; html+="
"; html+="
"; return html; } //////////////////// // sl_close sl_close= function (){ var content_div=document.getElementById('sl_wrapper'); window.document.body.removeChild(content_div); show_tongue(); sl_update_count (); } /////////////// // sl_help sl_help=function (){ var content_div=document.getElementById('sl_content'); var html="
"; html+="
"; html+=sl_help_html; html+="
"; content_div.innerHTML=html; } /////////////////////////// // click on add button sl_add =function (e){ if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); loadjscssfile (cbar_shortlist_url+'shortlist.php?a=a&sid='+cbar_sid+'&uid='+cbar_uid+'&pid='+encodeURIComponent(cbar_pid)+'&url='+encodeURIComponent((cbar_purl=='')?cbar_url:cbar_purl)+'&pic='+encodeURIComponent(cbar_pic)+'&name='+encodeURIComponent(cbar_name)+'&pri='+encodeURIComponent(cbar_pri)+"&ts="+Math.ceil(10000*Math.random()),'js'); } /////////////////// // show_tongue function show_tongue (){ if (sl_side=='l') side_str=' left:0px; '; else side_str=' right:0px; '; var html="
"; if (!cbar_PositionFixedSupported) html=html.replace(/fixed/,'absolute'); // change to absolute positioning // Add tab // decide if we should show the add tab if ((cbar_pid.length) && (cbar_pic.length) && (cbar_name.length)) sl_add_show=true; else sl_add_show=false; // num items tab html+="
"; if (sl_add_show) html+="
"+sl_add_html+"
"; // tongue popup html+=""; html+=sl_tongue_html+"
"; tmp=window.document.createElement('div'); tmp.innerHTML=html; window.document.body.appendChild(tmp.childNodes[0]); if (!cbar_PositionFixedSupported) { window.sl_tongue_element=document.getElementById('sl_tongue'); // save for quicker positioning when fixed not supported sl_position_callback(); } // listen to clicks on tongue cbar_listen('click', document.getElementById('sl_tongue'), sl_show ); if (sl_add_show) cbar_listen('click', document.getElementById('sl_add'), sl_add ); // listen to clicks on add } ////////////////////////// // update count on the tongue // return count or NaN function sl_update_count(){ var cnt = parseInt( cbar_readCookie ('sl_cnt')); if (!isNaN(cnt)) { document.getElementById('sl_num_number').innerHTML=cnt; } return cnt; } //////////////////////// // sl_delete sl_delete = function (pid){ //if (!e) var e = window.event; //e.cancelBubble = true; //if (e.stopPropagation) e.stopPropagation(); loadjscssfile (cbar_shortlist_url+'shortlist.php?a=d&sid='+cbar_sid+'&uid='+cbar_uid+'&pid_int='+pid+"&ts="+Math.ceil(10000*Math.random()),'js'); return false; } ////////////////// // sl_popup sl_popup = function (message_text){ tmp=document.getElementById('sl_msg'); tmp.innerHTML=message_text; tmp=document.getElementById('sl_pop'); tmp.style.display='block'; setTimeout ('document.getElementById(\'sl_pop\').style.display=\'none\';',3000) } ////////////////// // call_returned sl_call_returned=function (action) { // store updated count in cookie if (action=='i') sl_update_count(); if (action=='a') { if (sl_product_added) sl_popup (sl_added_msg); else sl_popup (sl_exists_msg); sl_update_count(); } if (action=='g') { if (window.sl_products.length==0) { sl_help(); // show help if no products sl_popup (sl_noproducts); } else sl_fill_content (window.sl_products); } if (action=='d') sl_fill_content (window.sl_products); } /*function cbar_listen(evnt, elem, func) { if (elem.addEventListener) // W3C DOM elem.addEventListener(evnt,func,false); else if (elem.attachEvent) { // IE DOM var r = elem.attachEvent("on"+evnt, func); return r; } return false; } */ var qr_base='//s3.amazonaws.com/qrcode.barilliance.com/'; var qr_powered_by='
by Barilliance
'; var qr_top_img='qr_top.png'; var qr_body_img='qr_body.png'; var qr_bottom_img='qr_bottom.png'; var qr_box_w=291; var qr_box_t=100; var qr_close_img='qr_close.png'; var side_str=' right:0px; '; //////////////////// // cbar_QR_show // show qr code popup after banner was clicked cbar_QR_show =function (e){ if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); // delete tongue //var content_div=document.getElementById('sl_tongue'); //window.document.body.removeChild(content_div); var qr_left= parseInt((window.document.body.scrollWidth-qr_box_w)/2); var html="
"; if (!cbar_PositionFixedSupported) html=html.replace(/fixed/,'absolute'); // change to absolute positioning // top html+="
"; //body var cbar_qr_html=decodeURIComponent(window.cbar_qr_code.replace (/\+/g, ' ')); cbar_qr_html=cbar_qr_html.replace ('%qrcode%',' '); html+="
"; html+=cbar_qr_html; html+="
"; // bottom html+="
"+qr_powered_by+"
"; html+="
"; // wrapper tmp=window.document.createElement('div'); tmp.innerHTML=html; window.document.body.appendChild(tmp.childNodes[0]); if (!cbar_PositionFixedSupported) { window.qr_element=document.getElementById('qr_wrapper'); // quicker positioning when fixed not supported qr_position_callback(); } } //////////////////// // qr_close cbar_qr_close= function (){ var content_div=document.getElementById('qr_wrapper'); window.document.body.removeChild(content_div); } function cbar_click2 (a_element, url, rectype, to_pid) { // set temp cookie that will register the click after the page is switched to the selected product cbar_createCookie('cbar_rec_clk', rectype+','+to_pid+','+encodeURIComponent(cbar_pid)+','+encodeURIComponent(cbar_cid)+','+cbar_pagetype ,0); // will be deleted in next page view cbar_report_click(true); // first click report (sometimes may not work) = to support back button on IE we dont use redirection a_element.href= url; return true; // go to the product in the href (the click will be registered after the page chages- allows back button to work normally); } function cbar_click3 (a_element, url, rectype, to_pid, to_pid_orig) { // set temp cookie that will register the click after the page is switched to the selected product cbar_createCookie('cbar_rec_clk', rectype+','+to_pid+','+encodeURIComponent(cbar_pid)+','+encodeURIComponent(cbar_cid)+','+cbar_pagetype+','+encodeURIComponent(to_pid_orig) ,0); // will be deleted in next page view cbar_report_click(true); // first click report (sometimes may not work) = to support back button on IE we dont use redirection a_element.href= url; return true; // go to the product in the href (the click will be registered after the page chages- allows back button to work normally); } // check if we arrived from click on widget, if so, report it // The report happens twice, after the click and after the page change function cbar_report_click (before_page_change){ var data= cbar_readCookie('cbar_rec_clk'); if ( (data ==null) || (data==false) || (data=='false')) return; // click data exists if (!before_page_change) cbar_createCookie('cbar_rec_clk', false ,0); // 'delete' cookie (set to false actually) var datas = data.split(','); cbar_switchto=''; // legacy// obsolete loadjscssfile (cbar_dynamic_url+cbar_datajs+'?sid='+cbar_sid+'&uid='+cbar_uid+'&pid='+datas[1]+'&rt='+datas[0]+'&clk=1'+cbar_abt_str+"&f_pt="+datas[4]+"&f_cid="+(datas[3]?datas[3]:0)+"&f_pid="+(datas[2]?datas[2]:0)+"&ts="+Math.ceil(10000*Math.random()),'js'); } function cbar_click (obj) { var switch_to = obj.getAttribute ('xhref'); cbar_switchto =switch_to; loadjscssfile (cbar_dynamic_url+cbar_datajs+'?sid='+cbar_sid+'&uid='+cbar_uid+'&pid='+obj.getAttribute ('idx')+'&rt='+obj.getAttribute ('rectype')+'&clk=1'+cbar_abt_str+"&f_pt="+cbar_pagetype+"&f_cid="+(cbar_cid?cbar_cid:0)+"&f_pid="+(cbar_pid?cbar_pid:0)+"&ts="+Math.ceil(10000*Math.random()),'js'); return false; } function cbar_add2cart_click (obj) { loadjscssfile (cbar_dynamic_url+cbar_datajs+'?sid='+cbar_sid+'&uid='+cbar_uid+'&pid='+obj.getAttribute ('idx')+'&rt='+obj.getAttribute ('rectype')+'&a2c_clk=1'+cbar_abt_str+"&pt="+cbar_pagetype+"&ts="+Math.ceil(10000*Math.random()),'js'); return false; } function cbar_report_delayed_action (rule_id){ var str="&rid="+rule_id; if (typeof window['cbar_rule_suppressed_'+rule_id] !='undefined') str+='&supp=true'; // rule was suppressed from data.js loadjscssfile (cbar_dynamic_url+cbar_datajs+'?a=delayed&sid='+cbar_sid+'&uid='+cbar_uid+str+cbar_abt_str+'&ts='+Math.ceil(10000*Math.random()),'js'); cbar_log_console ('cbar rule '+rule_id+' triggered'); } function cbar_refresh_recommendations(new_pid) { // enhance user attributes (optional) // delete current widgets for (var i=0; i<4 ; i++){ var widget= cbar_Sizzle ('#cbar_widget'+i); if (widget.length) widget[0].parentNode.removeChild(widget[0]); } cbar_results = new Array (); cbar_subproducts= new Array (); loadjscssfile (cbar_dynamic_url+cbar_datajs+'?a=refrecs&sid='+cbar_sid+'&uid='+cbar_uid+'&pid='+encodeURIComponent(new_pid)+'&url='+cbar_url_en+'&flow='+cbar_flow+'&pt='+cbar_pagetype+'&'+cbar_any2url('attu',cbar_user_attributes)+"&"+cbar_any2url('attu1',cbar_user_attribute)+"&subattr="+cbar_subproducts_attrib+"&ts="+Math.ceil(10000*Math.random()),'js'); } // data from server function cbar_data_returned () { if ( cbar_new_mode && (typeof (cbar_after_load) =='function')) cbar_after_load('new_mode'); if (cbar_new_mode_enabled && cbar_new_mode) cbar_data_returned_new_mode (); if ( cbar_widget && (typeof (cbar_after_load) =='function')) cbar_after_load('widget'); if (cbar_widget && cbar_widget_show ) cbar_data_returned_widget(); // bar if (!cbar_hidden_mode ) cbar_data_returned_bar(); return 1; } var cbar_BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i0) return found; else return null; } function cbar_replace_global (search, replace, source){ var myRegExp = new RegExp(search,'ig'); return source.replace(myRegExp,replace); } function cbar_in_array (item, array) { var o = {}; for(var i=0;i 5) return; // limit potential pounding function_to_run (val); },500); } function cbar_monitorelement_inpage (element_name, function_get_value, function_to_run){ var timer=window.setInterval(function(){ if (typeof window.countupdates == 'undefined') window.countupdates=0; var val = function_get_value(); if (typeof val=='undefined' || val==null || val==false) return; if (typeof window["cbar_monitor_"+element_name] != 'undefined') { if (window["cbar_monitor_"+element_name] ==val) return; // no change if (window.countupdates++ > 10) return; // limit potential pounding function_to_run (val); // change } window['cbar_monitor_'+element_name] = val; },500); } function cbar_log_event(msg){ cbar_uid=cbar_readCookie('cbar_uid'); loadjscssfile (cbar_dynamic_url+'logger.js.php?a=lg&sid='+cbar_sid+'&uid='+cbar_uid+'&lo='+encodeURIComponent(msg)+cbar_abt_str+'&ts='+Math.ceil(10000*Math.random()),'js'); } function cbar_log_error(msg){ cbar_uid=cbar_readCookie('cbar_uid'); loadjscssfile (cbar_dynamic_url+'logger.js.php?sid='+cbar_sid+'&uid='+cbar_uid+'&elo='+encodeURIComponent(msg)+cbar_abt_str+'&url='+encodeURIComponent( window.location.href),'js'); } function cbar_log_console(msg){ if (cbar_debug==0) return; window.console && console.log(msg); } function cbar_debug_log (url){ if (cbar_debug <2) return; //var datajs_script= cbar_Sizzle ('script[src*="data.js.php"]'); varsstr =url.split("?"); vars = varsstr[1].split("&"); for (var i=0; i< vars.length; i++) cbar_log_console(vars[i]); } function cbar_analysis_track(msg){ if (typeof msg=='undefined' || (msg==null) || (msg=="")) return; var tmp_str=''; cbar_uid=cbar_readCookie('cbar_uid'); //if (cbar_ba) tmp_str +="&ba=1"; loadjscssfile (cbar_dynamic_url+cbar_datajs+'?a=trke&sid='+cbar_sid+'&uid='+cbar_uid+tmp_str+'&e='+encodeURIComponent(msg)+cbar_abt_str+'&ts='+Math.ceil(10000*Math.random()),'js'); } function cbar_leave_site_callback(evt){ if ( window.cbar_mouseout==false || ((window.cbar_back_button==true) && (cbar_sess_pv !=1)) ) return; for (ind=0; ind< window.cbar_delayed_action.length; ind++){ if (window.cbar_delayed_action[ind].type!='tab_close') continue; if ((window.cbar_delayed_action[ind].rule_id >0) && (cbar_readCookie('cbar_pc_'+ window.cbar_delayed_action[ind].rule_id ) == '1')) continue; if (typeof window['cbar_rule_suppressed_'+window.cbar_delayed_action[ind].rule_id] !='undefined') return; // dont execute if suppressed from data.js //if ((typeof window.cbar_user_activity_time =='undefined' ) || (Math.round(cbar_date.getTime()/1000) - window.cbar_user_activity_time) >3) { // #8763 if ((cbar_BrowserDetect.browser=='Chrome') || (cbar_BrowserDetect.browser=="Safari")) setTimeout (function () { eval (decodeURIComponent(window.cbar_delayed_action[ind].func_eval_enc.replace (/\+/g, ' ')));},100); else eval (decodeURIComponent(window.cbar_delayed_action[ind].func_eval_enc.replace (/\+/g, ' '))); cbar_run_after_rules_js (window.cbar_delayed_action[ind].rule_id); cbar_report_delayed_action (window.cbar_delayed_action[ind].rule_id); return " "+decodeURIComponent(window.cbar_delayed_action[ind].data.replace (/\+/g, ' ')); //} } return ; } // cbar_delayed_action_set // type='tab_close' - when visitor closes page (data is message to show) // 'delayed' - after delay - data is delay timing // 'mouse_exit' - mouse exit from page // 'by_code' - action will be run by javascript code (cbar_run_delayed_action(rule_id)) - to launch popup from banner by code for example function cbar_delayed_action_set (rule_id, type, data, func_eval_enc ){ if (cbar_in_array(rule_id, cbar_suppress_rules)) return; // allow suppressing by js action if (typeof window.cbar_delayed_action=='undefined') window.cbar_delayed_action=[]; window.cbar_delayed_action[window.cbar_delayed_action.length]={rule_id:rule_id, type:type, data:data, func_eval_enc:func_eval_enc }; //function to run when visitor leaves site (encoded) if (type=='tab_close'){ cbar_init_mouse_exit_detect(); // track mouse status and back button (window.cbar_mouseout window.cbar_back_button) window.onbeforeunload = cbar_leave_site_callback; } if (type=='mouse_exit'){ cbar_init_mouse_exit_detect(); cbar_listen ('cbar_mouse_exit', document, function (e){ if ((e.data.back_button==false) || (cbar_sess_pv ==1) ){ if (typeof window.cbar_block_mouse_exit =='undefined') // allows blocking cbar_run_delayed_action(rule_id); } } ); } if (type=='delayed'){ setTimeout (function () { cbar_run_delayed_action(rule_id)}, 1000* parseInt(data)); } } function cbar_createfunc (funcname,param){ return function() { funcname(param) }; } // run_delayed_action function cbar_run_delayed_action (rule_id){ for (ind=0; ind< window.cbar_delayed_action.length; ind++){ if (window.cbar_delayed_action[ind].rule_id == rule_id) { if (typeof window.cbar_delayed_action[ind].runned =='undefined' || window.cbar_delayed_action[ind].type=='by_code'){ window.cbar_delayed_action[ind].runned=true; if (cbar_readCookie('cbar_pc_'+rule_id ) == '1') continue; if (typeof window['cbar_rule_suppressed_'+rule_id] =='undefined') { // execute if not suppressed by data.js eval (decodeURIComponent(window.cbar_delayed_action[ind].func_eval_enc.replace (/\+/g, ' '))); cbar_run_after_rules_js (rule_id); } cbar_report_delayed_action (rule_id); } } } } function cbar_launch_popup (rule_id){ eval(eval ('window.launch_popup_data_'+rule_id)); } function cbar_div_popup_show (rule_id, popup_width, popup_height, popup_top, img_url, html, img_is_background, img_width, img_height , token, replace_encoded, embed_data, popup_close, border, bordercol, backg, darken, corner, close_butt_pos, close_butt_id, close_butt_size, close_butt_offset){//(called from data.js) if (typeof img_is_background != 'boolean') return; // remove this. only used temporarily to suppress old cached cbar.js until changes are cached. if (cbar_in_array(rule_id, cbar_suppress_rules)) return; // allow suppressing by js action // dont show popup if user closed it (and not preview from control panel) (rule_id=0) if ((cbar_preview_rules=='') && (cbar_readCookie('cbar_pc_'+ rule_id ) == '1')) return; if (img_is_background) { popup_width=img_width+'px'; popup_height=img_height+'px'; } cbar_popup = window.document.createElement('div'); cbar_popup.id= 'cbar_popup_'+rule_id; cbar_popup.className="cbar_popup"; cbar_popup.setAttribute("rule_id", rule_id); var clientheight = document.compatMode=='CSS1Compat' ? document.documentElement.clientHeight: document.body.clientHeight; if (popup_width =='') popup_width='auto'; if (popup_width==parseInt(popup_width)) popup_width=popup_width+'px' cbar_popup.style.width= popup_width; cbar_popup.popup_close=popup_close; if (popup_height =='') popup_height='auto'; if (popup_height==parseInt(popup_height)) popup_height=popup_height+'px' cbar_popup.style.height= popup_height; if (popup_top =='') popup_top='100px'; if (popup_top==parseInt(popup_top)) popup_top=popup_top+'px' cbar_popup.style.top= popup_top; //cbar_popup.style.top= "100px"; if (img_is_background) cbar_popup.style.background="transparent url('"+cbar_userimages+img_url+"') no-repeat left top"; else cbar_popup.style.background= backg; cbar_popup.style.boxSizing = "content-box"; cbar_popup.style.border= border+"px solid "+bordercol; cbar_popup.style.zIndex="500000" ; if (corner >0) { cbar_popup.style.borderRadius = corner+'px'; cbar_popup.style.MozBorderRadius = corner+'px'; cbar_popup.style.WebkitBorderRadius = corner+'px'; } cbar_popup_html=""; var css_position=''; if (close_butt_pos !='') { if (close_butt_pos.search('t')>-1) {css_position+="top:1px;"; css_position+="bottom:auto;"; } if (close_butt_pos.search('b')>-1) {css_position+="top:auto;"; css_position+="bottom:1px;"; } if (close_butt_pos.search('l')>-1) {css_position+="left:1px;"; css_position+="right:auto;";} if (close_butt_pos.search('r')>-1) {css_position+="left:auto;"; css_position+="right:1px;";} }else{ css_position+='top:-15px;'; css_position+='right:-15px;'; } if((close_butt_id>-1)&&(close_butt_size>-1)) var close_icon=cbar_static_url+"img/close_buttons/close"+close_butt_id+"_"+close_butt_size+".png"; else var close_icon=cbar_static_url+"img/common/dialog_close.png"; cbar_popup_html+=""; if (img_url !='') img_html= ""; else img_html=''; if (img_is_background) img_html=''; cbar_popup_html+="
"+img_html+decodeURIComponent(html.replace (/\+/g, ' ')); if (token!=''){ // dynamic token. used in 'Get Coupon button' switch button token with html cbar_popup_html=cbar_popup_html.replace(token,decodeURIComponent(replace_encoded.replace (/\+/g, ' '))); } // embed external forms in the popup if (embed_data !== false){ if (embed_data.scrollbars=='on') noscroll=''; else noscroll="scrolling='no'"; embed_html=""; cbar_popup_html=cbar_popup_html.replace('%embed_form%',embed_html); } cbar_popup_html+="
"; cbar_popup_html+=" "; cbar_popup.innerHTML=cbar_popup_html; cbar_popup.style.display= "block"; cbar_popup.style.visibility='visible'; // reset inherited CSS loadjscssfile (cbar_static_url+'popup.css','css'); window.document.body.appendChild(cbar_popup); // darken under popup if (darken >0){ cbar_underlay = window.document.createElement('div'); cbar_underlay.id= 'cbar_underlay_'+rule_id; cbar_underlay.style.display= "block"; cbar_underlay.style.position= "fixed"; cbar_underlay.style.background= "none repeat scroll 0% 0% rgb(17, 17, 17)"; cbar_underlay.style.top='0px'; cbar_underlay.style.left='0px'; cbar_underlay.style.opacity=darken; cbar_underlay.style.filter = "alpha(opacity="+ parseInt( darken*100) +")"; // IE7,8 cbar_underlay.style.zIndex="490000"; cbar_underlay.style.height=clientheight+"px"; cbar_underlay.onclick =function(){eval ("cbar_close_popup ("+rule_id+");"); return false;}; var clientwidth = document.compatMode=='CSS1Compat' ? document.documentElement.clientWidth: document.body.clientWidth; cbar_underlay.style.width=clientwidth+"px"; window.document.body.appendChild(cbar_underlay); } cbar_popups.push (cbar_popup); // add this popup to array cbar_popups_position(); cbar_listen ("scroll", window, cbar_popup_scroll_event); cbar_listen ("resize", window, cbar_popups_position); } function cbar_close_popup( rule_id){ if (typeof rule_id=='undefined') { // close currently open if no rule_id var popups = document.getElementsByClassName("cbar_popup"); if (popups.length==0) return; var rule_id = popups[0].id.replace ('cbar_popup_',''); } var popup = document.getElementById('cbar_popup_'+rule_id); if (popup == null) return; var old = (popup.parentNode).removeChild(popup); var elem = document.getElementById('cbar_underlay_'+rule_id); if (elem!=null) var old = (elem.parentNode).removeChild(elem); // close popup cookie if ((typeof popup.popup_close =='undefined') || isNaN(parseInt(popup.popup_close)) ) popup.popup_close =1000; if ((popup.popup_close != -1) && (cbar_preview_rules =='')) cbar_createCookie('cbar_pc_'+rule_id ,1, parseInt(popup.popup_close)); } function cbar_close_offerzone( rule_id, days){ var oz = cbar_Sizzle("div[rule_id='"+rule_id+"']"); if (oz.length) var old = (oz[0].parentNode).removeChild(oz[0]); if (cbar_preview_rules=='') cbar_createCookie('cbar_oz_'+rule_id ,1, parseInt(days)); } function cbar_iframe_popup_show (rule_id, popup_url, popup_width , popup_height ,popup_top, img_w, img_h, img_url, popup_close, close_butt_pos, close_butt_id, close_butt_size, close_butt_offset){//(called from data.js) if (cbar_in_array(rule_id, cbar_suppress_rules)) return; // allow suppressing by js action // dont show popup if user closed it (and not preview from control panel) (rule_id=0) if ((cbar_preview_rules=='') && (cbar_readCookie('cbar_pc_'+ rule_id ) == '1')) return; cbar_popup = window.document.createElement('div'); cbar_popup.id= 'cbar_popup_'+rule_id; cbar_popup.className="cbar_popup"; var clientheight = document.compatMode=='CSS1Compat' ? document.documentElement.clientHeight: document.body.clientHeight; if (popup_width =='') popup_width=iframe_width='auto'; if (popup_width !='auto') {iframe_width=(popup_width-8)+"px"; popup_width+="px";} cbar_popup.style.width= popup_width; cbar_popup.popup_close=popup_close; if (popup_height =='') popup_height=iframe_height='auto'; if (img_h=='') img_h=0; if (popup_height !='auto') {iframe_height=(popup_height-parseInt(img_h)-8)+"px"; popup_height+="px";} cbar_popup.style.height= popup_height; if (popup_top =='') popup_top='100px'; if (popup_top==parseInt(popup_top)) popup_top=popup_top+'px' cbar_popup.style.top= popup_top; //cbar_popup.style.top= "100px"; cbar_popup.style.background="white"; cbar_popup.style.border="4px solid silver"; cbar_popup.style.zIndex="600000" ; cbar_popup.setAttribute("rule_id", rule_id); cbar_popup.style.boxSizing = "content-box"; if (img_url !='') img_html=""; else img_html=''; cbar_popup_html=""; var css_position=''; if (close_butt_pos !='') { if (close_butt_pos.search('t')>-1) {css_position+="top:1px;"; css_position+="bottom:auto;"; } if (close_butt_pos.search('b')>-1) {css_position+="top:auto;"; css_position+="bottom:1px;"; } if (close_butt_pos.search('l')>-1) {css_position+="left:1px;"; css_position+="right:auto;";} if (close_butt_pos.search('r')>-1) {css_position+="left:auto;"; css_position+="right:1px;";} }else{ css_position+='top:-15px;'; css_position+='right:-15px;'; } if((close_butt_id>-1)&&(close_butt_size>-1)) var close_butt=cbar_static_url+"img/close_buttons/close"+close_butt_id+"_"+close_butt_size+".png"; else var close_butt=cbar_static_url+"img/common/dialog_close.png"; cbar_popup_html+=""; cbar_popup_html+=img_html+ " "; cbar_popup_html+="powered by Barilliance" cbar_popup.innerHTML=cbar_popup_html; cbar_popup.style.display= "block"; cbar_popup.style.visibility='visible'; window.document.body.appendChild(cbar_popup); cbar_popups.push (cbar_popup); // add this popup to array cbar_popups_position(); cbar_listen ("scroll", window, cbar_popup_scroll_event); cbar_listen ("resize", window, cbar_popups_position); } function cbar_popup_scroll_event () {// must be here for ie6 if (cbar_pop_scrolltimeout >0) window.clearTimeout (cbar_pop_scrolltimeout); cbar_pop_scrolltimeout= window.setTimeout("cbar_popups_position()",300); } // position all available popups function cbar_popups_position () { var scrolltop = document.compatMode=="CSS1Compat" ? document.documentElement.scrollTop : document.body.scrollTop; var clientheight = document.compatMode=='CSS1Compat' ? document.documentElement.clientHeight: document.body.clientHeight; var clientwidth = document.compatMode=='CSS1Compat' ? document.documentElement.clientWidth: document.body.clientWidth; for (i=0; i < cbar_popups.length; i++){ if (cbar_popups[i].getAttribute('dont_reposition')!==null) continue; // tender #2425 if (cbar_PositionFixedSupported){ cbar_popups[i].style.position= "fixed"; //cbar_popups[i].style.top="100px"; width= cbar_popups[i].scrollWidth; cbar_popups[i].style.left= parseInt((clientwidth/2)-(width/2))+"px"; } else { // no fixed position cbar_popups[i].style.position= "absolute"; cbar_popups[i].style.top=parseInt(100+scrolltop)+"px"; width= cbar_popups[i].scrollWidth; cbar_popups[i].style.left= parseInt((clientwidth/2)-(width/2))+"px"; } } } // cbar_after_rules_js // run non delayed rules if rule_id==0 or a delayed rule if rule_id >0 function cbar_run_after_rules_js ( rule_id ){ if ( rule_id >0) { // delayed rule if ((typeof window.cbar_after_rules_js_delayed =='undefined') || (typeof window.cbar_after_rules_js_delayed[rule_id] =='undefined')) return; eval ( decodeURIComponent(window.cbar_after_rules_js_delayed[rule_id].replace (/\+/g, ' '))); return; } //run the 'run javascript' after rules action for all rules. it is executed last after all rules and recommendations finished. if (typeof window.cbar_after_rules_js =='undefined') return; for ( rule_id in window.cbar_after_rules_js) eval ( decodeURIComponent(window.cbar_after_rules_js[rule_id].replace (/\+/g, ' '))); } // Trust! function cbar_trust_message (payload){ var msg_data=JSON.parse(payload); var questionmark=""; if (cbar_wl) questionmark=""; // embedded messages if (typeof msg_data.embed_pt != 'undefined') { for (var index in msg_data.message) { if (msg_data.message.hasOwnProperty(index)) { var ref_elements = cbar_Sizzle("[cbar_live_insert]"); if (typeof ref_elements[index] == 'undefined') continue; op = ref_elements[index].getAttribute('cbar_live_insert'); var msg = "
"+msg_data.message[index]+questionmark+"
"; if (op == 'append') ref_elements[index].insertAdjacentHTML('beforeend', msg); if (op == 'prepend') ref_elements[index].insertAdjacentHTML('afterbegin', msg); if (op == 'before') ref_elements[index].insertAdjacentHTML('beforebegin', msg); if (op == 'after') ref_elements[index].insertAdjacentHTML('afterend', msg); } } return; } // non embedded messages if (typeof cbar_trust_message_show == 'function') {msg_data=cbar_trust_message_show (msg_data);} var v_margin= parseInt(msg_data.margin)*msg_data.count; for (var i=1; i< msg_data.count; i++) { bubble=cbar_Sizzle ("div#cbar_trust_"+msg_data.rule_id+"_"+i); if (bubble.length) v_margin+= bubble[0].scrollHeight; } var top='auto', bottom= 'auto', left='auto', right='auto', height='auto'; var dynamic_css=' border: none; '; if (msg_data.type=='bar' || msg_data.type=='pbar') { if (msg_data.type=='pbar') msg_data.barpos='t'; if (msg_data.barpos=='b') bottom = '0px'; else top ='0px'; if (msg_data.borderw > 0){ dynamic_css+=' border-top: '+msg_data.borderw+'px solid '+msg_data.border+ '; '; if (msg_data.barpos=='t') dynamic_css=dynamic_css.replace('border-top','border-bottom'); } if (msg_data.shadow > 0) { dynamic_css+=" box-shadow:"+msg_data.shadow+"px 0px "+msg_data.shadow+"px #888888; "; if (msg_data.barpos=='b') dynamic_css=dynamic_css.replace('box-shadow:','box-shadow:-'); } } else if (msg_data.type=='side') { bottom= '200px'; right= '-500px'; //bubble.cbar_rightpos = msg_data.margin+msg_data.width; //right =bubble.cbar_rightpos+'px'; } else { if (msg_data.pos[0] == 't') top = v_margin+'px'; if (msg_data.pos[0] == 'b') bottom = v_margin+'px'; if (msg_data.pos[1] == 'r') right = msg_data.margin+'px'; if (msg_data.pos[1] == 'l') left = msg_data.margin+'px'; } var div = document.createElement('div'); if (msg_data.type=='bubble' || msg_data.type=='side') { if (msg_data.image =='') var content=msg_data.message[0]+questionmark; else var content=""+msg_data.message[0]+questionmark+""; div.innerHTML = "
"+content+"
"; } else // top bar div.innerHTML = "
"+msg_data.message[0]+"
"; var bubble = div.firstChild; window.document.body.appendChild(bubble); if (msg_data.type=='pbar') document.body.style.marginTop = bubble.scrollHeight+'px'; if (msg_data.type=='side'){ // slide in/out bubble.style.opacity=1; msg_data.margin= parseInt(msg_data.margin); msg_data.width= parseInt(msg_data.width); bubble.cbar_rightpos= -(msg_data.width + msg_data.margin); var myVar = setInterval(function(){ bubble.cbar_rightpos= (msg_data.margin - (msg_data.margin- bubble.cbar_rightpos)*0.7 ); bubble.style.right = bubble.cbar_rightpos+'px'; if (Math.abs(bubble.cbar_rightpos - msg_data.margin) > 5 )return; clearInterval (myVar ); // slide out setTimeout(function(){ var myVar = setInterval(function(){ bubble.cbar_rightpos-= 20; bubble.style.right = bubble.cbar_rightpos+'px'; if (bubble.cbar_rightpos > -300) return; bubble.style.display='none'; clearInterval (myVar ); },40); }, msg_data.time*1000); },40); } else { // fade in var myVar = setInterval(function(){ bubble.style.opacity = parseFloat(bubble.style.opacity) +0.05; if (bubble.style.opacity < 1 )return; clearInterval (myVar ); // fade out setTimeout(function(){ var myVar = setInterval(function(){ bubble.style.opacity = parseFloat(bubble.style.opacity) -0.05; if (bubble.style.opacity > 0.05 )return; clearInterval (myVar ); bubble.style.display='none'; },40); if (msg_data.type=='pbar') { var myVar2 = setInterval(function(){ var newmargin= parseInt(document.body.style.marginTop)* 0.7; document.body.style.marginTop = newmargin +'px'; if (newmargin > 5 )return; clearInterval (myVar2 ); document.body.style.marginTop='0px'; },150); } }, msg_data.time*1000); },40); } } function cbar_trust_popup (){ loadjscssfile (cbar_dynamic_url+'cbar_trust_popup.js.php?action=wrapper&sid='+cbar_sid,'js'); } function cbar_trust_store_cart_message (pid_orig, message){ cbar_createCookie ('cbar_trust_cartmsg_'+pid_orig, message, 0); } function cbar_img_overlay_show ( image, type, align, lrmargin, tbmargin, eletype ,attrib, attrib_search, rule_id, zindex, is_redraw) { if (cbar_in_array(rule_id, cbar_suppress_rules)) return; // allow suppressing by js action tbmargin=parseInt (tbmargin); lrmargin=parseInt (lrmargin); elements=cbar_Sizzle (eletype+"["+attrib+"*='"+attrib_search+"']"); if (elements.length){ for (i=0; i"; if (h_html.length >0) template+=""; template+="
"; template+="
"+decodeURIComponent(html.replace (/\+/g, ' '))+"
 
"; //template+="
"; template+=""; cbar_offerzone = window.document.createElement('div'); cbar_offerzone.className = 'cbar_offerzone'; cbar_offerzone.id= 'cbar_offerzone_'+offerzone_id; cbar_offerzone.setAttribute("rule_id", rule_id); cbar_offerzone.style.zIndex="80000"; cbar_offerzone.innerHTML=template; // get the html of cbar_banner tmp_div= window.document.createElement('div'); tmp_div.appendChild(cbar_offerzone); offerzone_outerHTML=tmp_div.innerHTML; // store all offerzone data as banner for repositioning. var cbar_Banner= {id:'cbar_offerzone_'+offerzone_id, position:'f' ,overlay:'' , align:align, lrmargin:x, tbmargin: 0, html_item: '' , width:width, height:'auto', banner_html:offerzone_outerHTML} cbar_banners[cbar_banners.length]=cbar_Banner; // css position if (!cbar_PositionFixedSupported ) { cbar_offerzone.style.position='absolute'; cbar_listen ("scroll", window, cbar_banner_scroll_event); cbar_listen ("resize", window, cbar_banner_resize_event); } else{ cbar_offerzone.style.position='fixed'; } window.document.body.appendChild(cbar_offerzone); cbar_banner_position( cbar_banners.length-1); } function cbar_MSG_show (rule_id, position, backgroundcolor, bordercolor, borderwidth, shadowsize, extracss, html, animation, close_butt, close_butt_pos, close_butt_size, close_butt_offset, close_butt_id, divid, popup_close){ if ((cbar_preview_rules=='') && (cbar_readCookie('cbar_mc_'+ rule_id ) == '1')) return; if(extracss!='') { var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = decodeURIComponent(extracss.replace (/\+/g, ' ')); document.getElementsByTagName('head')[0].appendChild(style); } var cbar_banner_html='
'+decodeURIComponent(html.replace (/\+/g, ' '))+'
'; if (close_butt !='') { var close_css=''; if (close_butt_pos.search('t')>-1)close_css+="top:1px;bottom:auto;"; else close_css+="top:auto;bottom:1px;"; if(close_butt_pos.search('l')>-1)close_css+="left:1px;right:auto;"; else close_css+="right:1px;left:auto;"; cbar_banner_html+=""; } var border=(position=='bottom')?'border-top':'border-bottom'; var shadow=(position=='bottom')?'0 -'+shadowsize+'px '+shadowsize+'px 0':'0 '+shadowsize+'px '+shadowsize+'px 0'; var CallPeekABar=function (renew){ cbar_jQuery=jQuery.noConflict(renew); loadjscssfile(cbar_static_url + 'peekABar/jquery.peekabar.css','css'); loadjscssfile_callback(cbar_static_url + 'peekABar/cbar_jquery.peekabar.min.js','js',function (){ cbar_jQuery(function ($) { peekABar = new $.peekABar({ position: (position=='toppush')?'top':position, backgroundColor: '#'+backgroundcolor, padding: '5px '+(parseInt(close_butt_size)+(parseInt(close_butt_offset)*2))+'px', html:cbar_banner_html, onShow: function() { $('.peek-a-bar').css(border,'solid '+borderwidth+'px #'+bordercolor); $('.peek-a-bar').css('box-shadow',shadow); $('.peek-a-bar').attr('id',divid).attr('popup_close',popup_close); if(position=='toppush') { window['body_margin_top']=$('body').css('margin-top'); setTimeout(function (){ window['cbar_msg_bar_resize_handler']=function (){$('body').animate({ 'marginTop': $('.peek-a-bar').outerHeight()+'px'}, 150);}; $(window).bind("resize", window['cbar_msg_bar_resize_handler']); window['cbar_msg_bar_resize_handler'](); },500); } }, onHide: function (){ $("body").css("margin-top",window['body_margin_top']); $(window).unbind("resize",window['cbar_msg_bar_resize_handler']); window['cbar_b_no_click_'+rule_id]=true; // close popup cookie if ((typeof $('.peek-a-bar').attr('popup_close') =='undefined') || isNaN(parseInt($('.peek-a-bar').attr('popup_close'))) ) $('.peek-a-bar').attr('popup_close',1000); if (($('.peek-a-bar').attr('popup_close') != -1) && (cbar_preview_rules =='')) cbar_createCookie('cbar_mc_'+rule_id ,1, parseInt($('.peek-a-bar').attr('popup_close'))); }, animation: { type: animation, duration: 300 } }); peekABar.show(); }); }); cbar_jQuery.noConflict(); }; var jv=(typeof jQuery != 'undefined')?jQuery.fn.jquery.split('.'):[0,0,0]; if (!((jv[0]>1)&&(jv[1]>11)&&(jv[2]>3))) { loadjscssfile_callback('//code.jquery.com/jquery-1.11.3.min.js','js',function (){CallPeekABar(true);}); }else{ CallPeekABar(false); } } function cbar_email_capture_ajax(script,uid,sid,rid){ (function($){ var data={'s':sid,'r':rid,'u':uid,'user_email':$('#cbar_getemail_input').val()}; $.post(script,data,function (j){ $('#cbar_msgzone_content').hide(); if(j.error) { $('#email_capture_ajax_msg').show().html(j.message+' ').append($('').attr('href','javascript://').html(j.backlnk).click(function(){$('#email_capture_ajax_msg').hide();$('#cbar_msgzone_content').show();})); }else{ $('#email_capture_ajax_msg').show().html(j.message); } },'json'); })(jQuery); } function cbar_banner_show (img_url, width, height, clk_url, align, position, lrmargin, tbmargin, html_item , zindex, overlay, newwin, banner_id, close_butt_pos, onclick, mouseover,mouseout, rule_id, extra_html, close_butt_id, close_butt_size, close_butt_offset){//(called from data.js) if (cbar_in_array(rule_id, cbar_suppress_rules)) return; // allow suppressing by js action if ((cbar_preview_rules=='') && (cbar_readCookie('cbar_bc_'+ rule_id ) == '1')) return; // stops both banner and thumbnail // delete banner if it already exists var existing = document.getElementById('cbar_banner_'+banner_id); if (existing){ var old = (existing.parentNode).removeChild(existing); } cbar_banner = window.document.createElement('div'); cbar_banner.className = 'cbar_banner'; cbar_banner.id= 'cbar_banner_'+banner_id; cbar_banner.setAttribute("rule_id", rule_id); if (newwin) target_str=' _blank'; else target_str=""; if (zindex!="") cbar_banner.style.zIndex=zindex; else cbar_banner.style.zIndex="600000" ; var tmp=''; if (onclick || (clk_url!='')) tmp='cursor:pointer; cursor:hand; '; // img_url can be an image in cbar_userimages or full image url if ((img_url.search('http')!==0) && (img_url.search('//')!==0)) img_url = cbar_userimages + img_url; cbar_banner_html=" "; if (close_butt_pos !='') { var css_position=''; if (close_butt_pos.search('t')>-1) {css_position+="top:1px;"; css_position+="bottom:auto;"; } if (close_butt_pos.search('b')>-1) {css_position+="top:auto;"; css_position+="bottom:1px;"; } if (close_butt_pos.search('l')>-1) {css_position+="left:1px;"; css_position+="right:auto;";} if (close_butt_pos.search('r')>-1) {css_position+="left:auto;"; css_position+="right:1px;";} if((close_butt_id>-1)&&(close_butt_size>-1)) var close_icon=cbar_static_url+"img/close_buttons/close"+close_butt_id+"_"+close_butt_size+".png"; else var close_icon=cbar_static_url+"img/common/dialog_close.png"; cbar_banner_html+=""; } if (extra_html.length>0) cbar_banner_html+=decodeURIComponent(extra_html.replace (/\+/g, ' ')); if (clk_url.length>0) cbar_banner_html=""+cbar_banner_html+""; cbar_banner.style.width= "auto"; cbar_banner.style.height= "auto"; cbar_banner.style.top= "0px"; cbar_banner.style.left= "0px"; cbar_banner.style.display= "block"; cbar_banner.style.margin='0 0 0 0'; cbar_banner.style.position='relative'; //position cant be static, so close button will appear inside cbar_banner.style.visibility='visible'; cbar_banner.innerHTML=cbar_banner_html; // get the html of cbar_banner tmp_div= window.document.createElement('div'); tmp_div.appendChild(cbar_banner); banner_outerHTML=tmp_div.innerHTML; // store all banner data for repositioning. var cbar_Banner= {id:'cbar_banner_'+banner_id, position:position ,overlay:overlay , align:align, lrmargin:lrmargin, tbmargin: tbmargin, html_item: html_item , width:width, height:height, banner_html:banner_outerHTML} cbar_banners[cbar_banners.length]=cbar_Banner; if ( (position=='html') && ((overlay =='r') || (overlay =='rp')) ) // overwrite existing HTML element content cbar_banner=cbar_replace_element (cbar_banners.length-1); if ( (position=='html') && (overlay =='in') ) { // insert into var ele= document.getElementById (html_item); if (ele){ var firstchild = ele.firstChild; if (firstchild) ele.insertBefore(cbar_banner,firstchild); else ele.appendChild(cbar_banner); } } if (typeof cbar_banner != 'undefined'){ if (onclick) cbar_listen('click', cbar_banner, eval ("cbar_banner_onclick_"+banner_id)) ; if (mouseover) cbar_listen('mouseover', cbar_banner, eval ("cbar_banner_mouseover_"+banner_id)) ; if (mouseout) cbar_listen('mouseout', cbar_banner, eval ("cbar_banner_mouseout_"+banner_id)) ; } if ( (position=='html') && ((overlay =='r') || (overlay =='rp') || (overlay =='in') ) ) return; // overwrite existing HTML element content // css position if (!cbar_PositionFixedSupported || (position=='html')) { cbar_banner.style.position='absolute'; cbar_listen ("scroll", window, cbar_banner_scroll_event); cbar_listen ("resize", window, cbar_banner_resize_event); } else{ if (position=='f') cbar_banner.style.position='fixed'; else cbar_banner.style.position='absolute'; } window.document.body.appendChild(cbar_banner); cbar_banner_position( cbar_banners.length-1); } function cbar_replace_element (banners_index) { banner_data=cbar_banners[banners_index]; var ele= document.getElementById (banner_data.html_item); if (banner_data.overlay=='rp') ele=ele.parentNode; if (ele !=null) ele.innerHTML=banner_data.banner_html; else cbar_ban_retrytimeout= window.setTimeout("cbar_replace_element("+banners_index+")",600); if (ele !=null) return ele; } function cbar_banner_resize_event () {// # 227 if (cbar_ban_resizetimeout >0) window.clearTimeout (cbar_ban_resizetimeout); cbar_ban_resizetimeout= window.setTimeout("cbar_banners_position()",100); } function cbar_banner_scroll_event () {// must be here for ie6 if (cbar_ban_scrolltimeout >0) window.clearTimeout (cbar_ban_scrolltimeout); cbar_ban_scrolltimeout= window.setTimeout("cbar_banners_position()",300); } // all banners position function cbar_banners_position (){ for (i=0; i