").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
/*!
* jQuery Cookie Plugin v1.3.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as anonymous module.
define(['jquery'], factory);
} else {
// Browser globals.
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return decodeURIComponent(s.replace(pluses, ' '));
}
function converted(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
return config.json ? JSON.parse(s) : s;
} catch(er) {}
}
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = config.json ? JSON.stringify(value) : String(value);
return (document.cookie = [
config.raw ? key : encodeURIComponent(key),
'=',
config.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// read
var decode = config.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
var result = key ? undefined : {};
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = decode(parts.join('='));
if (key && key === name) {
result = converted(cookie);
break;
}
if (!key) {
result[name] = converted(cookie);
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) !== undefined) {
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return true;
}
return false;
};
}));
$.cookie.json = true;
function dakisIsIE()
{return((navigator.userAgent.toLowerCase().indexOf("msie")!=-1)&&!window.opera)?true:false;}
function fakeFunction()
{}
var g_dakisGalleryImages=new Array();var g_dakisNbImageGalleries=0;function dakisCreateImageGallery(thumbnailClass,changeImageEvent,fullImageElementId,fullImageSuffix,selectedImageClass,textElementId)
{thumbnails=document.getElementsByClassName(thumbnailClass);firstThumbnail=null;if(g_dakisNbImageGalleries>0)
{fullImageElementId=fullImageElementId+(g_dakisNbImageGalleries+1).toString();}
fullImageElement=$("#"+fullImageElementId);if(fullImageElement.length==0)
{alert("Gallery Image Error: The large gallery image element doesn't exist. Make sure an element has the id: "+fullImageElementId);return;}
if(fullImageElement[0].nodeName.toLowerCase()!="img")
{alert("Gallery Image Error: The large gallery must be an image. It is actually a: "+fullImageElement.tagName);return;}
for(var i=0;i
0)
{$("#"+textElementId).html(this.alt);}
if($("#"+fullImageElementId).attr("src")==largeFile)
{return;}
$("#"+fullImageElementId).attr("src",largeFile);};}};if(firstThumbnail==null)
{alert("Gallery Image Error: No thumbnail found for the full image element id: "+fullImageElementId);}
firstThumbnail[changeImageEvent]();g_dakisNbImageGalleries++;}
var g_templateHoverImages={};function templateLoadHoverImage(image,hoverSrc,forceReload)
{if(!forceReload&&typeof(image.hoverImage)!="undefined"&&image.hoverImage!=null)
{return;}
if(typeof(image.src)=="undefined"||image.src==null)
{setTimeout(function(){templateLoadHoverImage(image,hoverSrc,forceReload);},100);return;}
var originalSrc=image.src;image.originalImage=new Image();image.originalImage.src=originalSrc;var hoverImage=g_templateHoverImages[hoverSrc];if(hoverImage==null)
{hoverImage=new Image();hoverImage.src=hoverSrc;g_templateHoverImages[hoverSrc]=hoverImage;}
image.hoverImage=hoverImage;image.hoverIndex=g_nbHoverImages;g_nbHoverImages++;}
function templateOnImageMouseHover(image,originalSrc,hoverSrc)
{if(typeof(originalSrc)=="undefined")
{if(typeof(image.originalImage)=="undefined")
{return;}
originalSrc=image.originalImage.src;hoverSrc=image.hoverImage.src;}
var queueName="templateHover"+image.hoverIndex;jQuery(image).fadeTo(120,0.6,function(){image.src=hoverSrc;jQuery(image).fadeTo(200,1.0);});}
function templateOnImageMouseOut(image,originalSrc,hoverSrc)
{if(typeof(originalSrc)=="undefined")
{if(typeof(image.originalImage)=="undefined")
{return;}
originalSrc=image.originalImage.src.replace(/&/g,"%26");hoverSrc=image.hoverImage.src.replace(/&/g,"%26");}
if(originalSrc==hoverSrc)
{return;}
var queueName="templateHover"+image.hoverIndex;jQuery(image).fadeTo(120,0.6,function(){image.src=originalSrc;jQuery(image).fadeTo(200,1.0);});}
function templateMakeSureUsingOriginalImageSrc(image)
{if(typeof(image)!="undefined"&&image!=null&&typeof(image.originalImage)!="undefined")
{image.src=image.originalImage.src;}}
function dakisButtonUpEvent(element)
{Element.setOpacity(element,1);}
function dakisButtonDownEvent(element,width)
{$(element).css("opacity",0.75);}
function dakisBackToTop()
{var x1=x2=x3=0;var y1=y2=y3=0;if(document.documentElement){x1=document.documentElement.scrollLeft||0;y1=document.documentElement.scrollTop||0;}
if(document.body){x2=document.body.scrollLeft||0;y2=document.body.scrollTop||0;}
x3=window.scrollX||0;y3=window.scrollY||0;var x=Math.max(x1,Math.max(x2,x3));var y=Math.max(y1,Math.max(y2,y3));window.scrollTo(Math.floor(x/2),Math.floor(y/2));if(x>0||y>0){window.setTimeout("dakisBackToTop()",25);}}
function dakisLoadAdRotators(templateElementId)
{var id=0;var adRotators=document.getElementsByClassName("dakisAdRotator");adRotators.each(function(element)
{element.id="dakisAdRotator"+id;var advertiser=new DakisProductAdvertiser2(element.id,templateElementId);advertiser.imageWidth=g_dakisAdRotatorImageWidth;advertiser.imageHeight=g_dakisAdRotatorImageHeight;advertiser.delay=g_dakisAdRotatorDelay;advertiser.afterMerchandiseImported=dakisProcessImportedProduct;advertiser.start();id++;});}
function dakisLoadAdRotators2(templateElementId,host,retailer_guid,lang)
{var id=0;var adRotators=jQuery(".dakisAdRotator");var firstIndex=0;if(g_dakisAdRotatorRandomOrder)
{firstIndex=Math.random()*100;}
for(var t=0;t0&&!merchandise.hidePriceEnabled)
{regPriceElement.show();if(isMap)
{regPriceElement.html("see price in cart!");}}
if(isMap)
{var ourPriceElement=$("#"+id+"_ourprice");if(ourPriceElement.length>0)
{ourPriceElement.html(merchandise.regPrice);}}}}
function zoomToStore(index)
{var storeIndexArgName="index";var src=document.getElementById('dakisMapFrame').src;var storeIndexPos=src.indexOf(storeIndexArgName+"=");if(storeIndexPos!=-1)
{src=src.substr(0,storeIndexPos-1);}
src=src+"&"+storeIndexArgName+"="+index;document.getElementById('dakisMapFrame').src=src;}
function resizeToFitParentElement(element)
{var parentNode=element.parentNode;while(parentNode!=null)
{if(parentNode.tagName!="FONT"&&parentNode.tagName!="P"&&parentNode.style.height!=null&&parentNode.style.height.indexOf("px")!=-1)
{element.style.height=parentNode.style.height;if(parentNode.style.width!=null||element.offsetWidth==0)
{if(parentNode.clientWidth!=null&&parentNode.clientWidth!=0)
{element.style.width=parentNode.clientWidth;}
else if(parentNode.offsetWidth!=null&&parentNode.offsetWidth!=0)
{element.style.width=parentNode.offsetWidth;}
else if(parentNode.style.width!=null&&parentNode.style.width.indexOf("px")!=-1)
{element.style.width=parentNode.style.width;}}
break;}
parentNode=parentNode.parentNode;}}
function includeJsIfUndefined(testVar,jsPath)
{if(testVar==undefined)
{includeJs(jsPath);testVar="defined";}}
function includeJs(jsPath)
{document.write('<'+'script');document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="'+jsPath+'">');document.write(''+'script'+'>');}
function redirectToPrintAppIfNeeded(serverUrl,lang,retailerGuid,appVersion)
{try
{var remote=isRemoteLayout;}
catch(e)
{redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion);}}
function redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion)
{if(typeof(g_websiteVersion)!="undefined"&&typeof(g_sessionId)!="undefined"&&g_sessionId!=0){redirectToPrintApp(serverUrl,lang,retailerGuid,appVersion);}
else{setTimeout(function(){redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion);},100);}}
function parseParams(merchandiseId)
{var additional_params='gift_merchandise_id='+merchandiseId+'&cartPage='+g_shoppingCartPageFile;jQuery("input.parametric").each(function(i,s){s=jQuery(s);if(s.attr("type")=="number"||s.attr("type")=="text"||(s.attr("type")=="radio"&&s.is(':checked')))
additional_params+='&'+s.attr("name")+'='+s.val();});dakisGoToPrintApp('gift_editing',additional_params);}
function redirectToPrintApp(serverUrl,lang,retailerGuid,appVersion,layoutFile)
{window.location.replace(computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile));}
function goToPrintApp(serverUrl,lang,retailerGuid,appVersion,layoutFile,params)
{window.location=computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile,params);}
function computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile,params)
{var baseUrl=(typeof(g_baseURL)!=='undefined')?baseUrl=g_baseURL:getDocDomainDir();var pageFile=layoutFile;var baseRoute="/guid/"+retailerGuid+"/"+lang+"/photo/"+appVersion+"?";if(pageFile==null)
{pageFile=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);}
if(typeof(params)=="undefined"||params=="")
{params="";}
else if(appVersion!=="gift_editing")
{params="&"+params;if(appVersion=="pro_event")
baseRoute="/guid/"+retailerGuid+"/"+lang+"/pro_event/login?";else if((params.lastIndexOf("gift_merchandise_id")!=-1)||(params.lastIndexOf("order_id")!=-1))
baseRoute="/guid/"+retailerGuid+"/"+lang+"/photo_gift/"+appVersion+"?";}
if(appVersion=="photo_prints"){baseRoute="?";params+="&cartUrl="+g_shoppingCartPageFile;}
if(typeof(g_sessionId)=="undefined")
{g_sessionId="";}
var url=serverUrl+baseRoute+"base_url="+baseUrl+"&page_file="+pageFile+"&page_version="+g_websiteVersion+"&lang="+lang+"&session_id="+g_sessionId+"&retailer_guid="+retailerGuid+
params;if(appVersion==="gift_editing"){if(params.lastIndexOf("order_id")!==-1){var order_id=params.match(/order_id=([^&]*)/)[1];url=serverUrl+"#/loadOrder/"+lang
+"/"+retailerGuid
+"/"+order_id
+"/"+g_sessionId
+"/"+encodeURIComponent(baseUrl)
+"/"+pageFile+"/"
+g_websiteVersion
+"/ignored/false?"+params}else if(params.lastIndexOf("gift_merchandise_id")!==-1){var merchandise_id=params.match(/gift_merchandise_id=([^&]*)/)[1];url=serverUrl+"#/load/"+lang
+"/"+retailerGuid
+"/"+merchandise_id
+"/"+g_sessionId
+"/"+encodeURIComponent(baseUrl)
+"/"+pageFile+"/"
+g_websiteVersion
+"/ignored/true?"+params}}
if(typeof(g_gaLinker)!="undefined"&&g_gaLinker!=null)
{url=g_gaLinker.decorate(url,true);}
return url;}
function redirectToCashierIfNeeded(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{try
{var remote=isRemoteLayout;}
catch(e)
{redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile);}}
function redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{if(typeof(g_websiteVersion)!="undefined"&&typeof(g_sessionId)!="undefined"&&g_sessionId!=0){redirectToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile);}
else{setTimeout(function(){redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile);},100);}}
function goToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{window.location=computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile);}
function redirectToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{var url=computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile);window.location.replace(url);}
function computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{var baseUrl=getDocDomainDir();var pageFile=layoutFile;if(pageFile==null)
{pageFile=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);}
var url=serverUrl+"/checkout?"+"base_url="+baseUrl+"&page_file="+pageFile+"&page_version="+g_websiteVersion+"&lang="+lang+"&session_id="+sessionId+"&retailer_guid="+retailerGuid;if(typeof(g_gaLinker)!="undefined"&&g_gaLinker!=null)
{url=g_gaLinker.decorate(url);}
return url;}
function setElementClass(element,className)
{jQuery(element).attr("class",className);jQuery(element).attr("className",className);}
function bookmarkThisPage()
{if(document.all)
{window.external.AddFavorite(document.URL,document.title);}
else if(window.sidebar)
{window.sidebar.addPanel(document.title,document.URL,"")}}
function dakisPopupWindow(url,args,width,height,centered,menubar,location,scrollbars,resizable)
{if(g_designMode){return;}
var left=0;var top=0;if(width==0||height==0)
{width=screen.width;height=screen.height;}
if(centered)
{left=(screen.width-width)/2;top=(screen.height-height)/2;}
var params='width='+width+',height='+height+',left='+left+',top='+top+', menubar='+menubar+', toolbar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',location='+location;if(args!='')
{url+='?'+args;}
var popup=window.open(url,window.location.href+"_popup",params);popup.focus();}
function winopen(url,width,height,args)
{var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+',height='+height+',left='+left+',top='+top+'menubar=no,scrollbars=yes,resizable=no,location=no'
var popup=window.open(url+'?'+args,'popup',params);popup.focus();}
function winopenResizable(url,width,height,args)
{var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+',height='+height+',left='+left+',top='+top+'menubar=no,scrollbars=yes,resizable=yes,location=no'
var popup=window.open(url+'?'+args,'popup',params);popup.focus();}
function flashAppOpen()
{flashAppOpenArgs('');}
function flashAppOpenProduct(productGuid)
{flashAppOpenArgs('skipL=true&p1='+productGuid);}
function flashAppOpenPL(plGuid)
{flashAppOpenArgs('pl='+plGuid);}
function flashAppOpenDM(dmGuid)
{flashAppOpenArgs('dm='+dmGuid);}
function templateOnLink(url)
{if(url.indexOf('http://')==-1)
{refreshVisibleContentDivFromHref(url);}}
DakisFlashObject=JClass.extend({objectWidth:0,objectHeigth:0,htmlElementId:'dhe_flash_object',created:false,cssUrl:'none',flashUrl:'',className:'dhe_flash_object',callbackObj:'',randomized:false,init:function(callbackObj,flashUrl,w,h,htmlElementId,cssUrl)
{this.callbackObj=callbackObj;this.flashUrl=this.getPublicUrl(flashUrl,{obj:callbackObj,cssUrl:cssUrl,language:g_dakisLang});this.objectWidth=w;this.objectHeigth=h;if(htmlElementId!==undefined){this.htmlElementId=htmlElementId;this.className=htmlElementId;}
if(cssUrl!==undefined)
this.cssUrl=cssUrl;},hideObject:function()
{$(this.htmlElementId).style.visibility="hidden";$(this.htmlElementId).style.display="none";removeOverlay();},promptObject:function()
{if(!this.created)
this.createObject();this.showObject();},createObject:function()
{var self=this;var someRand=Math.floor(Math.random()*10);this.addObjectDiv();var so=new SWFObject(this.flashUrl,"flashObj"+someRand,this.objectWidth,this.objectHeigth,"7","#FFFFFF");so.write(this.htmlElementId);this.created=true;},addObjectDiv:function()
{var bodyElem=document.getElementsByTagName("body")[0];var obj=document.createElement("div");obj.setAttribute('id',this.htmlElementId);obj.className=this.className;obj.style.zIndex='102';obj.style.position="absolute";obj.style.display="none";obj.style.visibility="hidden";bodyElem.appendChild(obj);},showObject:function()
{$(this.htmlElementId).style.visibility="visible";$(this.htmlElementId).style.display="block";this.positionMiddle();addOverlay();},positionMiddle:function()
{var element=$(this.htmlElementId);var windowHeight;var windowWidth;var scrolled;if(ie)
{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;windowWidth=document.documentElement.clientWidth;}
else{windowHeight=document.body.clientHeight;windowWidth=document.body.clientWidth;}
scrolled=document.documentElement.scrollTop;}
else
{windowHeight=self.innerHeight;windowWidth=self.innerWidth;scrolled=pageYOffset;}
element.style.top="0px";element.style.left="0px";element.style.top=Math.round(scrolled+windowHeight/2-element.clientHeight/2)+"px";element.style.left=Math.round(windowWidth/2-element.clientWidth/2)+"px";},getPublicUrl:function(fileName,params){if(params!==undefined)
return g_dakisServerUrl+fileName+'?'+$H(params).toQueryString();else
return g_dakisServerUrl+fileName;}});DakisDHEBanner=DakisFlashObject.extend({imageDelay:5000,imagePath:'./../images/banner/',randomized:false,transparency:false,init:function(flashUrl,htmlElementId,imagePath,delay,transparency){this.flashUrl=flashUrl;this.imagePath=imagePath;this.imageDelay=delay;this.transparency=transparency;if(htmlElementId!==undefined)
{this.htmlElementId=htmlElementId;this.className=htmlElementId;var el=document.getElementById(htmlElementId);this.objectWidth=el.offsetWidth;this.objectHeight=el.offsetHeight;this.createObject();}},createObject:function()
{var so=new SWFObject(this.flashUrl,this.htmlElementId+"_flash",this.objectWidth,this.objectHeight,"8","#FFFFFF");if(this.transparency==true)
so.addParam('wmode','transparent');so.write(this.htmlElementId);this.created=true;},getJSReady:function(){return true;},getImagePath:function(){return this.imagePath;},getImageDelay:function(){return this.imageDelay;},getImageHeight:function(){return this.objectHeight;},getImageWidth:function(){return this.objectWidth;}});if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+=" ";var _1d=this.getParams();for(var key in _1d){_19+=" ";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+=" ";}_19+=" ";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var g_curContentDivId=-1;var g_isAnimatingContent=0;var g_contentHeightTreshold=650;var g_contentHeaderHeight=34;function adjustContentDivHeight()
{if(jQuery('#middleTableRightDiv_general').length==0)
{return;}
jQuery('#middleTableRight').height(10);}
function refreshVisibleContentDiv()
{var divId=getURLParam('divid');if(divId)
{switchContent(divId);}
else
{switchContent(g_firstDivId);}}
function refreshVisibleContentDivFromHref(href)
{if(g_designMode){return;}
var divId=getURLParamFromHref(href,'divid');if(divId)
{switchContent(divId);}
else
{switchContent(g_firstDivId);}
dakisBackToTop();}
var g_contentDivPrefix='div_leftMenuItem_';function switchContent(divNumber)
{var element=0;var index=0;var closeDownNeeded=0;if(g_isAnimatingContent==1)
{return;}
if(divNumber==g_curContentDivId)
{return;}
if(g_curContentDivId!=-1)
{if($(g_contentDivPrefix+g_curContentDivId))
{closeDownNeeded=1;}}
if(typeof g_lastDivId=="undefined")
{g_lastDivId=40;}
for(index=0;index<=g_lastDivId;index++)
{element=jQuery("#"+g_contentDivPrefix+index);if(element.length>0)
{if(index==divNumber)
{if(g_curContentDivId==-1)
{element.show();}
else
{if(closeDownNeeded==1)
{if(!g_designMode)
{g_isAnimatingContent=1;executeContentEffects(jQuery("#"+g_contentDivPrefix+g_curContentDivId),element);height=$('#middleTableRightDiv_general').height();if(height!=undefined&&height!=null&&height!=0)
{jQuery('#middleTableRightDiv_general').height(height);}}
else
{jQuery("#"+g_contentDivPrefix+g_curContentDivId).hide();element.show();}
closeDownNeeded=0;}
else
{element.show();}}
setLeftMenuSelected(index,1);}
else
{if(g_curContentDivId==-1){element.hide();}
setLeftMenuSelected(index,0);}}}
g_curContentDivId=divNumber;}
function executeContentEffects(oldContent,newContent)
{jQuery(oldContent).hide(120,function(){jQuery(newContent).show(200);});}
function onContentEffectsFinished()
{g_isAnimatingContent=0;$('#middleTableRightDiv_general').css("height","");}
var g_leftMenuClassName="menuItemText";var g_leftMenuSelectedClassName="selectedMenuItemText";function setLeftMenuSelected(leftMenuId,selected)
{var leftMenuElement=document.getElementById('leftMenu_'+leftMenuId);var className=g_leftMenuClassName;if(selected){className=g_leftMenuSelectedClassName;}
if(leftMenuElement)
{leftMenuElement.setAttribute('class',className);leftMenuElement.setAttribute('className',className);}}
function getURLParam(strParamName)
{return getURLParamFromHref(window.location.href,strParamName);}
function getURLParamFromHref(strHref,strParamName)
{var strReturn="";if(strHref.indexOf("#")>-1)
{var strQueryString=strHref.substr(strHref.indexOf("#")).toLowerCase();var aQueryString=strQueryString.split("&");for(var iParam=0;iParam-1)
{var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
return strReturn;}
function ExpandableMenu(nbMenuItems)
{this.menuItemStates=new Array(nbMenuItems);for(i=0;i0)
{cookieValue=cookieValue.replace(/~/g,",");value=cookieValue.evalJSON();}}
return value;}
function eraseCookie(name)
{writeJsonCookie(name,"",-1);}
(function($){var ajaxQueue=$({});$.ajaxQueue=function(ajaxOpts){var jqXHR,dfd=$.Deferred(),promise=dfd.promise();ajaxQueue.queue(doRequest);promise.abort=function(statusText){if(jqXHR){return jqXHR.abort(statusText);}
var queue=ajaxQueue.queue(),index=$.inArray(doRequest,queue);if(index>-1){queue.splice(index,1);}
dfd.rejectWith(ajaxOpts.context||ajaxOpts,[promise,statusText,""]);return promise;};function doRequest(next){jqXHR=$.ajax(ajaxOpts).done(dfd.resolve).fail(function(jqXHR,textStatus,errorThrown){console.log("fail");dfd.reject();}).then(next,next);}
return promise;};})(jQuery);(function($){if(!$.support.cors&&$.ajaxTransport&&window.XDomainRequest){var httpRegEx=/^https?:\/\//i;var getOrPostRegEx=/^get|post$/i;var sameSchemeRegEx=new RegExp('^'+location.protocol,'i');var htmlRegEx=/text\/html/i;var jsonRegEx=/\/json/i;var xmlRegEx=/\/xml/i;$.ajaxTransport('* text html xml json',function(options,userOptions,jqXHR){if(options.crossDomain&&options.async&&getOrPostRegEx.test(options.type)&&httpRegEx.test(options.url)&&sameSchemeRegEx.test(options.url)){var xdr=null;var userType=(userOptions.dataType||'').toLowerCase();return{send:function(headers,complete){xdr=new XDomainRequest();if(/^\d+$/.test(userOptions.timeout)){xdr.timeout=userOptions.timeout;}
xdr.ontimeout=function(){complete(500,'timeout');};xdr.onload=function(){var allResponseHeaders='Content-Length: '+xdr.responseText.length+'\r\nContent-Type: '+xdr.contentType;var status={code:200,message:'success'};var responses={text:xdr.responseText};try{if(userType==='html'||htmlRegEx.test(xdr.contentType)){responses.html=xdr.responseText;}else if(userType==='json'||(userType!=='text'&&jsonRegEx.test(xdr.contentType))){try{responses.json=$.parseJSON(xdr.responseText);}catch(e){status.code=500;status.message='parseerror';}}else if(userType==='xml'||(userType!=='text'&&xmlRegEx.test(xdr.contentType))){var doc=new ActiveXObject('Microsoft.XMLDOM');doc.async=false;try{doc.loadXML(xdr.responseText);}catch(e){doc=undefined;}
if(!doc||!doc.documentElement||doc.getElementsByTagName('parsererror').length){status.code=500;status.message='parseerror';throw'Invalid XML: '+xdr.responseText;}
responses.xml=doc;}}catch(parseMessage){throw parseMessage;}finally{complete(status.code,status.message,responses,allResponseHeaders);}};xdr.onprogress=function(){};xdr.onerror=function(){complete(500,'error',{text:xdr.responseText});};var postData='';if(userOptions.data){postData=($.type(userOptions.data)==='string')?userOptions.data:$.param(userOptions.data);}
xdr.open(options.type,options.url);xdr.send(postData);},abort:function(){if(xdr){xdr.abort();}}};}});}})(jQuery);if(typeof(console)=="undefined"||typeof(console.log)=="undefined")
{console={log:function(m){},error:function(m){},debug:function(m){}};}
function dakisIncludeCss(url)
{jQuery('head').append(' ');}
var g_designMode=false;var g_dakisAdRotatorImageWidth=60;var g_dakisAdRotatorImageHeight=60;var g_dakisAdRotatorDelay=13000;var g_dakisAdRotatorRandomOrder=false;var g_nbHoverImages=0;var g_dakisBannerIsTransparent=true;
function wireOnCartUpdated(cart)
{}
WireAjaxAPI={formatMoney:function(money,symbol,formatString)
{if(typeof(symbol)=="undefined"||typeof(formatString)=="undefined")
{return"";}
if(money!=null)
money=money.toString().replace(/\$|\,/g,'');else
return"";if(isNaN(money))
{money="0";}
sign=(money==(money=Math.abs(money)));money=Math.floor(money*100+0.50000000001);cents=money%100;money=Math.floor(money/100).toString();if(cents<10)
{cents="0"+cents;}
for(var i=0;i0)
{var bodyElement=bodyList[0];var newdiv=document.createElement('div');newdiv.setAttribute('id','wait_message_div');newdiv.setAttribute('style','display: none; background-color: #555555; height: 200%; position: absolute; width: 100%; left: 0; top: 0; right: 0; bottom: 0; z-index: 100; opacity: 0.90; filter: alpha(opacity=90); zoom: 1;');newdiv.innerHTML="";bodyElement.appendChild(newdiv);}}
if(document.getElementById('wait_message_div'))
{var waitMessageDiv=document.getElementById('wait_message_div');var scrollTop=document.body.scrollTop||document.documentElement.scrollTop;waitMessageDiv.style.top=scrollTop.toString()+"px";waitMessageDiv.style.display='block';}
this.afterBuyFunction=afterBuyFunction;WireAjaxAPI.requestThroughScriptTag(this.host,"cart","add_item",params,function(result){WireAjaxAPI.cart.updateCartAndShowMessage(result);});}}},buyWarranty:function(warranty_type,warranty_object_id,merchandise_id)
{if(!this.updating)
{var params={retailer_guid:this.retailerGuid,session_id:this.sessionId,lang:this.lang,warranty_type:warranty_type,warranty_object_id:warranty_object_id,parent_object_id:merchandise_id};WireAjaxAPI.requestThroughScriptTag(this.host,"cart","add_item",params,function(result){WireAjaxAPI.cart.afterCartWarranty(result);});}},afterCartWarranty:function(cartResponse)
{var holder=$('.warranty_holder');if(holder.length>0&&g_textAfterAddWarrantyToCart!=null)
holder.html(g_textAfterAddWarrantyToCart);WireAjaxAPI.cart.updateCart(cartResponse);},changeItemQuantity:function(shoppingCartItemId,quantity)
{this.changeItem(shoppingCartItemId,{action:"set_item_quantity",quantity:quantity});},decrementItem:function(shoppingCartItemId,quantity)
{if(quantity==null||quantity>0)
this.changeItem(shoppingCartItemId,{action:"decrement_item",quantity:quantity});},incrementItem:function(shoppingCartItemId,quantity)
{if(quantity==null||quantity>0)
this.changeItem(shoppingCartItemId,{action:"increment_item",quantity:quantity});},removeItem:function(shoppingCartItemId)
{this.changeItem(shoppingCartItemId,{action:"remove_item"});},updateCartFromTheWire:function()
{var params={retailer_guid:this.retailerGuid,session_id:this.sessionId,lang:this.lang};this.updating=true;WireAjaxAPI.requestThroughScriptTag(this.host,"cart","index",params,function(result){WireAjaxAPI.cart.updateCart(result);});},updateCartWithEmptyData:function()
{var currencySymbol=getCookie(this.currencySymbolCookie)||"";var emptyCartData={"sub_total":0.0,"currency":{"symbol":currencySymbol,"format":"%symbol%money","code":"","text":""},"items":{},"total_items":0};wireOnCartUpdated(emptyCartData);if(currencySymbol=="")
{setTimeout(jQuery.proxy(function(){this.updateCartFromTheWire()},this),3000);}},updateCartAndShowMessage:function(cartResponse)
{WireAjaxAPI.cart.updateCart(cartResponse);if(document.getElementById('wait_message_div'))
{document.getElementById('wait_message_div').style.display='none';}
if(this.afterBuyFunction!="")
{eval(this.afterBuyFunction);this.afterBuyFunction="";}},updateCart:function(cartResponse)
{this.updating=false;var queryTimestamp=parseInt(cartResponse.query_timestamp,10);if(queryTimestamp>this.lastCartUpdateTimestamp)
{cart=cartResponse.data;var element=jQuery('#promotion_pass_code');if(element!=null&&cart["promotion_pass_code"]!=null)
{element.value=cart["promotion_pass_code"];}
this.lastCartUpdateTimestamp=queryTimestamp;wireOnCartUpdated(cart);}
setCookie(this.currencySymbolCookie,cartResponse.data.currency.symbol)},changeItem:function(shoppingCartItemId,options)
{if(!this.updating)
{options=$H(options);var action=options.unset("action");var params={retailer_guid:this.retailerGuid,session_id:this.sessionId,lang:this.lang,shopping_cart_item_id:shoppingCartItemId};params=params.merge(options);this.updating=true;WireAjaxAPI.requestThroughScriptTag(this.host,"cart",action,params,function(result){WireAjaxAPI.cart.updateCart(result);});}},setPromotionPass:function(code)
{if(this.updating)
{window.setTimeout(jQuery.proxy(function(){this.setPromotionPass(code);},this),200);}
else
{var params={retailer_guid:this.retailerGuid,session_id:this.sessionId,lang:this.lang,promotion_pass_code:code};this.updating=true;WireAjaxAPI.requestThroughScriptTag(this.host,"cart","set_promotion_pass",params,function(result){WireAjaxAPI.cart.updateCart(result);});}},sessionId:0,retailerGuid:"0",lang:"en",host:"",initialized:false,lastCartUpdateTimestamp:0,updating:false,somethingAddedToCartCookie:"somethingAddedToCart",currencySymbolCookie:"currencySymbol"});WireAjaxAPI.cart=new DakisCart();var g_importers=[];var DakisProductAdvertiser2=JClass.extend({init:function(containerElementId,productTemplateElementId)
{this.containerElementId=containerElementId;this.productTemplateElementId=productTemplateElementId;},start:function()
{this.loadProducts();},setTimer:function()
{setTimeout(jQuery.proxy(function(){this.showNextProduct()},this),this.delay);},showNextProduct:function()
{if(this.getNbProducts()<=1)
{return;}
containerElement=$("#"+this.containerElementId);curProduct=$(containerElement.children()[this.curDisplayedIndex]);var self=this;curProduct.hide(500,function(){self.showNextProductAfterFade();});},showNextProductAfterFade:function()
{containerElement=$("#"+this.containerElementId);nbProducts=this.getNbProducts();this.curDisplayedIndex=(this.curDisplayedIndex+1)%nbProducts;curProduct=$(containerElement.children()[this.curDisplayedIndex]);curProduct.show(500);this.setTimer();},getNbProducts:function()
{containerElement=$("#"+this.containerElementId);return containerElement.children().length;},loadProducts:function()
{containerElement=$("#"+this.containerElementId);containerElement.html("");containerElement.hide();var self=this;var importer=new DakisShowcasedMerchandiseImporter(this.productTemplateElementId,this.containerElementId);importer.host=this.host;importer.serverAction="merchandise";importer.imageWidth=this.imageWidth;importer.imageHeight=this.imageHeight;importer.tags="advertised";importer.maxMerchandises=7;importer.retailer_guid=this.retailer_guid;importer.lang=this.lang;importer.afterMerchandiseImported=jQuery.proxy(this.afterMerchandiseImported,this);importer.afterFinish=jQuery.proxy(this.afterAllProductImported,this);importer.start();},afterAllProductImported:function()
{containerElement=$("#"+this.containerElementId);nbProducts=containerElement.children().length;containerElement.children().hide();containerElement.show();this.curDisplayedIndex=parseInt(this.firstIndex%nbProducts);$(containerElement.children()[this.curDisplayedIndex]).show();this.setTimer();},delay:5000,imageWidth:100,imageHeight:100,containerElementId:null,productTemplateElementId:null,host:null,lang:'en',retailer_guid:null,curDisplayedIndex:0,firstIndex:0});var DakisShowcasedMerchandiseImporter=JClass.extend({init:function(templateHtmlElementId,containerHtmlElementId)
{dakisAssert(jQuery("#"+templateHtmlElementId).length>0,"DakisShowcasedMerchandiseImporter: templateHtmlElementId is undefined!");dakisAssert(jQuery("#"+containerHtmlElementId).length>0,"DakisShowcasedMerchandiseImporter: containerHtmlElementId is undefined!");this.htmlTemplate=jQuery("#"+templateHtmlElementId).html();this.htmlTemplate=this.htmlTemplate.replace("","");this.containerId=containerHtmlElementId;},start:function()
{var options={wire_server:this.host,retailer_guid:this.retailer_guid,lang:this.lang,count:this.maxMerchandises,output_format:"json",tags:this.tags};if(location.search.indexOf("nocache")!=-1)options["nocache"]="1";g_importers[this.containerId]=this;var self=this;jQuery.getJSON("merchandises.php?"+jQuery.param(options)).success(function(result){self.importMerchandises(result);});},afterMerchandiseImported:function(id,merchandise,nbMerchandises)
{},afterFinish:function()
{},importMerchandises:function(response)
{decision_models=response["data"]["decision_models"];if(decision_models==null||decision_models.length==0)
{return;}
this.specsDefinitions=response["data"]["decision_models"][0]["products"][0]["specs"];this.currency=response["data"]["definitions"]["currency"];k=0;merch_length=response["data"]["page"]["count"];for(var i=0;i0)
{merchandise.setSpecs(merchandiseInfo.specs.categories[0].specs,this.specsDefinitions);}
merchandise.setRegPrice(WireAjaxAPI.formatMoney(merchandiseInfo.regular_price,this.currency.symbol,this.currency.format));merchandise.setSalePrice(WireAjaxAPI.formatMoney(merchandiseInfo.final_price,this.currency.symbol,this.currency.format));merchandise.setSaleText(merchandiseInfo.display_text);if(merchandiseInfo.regular_price!=merchandiseInfo.final_price)
{strSaleText=' ';if((merchandiseInfo.saleText!=undefined)&&(merchandiseInfo.saleText!=null)&&(merchandise.saleText!=''))
{strSaleText=merchandise.saleText+' ';}
strOtherRebateText=' ';if((merchandiseInfo.other_rebate_text!=undefined)&&(merchandiseInfo.other_rebate_text!=null))
{strOtherRebateText=merchandiseInfo.other_rebate_text+' ';}
strOtherRebateAmount=' ';if((merchandiseInfo.other_rebate_amount!=undefined)&&(merchandiseInfo.other_rebate_amount!=null))
{if(merchandiseInfo.other_rebate_amount!=0)
{strOtherRebateAmount=WireAjaxAPI.formatMoney(merchandiseInfo.other_rebate_amount,this.currency.symbol,this.currency.format)+' ';}}
strOtherRebateEnds=' ';if((merchandiseInfo.other_rebate_ends!=undefined)&&(merchandiseInfo.other_rebate_ends!=null))
{if(merchandiseInfo.other_rebate_ends!='')
{strOtherRebateEnds='(ends on '+merchandiseInfo.other_rebate_ends+')'+' ';}}
merchandise.setRotatorText('reg '+merchandise.regPrice+' '+strSaleText+strOtherRebateText+strOtherRebateAmount+strOtherRebateEnds+merchandise.salePrice);}
else
{merchandise.setRotatorText(merchandise.salePrice);}
merchandise.imageWidth=this.imageWidth;merchandise.imageHeight=this.imageHeight;merchandise.setImageUrl(merchandiseInfo["images"][0]);merchandise.setHidePriceEnabled(merchandiseInfo.hide_price=="1");var flag="default";if(Math.abs(parseFloat(merchandiseInfo.final_price)-parseFloat(merchandiseInfo.regular_price))>0.01)
{flag="sale";}
merchandise.setFlag(flag);merchandise.setMAP(merchandiseInfo.map);this.importMerchandise(merchandise,merchandiseInfo.guid,id,nbMerchandises);},importMerchandise:function(merchandise,guid,id,nbMerchandises)
{var html=this.htmlTemplate;var idStr=this.containerId+"DakisProduct"+id;html=this.replaceTag(html,"Id",idStr);html=this.replaceTag(html,"Name",merchandise.name);html=this.replaceTag(html,"Specs",merchandise.specs);html=this.replaceTag(html,"RegPrice",merchandise.regPrice);html=this.replaceTag(html,"SalePrice",merchandise.salePrice);html=this.replaceTag(html,"SaleText",merchandise.saleText);html=this.replaceTag(html,"RotatorText",merchandise.rotatorText);html=this.replaceTag(html,"ImageUrl",merchandise.imageUrl);html=this.replaceTag(html,"Guid",guid);html=stringReplace(html,"","");var flag=merchandise.flag;if(flag=="default")
{flag="featured";}
html=this.replaceTag(html,"Flag",flag);var element=document.createElement("div");jQuery(element).html(html);jQuery("#"+this.containerId).append(element);this.afterMerchandiseImported(idStr,merchandise,nbMerchandises);},replaceTag:function(text,tag,value)
{return stringReplace(text,"#dakisProduct"+tag+"#",value);},imageWidth:100,imageHeight:100,maxMerchandises:50,serverAction:"merchandise",specsDefinitions:null,containerId:null,tags:null,lang:null,retailer_guid:null,host:null,htmlTemplate:"",currency:null});var DakisMerchandise=JClass.extend({init:function(productGuid)
{this.productGuid=productGuid;this.hidePriceEnabled=false;},load:function()
{this.getMerchandiseInformation();},setName:function(name)
{this.name=name;},setSpecs:function(specs)
{var specHtml="";for(var i=0;i0)
{valueHtml+=",";}
valueHtml+=" "+values[j].text;if(typeof(specs[i].measure_unit)!="undefined"&&specs[i].measure_unit!=null)
{valueHtml+=" "+specs[i].measure_unit;}
curValueCount++;}}
valueHtml+="";if(curValueCount>0)
{specHtml+=valueHtml;}}
this.specs=specHtml;},setRegPrice:function(price)
{if(this.hidePriceEnabled)
{this.regPrice="";}
else
{this.regPrice=price;}},setSalePrice:function(price)
{if(this.hidePriceEnabled)
{this.salePrice="";}
else
{this.salePrice=price;}},setSaleText:function(text)
{this.saleText=text;},setRotatorText:function(text)
{this.rotatorText=text;},setImageUrl:function(url)
{url=url.replace("%width",this.imageWidth);url=url.replace("%height",this.imageHeight);this.imageUrl=url;},setFlag:function(flag)
{this.flag=flag;},setHidePriceEnabled:function(enabled)
{this.hidePriceEnabled=enabled;if(enabled)
{this.regPrice="";this.salePrice="";}},setMAP:function(MAP)
{this.MAP=MAP;},productGuid:null,name:"",regPrice:"",salePrice:"",saleText:"",rotatorText:"",specs:"",imageUrl:"",flag:"",MAP:false,regPriceBindingId:"",salePriceBindingId:"",nameBindingId:"",specsBindingId:"",flagBingingId:"",imageUrlBindingId:"",imageWidth:100,imageHeight:100,onLoadCompleted:function(dakisMerchandise)
{this.updateHtml();},onMerchandiseInformationCompleted:function(infoJsonString)
{var info=eval('('+infoJsonString+')');this.setName(info.name);this.setRegPrice(info.regPrice);this.setSalePrice(info.salePrice);this.setSaleText(info.saleDisplayText);this.setImageUrl(info.imageUrl);this.setSpecs(info.specs);this.setFlag(info.flag);this.setMAP(info.map);this.setHidePriceEnabled(info.hide_price=="1");this.onLoadCompleted(this);},updateHtml:function()
{if(jQuery("#"+this.nameBindingId)!==undefined)
{jQuery("#"+this.nameBindingId).html(this.name);}
if(jQuery("#"+this.specsBindingId)!==undefined)
{jQuery("#"+this.specsBindingId).html(this.specs);}
if(jQuery("#"+this.regPriceBindingId)!==undefined)
{jQuery("#"+this.regPriceBindingId).html(this.regPrice);}
if(jQuery("#"+this.salePriceBindingId)!==undefined)
{jQuery("#"+this.salePriceBindingId).html(this.salePrice);}
if(jQuery("#"+this.imageUrlBindingId)!==undefined)
{jQuery("#"+this.imageUrlBindingId).html(this.imageUrl);}
if(jQuery("#"+this.flagUrlBindingId)!==undefined)
{jQuery("#"+this.flagUrlBindingId).html(this.flag);}},isSpecValid:function(spec)
{if(spec==null||spec==""||spec=="non applicable"||spec=="not applicable"||spec=="unknown")
{return false;}
return true;}});function dakisAssert(condition,message)
{if(condition===false)
{if(g_dakisDebug===true)
{alert("ASSERTION FAILED: "+message);}
g_dakisTrace.traceError(message);}}
function stringReplace(string,oldValue,newValue)
{var parts=string.split(oldValue);var newString=parts.join(newValue);return newString;}
var isIE=document.all&&navigator.userAgent.indexOf("Opera")==-1;var RedBox2={showInline:function(id){this.showOverlay();jQuery('#'+id).clone(true).css({display:'block'}).appendTo('#RB_window');jQuery("#RB_window").show(300);this.setWindowPosition();},addHiddenContent:function(id){jQuery("#RB_window").children().remove();jQuery('#'+id).children().appendTo('#RB_window');jQuery("#RB_loading").hide();jQuery("#RB_window").show(300);this.setWindowPosition();},loading:function(){this.showOverlay();jQuery('#RB_loading').show();this.setWindowPosition();},close:function(){jQuery(window).unbind("keyup",RedBox2.handleKeyUp);jQuery("#RB_window").hide(300).children().remove();jQuery("#RB_overlay").hide(300);},initContent:function(){if(jQuery('#RB_redbox').length){jQuery('#RB_redbox').children().remove();jQuery('#RB_redbox').html('
');}
else{jQuery('body').append('');}},showOverlay:function(){this.initContent();jQuery("#RB_overlay").css({height:jQuery(document).height(),opacity:0.6}).show(300);},getScrollYPos:function(){var ypos=0;if(isIE)
ypos=document.documentElement.scrollTop;else
ypos=window.pageYOffset;if(ypos==null)
ypos=0;return ypos;},setWindowPosition:function(){jQuery("#RB_window").css({width:'auto',height:'auto'});var left=(jQuery(window).width()-jQuery("#RB_window").width())/2;var top=(jQuery(window).height()-jQuery("#RB_window").height())/2-30+this.getScrollYPos();jQuery("#RB_window").css({left:left,top:top});jQuery(window).keyup(RedBox2.handleKeyUp);},handleKeyUp:function(e){if(e.keyCode==27){RedBox2.close();}}}
function initializeFlashBanners(flashRotatorFile)
{
var imagePath = "./bannerImages/";
if( typeof(g_dakisBannerImagePath) != "undefined" )
{
imagePath = g_dakisBannerImagePath;
}
var dakisBanner = jQuery('#dakisBanner');
if( dakisBanner.length > 0)
{
resizeToFitParentElement(dakisBanner);
flashBanner = new DakisDHEBanner(flashRotatorFile,"dakisBanner",imagePath, 7000, g_dakisBannerIsTransparent);
}
}
function initializeCartIndicator()
{
var nbItemElement = jQuery('#dakisCartIndicatorNbItems');
var subtotalElement = jQuery('#dakisCartIndicatorSubtotal');
// need to get the cart indicator data from the wire?
if( nbItemElement.length > 0 || subtotalElement.length > 0 )
{
WireAjaxAPI.cart.update();
}
}
function showCurrentSection()
{
g_contentHeaderHeight = 90;
adjustContentDivHeight();
refreshVisibleContentDiv();
if( jQuery('#middleTableRightDiv_general_switching').length > 0 )
{
jQuery('#middleTableRightDiv_general_switching').css("visibility", "visible");
}
}
function onCartUpdated(cart)
{
var nbItemElement = jQuery('#dakisCartIndicatorNbItems');
var subtotalElement = jQuery('#dakisCartIndicatorSubtotal');
if( nbItemElement.length > 0 )
{
nbItemElement.html(cart.total_items);
}
if( subtotalElement.length > 0 )
{
subtotalElement.html(WireAjaxAPI.formatMoney(cart.sub_total, cart.currency.symbol, cart.currency.format));
}
// if the cart content is visible, update!
if( typeof(updateCartContent) != "undefined" ) {
updateCartContent(cart);
}
jQuery(document).trigger("cartUpdated", cart);
}
function compareSelectedProducts()
{
var params = "?";
var comparison = readComparison();
$.each(comparison.values, function (index, guid) {
params += "catalog[product_guids][]=" + guid + "&";
});
if (comparison.values.length > 1) {
window.location = g_comparisonPageFile + params;
} else if (comparison.values.length == 1) {
window.location = g_specsheetPageFile + params;
}
}
function resetComparison () {
$.removeCookie(g_comparisonCookieName);
$('input .comparison').each(function (index, checkbox) {
checkbox.prop('disabled', false);
checkbox.checked = false;
});
}
function recoverComparison()
{
var comparison = readComparison();
$.each(comparison.ids, function (checkboxId){
var element = $(checkboxId);
if( element != null )
$(checkboxId).checked = true;
});
disableRemaining(comparison.ids, comparison.css);
}
function onComparisonChecked (checkbox) {
// first, store or remove compared product in client side cookie
var comparison = readComparison();
comparison.ids = jQuery.grep(comparison.ids, function (checkboxId) {
return checkboxId != checkbox.id;
});
comparison.values = jQuery.grep(comparison.values, function(value) {
return value != checkbox.value;
});
if (checkbox.checked) {
comparison.values.push(checkbox.value);
comparison.ids.push(checkbox.id);
}
if (comparison.css == null || comparison.css == '') {
comparison.css = jQuery.inArray('comparable', checkbox.className.split(' '));
}
if( comparison.ids.length == 0 )
comparison.css = "";
$.cookie(g_comparisonCookieName, comparison, {expires: 1, path: '/'});
// secondly, disable uncomparable products (this can happen when using the product search)
// and also disable any other comparable product if we reach 3 products
disableRemaining(comparison.ids, comparison.css);
}
function disableRemaining (ids, comparableCss) {
$('input .comparison').each(function (index, checkbox) {
var disabled = false;
if (comparableCss != null && comparableCss.length > 0 && !checkbox.hasClass(comparableCss) )
disabled = true;
if (!disabled && ids.length >= 3 && !jQuery(checkbox.id, ids))
disabled = true;
checkbox.prop('disabled', disabled);
});
}
function readComparison () {
return $.cookie(g_comparisonCookieName) || {'ids': [], 'values': [], 'css': ''};
}
function onSpecClick( specId, dmGuid )
{
params = { include_description: true,
count: 1000,
lang: g_lang,
include_values: false,
output_format: "json",
spec_ids: [specId],
decision_model_guids: [dmGuid] };
WireAjaxAPI.requestThroughScriptTag( g_dakisWireServer, "specification", "", params, function(result){
specClickCallback(result, dmGuid);
});
}
function specClickCallback( wiredata, dmGuid )
{
var spec = wiredata["data"]["specifications"][dmGuid]["categories"][0]["specs"][0];
if( spec != null )
{
var dialog = $('#popup_dialog');
$("#popup_dialog .popup_dialog_header").first().html( spec.text );
$("#popup_dialog .popup_dialog_body").first().html( spec.description );
$("#popup_dialog .popup_dialog_footer").first().html(""+g_textClose+" ");
RedBox2.showInline( 'popup_dialog', { width:640 } );
}
}
function alertAddToCart( productImageSrc, productText, merchandise_id, json_warranty, accessoriesDivId )
{
try
{
if(productImageSrc.indexOf("http://") == -1 && productImageSrc.indexOf("https://") == -1) productImageSrc = "http://" + productImageSrc;
// warranty
var warrantyArray = null;
if(json_warranty != '')
warrantyArray = eval('(' + json_warranty + ')');
// show add to cart dialog
var dialog = $('#popup_dialog');
$("#popup_dialog .popup_dialog_header").first().html( g_textProductAddedToCart );
$("#popup_dialog .popup_dialog_body").first().html( createProductInfoTable( productImageSrc, productText ) );
$("#popup_dialog .popup_dialog_footer").first().html(" ")
.append(" ")
.append(""+g_textContinueShopping+" ")
.append(" ")
.append(""+g_textGoToCart+" ");
if(warrantyArray != null)
{
$('.warranty_holder').html( createWarrantyDropDown(warrantyArray))
.append( " ", { position:"bottom" })
.append(""+g_textAddWarrantyToCart+" ");
}
if( $("#accessory_section").length )
{
$("#accessory_section").remove();
$("#accessory_hr").remove();
$("#accessory_separator").remove();
}
if( accessoriesDivId !== undefined )
{
if( $("#" + accessoriesDivId).length > 0 )
{
$("#popup_dialog").first().append( "
" );
$("#accessory_section").first().append( $("#" + accessoriesDivId).html() );
$("#popup_dialog").first().css("width","800px");
}
}
RedBox2.showInline( 'popup_dialog', { width:640 } );
$('#RB_window select').css("visibility", "visible");
}
catch(e)
{
// On some websites still using Prototype, we'll get error.
// So instead of just failing, redirect to the cart.
console.log("error adding to cart", e);
window.location.href = g_shoppingCartPageFile;
}
}
function createProductInfoTable( imageSrc, text )
{
var pTable = "";
return pTable;
}
function createWarrantyDropDown( warrantyArray )
{
if( warrantyArray == '' )
return null;
var html = "";
html += "" + g_textWarrantySelect + " ";
jQuery.each(warrantyArray, function(i, warrantyObj ){
var s = "$";
if( WireAjaxAPI.cart.currency ) s = WireAjaxAPI.cart.currency.symbol;
var f = "%symbol%money";
if( WireAjaxAPI.cart.currency ) f = WireAjaxAPI.cart.currency.format;
var price = WireAjaxAPI.formatMoney( warrantyObj['price'], s, f );
html += "" + warrantyObj['text'] + " - " + g_textWarrantyPrice + ": " + price + " ";
});
html += " ";
return html;
}
function processWarranty(merchandise_id)
{
var warranty = $('.curent_item_warranties').last().val();
re = new RegExp(/^(ProductLineWarranty|MerchandiseWarranty)_\d+$/);
if( re.exec(warranty) != null )
{
var warranty_type = warranty.split('_')[0];
var warranty_id = warranty.split('_')[1];
WireAjaxAPI.cart.buyWarranty( warranty_type, warranty_id, merchandise_id );
}
}
function showLargeProductImage( imageElement, title, text )
{
$("#popup_dialog .popup_dialog_header").first().html( title );
var x = $("#popup_dialog .popup_dialog_body").first();
x.html("
");
var large_image_container = $('#large_image_container');
if (typeof(imageElement) != "undefined" && imageElement != null && imageElement.attr("src") != null)
{
large_image_container.html(" ");
}
else if (typeof(text) != "undefined" )
{
large_image_container.html( text );
}
// END New code
$("#popup_dialog .popup_dialog_footer").first().html(""+g_textClose+" ");
RedBox2.showInline( 'popup_dialog' );
}
function switchProductImage( newSrc )
{
$('#large_product_image').attr("src", newSrc.replace("%width", 500).replace("%height", 500));
$('#small_product_image').attr("src", newSrc.replace("%width", 400).replace("%height", 400));
}
function dakisGoToPrintApp(appVersion, params, printAppServerUrl)
{
// use the new appVersion instead photo_prints...
if(appVersion == "photo_prints") {
printAppServerUrl = 'https://argus.mydakis.com';
}
var layout = "onlinePrint.html";
if( appVersion == "photo_prints_flash" )
{
layout = "#onlinePrintPageFile_flash_prints";
}
else if(appVersion == "gifts")
{
layout = "onlinePrintGift.html";
}
else if(appVersion == "gifts_flash")
{
layout = "#onlinePrintPageFile_flash_gifts";
}
else if(appVersion == "gift_editing")
{
layout = "onlinePrintGift.html";
}
if (!printAppServerUrl) {
printAppServerUrl = ["pro_event", "photo_prints_common"].indexOf(appVersion) > -1 ? "https://photominator.mydakis.com" : "https://codex.mydakis.com";
}
goToPrintApp(printAppServerUrl, g_lang, "18299080-a8a1-0131-fcfc-00163e7cc54c", appVersion, layout, params);
}
function dakisGoToCashierApp()
{
goToCashier("https://cashier.mydakis.com", g_lang, "18299080-a8a1-0131-fcfc-00163e7cc54c", g_sessionId, "cashier.html");
}
var DakisJITScript = {
load: function(url) {
var promise = DakisJITScript.promises[url];
if(promise == null)
{
jQuery.ajaxSetup({cache: true});
promise = jQuery.getScript(url);
DakisJITScript.promises[url] = promise;
}
return promise;
},
promises: {}
};
var DakisRUA = {
retailerGuid: '18299080-a8a1-0131-fcfc-00163e7cc54c',
webAPPUrl: 'https://static.dakiscdn.com/rua/1/rua.html',
photominatorUrl: 'https://photominator.mydakis.com',
cashierUrl: 'https://cashier.mydakis.com',
init: function(container, typeUI) {
DakisRUA.container = jQuery(container)[0];
if(typeof(DakisRUA.container) == "undefined") throw new Error("DakisRUA: invalid container. Make sure to provide a valid element id.");
if(DakisRUA.getStoredData("token") != null)
{
DakisRUA.updateUISignedIn(DakisRUA.getStoredData("firstName"), DakisRUA.getStoredData("lastName") );
}
else
{
DakisRUA.updateUISignedOut();
}
if( typeof(typeUI) == "undefined")
{
DakisRUA.typeUI = "popup";
}
else
{
DakisRUA.typeUI = typeUI;
}
DakisRUA.initialized = true;
},
isInitialized: function() {
return DakisRUA.initialized;
},
isSignedIn: function() {
return (DakisRUA.getStoredData("token") != null);
},
signOut: function()
{
if(typeof(ruaApp) == "undefined")
{
DakisRUA.onSignedOut();
}
else
{
ruaApp.signOut();
}
},
show: function()
{
if(!DakisRUA.isLoaded) DakisRUA.loadWebApp();
jQuery(".rua-overlay").show();
if(typeof(ruaApp) !== "undefined")
{
ruaApp.show();
}
},
hide: function()
{
ruaApp.hide();
if( (typeof(currentApplication) !== "undefined") && (currentApplication == 'cashier') && (jQuery("#billing_address_content").length > 0) )
{
window.location.reload();
}
},
//*****************************
// private
getStoredData: function(name)
{
return getCookie(DakisRUA.getCookieNameFor(name));
},
storeData: function(name, value)
{
if( typeof(currentApplication) === 'undefined' )
{
return setCookie(DakisRUA.getCookieNameFor(name), value);
}
else
{
return setCookie(DakisRUA.getCookieNameFor(name), value, null, "/");
}
},
deleteStoredData: function(name)
{
return deleteCookie(DakisRUA.getCookieNameFor(name));
},
getCookieNameFor: function(cookieName)
{
return "ruaApp_" + cookieName + "_" + DakisRUA.retailerGuid;
},
loadWebApp: function()
{
if( DakisRUA.typeUI == "popup" )
{
dakisIncludeCss("https://static.dakiscdn.com/rua/1/css/popup.css");
}
else
{
dakisIncludeCss("https://static.dakiscdn.com/rua/1/css/static.css");
}
DakisJITScript.load("https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js").done(function(){
jQuery.ajax({
url: DakisRUA.webAPPUrl,
crossDomain: true,
cache: true,
success: function(result) {
jQuery.ajaxSetup({cache: true});
jQuery(DakisRUA.container).html(result);
jQuery(DakisRUA.container).before("
");
jQuery(DakisRUA.container).append("
");
DakisRUA.initAppWhenLoaded();
},
error: function(result) {
jQuery(DakisRUA.container).html("Unavailable. Please retry later.");
}
});
});
DakisRUA.isLoaded = true;
},
initAppWhenLoaded: function()
{
// We need to wait until the rua html+script are
// fully loaded. We have no choice but to check
// whether the ruaApp global var exists...
if(typeof(ruaApp) == "undefined")
{
window.setTimeout(function() {
DakisRUA.initAppWhenLoaded();
}, 50);
return;
}
DakisRUA.initApp();
},
initApp: function()
{
ruaApp.getStoredData = function(name){return DakisRUA.getStoredData(name);};
ruaApp.storeData = function(name, value){DakisRUA.storeData(name, value);};
ruaApp.deleteStoredData = function(name){DakisRUA.deleteStoredData(name);};
ruaApp.openProject = function(projectId) {DakisRUA.openProject(projectId);};
ruaApp.lang = g_lang;
ruaApp.serverURL = (g_dakisWireServer+'/rua/').replace("http:", "https:");
ruaApp.retailerGuid = DakisRUA.retailerGuid;
ruaApp.init(DakisRUA.container);
jQuery(ruaApp).on("signedIn", function(e, params){
DakisRUA.onSignedIn(params.firstName, params.lastName, params.token);
});
jQuery(ruaApp).on("signedOut", function(e, params){
DakisRUA.onSignedOut();
});
jQuery(ruaApp).on("nameChanged", function(e, params){
DakisRUA.onNameChanged(params.firstName, params.lastName);
});
jQuery(ruaApp).on("visibleChanged", function(e, params){
if(!params.isVisible) {
jQuery(".rua-overlay").hide();
}
});
if( ( DakisRUA.typeUI != "popup" ) && (typeof(ruaApp) !== "undefined") )
{
ruaApp.hideAfterSignIn = false;
}
ruaApp.show();
},
onSignedIn: function(firstName, lastName, token)
{
DakisRUA.updateUISignedIn(firstName, lastName );
var params = {login: "yes"};
params[DakisRUA.getCookieNameFor("token")] = token;
params[DakisRUA.getCookieNameFor("firstName")] = firstName;
params[DakisRUA.getCookieNameFor("lastName")] = lastName;
DakisRUA.callTokenScripts(params).always( function() {
if( typeof(currentApplication) !== "undefined" )
{
switch( currentApplication )
{
case 'photominator' :
DakisRUA.ajaxPost( DakisRUA.photominatorUrl + "/set_shopping_cart_owner", { rua_token: token, printing_order_id: printingOrderID } );
break;
case 'cashier':
DakisRUA.ajaxPost( DakisRUA.cashierUrl + "/set_shopping_cart_owner", { rua_token: token, cashier_session_id: cashierSessionId } ).complete( function(){ window.location.reload();});
break;
}
}
else
{
DakisRUA.ajaxPost( DakisRUA.cashierUrl + "/set_shopping_cart_owner", { rua_token: token, cashier_session_id: g_sessionId } );
}
});
},
onSignedOut: function()
{
DakisRUA.updateUISignedOut();
DakisRUA.deleteStoredData("token");
var params = {logout: "yes"};
params[DakisRUA.getCookieNameFor("token")] = "x";
params[DakisRUA.getCookieNameFor("firstName")] = "x";
params[DakisRUA.getCookieNameFor("lastName")] = "x";
DakisRUA.callTokenScripts(params).always( function() {
if( typeof(currentApplication) === 'undefined' )
{
window.location.reload();
}
else
{
window.location.assign( g_baseURL );
}
});
},
onNameChanged: function(firstName, lastName)
{
jQuery(".rua-first-name").html(firstName);
jQuery(".rua-last-name").html(lastName);
var params = {login: "yes"};
params[DakisRUA.getCookieNameFor("firstName")] = firstName;
params[DakisRUA.getCookieNameFor("lastName")] = lastName;
DakisRUA.callTokenScripts(params)
},
openProject: function( projectId )
{
dakisGoToPrintApp( "gift_editing", "order_id=" + projectId + '&cartPage=' + g_shoppingCartPageFile );
},
getBaseURL: function()
{
return typeof(currentApplication) !== 'undefined' ? g_baseURL : getDocDomainDir();
},
updateUISignedOut: function()
{
jQuery(".rua-signed-in").hide();
jQuery(".rua-not-signed-in").show();
},
updateUISignedIn: function(firstName, lastName )
{
jQuery(".rua-first-name").html(firstName);
jQuery(".rua-last-name").html(lastName);
jQuery(".rua-signed-in").show();
jQuery(".rua-not-signed-in").hide();
},
callTokenScripts: function(params)
{
var base = typeof(currentApplication) !== 'undefined' ? g_baseURL : getDocDomainDir();
return jQuery.when( DakisRUA.ajaxPost( base + "sign.php", params, true ),
DakisRUA.ajaxPost( DakisRUA.photominatorUrl + "/set_rua_token", params, true ),
DakisRUA.ajaxPost( DakisRUA.cashierUrl + "/set_rua_token", params, true ) );
},
ajaxPost: function( url, params, ignoreError )
{
var promise = jQuery.ajax({
type: "POST",
cache: false,
xhrFields: {
withCredentials: true
},
crossDomain: true,
url: url,
data: params
});
if(typeof(ignoreError) != "undefined" && ignoreError === true) {
var defered = jQuery.Deferred();
promise.complete(function() {
defered.resolve();
});
return defered;
}
else {
return promise;
}
},
isLoaded: false,
container: null,
initialized: false
};
function generateUUID(){
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
};
jQuery(window).load(function() {
if(typeof(ga) != "undefined" && typeof(dakisShoppingCartInfo) != "undefined")
{
dakisSendAnalyticsECommerceInfo(dakisShoppingCartInfo);
}
});
function dakisSendAnalyticsECommerceInfo(cart)
{
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': cart.id,
'revenue': cart.total,
'shipping': cart.shipping,
'tax': cart.taxes
});
jQuery.each(cart.items, function(i, item){
ga('ecommerce:addItem', {
'id': cart.id,
'name': item.name,
'sku': item.sku,
'category': item.category,
'price': item.price / item.quantity,
'quantity': item.quantity
});
});
ga('ecommerce:send');
}
var g_comparisonCookieName = "dakisComparison";
var g_giftCatalogPage = "#giftCatalogPageFile";
var g_packagesCatalogPage = "photo_factory.html";
var g_dakisBannerIsTransparent = true;
wireOnCartUpdated = onCartUpdated;