Gen X or Baby Boomers America’s Great Consumer: Infographic

Previously I reposted the Generation Y infographic. This time is an infographic referring to our Baby Boomers Generation and most of us today if we’re not one of them, the Baby Boomers could be our parents or grandparents at least, though the infographic below was narrowed down to the Americans, it could still be applicable to the first world consumers or the western way of living among the Baby Boomers alike. Tell us, does your baby boomer shop a lot according to the infographic? What do they shop often?

How are Baby Boomers or Generation X defined by netlingo.com?

“It’s pronounced as {jenn-X} a.k.a. gen x -or- GenX. The generation of Americans born to the baby boomers, this includes people born between 1963 and 1979. It’s a popular marketing notion to segment an audience into a particular demographic, and “GenXers” are known for making the transition between the old way of doing things and the new way. With a focus on a better balance between work and personal life, GenX demands in the workplace have resulted in more part-time jobs, telecommuting, self-employment, flex time, significant-other insurance coverage, and a variety of alternative work arrangements.”

Baby Boomers: America's Great Consumer Generation [INFOGRAPHIC]

)<[^<]*)*/gi,tb=/^(?:select|textarea)/i,Ea=/s+/,ub=/([?&])_=[^&]*/,vb=/(^|-)([a-z])/g,wb=function(a,c,d){return c+d.toUpperCase()},Oa=/^([w+.-]+:)//([^/?#:]*)(?::(d+))?/,Pa=h.fn.load,sa={},Qa={},Y,Z;try{Y=o.location.href}catch(Cb){Y=o.createElement("a"),Y.href='' ,Y=Y.href}Z=Oa.exec(Y.toLowerCase());h.fn.extend({load:function(a,
d,e){if(typeof a!=="string"&&Pa)return Pa.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0)var j=a.slice(f,a.length),a=a.slice(0,f);f="GET";d&&(h.isFunction(d)?(e=d,d=c):typeof d==="object"&&(d=h.param(d,h.ajaxSettings.traditional),f="POST"));var k=this;h.ajax({url:a,type:f,dataType:"html",data:d,complete:function(a,c,d){d=a.responseText;a.isResolved()&&(a.done(function(a){d=a}),k.html(j?h("

").append(d.replace(sb,"")).find(j):d));e&&k.each(e,[d,c,a])}});return this},
serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?h.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||tb.test(this.nodeName)||pb.test(this.type))}).map(function(a,c){var d=h(this).val();return d==null?null:h.isArray(d)?h.map(d,function(a){return{name:c.name,value:a.replace(Ma,"rn")}}):{name:c.name,value:d.replace(Ma,"rn")}}).get()}});h.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,c){h.fn[c]=function(a){return this.bind(c,a)}});h.each(["get","post"],function(a,d){h[d]=function(a,e,f,j){h.isFunction(e)&&(j=j||f,f=e,e=c);return h.ajax({type:d,url:a,data:e,success:f,dataType:j})}});h.extend({getScript:function(a,d){return h.get(a,c,d,"script")},getJSON:function(a,c,d){return h.get(a,c,d,"json")},ajaxSetup:function(a,c){c?h.extend(!0,a,h.ajaxSettings,c):(c=a,a=h.extend(!0,h.ajaxSettings,c));for(var d in{context:1,url:1})d in c?a[d]=c[d]:d in h.ajaxSettings&&(a[d]=h.ajaxSettings[d]);
return a},ajaxSettings:{url:Y,isLocal:/(?:^file|^widget|-extension):$/.test(Z[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":h.parseJSON,"text xml":h.parseXML}},ajaxPrefilter:p(sa),
ajaxTransport:p(Qa),ajax:function(a,d){function e(a,d,n,l){if(x!==2){x=2;w&&clearTimeout(w);z=c;A=l||"";D.readyState=a?4:0;var y,G,u;if(n){var l=f,v=D,C=l.contents,B=l.dataTypes,K=l.responseFields,E,L,J,O;for(L in K)L in n&&(v[K[L]]=n[L]);for(;B[0]==="*";)B.shift(),E===c&&(E=l.mimeType||v.getResponseHeader("content-type"));if(E)for(L in C)if(C[L]&&C[L].test(E)){B.unshift(L);break}if(B[0]in n)J=B[0];else{for(L in n){if(!B[0]||l.converters[L+" "+B[0]]){J=L;break}O||(O=L)}J=J||O}J?(J!==B[0]&&B.unshift(J),
n=n[J]):n=void 0}else n=c;if(a>=200&&a<300||a===304){if(f.ifModified){if(E=D.getResponseHeader("Last-Modified"))h.lastModified[q]=E;if(E=D.getResponseHeader("Etag"))h.etag[q]=E}if(a===304)d="notmodified",y=!0;else try{E=f;E.dataFilter&&(n=E.dataFilter(n,E.dataType));var P=E.dataTypes;L={};var M,ma,U=P.length,T,N=P[0],R,ua,W,Q,S;for(M=1;M W=L[ua]||L["* "+N];if(!W)for(Q in S=c,L)if(T=Q.split(" "),T[0]===R||T[0]==="*")if(S=L[T[1]+" "+N]){Q=L[Q];Q===!0?W=S:S===!0&&(W=Q);break}!W&&!S&&h.error("No conversion from "+ua.replace(" "," to "));W!==!0&&(n=W?W(n):S(Q(n)))}}G=n;d="success";y=!0}catch(V){d="parsererror",u=V}}else if(u=d,!d||a)d="error",a<0&&(a=0);D.status=a;D.statusText=d;y?m.resolveWith(j,[G,d,D]):m.rejectWith(j,[D,d,u]);D.statusCode(o);o=c;H&&k.trigger("ajax"+(y?"Success":"Error"),[D,f,y?G:u]);p.resolveWith(j,[D,d]);H&&(k.trigger("ajaxComplete",
[D,f]),--h.active||h.event.trigger("ajaxStop"))}}typeof a==="object"&&(d=a,a=c);var d=d||{},f=h.ajaxSetup({},d),j=f.context||f,k=j!==f&&(j.nodeType||j instanceof h)?h(j):h.event,m=h.Deferred(),p=h._Deferred(),o=f.statusCode||{},q,u={},A,v,z,w,C,x=0,H,B,D={readyState:0,setRequestHeader:function(a,c){x||(u[a.toLowerCase().replace(vb,wb)]=c);return this},getAllResponseHeaders:function(){return x===2?A:null},getResponseHeader:function(a){var d;if(x===2){if(!v)for(v={};d=ob.exec(A);)v[d[1].toLowerCase()]=
d[2];d=v[a.toLowerCase()]}return d===c?null:d},overrideMimeType:function(a){x||(f.mimeType=a);return this},abort:function(a){a=a||"abort";z&&z.abort(a);e(0,a);return this}};m.promise(D);D.success=D.done;D.error=D.fail;D.complete=p.done;D.statusCode=function(a){if(a){var c;if(x<2)for(c in a)o[c]=[o[c],a[c]];else c=a[D.status],D.then(c,c)}return this};f.url=((a||f.url)+"").replace(nb,"").replace(rb,Z[1]+"//");f.dataTypes=h.trim(f.dataType||"*").toLowerCase().split(Ea);f.crossDomain||(C=Oa.exec(f.url.toLowerCase()), f.crossDomain=C&&(C[1]!=Z[1]||C[2]!=Z[2]||(C[3]||(C[1]==="http:"?80:443))!=(Z[3]||(Z[1]==="http:"?80:443))));f.data&&f.processData&&typeof f.data!=="string"&&(f.data=h.param(f.data,f.traditional));l(sa,f,d,D);if(x===2)return!1;H=f.global;f.type=f.type.toUpperCase();f.hasContent=!qb.test(f.type);H&&h.active++===0&&h.event.trigger("ajaxStart");if(!f.hasContent&&(f.data&&(f.url+=(Na.test(f.url)?"&":"?")+f.data),q=f.url,f.cache===!1)){C=h.now();var K=f.url.replace(ub,"$1_="+C);f.url=K+(K===f.url?(Na.test(f.url)? "&":"?")+"_="+C:"")}if(f.data&&f.hasContent&&f.contentType!==!1||d.contentType)u["Content-Type"]=f.contentType;f.ifModified&&(q=q||f.url,h.lastModified[q]&&(u["If-Modified-Since"]=h.lastModified[q]),h.etag[q]&&(u["If-None-Match"]=h.etag[q]));u.Accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(B in f.headers)D.setRequestHeader(B,f.headers[B]);if(f.beforeSend&&(f.beforeSend.call(j,D,f)===!1||x===2))return D.abort(), !1;for(B in{success:1,error:1,complete:1})D[B](f[B]);if(z=l(Qa,f,d,D)){D.readyState=1;H&&k.trigger("ajaxSend",[D,f]);f.async&&f.timeout>0&&(w=setTimeout(function(){D.abort("timeout")},f.timeout));try{x=1,z.send(u,e)}catch(E){status<2?e(-1,E):h.error(E)}}else e(-1,"No Transport");return D},param:function(a,d){var e=[],f=function(a,c){c=h.isFunction(c)?c():c;e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(c)};d===c&&(d=h.ajaxSettings.traditional);if(h.isArray(a)||a.jquery&&!h.isPlainObject(a))h.each(a,
function(){f(this.name,this.value)});else for(var j in a)m(j,a[j],d,f);return e.join("&").replace(mb,"+")}});h.extend({active:0,lastModified:{},etag:{}});var xb=h.now(),oa=/(=)?(&|$)|()??()/i;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return h.expando+"_"+xb++}});h.ajaxPrefilter("json jsonp",function(c,d,e){var f=typeof c.data==="string";if(c.dataTypes[0]==="jsonp"||d.jsonpCallback||d.jsonp!=null||c.jsonp!==!1&&(oa.test(c.url)||f&&oa.test(c.data))){var j,k=c.jsonpCallback=h.isFunction(c.jsonpCallback)?
c.jsonpCallback():c.jsonpCallback,m=a[k],d=c.url,l=c.data,p="$1"+k+"$2",o=function(){a[k]=m;j&&h.isFunction(m)&&a[k](j[0])};c.jsonp!==!1&&(d=d.replace(oa,p),c.url===d&&(f&&(l=l.replace(oa,p)),c.data===l&&(d+=(/?/.test(d)?"&":"?")+c.jsonp+"="+k)));c.url=d;c.data=l;a[k]=function(a){j=[a]};e.then(o,o);c.converters["script json"]=function(){j||h.error(k+" was not called");return j[0]};c.dataTypes[0]="json";return"script"}});h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){h.globalEval(a);return a}}});h.ajaxPrefilter("script",function(a){a.cache===c&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});h.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=o.head||o.getElementsByTagName("head")[0]||o.documentElement;return{send:function(f,h){d=o.createElement("script");d.async="async";a.scriptCharset&&(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,
f){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=c,f||h(200,"success")};e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var yb=h.now(),ba;h.ajaxSettings.xhr=a.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&j()))a:{try{c=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(d){}c=void 0}return c}:j;V=h.ajaxSettings.xhr();h.support.ajax=!!V;h.support.cors=V&&"withCredentials"in V;V=c;h.support.ajax&&
h.ajaxTransport(function(a){if(!a.crossDomain||h.support.cors){var d;return{send:function(e,f){var j=a.xhr(),m,l;a.username?j.open(a.type,a.url,a.async,a.username,a.password):j.open(a.type,a.url,a.async);if(a.xhrFields)for(l in a.xhrFields)j[l]=a.xhrFields[l];a.mimeType&&j.overrideMimeType&&j.overrideMimeType(a.mimeType);(!a.crossDomain||a.hasContent)&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(l in e)j.setRequestHeader(l,e[l])}catch(p){}j.send(a.hasContent&&a.data||
null);d=function(e,k){var l,p,o,q,G;try{if(d&&(k||j.readyState===4))if(d=c,m&&(j.onreadystatechange=h.noop,delete ba[m]),k)j.readyState!==4&&j.abort();else{l=j.status;o=j.getAllResponseHeaders();q={};(G=j.responseXML)&&G.documentElement&&(q.xml=G);q.text=j.responseText;try{p=j.statusText}catch(u){p=""}l||!a.isLocal||a.crossDomain?l===1223&&(l=204):l=q.text?200:404}}catch(v){k||f(-1,v)}q&&f(l,p,q,o)};a.async&&j.readyState!==4?(ba||(ba={},k()),m=yb++,j.onreadystatechange=ba[m]=d):d()},abort:function(){d&&
d(0,1)}}}});var ra={},zb=/^(?:toggle|show|hide)$/,Ab=/^([+-]=)?([d+.-]+)([a-z%]*)$/i,pa,Da=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];h.fn.extend({show:function(a,c,d){if(a||a===0)return this.animate(f("show",3),a,c,d);for(var d=0,j=this.length;d e(a.nodeName));for(d=0;d=0;a--)d[a].elem===this&&(c&&d[a](!0),d.splice(a,1))});c||this.dequeue();return this}});h.each({slideDown:f("show",1),slideUp:f("hide",1),slideToggle:f("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,c){h.fn[a]=function(a,d,e){return this.animate(c,a,d,e)}});h.extend({speed:function(a,c,d){var e=a&&typeof a==="object"?h.extend({},a):{complete:d||!d&&c||h.isFunction(a)&&a,duration:a,
easing:d&&c||c&&!h.isFunction(c)&&c};e.duration=h.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in h.fx.speeds?h.fx.speeds[e.duration]:h.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==!1&&h(this).dequeue();h.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,c,d,e){return d+e*a},swing:function(a,c,d,e){return(-Math.cos(a*Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,c,d){this.options=c;this.elem=a;this.prop=d;c.orig||(c.orig={})}});h.fx.prototype=
{update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(h.fx.step[this.prop]||h.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,c=h.css(this.elem,this.prop);return isNaN(a=parseFloat(c))?!c||c==="auto"?0:c:a},custom:function(a,c,d){function e(a){return f.step(a)}var f=this,j=h.fx;this.startTime=h.now();this.start=a;this.end=c;this.unit=d||this.unit||(h.cssNumber[this.prop]?
"":"px");this.now=this.start;this.pos=this.state=0;e.elem=this.elem;e()&&h.timers.push(e)&&!pa&&(pa=setInterval(j.tick,j.interval))},show:function(){this.options.orig[this.prop]=h.style(this.elem,this.prop);this.options.show=!0;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());h(this.elem).show()},hide:function(){this.options.orig[this.prop]=h.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(a){var c=h.now(),d=!0;if(a||c>=this.options.duration+
this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(d=!1);if(d){if(this.options.overflow!=null&&!h.support.shrinkWrapBlocks){var f=this.elem,j=this.options;h.each(["","X","Y"],function(a,c){f.style["overflow"+c]=j.overflow[a]})}this.options.hide&&h(this.elem).hide();if(this.options.hide||this.options.show)for(var k in this.options.curAnim)h.style(this.elem,k,this.options.orig[k]);
this.options.complete.call(this.elem)}return!1}a=c-this.startTime;this.state=a/this.options.duration;c=this.options.easing||(h.easing.swing?"swing":"linear");this.pos=h.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||c](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();return!0}};h.extend(h.fx,{tick:function(){for(var a=h.timers,c=0;c pa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){h.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}});h.expr&&h.expr.filters&&(h.expr.filters.animated=function(a){return h.grep(h.timers,function(c){return a===c.elem}).length});var Bb=/^t(?:able|d|h)$/i,Ra=/^(?:body|html)$/i;"getBoundingClientRect"in o.documentElement?
h.fn.offset=function(a){var c=this[0],e;if(a)return this.each(function(c){h.offset.setOffset(this,a,c)});if(!c||!c.ownerDocument)return null;if(c===c.ownerDocument.body)return h.offset.bodyOffset(c);try{e=c.getBoundingClientRect()}catch(f){}var j=c.ownerDocument,k=j.documentElement;if(!e||!h.contains(k,c))return e?{top:e.top,left:e.left}:{top:0,left:0};c=j.body;j=d(j);return{top:e.top+(j.pageYOffset||h.support.boxModel&&k.scrollTop||c.scrollTop)-(k.clientTop||c.clientTop||0),left:e.left+(j.pageXOffset||
h.support.boxModel&&k.scrollLeft||c.scrollLeft)-(k.clientLeft||c.clientLeft||0)}}:h.fn.offset=function(a){var c=this[0];if(a)return this.each(function(c){h.offset.setOffset(this,a,c)});if(!c||!c.ownerDocument)return null;if(c===c.ownerDocument.body)return h.offset.bodyOffset(c);h.offset.initialize();var d,e=c.offsetParent,f=c.ownerDocument,j=f.documentElement,k=f.body;d=(f=f.defaultView)?f.getComputedStyle(c,null):c.currentStyle;for(var l=c.offsetTop,m=c.offsetLeft;(c=c.parentNode)&&c!==k&&c!==j;){if(h.offset.supportsFixedPosition&&
d.position==="fixed")break;d=f?f.getComputedStyle(c,null):c.currentStyle;l-=c.scrollTop;m-=c.scrollLeft;c===e&&(l+=c.offsetTop,m+=c.offsetLeft,h.offset.doesNotAddBorder&&(!h.offset.doesAddBorderForTableAndCells||!Bb.test(c.nodeName))&&(l+=parseFloat(d.borderTopWidth)||0,m+=parseFloat(d.borderLeftWidth)||0),e=c.offsetParent);h.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(l+=parseFloat(d.borderTopWidth)||0,m+=parseFloat(d.borderLeftWidth)||0)}if(d.position==="relative"||d.position===
"static")l+=k.offsetTop,m+=k.offsetLeft;h.offset.supportsFixedPosition&&d.position==="fixed"&&(l+=Math.max(j.scrollTop,k.scrollTop),m+=Math.max(j.scrollLeft,k.scrollLeft));return{top:l,left:m}};h.offset={initialize:function(){var a=o.body,c=o.createElement("div"),d,e,f,j=parseFloat(h.css(a,"marginTop"))||0;h.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});c.innerHTML="

";
a.insertBefore(c,a.firstChild);d=c.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(c);
h.offset.initialize=h.noop},bodyOffset:function(a){var c=a.offsetTop,d=a.offsetLeft;h.offset.initialize();h.offset.doesNotIncludeMarginInBodyOffset&&(c+=parseFloat(h.css(a,"marginTop"))||0,d+=parseFloat(h.css(a,"marginLeft"))||0);return{top:c,left:d}},setOffset:function(a,c,d){var e=h.css(a,"position");e==="static"&&(a.style.position="relative");var f=h(a),j=f.offset(),k=h.css(a,"top"),l=h.css(a,"left"),m=e==="absolute"&&h.inArray("auto",[k,l])>-1,e={},p={};m&&(p=f.position());k=m?p.top:parseInt(k,
10)||0;l=m?p.left:parseInt(l,10)||0;h.isFunction(c)&&(c=c.call(a,d,j));c.top!=null&&(e.top=c.top-j.top+k);c.left!=null&&(e.left=c.left-j.left+l);"using"in c?c.using.call(a,e):f.css(e)}};h.fn.extend({position:function(){if(!this[0])return null;var a=this[0],c=this.offsetParent(),d=this.offset(),e=Ra.test(c[0].nodeName)?{top:0,left:0}:c.offset();d.top-=parseFloat(h.css(a,"marginTop"))||0;d.left-=parseFloat(h.css(a,"marginLeft"))||0;e.top+=parseFloat(h.css(c[0],"borderTopWidth"))||0;e.left+=parseFloat(h.css(c[0],
"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||o.body;a&&!Ra.test(a.nodeName)&&h.css(a,"position")==="static";)a=a.offsetParent;return a})}});h.each(["Left","Top"],function(a,e){var f="scroll"+e;h.fn[f]=function(e){var j=this[0],k;if(!j)return null;if(e!==c)return this.each(function(){(k=d(this))?k.scrollTo(a?h(k).scrollLeft():e,a?e:h(k).scrollTop()):this[f]=e});return(k=d(j))?"pageXOffset"in k?k[a?
"pageYOffset":"pageXOffset"]:h.support.boxModel&&k.document.documentElement[f]||k.document.body[f]:j[f]}});h.each(["Height","Width"],function(a,d){var e=d.toLowerCase();h.fn["inner"+d]=function(){return this[0]?parseFloat(h.css(this[0],e,"padding")):null};h.fn["outer"+d]=function(a){return this[0]?parseFloat(h.css(this[0],e,a?"margin":"border")):null};h.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(h.isFunction(a))return this.each(function(c){var d=h(this);d[e](a.call(this,c,d[e]()))});
if(h.isWindow(f)){var j=f.document.documentElement["client"+d];return f.document.compatMode==="CSS1Compat"&&j||f.document.body["client"+d]||j}if(f.nodeType===9)return Math.max(f.documentElement["client"+d],f.body["scroll"+d],f.documentElement["scroll"+d],f.body["offset"+d],f.documentElement["offset"+d]);if(a===c)return f=h.css(f,e),j=parseFloat(f),h.isNaN(j)?f:j;return this.css(e,typeof a==="string"?a:a+"px")}});a.avpw_jQuery=a.avpw$=h})(window);(function(a,c){function d(c){return!a(c).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.11",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,
PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({_focus:a.fn.focus,focus:function(c,d){return typeof c==="number"?this.each(function(){var j=this;setTimeout(function(){a(j).focus();d&&d.call(j)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,
"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(d){if(d!==c)return this.css("zIndex",d);if(this.length)for(var d=a(this[0]),f;d.length&&d[0]!==document;){f=d.css("position");if(f===
"absolute"||f==="relative"||f==="fixed")if(f=parseInt(d.css("zIndex"),10),!isNaN(f)&&f!==0)return f;d=d.parent()}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(d,f){function j(c,d,e,f){a.each(k,function(){d-=parseFloat(a.curCSS(c,"padding"+this,!0))||0;e&&(d-=parseFloat(a.curCSS(c,
"border"+this+"Width",!0))||0);f&&(d-=parseFloat(a.curCSS(c,"margin"+this,!0))||0)});return d}var k=f==="Width"?["Left","Right"]:["Top","Bottom"],m=f.toLowerCase(),l={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+f]=function(d){if(d===c)return l["inner"+f].call(this);return this.each(function(){a(this).css(m,j(this,d)+"px")})};a.fn["outer"+f]=function(c,d){if(typeof c!=="number")return l["outer"+f].call(this,c);return this.each(function(){a(this).css(m,
j(this,c,!0,d)+"px")})}}),a.extend(a.expr[":"],{data:function(c,d,j){return!!a.data(c,j[3])},focusable:function(c){var f=c.nodeName.toLowerCase(),j=a.attr(c,"tabindex");if("area"===f){f=c.parentNode;j=f.name;if(!c.href||!j||f.nodeName.toLowerCase()!=="map")return!1;c=a("img[usemap=#"+j+"]")[0];return!!c&&d(c)}return(/input|select|textarea|button|object/.test(f)?!c.disabled:"a"==f?c.href||!isNaN(j):!isNaN(j))&&d(c)},tabbable:function(c){var d=a.attr(c,"tabindex");return(isNaN(d)||d>=0)&&a(c).is(":focusable")}}),
a(function(){var c=document.body,d=c.appendChild(d=document.createElement("div"));a.extend(d.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=d.offsetHeight===100;a.support.selectstart="onselectstart"in d;c.removeChild(d).style.display="none"}),a.extend(a.ui,{plugin:{add:function(c,d,j){var c=a.ui[c].prototype,k;for(k in j)c.plugins[k]=c.plugins[k]||[],c.plugins[k].push([d,j[k]])},call:function(a,c,d){if((c=a.plugins[c])&&a.element[0].parentNode)for(var k=0;k0)return!0;c[d]=1;j=c[d]>0;c[d]=0;return j},isOverAxis:function(a,c,d){return a>c&&a=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted)return this._mouseDrag(c),c.preventDefault();if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==!1)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted)this._mouseStarted=
!1,c.target==this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c);return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(avpw_jQuery);
(function(a){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e=a.fn.position,f=a.fn.offset;a.fn.position=function(f){if(!f||!f.of)return e.apply(this,arguments);var f=a.extend({},f),k=a(f.of),m=k[0],l=(f.collision||"flip").split(" "),p=f.offset?f.offset.split(" "):[0,0],q,v,u;m.nodeType===9?(q=k.width(),v=k.height(),u={top:0,left:0}):m.setTimeout?(q=k.width(),v=k.height(),u={top:k.scrollTop(),left:k.scrollLeft()}):m.preventDefault?(f.at="left top",q=v=0,u={top:f.of.pageY,left:f.of.pageX}):
(q=k.outerWidth(),v=k.outerHeight(),u=k.offset());a.each(["my","at"],function(){var a=(f[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat(["center"]):d.test(a[0])?["center"].concat(a):["center","center"]);a[0]=c.test(a[0])?a[0]:"center";a[1]=d.test(a[1])?a[1]:"center";f[this]=a});l.length===1&&(l[1]=l[0]);p[0]=parseInt(p[0],10)||0;p.length===1&&(p[1]=p[0]);p[1]=parseInt(p[1],10)||0;f.at[0]==="right"?u.left+=q:f.at[0]==="center"&&(u.left+=q/2);f.at[1]==="bottom"?u.top+=v:f.at[1]==="center"&&
(u.top+=v/2);u.left+=p[0];u.top+=p[1];return this.each(function(){var c=a(this),d=c.outerWidth(),e=c.outerHeight(),k=parseInt(a.curCSS(this,"marginLeft",!0))||0,m=parseInt(a.curCSS(this,"marginTop",!0))||0,x=d+k+(parseInt(a.curCSS(this,"marginRight",!0))||0),E=e+m+(parseInt(a.curCSS(this,"marginBottom",!0))||0),B=a.extend({},u),T;f.my[0]==="right"?B.left-=d:f.my[0]==="center"&&(B.left-=d/2);f.my[1]==="bottom"?B.top-=e:f.my[1]==="center"&&(B.top-=e/2);B.left=Math.round(B.left);B.top=Math.round(B.top);
T={left:B.left-k,top:B.top-m};a.each(["left","top"],function(c,k){a.ui.position[l[c]]&&a.ui.position[l[c]][k](B,{targetWidth:q,targetHeight:v,elemWidth:d,elemHeight:e,collisionPosition:T,collisionWidth:x,collisionHeight:E,offset:p,my:f.my,at:f.at})});a.fn.bgiframe&&c.bgiframe();c.offset(a.extend(B,{using:f.using}))})};a.ui.position={fit:{left:function(c,d){var e=a(window),e=d.collisionPosition.left+d.collisionWidth-e.width()-e.scrollLeft();c.left=e>0?c.left-e:Math.max(c.left-d.collisionPosition.left,
c.left)},top:function(c,d){var e=a(window),e=d.collisionPosition.top+d.collisionHeight-e.height()-e.scrollTop();c.top=e>0?c.top-e:Math.max(c.top-d.collisionPosition.top,c.top)}},flip:{left:function(c,d){if(d.at[0]!=="center"){var e=a(window),e=d.collisionPosition.left+d.collisionWidth-e.width()-e.scrollLeft(),f=d.my[0]==="left"?-d.elemWidth:d.my[0]==="right"?d.elemWidth:0,p=d.at[0]==="left"?d.targetWidth:-d.targetWidth,q=-2*d.offset[0];c.left+=d.collisionPosition.left<0?f+p+q:e>0?f+p+q:0}},top:function(c,
d){if(d.at[1]!=="center"){var e=a(window),e=d.collisionPosition.top+d.collisionHeight-e.height()-e.scrollTop(),f=d.my[1]==="top"?-d.elemHeight:d.my[1]==="bottom"?d.elemHeight:0,p=d.at[1]==="top"?d.targetHeight:-d.targetHeight,q=-2*d.offset[1];c.top+=d.collisionPosition.top<0?f+p+q:e>0?f+p+q:0}}}};if(!a.offset.setOffset)a.offset.setOffset=function(c,d){if(/static/.test(a.curCSS(c,"position")))c.style.position="relative";var e=a(c),f=e.offset(),p=parseInt(a.curCSS(c,"top",!0),10)||0,q=parseInt(a.curCSS(c,
"left",!0),10)||0,f={top:d.top-f.top+p,left:d.left-f.left+q};"using"in d?d.using.call(c,f):e.css(f)},a.fn.offset=function(c){var d=this[0];if(!d||!d.ownerDocument)return null;if(c)return this.each(function(){a.offset.setOffset(this,c)});return f.call(this)}})(avpw_jQuery);
(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position=
"relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle"))return!1;
this.handle=this._getHandle(c);if(!this.handle)return!1;return!0},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:c.pageX-
this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();if(this._trigger("start",c)===!1)return this._clear(),!1;this._cacheHelperProportions();a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");
this._mouseDrag(c,!0);return!0},_mouseDrag:function(c,d){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!d){d=this._uiHash();if(this._trigger("drag",c,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,c);return!1},
_mouseStop:function(c){var d=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,c));if(this.dropped)d=this.dropped,this.dropped=!1;if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var e=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
10),function(){e._trigger("stop",c)!==!1&&e._clear()})}else this._trigger("stop",c)!==!1&&this._clear();return!1},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==c.target&&(d=!0)});return d},_createHelper:function(c){var d=this.options,c=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],
[c])):d.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(d.appendTo=="parent"?this.element[0].parentNode:d.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){typeof c=="string"&&(c=c.split(" "));a.isArray(c)&&(c={left:+c[0],top:+c[1]||0});if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-
c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(c.left+=this.scrollParent.scrollLeft(),c.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==
document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),
10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment==
"parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[(c.containment=="document"?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(c.containment=="document"?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(c.containment=="document"?0:a(window).scrollLeft())+a(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c.containment=="document"?
0:a(window).scrollTop())+(a(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){var d=a(c.containment)[0];if(d){var c=a(c.containment).offset(),e=a(d).css("overflow")!="hidden";this.containment=[c.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),c.top+(parseInt(a(d).css("borderTopWidth"),
10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),c.left+(e?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,c.top+(e?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(c.containment.constructor==
Array)this.containment=c.containment},_convertPositionTo:function(c,d){if(!d)d=this.position;var c=c=="absolute"?1:-1,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:d.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
f?0:e.scrollTop())*c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*c)}},_generatePosition:function(c){var d=this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName),j=c.pageX,k=c.pageY;
this.originalPosition&&(this.containment&&(c.pageX-this.offset.click.left

this.containment[2]&&(j=this.containment[2]+this.offset.click.left),c.pageY-this.offset.click.top>this.containment[3]&&(k=this.containment[3]+this.offset.click.top)),d.grid&&(k=this.originalPageY+Math.round((k-this.originalPageY)/d.grid[1])*
d.grid[1],k=this.containment?!(k-this.offset.click.top

this.containment[3])?k:!(k-this.offset.click.top

this.containment[2])?j:!(j-this.offset.click.left

this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop()),left:j-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&
this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(c,d,e){e=e||this._uiHash();a.ui.plugin.call(this,c,[d,e]);if(c=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,c,d,e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.11"});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,
d){var e=a(this).data("draggable"),f=e.options,j=a.extend({},d,{item:e.element});e.sortables=[];a(f.connectToSortable).each(function(){var d=a.data(this,"sortable");d&&!d.options.disabled&&(e.sortables.push({instance:d,shouldRevert:d.options.revert}),d.refreshPositions(),d._trigger("activate",c,j))})},stop:function(c,d){var e=a(this).data("draggable"),f=a.extend({},d,{item:e.element});a.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=!0;this.instance.cancelHelperRemoval=
!1;if(this.shouldRevert)this.instance.options.revert=!0;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",c,f)})},drag:function(c,d){var e=a(this).data("draggable"),f=this;a.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=
e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver)this.instance.isOver=1,this.instance.currentItem=a(f).clone().appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return d.helper[0]},c.target=this.instance.currentItem[0],this.instance._mouseCapture(c,!0),this.instance._mouseStart(c,!0,!0),this.instance.offset.click.top=e.offset.click.top,this.instance.offset.click.left=
e.offset.click.left,this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top,e._trigger("toSortable",c),e.dropped=this.instance.element,e.currentItem=e.element,this.instance.fromOutside=e;this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver)this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",
c,this.instance._uiHash(this.instance)),this.instance._mouseStop(c,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),e._trigger("fromSortable",c),e.dropped=!1})}});a.ui.plugin.add("draggable","cursor",{start:function(){var c=a("body"),d=a(this).data("draggable").options;if(c.css("cursor"))d._cursor=c.css("cursor");c.css("cursor",d.cursor)},stop:function(){var c=a(this).data("draggable").options;
c._cursor&&a("body").css("cursor",c._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var c=a(this).data("draggable").options;a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('

').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});
a.ui.plugin.add("draggable","opacity",{start:function(c,d){c=a(d.helper);d=a(this).data("draggable").options;if(c.css("opacity"))d._opacity=c.css("opacity");c.css("opacity",d.opacity)},stop:function(c,d){c=a(this).data("draggable").options;c._opacity&&a(d.helper).css("opacity",c._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var c=a(this).data("draggable");if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var d=
a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-c.pageY e.scrollSensitivity)d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed;else if(c.pageX-d.overflowOffset.left if(!e.axis||e.axis!="y")c.pageX-a(document).scrollLeft()=0;q--){var v=e.snapElements[q].left,u=v+e.snapElements[q].width,z=e.snapElements[q].top,A=
z+e.snapElements[q].height;if(v-j left:v-e.helperProportions.width}).left-e.margins.left;if(x)d.position.left=e._convertPositionTo("relative",{top:0,left:u}).left-e.margins.left}var E=C||H||K||x;if(f.snapMode!="outer"){C=Math.abs(z-l)<=j;H=Math.abs(A-p)<=j;K=Math.abs(v-k)<=j;x=Math.abs(u-m)<=j;if(C)d.position.top=e._convertPositionTo("relative",{top:z,left:0}).top-e.margins.top;if(H)d.position.top=e._convertPositionTo("relative",{top:A-e.helperProportions.height,left:0}).top-e.margins.top;if(K)d.position.left=e._convertPositionTo("relative",
{top:0,left:v}).left-e.margins.left;if(x)d.position.left=e._convertPositionTo("relative",{top:0,left:u-e.helperProportions.width}).left-e.margins.left}!e.snapElements[q].snapping&&(C||H||K||x||E)&&e.options.snap.snap&&e.options.snap.snap.call(e.element,c,a.extend(e._uiHash(),{snapItem:e.snapElements[q].item}));e.snapElements[q].snapping=C||H||K||x||E}else e.snapElements[q].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,c,a.extend(e._uiHash(),{snapItem:e.snapElements[q].item})),
e.snapElements[q].snapping=!1}}});a.ui.plugin.add("draggable","stack",{start:function(){var c=a(this).data("draggable").options,c=a.makeArray(a(c.stack)).sort(function(c,d){return(parseInt(a(c).css("zIndex"),10)||0)-(parseInt(a(d).css("zIndex"),10)||0)});if(c.length){var d=parseInt(c[0].style.zIndex)||0;a(c).each(function(a){this.style.zIndex=d+a});this[0].style.zIndex=d+c.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){c=a(d.helper);d=a(this).data("draggable").options;if(c.css("zIndex"))d._zIndex=
c.css("zIndex");c.css("zIndex",d.zIndex)},stop:function(c,d){c=a(this).data("draggable").options;c._zIndex&&a(d.helper).css("zIndex",c._zIndex)}})})(avpw_jQuery);
(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,d=c.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(d)?d:function(a){return a.is(d)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[c.scope]=a.ui.ddmanager.droppables[c.scope]||[];a.ui.ddmanager.droppables[c.scope].push(this);
c.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var c=a.ui.ddmanager.droppables[this.options.scope],d=0;d this.element.addClass(this.options.activeClass);d&&this._trigger("activate",c,this.ui(d))},_deactivate:function(c){var d=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);d&&this._trigger("deactivate",c,this.ui(d))},_over:function(c){var d=a.ui.ddmanager.current;if(d&&(d.currentItem||d.element)[0]!=this.element[0])if(this.accept.call(this.element[0],d.currentItem||d.element))this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",
c,this.ui(d))},_out:function(c){var d=a.ui.ddmanager.current;if(d&&(d.currentItem||d.element)[0]!=this.element[0])if(this.accept.call(this.element[0],d.currentItem||d.element))this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",c,this.ui(d))},_drop:function(c,d){var e=d||a.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0])return!1;var f=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var c=a.data(this,
"droppable");if(c.options.greedy&&!c.options.disabled&&c.options.scope==e.options.scope&&c.accept.call(c.element[0],e.currentItem||e.element)&&a.ui.intersect(e,a.extend(c,{offset:c.element.offset()}),c.options.tolerance))return f=!0,!1});if(f)return!1;if(this.accept.call(this.element[0],e.currentItem||e.element))return this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",c,this.ui(e)),
this.element;return!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.11"});a.ui.intersect=function(c,d,e){if(!d.offset)return!1;var f=(c.positionAbs||c.position.absolute).left,j=f+c.helperProportions.width,k=(c.positionAbs||c.position.absolute).top,m=k+c.helperProportions.height,l=d.offset.left,p=l+d.proportions.width,q=d.offset.top,v=q+d.proportions.height;switch(e){case "fit":return l<=
f&&j<=p&&q<=k&&m<=v;case "intersect":return l=q&&k<=v||m>=q&&m<=v||kv)&&(f>=l&&f<=p||j>=l&&j<=p||fp);
default:return!1}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,d){var e=a.ui.ddmanager.droppables[c.options.scope]||[],f=d?d.type:null,j=(c.currentItem||c.element).find(":data(droppable)").andSelf(),k=0;a:for(;k "mousedown"&&e[k]._activate.call(e[k],d),e[k].offset=e[k].element.offset(),e[k].proportions={width:e[k].element[0].offsetWidth,height:e[k].element[0].offsetHeight}}},drop:function(c,d){var e=!1;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)&&(e=e||this._drop.call(this,d)),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||c.element)))this.isout=
1,this.isover=0,this._deactivate.call(this,d)});return e},drag:function(c,d){c.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(c,d);a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e=a.ui.intersect(c,this,this.options.tolerance);if(e=!e&&this.isover==1?"isout":e&&this.isover==0?"isover":null){var f;if(this.options.greedy){var j=this.element.parents(":data(droppable):eq(0)");if(j.length)f=a.data(j[0],"droppable"),
f.greedyChild=e=="isover"?1:0}if(f&&e=="isover")f.isover=0,f.isout=1,f._out.call(f,d);this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,d);if(f&&e=="isout")f.isout=0,f.isover=1,f._over.call(f,d)}}})}}})(avpw_jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");d.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=a([]);if(d.range){if(d.range===!0){this.range=a("

");if(!d.values)d.values=[this._valueMin(),this._valueMin()];if(d.values.length&&d.values.length!==2)d.values=[d.values[0],d.values[0]]}else this.range=a("

");this.range.appendTo(this.element).addClass("ui-slider-range");(d.range==="min"||d.range==="max")&&this.range.addClass("ui-slider-range-"+d.range);this.range.addClass("ui-widget-header")}a(".ui-slider-handle",this.element).length===0&&a("").appendTo(this.element).addClass("ui-slider-handle");
if(d.values&&d.values.length)for(;a(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?
a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(c){a(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(d){var f=!0,j=a(this).data("index.ui-slider-handle"),k,m,l;if(!c.options.disabled){switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(f=
!1,!c._keySliding&&(c._keySliding=!0,a(this).addClass("ui-state-active"),k=c._start(d,j),k===!1))return}l=c.options.step;k=c.options.values&&c.options.values.length?m=c.values(j):m=c.value();switch(d.keyCode){case a.ui.keyCode.HOME:m=c._valueMin();break;case a.ui.keyCode.END:m=c._valueMax();break;case a.ui.keyCode.PAGE_UP:m=c._trimAlignValue(k+(c._valueMax()-c._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:m=c._trimAlignValue(k-(c._valueMax()-c._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(k===
c._valueMax())return;m=c._trimAlignValue(k+l);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(k===c._valueMin())return;m=c._trimAlignValue(k-l)}c._slide(d,j,m);return f}}).keyup(function(d){var f=a(this).data("index.ui-slider-handle");if(c._keySliding)c._keySliding=!1,c._stop(d,f),c._change(d,f),a(this).removeClass("ui-state-active")});this._refreshValue();this._animateOff=!1},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(c){var d=this.options,e,f,j,k,m;if(d.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:c.pageX,y:c.pageY});f=this._valueMax()-this._valueMin()+1;k=this;this.handles.each(function(c){var d=Math.abs(e-k.values(c));f>d&&(f=d,j=a(this),m=c)});d.range===!0&&this.values(1)===d.min&&(m+=1,j=a(this.handles[m]));if(this._start(c,
m)===!1)return!1;this._mouseSliding=!0;k._handleIndex=m;j.addClass("ui-state-active").focus();d=j.offset();this._clickOffset=!a(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-d.left-j.width()/2,top:c.pageY-d.top-j.height()/2-(parseInt(j.css("borderTopWidth"),10)||0)-(parseInt(j.css("borderBottomWidth"),10)||0)+(parseInt(j.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(c,m,e);return this._animateOff=!0},_mouseStart:function(){return!0},
_mouseDrag:function(a){var d=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,d);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var d;this.orientation===
"horizontal"?(d=this.elementSize.width,a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(d=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));d=a/d;d>1&&(d=1);d<0&&(d=0);this.orientation==="vertical"&&(d=1-d);a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+d*a)},_start:function(a,d){var e={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length)e.value=this.values(d), e.values=this.values();return this._trigger("start",a,e)},_slide:function(a,d,e){var f;if(this.options.values&&this.options.values.length){f=this.values(d?0:1);if(this.options.values.length===2&&this.options.range===!0&&(d===0&&e>f||d===1&&e1&&(this.options.values[c]=this._trimAlignValue(d),this._refreshValue(),this._change(null,c));if(arguments.length)if(a.isArray(arguments[0])){e=this.options.values;f=arguments[0];for(j=0;j else return this._values()},_setOption:function(c,d){var e,f=0;if(a.isArray(this.options.values))f=this.options.values.length;a.Widget.prototype._setOption.apply(this,arguments);switch(c){case "disabled":d?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.attr("disabled","disabled"),this.element.addClass("ui-disabled")):(this.handles.removeAttr("disabled"),this.element.removeClass("ui-disabled"));break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(e=0;e else{d=this.options.values.slice();for(e=0;e=this._valueMax())return this._valueMax();var d=this.options.step>0?this.options.step:1,e=(a-this._valueMin())%d;alignValue=a-e;Math.abs(e)*2>=d&&(alignValue+=e>0?d:-d);return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var c=
this.options.range,d=this.options,e=this,f=!this._animateOff?d.animate:!1,j,k={},m,l,p,q;if(this.options.values&&this.options.values.length)this.handles.each(function(c){j=(e.values(c)-e._valueMin())/(e._valueMax()-e._valueMin())*100;k[e.orientation==="horizontal"?"left":"bottom"]=j+"%";a(this).stop(1,1)[f?"animate":"css"](k,d.animate);if(e.options.range===!0)if(e.orientation==="horizontal"){if(c===0)e.range.stop(1,1)[f?"animate":"css"]({left:j+"%"},d.animate);if(c===1)e.range[f?"animate":"css"]({width:j-
m+"%"},{queue:!1,duration:d.animate})}else{if(c===0)e.range.stop(1,1)[f?"animate":"css"]({bottom:j+"%"},d.animate);if(c===1)e.range[f?"animate":"css"]({height:j-m+"%"},{queue:!1,duration:d.animate})}m=j});else{l=this.value();p=this._valueMin();q=this._valueMax();j=q!==p?(l-p)/(q-p)*100:0;k[e.orientation==="horizontal"?"left":"bottom"]=j+"%";this.handle.stop(1,1)[f?"animate":"css"](k,d.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:j+"%"},d.animate);
if(c==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-j+"%"},{queue:!1,duration:d.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:j+"%"},d.animate);if(c==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-j+"%"},{queue:!1,duration:d.animate})}}});a.extend(a.ui.slider,{version:"1.8.11"})})(avpw_jQuery);typeof AV=="undefined"&&(AV={});AV.FlashControls=function(){};AV.FlashControls.prototype={setup:function(){},enablePlugin:function(a){AV_paintWidget.onModuleLoaded(a)},activatePlugin:function(){},deactivatePlugin:function(){},onPreviewRendered:function(){},syncProperty:function(){},syncPreview:function(){}};
Aviary=function(){var a={UPLOAD_TO_SERVER:"UPLOAD_TO_SERVER",UPLOAD_TO_AVIARY:"UPLOAD_TO_AVIARY",REPLACE_IMAGE:"REPLACE_IMAGE",log:function(){}},c=typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&typeof document.createElement!="undefined",d=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),f=e?/win/.test(e):/win/.test(d),e=e?/mac/.test(e):/mac/.test(d),d=/webkit/.test(d)?parseFloat(d.replace(/^.*webkit/(d+(.d+)?).*$/,"$1")):!1,
j=AV__getInternetExplorerVersion()>0;a.w3=c;a.wk=d;a.ie=j;a.win=f;a.mac=e;return a}();
Aviary.Plugins=function(){return{Crop:{id:"crop",name:"Crop",file:AV_feather_baseURL+"crop.swf",text:"Draw the crop rect, drag it by clicking inside or redraw clicking outside. Press ENTER to apply."},Resize:{id:"resize",name:"Resize",file:AV_feather_baseURL+"resize.swf",text:"Resize an image. Use the preview rectangle to see the quality of the resized image.",controls:[{type:"slider",id:"width",name:"Width","default":"@width",from:100,to:3E3},{type:"slider",id:"height",name:"Height","default":"@height",
from:100,to:3E3},{type:"checkbox",id:"keep_proportions",name:"Keep proportions",selected:!0}]},Rotate:{id:"rotate90",name:"Rotate",file:AV_feather_baseURL+"rotate90.swf",text:"Rotate an image.",presets:[{angle:0},{angle:90},{angle:180},{angle:270}],controls:[{type:"slider",id:"rotation",name:"Rotation","default":"0",from:-360,to:360}]},RedEyeRemoval:{id:"redeye",name:"Red Eye Removal",file:AV_feather_baseURL+"redeye.swf",text:"The Red Eyes Removal plugin can be used to remove red eyes caused by the camera flash. Draw with the brush onto the eyes you want to heal.",
controls:[{type:"slider",id:"threshold",name:"Threshold",description:"The amount of red used to guess if the region is a red eye or not.","default":50,from:0,to:100},{type:"slider",id:"radius",name:"Brush size",description:"The size of the brush.","default":10,from:2,to:40}]},Colors:{id:"colors",name:"Colors",file:AV_feather_baseURL+"colors.swf",text:"The Colors plugin bla bla bla.",controls:[{type:"slider",id:"hue",name:"Hue","default":0,from:-180,to:180},{type:"slider",id:"saturation",name:"Saturation",
"default":0,from:-100,to:100},{type:"slider",id:"brightness",name:"Saturation","default":0,from:-100,to:100}],presets:[{hue:-90,saturation:0,brightness:0},{hue:0,saturation:-100,brightness:0},{hue:90,saturation:0,brightness:0}]},Saturation:{id:"saturation",name:"Saturation",file:AV_feather_baseURL+"saturation.swf",presets:[{value:0},{value:0.66},{value:1.33},{value:2}]},Brightness:{id:"brightness",name:"Brightness",file:AV_feather_baseURL+"brightness.swf",text:"Brightness adjustment",presets:[{brightnessvalue:0.33,
contrastvalue:1},{brightnessvalue:0.77,contrastvalue:1},{brightnessvalue:1.22,contrastvalue:1},{brightnessvalue:1.66,contrastvalue:1}]},Contrast:{id:"contrast",name:"Contrast",file:AV_feather_baseURL+"contrast.swf",presets:[{contrastvalue:0.33,brightnessvalue:1},{contrastvalue:0.77,brightnessvalue:1},{contrastvalue:1.22,brightnessvalue:1},{contrastvalue:1.66,brightnessvalue:1}]},Blur:{id:"blur",name:"Blur",file:AV_feather_baseURL+"blur.swf",presets:[{radius:0},{radius:5},{radius:10},{radius:15}]},
Sharpen:{id:"sharpen",name:"Sharpen",file:AV_feather_baseURL+"sharpen.swf",presets:[{value:0},{value:33},{value:66},{value:100}]},Blemish:{id:"blemish",name:"Blemish",file:AV_feather_baseURL+"blemish.swf"},Drawing:{id:"drawing",name:"Drawing",file:AV_feather_baseURL+"drawing.swf"},Overlay:{id:"overlay",name:"Stickers",file:AV_feather_baseURL+"overlay.swf"},Text:{id:"text",name:"Text",file:AV_feather_baseURL+"text.swf"},Flip:{id:"flip",name:"Flip",presets:[{vertical:!1,horizontal:!1},{vertical:!1,
horizontal:!0},{vertical:!0,horizontal:!1},{vertical:!0,horizontal:!0}],file:AV_feather_baseURL+"flip.swf"}}}();
Aviary.DOM=function(){var a=/s*([a-zA-Z_][a-zA-Z_0-9]*)s*(#s*([a-zA-Z_][a-zA-Z_0-9]*))?s*(.s*(.+))?s*/;return{getElement:function(a){return a instanceof Aviary.Node?a.el:a},getNode:function(a){if(!a||a instanceof Aviary.Node)return a;if(typeof a=="string")return Aviary.DOM.getNode(document.getElementById(a));return new Aviary.Node(a)},create:function(c,d,e){var c=a.exec(c),f=c[3],j=c[5],c=document.createElement(c[1]);if(f)c.id=f;if(j)c.className=j;if(d)for(var k in d)c.style[k]=d[k];if(e){d=
e.length;for(k=0;k a;j.width=e;j.height=f;a={};if(l&&typeof l==="object")for(var v in l)a[v]=l[v];if(m&&typeof m==="object")for(var u in m)typeof a.flashvars!="undefined"?a.flashvars+="&"+u+"="+m[u]:a.flashvars=u+"="+m[u];this._createSWF(j,a,d)},_createSWF:function(a,d,e){var f=document.getElementById(e);if(f){if(typeof a.id=="undefined")a.id=e;if(Aviary.ie&&Aviary.win){var j="",k;for(k in a)if(a[k]!=Object.prototype[k])k.toLowerCase()=="data"?d.movie=a[k]:k.toLowerCase()=="styleclass"?j+=' class="'+a[k]+'"':k.toLowerCase()!=
"classid"&&(j+=" "+k+'="'+a[k]+'"');k="";for(var m in d)d[m]!=Object.prototype[m]&&(k+='');f.outerHTML='"+k+"";typeof objIdArr=="undefined"&&(objIdArr=[]);objIdArr[objIdArr.length]=a.id}else{m=document.createElement("object");m.setAttribute("type","application/x-shockwave-flash");for(j in a)a[j]!=Object.prototype[j]&&(j.toLowerCase()=="styleclass"?m.setAttribute("class",a[j]):j.toLowerCase()!=
"classid"&&m.setAttribute(j,a[j]));for(var l in d)d[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&this._createObjParam(m,l,d[l]);f.parentNode.replaceChild(m,f)}}},_createObjParam:function(a,d,e){var f=document.createElement("param");f.setAttribute("name",d);f.setAttribute("value",e);a.appendChild(f)}}}();Aviary.Node=function(a){this.el=a};
Aviary.Node.prototype=function(){var a=Aviary.DOM.getNode,c=Aviary.DOM.getElement;return{parent:function(){return a(this.el.parentNode)},show:function(){this.el.style.display="block"},hide:function(){this.el.style.display="none"},add:function(){for(var a=0;a a[c];return this}}}();Aviary.Canvas=function(a){this.canvas=document.getElementById(a)};
Aviary.Canvas.prototype={setup:function(a,c){var d;Aviary.log("Setting up canvas");typeof AV_proxyServer!="undefined"?(d=AV_proxyServer+"?url="+escape(a),Aviary.log("Setting up canvas:",d),this.canvas.setup(d,c)):(Aviary.log("Setting up canvas (localtest!!):",a),this.canvas.setup(a,c))},activatePlugin:function(a){this.canvas.activatePlugin(a)},deactivatePlugin:function(a){this.canvas.deactivatePlugin(a)},executePlugin:function(){this.canvas.executePlugin()},renderGoldenEgg:function(a,c,d){this.canvas.renderGoldenEgg(a,
c,d)},changeProperty:function(a,c){this.canvas.changeProperty(a,c)},commit:function(a,c){this.canvas.commit(a,c)},undo:function(){this.canvas.undo()},redo:function(){this.canvas.redo()},doCrop:function(){this.canvas.executeCrop()},renderPreview:function(a,c){this.canvas.renderPreview(a,c)},getHistory:function(){return this.canvas.getHistory()},getDynamicPropertyDefaultValue:function(a){return this.canvas.getDynamicPropertyDefaultValue(a)}};Aviary.Controls=function(){this.controls=new AV.FlashControls};
Aviary.Controls.prototype={setup:function(a){this.controls.setup(a)},enablePlugin:function(a,c){this.controls.enablePlugin(a,c)},activatePlugin:function(a){this.controls.activatePlugin(a)},deactivatePlugin:function(a){this.controls.deactivatePlugin(a)},onPreviewRendered:function(a,c){this.controls.onPreviewRendered(a,c)},syncProperty:function(a,c){this.controls.syncProperty(a,c)},syncPreview:function(a){this.controls.syncPreview(a)}};Aviary.Bridge=function(){};
Aviary.Bridge.prototype=function(){var a=Aviary.DOM.getNode,c=Aviary.DOM.create,d=Aviary.log;return{listEditableImages:function(){return document.getElementsByTagName("img")},getPlugins:function(){return[Aviary.Plugins.Crop,Aviary.Plugins.Resize,Aviary.Plugins.Rotate,Aviary.Plugins.RedEyeRemoval,Aviary.Plugins.Colors,Aviary.Plugins.Brightness,Aviary.Plugins.Saturation,Aviary.Plugins.Contrast,Aviary.Plugins.Blemish,Aviary.Plugins.Overlay,Aviary.Plugins.Drawing,Aviary.Plugins.Text,Aviary.Plugins.Flip]},
setEditable:function(d){var d=a(d),f=c("div",{position:"relative",display:"inline"});d.parent().add(f.add(c("a",{fontSize:"22px",fontWeight:"bold",textDecoration:"none",right:"10px",bottom:"10px",position:"absolute"})));var j=a(f.el.getElementsByTagName("a")[0]);j.hide();d.move(f);f.prop({onmouseover:function(){j.show()},onmouseout:function(){j.hide()}})},createCanvas:function(){this.initsize?Aviary.DOM.embedSWF("canvas",AV_feather_baseURL+"canvas.swf",this.initsize.width,this.initsize.height):Aviary.DOM.embedSWF("canvas",
AV_feather_baseURL+"canvas.swf");Aviary.DOM.embedSWF("thumb1",AV_feather_baseURL+"Thumb.swf","64px","64px",{callback:"AV_FlashThumbClickCallback",uid:"thumb1"});Aviary.DOM.embedSWF("thumb2",AV_feather_baseURL+"Thumb.swf","64px","64px",{callback:"AV_FlashThumbClickCallback",uid:"thumb2"});Aviary.DOM.embedSWF("thumb3",AV_feather_baseURL+"Thumb.swf","64px","64px",{callback:"AV_FlashThumbClickCallback",uid:"thumb3"});Aviary.DOM.embedSWF("thumb4",AV_feather_baseURL+"Thumb.swf","64px","64px",{callback:"AV_FlashThumbClickCallback",
uid:"thumb4"})},createControls:function(){this._onComponentLoaded("controls")},setupEditingUI:function(){a("editorOverlay")},destroyEditingUI:function(){var c=a("editorOverlay");c&&c.remove()},onSave:function(a){return this.onEndEditing(a)},onEndEditing:function(a){a.commit(Aviary.UPLOAD_TO_AVIARY,{url:"http://test.viary.com/apps/xmlapi/receiver.aspx?auid=aviaryframework",name:"image2"})},onCommitComplete:function(a){d("Commit has been completed:",a);AV__controlsWidget_onImageSaved(a.url)},_onComponentLoaded:function(a){Aviary.log("_onComponentLoaded: ",
a);switch(a){case "canvas":Aviary.API._onCanvasLoaded(new Aviary.Canvas("canvas"));break;case "controls":Aviary.API._onControlsLoaded(new Aviary.Controls("controls"))}},_onComponentReady:function(a){Aviary.log("_onComponentReady: ",a);switch(a){case "canvas":Aviary.API._onCanvasReady();break;case "controls":Aviary.API._onControlsReady()}}}}();
Aviary.API=function(){var a=Aviary.log,c=Aviary.DOM.getNode,d=Aviary.DOM.getElement;return{customBridge:function(a){var c=function(){};c.prototype=new Aviary.Bridge;c.prototype.constructor=Aviary.Bridge;for(var d in a)c.prototype[d]=a[d];return c},activate:function(a){this.bridge=a||new Aviary.Bridge;this._install();this.goldenEggCallback=null},startEditing:function(d){a("startEditing: ",d);d=c(d);this.controls=this.canvas=null;this.active_target=d;this.bridge.setupEditingUI();this.bridge.createCanvas();
this.bridge.createControls()},restartEditing:function(a){this.active_target=a=c(a);this._setupEditing()},save:function(){this.bridge.onSave(this.canvas)},close:function(){this.bridge.destroyEditingUI()},runGoldenEgg:function(a,c,d,k){this.goldenEggCallback=k;this.canvas.renderGoldenEgg(a,c,d)},doCrop:function(){this.canvas.doCrop()},endEditing:function(){this.bridge.onEndEditing(this.canvas);this.goldenEggCallback=null},activatePlugin:function(c){a("Activate plugin:",c);this.canvas.activatePlugin(c);
this.controls.activatePlugin(c)},deactivatePlugin:function(c){a("Dectivate plugin:",c,this.canvas,this.controls);this.canvas.deactivatePlugin(c);this.controls.deactivatePlugin(c)},changeProperty:function(c,d){a("Changing property:",c,d);this.canvas.changeProperty(c,d)},resizeCanvas:function(a,c){var d=this.canvas.canvas;d.width=a+"px";d.height=c+"px"},getCanvasWidth:function(){return parseInt(this.canvas.canvas.width)},getCanvasHeight:function(){return parseInt(this.canvas.canvas.height)},executePlugin:function(){this.canvas.executePlugin()},
renderPreview:function(a,c){this.canvas.renderPreview(a,c)},getDynamicPropertyDefaultValue:function(a){return this.canvas.getDynamicPropertyDefaultValue(a)},syncProperty:function(a,c){this.controls.syncProperty(a,c)},syncPreview:function(a){this.controls.syncPreview(a)},setImageData:function(a,d){c(a).el.src=d},setThumb:function(a,c){var d=document.getElementById("thumb"+a);d&&d.refreshThumb(c)},getHistory:function(){return this.canvas.getHistory()},_cropSelectionStarted:function(){},_onPreviewRendered:function(a,
c){this.controls.onPreviewRendered(a,c)},_onPluginLoaded:function(c,d){a("Enabling plugin:",c);this.controls.enablePlugin(c,d)},_onImageLoaded:function(){a("Image loaded");AV_paintWidgetLauncher_Flash_stage2&&AV_paintWidgetLauncher_Flash_stage2()},_onGoldenEggComplete:function(){this.goldenEggCallback&&this.goldenEggCallback()},_onCanvasLoaded:function(a){this.canvas=a;null!=this.controls&&(Aviary.log("_onCanvasLoaded, setting up editing"),this._setupEditing())},_onControlsLoaded:function(a){this.controls=
a;null!=this.canvas&&this._setupEditing()},_onCanvasReady:function(){this.canvas.ready=!0;this.controls.ready&&this._activateEditing()},_onControlsReady:function(){this.controls.ready=!0;this.canvas.ready&&this._activateEditing()},_onCommitComplete:function(a){this.bridge.onCommitComplete(a)},_setupEditing:function(){a("Setup Editing");var c=this.bridge.getPlugins();this.controls.setup(c);this.canvas.setup(d(this.active_target).src,c)},_activateEditing:function(){a("Editing")},_install:function(){for(var c=
this.bridge.listEditableImages(),d=[],j=0;j function AviaryAPIActivate(a){var c=Aviary.log;Aviary.API.activate(function(){if(!a)return new Aviary.Bridge;if(a.plugins){for(var d=[],e=a.plugins.toLowerCase().split(","),f=0;f0)a.getPlugins=function(){return d};delete a.plugins}if(a.targets){for(var l=[],f=0;f a.listEditableImages=function(){return l};delete a.targets}if(a.action){var p=a.action;a.onSave=function(a){a.commit(p.type,p)};delete a.action}e=function(){};e.prototype=new Aviary.Bridge;e.prototype.constructor=Aviary.Bridge;for(var q in a)e.prototype[q]=a[q];return new e}())};typeof AV=="undefined"&&(AV={});var AV_paintWidget,AV_controlsWidget;AV__getWidgetURL="http://www.aviary.com/html5";AV__giveFeedbackURL="http://www.aviary.com/contactus";typeof AV__jsonp_imgserver=="undefined"&&(AV__jsonp_imgserver="imgjsonpserver.cgi");AV.toolDefaults={redeye:{initialvalue:10},greeneye:{initialvalue:10},bulge:{radius:100,maxradius:200,power:50},pinch:{radius:100,maxradius:200,power:50},whiten:{initialvalue:10},blemish:{initialvalue:5},drawing:{width:10}};
AV.usageTracker=function(){var a=null,c={},d=[],e,f,j,k,m,l,p;return{clear:function(){a=null;c={};d=[]},getUUID:function(){if(a)return a;return a=Math.floor(Math.random()*4294967295).toString(16)+Math.floor(Math.random()*4294967295).toString(16)},addUsage:function(a,d){d||(d=1);c[a]===void 0?c[a]=d:c[a]+=d},setPageCount:function(a){var c;d=Array(a);for(c=0;c k=avpw$("#avpw_track_form_sessionid"),m=avpw$("#avpw_track_form_apikey"),l=avpw$("#avpw_track_form_data"),p=avpw$("#avpw_img_track_target_holder"));if(typeof AV_imgtrackServer!=="undefined"){j.val(a);k.val(this.getUUID());m.val(AV_launchData.APIKey);switch(a){case "close":l.val(AV.JSON.stringify({dataver:1,opentype:Feather_OpenType,pagehits:d,toolusage:c}));break;default:l.val("")}p.html(AV.buildHiddenFrame("avpw_img_track_target"));avpw$("#avpw_img_track_target").load(function(){setTimeout(function(){p.empty()},
5)});setTimeout(function(){f.submit()},5)}}}}();
function AV_paintWidgetGetPopupEmbedDiv(a){var c,d,e,f=["top","left","bottom","right","margin-top","margin-right","margin-bottom","margin-left","border-top","border-right","border-bottom","border-left","padding-top","padding-right","padding-bottom","padding-left"];c=avpw$("#avpw_canvas_embed_popup");if(c.length==0)c=document.createElement("div"),c.id="avpw_canvas_embed_popup";d=avpw$(a).css("display");if(d==""||d=="inline")d="inline-block";avpw$(c).css("display",d);for(d=0;d0&&f<9)document.getElementById("avpw_controls_2").onselectstart=function(){return!1};return AV__featherUseFlash?AV_paintWidgetLauncher_Flash(a,c,d,e):AV_paintWidgetLauncher_HTML(a,c,d,e)}}
function AV_mapToFlashToolName(a){switch(a){case "rotate":return"rotate90"}return a}function AV_mapFromFlashToolName(a){switch(a){case "rotate90":return"rotate"}return a}
function AV_getActiveTools(a,c){var d=a;typeof a==="string"&&(d=a.split(","));var e=[],f,j={},k;if(c)for(k=0;k function AV_paintWidgetLauncher_Flash(a,c,d,e){function f(){avpw$(k).unbind("load",f);p=AV_controlsWidget.layoutNotify(Feather_OpenType,"getScaledImageDims_Flash",[m,k]);q=p.width;v=p.height;AV_controlsWidget.setMinWidth(q);AV_paintWidget=new AV.PaintWidget(q,v);AV_paintWidget.setOrigSize(q,v);AV_paintWidget.setActionListScaleFactor(AV_controlsWidget.calcActionListScaleFactor(k.width));var A=document.createElement("div");A.id="canvasContent";avpw$(m).append(A);AV_controlsWidget.initAllTools.AV_bindInst(AV_controlsWidget)();
for(u=0;u0?(this.quitCount=0,this.wasJustSaved=!1,this.scrollMainTo(this.scrollPanelInfo.prevPanel,!1,function(){this.setLastPanel("avpw_aviary_about")}.AV_bindInst(this))):this.scrollMainDir(-1);return!1}.AV_bindInst(this);avpw$("#avpw_lftArrow").click(a);
avpw$("#avpw_resume_editing").click(a);avpw$("#avpw_rghtArrow").click(function(){this.scrollMainDir(1);return!1}.AV_bindInst(this));avpw$("#avpw_controls_2").mousedown(function(a){var d=a.target.tagName.toLowerCase();d!="input"&&d!="textarea"&&d!="object"&&a.preventDefault()});avpw$("#avpw_control_undo").click(this.undo.AV_bindInst(this));avpw$("#avpw_control_redo").click(this.redo.AV_bindInst(this));avpw$("#avpw_save_button").click(this.save.AV_bindInst(this));avpw$("#avpw_control_cancel").click(this.cancel.AV_bindInst(this));
avpw$("#avpw_close_save").click(this.save.AV_bindInst(this));avpw$("#avpw_close_nosave").click(this.cancel.AV_bindInst(this));avpw$("#avpw_all_effects").click(function(){this.scrollMain(!0);this.showView("main");this.setPanelMode(null);this.paintWidget.setMode(null);return!1}.AV_bindInst(this));avpw$("#avpw_header").click(function(){this.showView("main");this.setPanelMode(null);this.paintWidget.setMode(null);this.setLastPanel("avpw_aviary_about");setTimeout(function(){this.scrollPanelInfo.prevPanel=
this.scrollPanelInfo.curPanel;this.scrollMainTo(this.scrollPanelInfo.panelCount-1)}.AV_bindInst(this),5);return!1}.AV_bindInst(this));avpw$("#avpw_header").unbind().click(function(){console.log(this.paintWidget.actionExportJSON(!0));return!1}.AV_bindInst(this));AV__featherUseFlash||this.initAllTools();avpw$(".avpw_icon a").each(function(a,d){var e=d.id.replace("avpw_main_","");avpw$(d).click(function(){this.setActiveTool(e,d);return!1}.AV_bindInst(this))}.AV_bindInst(this));this.paintWidget.showWaitThrobber=
this.showWaitThrobber.AV_bindInst(this)};
AV.ControlsWidget.prototype.setActiveTool=function(a,c){var d=function(){this.paintWidget.busy||(this.setPanelModeFromMain(a),avpw$(AV_controlsWidget.onEggWaitThrobber).hide(),AV.usageTracker.addUsage(a))}.AV_bindInst(this);if(a.indexOf("overlay")>-1){var e=a.split("overlay_")[1];if(e)this.tool.overlay.stickerGroupIndex=e;a="overlay"}!this.paintWidget.moduleLoaded(a,d)&&c&&(avpw$(c).children(".avpw_main_egg_icon").append(this.onEggWaitThrobber),avpw$(this.onEggWaitThrobber).show(),avpw$(this.onEggWaitThrobber).css({top:"1px",
left:"3px",width:"37px",height:"46px"}))};AV.ControlsWidget.prototype.setMinWidth=function(a){var c=AV__getInternetExplorerVersion();c<0||c>=8||(a=parseInt(a)+330,avpw$("#avpw_wrapper_1").css("min-width",a))};AV.ControlsWidget.prototype.calcActionListScaleFactor=function(a){return Math.max(1,a/this.maxWidth)};AV.ControlsWidget.prototype.setActionListScaleFactor=function(a){a=this.calcActionListScaleFactor(a);this.paintWidget.setActionListScaleFactor(a);return a};
AV.ControlsWidget.prototype.imageIsScaled=function(){return this.paintWidget.actionListScaleFactor>1};AV.ControlsWidget.prototype.showWaitThrobber=function(a,c){var d,e;a?(this.paintWidget&&(d=parseInt((this.paintWidget.canvas.height-this.waitThrobber.height)/2,10),e=parseInt((this.paintWidget.canvas.width-this.waitThrobber.width)/2,10),avpw$(this.waitThrobber).css({position:"absolute",top:d,left:e})),avpw$(this.waitThrobber).show()):avpw$(this.waitThrobber).hide();c&&setTimeout(c,5)};
AV.ControlsWidget.prototype.panelMode2WidgetMode=function(a){switch(a){case "rotate":return"rotate90";case "filters":return null;case "greeneye":return"redeye";case "pinch":return"bulge"}return a};
AV.ControlsWidget.prototype.setPanelMode=function(a){var c;c=this.panelMode2WidgetMode(a);this.moduleNotify(this.curMode,"panelWillClose");this.moduleNotify(a,"panelWillOpen");a=="filters"&&this.filterEggs.setMode(null);this.resizeFlashThumbs(a);this.paintWidget.setMode(c);this.showPanel(a);this._resetUI(a);this.paintWidget.setCurrentLayerByName("background");this.moduleNotify(this.curMode,"panelDidClose");this.moduleNotify(a,"panelDidOpen");this.curMode=a};
AV.ControlsWidget.prototype.setPanelModeFromMain=function(a){this.showView("editpanel");this.setPanelMode(a)};
AV.ControlsWidget.prototype.showView=function(a,c){var d=200;c&&(d=c);switch(a){case "editpanel":c<=5?(avpw$("#avpw_tool_main_container").hide(),avpw$("#avpw_tool_options_container").show(),avpw$("#avpw_filter_eggs_panel").hide()):(avpw$("#avpw_tool_main_container").fadeOut(d),avpw$("#avpw_tool_options_container").fadeIn(d),avpw$("#avpw_filter_eggs_panel").fadeOut(d));break;case "main":c<=5?(avpw$("#avpw_tool_main_container").show(),avpw$("#avpw_tool_options_container").hide(),avpw$("#avpw_filter_eggs_panel").show()):
(avpw$("#avpw_tool_main_container").fadeIn(d),avpw$("#avpw_tool_options_container").fadeOut(d),avpw$("#avpw_filter_eggs_panel").fadeIn(d))}};AV.ControlsWidget.prototype.setNavPip=function(a){avpw$(".avpw_is_navpip").removeClass("avpw_page_selected");avpw$("#avpw_navpip_"+a).addClass("avpw_page_selected")};AV.ControlsWidget.prototype.scrollMainTo=function(a,c,d){this.scrollPanelInfo.curPanel=parseInt(a);this.scrollMain(c,d)};
AV.ControlsWidget.prototype.scrollMainDir=function(a,c,d){this.scrollPanelInfo.curPanel+=a;this.scrollMain(c,d)};
AV.ControlsWidget.prototype.scrollMain=function(a,c){var d,e=avpw$("#avpw_control_main_scroll_panel");if(this.scrollPanelInfo.curPanel<0)this.scrollPanelInfo.curPanel=0;else if(this.scrollPanelInfo.curPanel>this.scrollPanelInfo.panelCount-1)this.scrollPanelInfo.curPanel=this.scrollPanelInfo.panelCount-1;AV.usageTracker.addPageHit(this.scrollPanelInfo.curPanel);d=this.scrollPanelInfo.curPanel*(this.scrollPanelInfo.widthPx+this.scrollPanelInfo.padding);a?avpw$(e).animate({scrollLeft:d},1,"swing",c):
avpw$(e).animate({scrollLeft:d},300,"swing",c);this.setNavPip(this.scrollPanelInfo.curPanel);this.scrollPanelInfo.curPanel==0?(avpw$("#avpw_lftArrow").addClass("avpw_prev_disabled"),avpw$("#avpw_lftArrow").removeClass("avpw_prev_enabled")):(avpw$("#avpw_lftArrow").removeClass("avpw_prev_disabled"),avpw$("#avpw_lftArrow").addClass("avpw_prev_enabled"));this.scrollPanelInfo.curPanel==this.scrollPanelInfo.panelCount-1?(avpw$("#avpw_rghtArrow").addClass("avpw_next_disabled"),avpw$("#avpw_rghtArrow").removeClass("avpw_next_enabled")):
(avpw$("#avpw_rghtArrow").removeClass("avpw_next_disabled"),avpw$("#avpw_rghtArrow").addClass("avpw_next_enabled"))};AV.ControlsWidget.prototype.scrollFilterTo=function(a,c,d){this.scrollFilterPanelInfo.curPanel=parseInt(a);this.scrollFilter(c,d)};AV.ControlsWidget.prototype.scrollFilterDir=function(a,c,d){this.scrollFilterPanelInfo.curPanel+=a;this.scrollFilter(c,d)};
AV.ControlsWidget.prototype.scrollFilter=function(a,c){var d,e=avpw$("#avpw_filter_control_main_scroll_panel");if(this.scrollFilterPanelInfo.curPanel<0)this.scrollFilterPanelInfo.curPanel=0;else if(this.scrollFilterPanelInfo.curPanel>this.scrollFilterPanelInfo.panelCount-1)this.scrollFilterPanelInfo.curPanel=this.scrollFilterPanelInfo.panelCount-1;d=avpw$(".avpw_filter_scroll_pane")[this.scrollFilterPanelInfo.curPanel];d=avpw$(d).position().left;a?avpw$(e).animate({scrollLeft:d},1,"swing",c):avpw$(e).animate({scrollLeft:d},
300,"swing",c);this.setNavPip(this.scrollFilterPanelInfo.curPanel);this.scrollFilterPanelInfo.curPanel==0?(avpw$("#avpw_filter_lftArrow").addClass("avpw_prev_disabled"),avpw$("#avpw_filter_lftArrow").removeClass("avpw_prev_enabled")):(avpw$("#avpw_filter_lftArrow").removeClass("avpw_prev_disabled"),avpw$("#avpw_filter_lftArrow").addClass("avpw_prev_enabled"));this.scrollFilterPanelInfo.curPanel==this.scrollFilterPanelInfo.panelCount-1?(avpw$("#avpw_filter_rghtArrow").addClass("avpw_next_disabled"),
avpw$("#avpw_filter_rghtArrow").removeClass("avpw_next_enabled")):(avpw$("#avpw_filter_rghtArrow").removeClass("avpw_next_disabled"),avpw$("#avpw_filter_rghtArrow").addClass("avpw_next_enabled"))};
AV.ControlsWidget.prototype.setupScrollPanels=function(){var a,c,d,e,f,j,k,m=0;this.scrollPanelInfo=this.layoutNotify(Feather_OpenType,"getScrollPanelDims");this.scrollPanelInfo.padding=5;this.scrollPanelInfo.curPanel=0;this.scrollPanelInfo.prevPanel=0;f=this.scrollPanelInfo.across*this.scrollPanelInfo.down;this.scrollPanelInfo.panelCount=parseInt((this.activeTools.length-1)/f)+1;this.scrollPanelInfo.panelCount++;AV.usageTracker.setPageCount(this.scrollPanelInfo.panelCount);e="";for(a=0;a

1;a++){var l="";for(d=c=a*f;d','','

',"

",''+k+"","

n"].join("")):
l+='

n

n';e+=['

n',l,"

n"].join("")}e+=['

n

n

Powered by Aviary.com

n

n

n

n

n

 

n

n

n

n

Your work was saved!

n

n

n

n

n

n

Wait! You didn't save your work. Are you certain that you want to close this editor?

'].join("");
avpw$("#avpw_control_main_scrolling_region").html(e);avpw$("#avpw_control_main_scrolling_region").width();avpw$("#avpw_control_main_scrolling_region").css("width");avpw$("#avpw_control_main_scrolling_region").width((243+this.scrollPanelInfo.padding)*this.scrollPanelInfo.panelCount);this.scrollPanelInfo.widthPx=243;c="";for(a=0;a

n';avpw$("#avpw_tools_pager ul").html(c);this.setNavPip(this.scrollPanelInfo.curPanel)};
AV.ControlsWidget.prototype.setLastPanel=function(a){avpw$(".avpw_isa_last_panel").hide();avpw$("#"+a).show()};
AV.ControlsWidget.prototype.filterEggs=function(){var a={polaroid:{flash:'',server:'{parameters:{parameter:[{id:"Inner Placement",value:0.5},{id:"Desaturation Factor",value:0.8},{id:"Background Color",value:-1},{id:"Light Leak Active",value:"true"},{id:"Light Leak Seed",value:-17130388},{id:"Color Grading Active",value:"true"},{id:"Color Grading Seed",value:-101359189},{id:"Red Variation Strength",value:25},{id:"Green Variation Strength",value:25},{id:"Blue Variation Strength",value:25},{id:"Shadow Center",value:"0.4,0.2"},{id:"Stains Active",value:"true"},{id:"Stains On Frame Only",value:"true"},{id:"Stains Density",value:30},{id:"Stains Minimum Drop Size",value:1},{id:"Stains Maximum Drop Size",value:80},{id:"Stains Smoothing",value:8}]}}'},
autocorrection:{flash:'',server:'{parameters:{parameter:[{uid:0,value:"true"},{uid:1,value:"true"},{uid:2,value:"false"},{uid:3,value:"true"},{uid:4,value:"false"}]}}'},toycamera:{flash:'',
server:'{parameters:{parameter:[{id:"Contrast",value:0.1},{id:"Saturation",value:1},{id:"Glow Threshold",value:128},{id:"Glow Radius",value:34},{id:"Glow Intensity",value:0.5},{id:"Grain Random Seed",value:-48494495},{id:"Grain Intensity",value:0.32},{id:"Grain Size",value:3.2},{id:"Grain Clumping Iterations",value:3},{id:"Grain Clumping Strength",value:7},{id:"Color Grading Seed",value:-86426274},{id:"Red Variation Strength",value:30.1},{id:"Green Variation Strength",value:21.5},{id:"Blue Variation Strength",value:38.6},{id:"Inner Limit",value:0.3},{id:"Outer Limit",value:2},{id:"Blur Radius",value:10},{id:"Radius Factor",value:1},{id:"Radius Gamma",value:2.5}]}}'},
oldphoto:{flash:'',
server:'{parameters:{parameter:[{id:"Contrast",value:0.2},{id:"Glow Threshold",value:175},{id:"Glow Radius",value:30},{id:"Glow Intensity",value:0.2},{id:"Grain Intensity",value:0.5},{id:"Grain Size",value:1.2},{id:"Grain Clumping Iterations",max:2,value:2},{id:"Grain Clumping Strength",value:7},{id:"Tint Color",value:52},{id:"Add Dust",value:"true"},{id:"Dust Amount",value:30},{id:"Add Stains",value:"true"},{id:"Add Dots",value:"true"},{id:"Dots Random Seed",value:-147552578},{id:"Dots Amount",value:3}]}}'},
retro:{flash:'',
server:'{parameters:{parameter:[{id:"Matte Padding",value:0.008},{id:"Matte Color",value:-66590},{id:"Matte Corner Radius",value:0.03},{id:"Border Radius",value:30},{id:"Border Intensity",value:1},{id:"Color Effect Intensity",value:0.2},{id:"Grain Intensity",value:0.1},{id:"Grain Size",value:2},{id:"Grain Clumping Iterations",value:4},{id:"Grain Clumping Strength",value:6},{id:"Tint Random Seed",value:-142803775},{id:"TintIntensity",value:1},{id:"Fuzziness",value:35},{id:"Add Light Leak",value:"false"},{id:"Add Dots",value:"true"},{id:"Dots Amount",value:5},{id:"Add Scratches",value:"true"},{id:"Scratches Amount",value:1},{id:"Add Wrinkles",value:"true"},{id:"Add Stains",value:"false"},{id:"Stain Amount",value:10},{id:"Red Adjust",value:40},{id:"Green Adjust",value:80},{id:"Blue Adjust",value:3},{id:"Red Contrast",value:0.6},{id:"Green Contrast",value:0.6},{id:"Blue Contrast",value:0.6},{id:"Saturation",value:1}]}}'}},
c={toycamera:"Toy Camera",polaroid:"Instant!",autocorrection:"Auto",oldphoto:"Old Photo",colorgrading:"Color Grading",vignetteblur:"Vignette Blur",colormatrix:"Color Matrix",filmgrain:"Film Grain",retro:"Retro"};return{setup:function(){var d,e,f,j,k;e=AV_launchData.hiResURL?["autocorrection","toycamera","oldphoto","retro"]:AV_launchData.useServerFilters?["autocorrection","toycamera","oldphoto","retro"]:["polaroid","toycamera","oldphoto","retro"];for(d=0;d e[d],j="#avpw_effects_egg"+d,avpw$(j+" .avpw_filter_text").html(c[f]),avpw$(j+" .avpw_filter_egg_icon").addClass("avpw_filter_egg_icon_"+f),avpw$(j).data("avpw_filter_name",f),avpw$(j).click(function(c){var d=function(){avpw$(AV_controlsWidget.onGoldEggWaitThrobber).hide()}.AV_bindInst(this),e=function(){this.paintWidget.busy||(k=avpw$(c.currentTarget).data("avpw_filter_name"),setTimeout(function(){var c=a[k];this.filterEggs.execute.AV_bindInst(this)(k,c,d)}.AV_bindInst(this),5))}.AV_bindInst(this);
AV_launchData.useServerFilters?this.paintWidget.moduleLoaded("serverfilter",e):this.paintWidget.moduleLoaded("flashfilter",e);avpw$(this.onGoldEggWaitThrobber).show();this.paintWidget.busy||avpw$(c.currentTarget).children(".avpw_filter_eggs_panel_eh_egg").append(this.onGoldEggWaitThrobber);avpw$(this.onGoldEggWaitThrobber).css({top:"2px",left:"7px",width:"33px",height:"44px"});return!1}.AV_bindInst(this))},setMode:function(a){a?(avpw$(".avpw_filter_thumb").hide(),avpw$(".avpw_filter_thumb").removeClass("avpw_filter_thumb_panelmode"),
avpw$("#avpw_"+a+"_thumb").show(),avpw$(".avpw_filter_thumb").addClass("avpw_filter_thumb_panelmode"),avpw$(".avpw_filterpanel").hide(),avpw$("#avpw_filterpanel_"+a).show()):(avpw$(".avpw_filterpanel").hide(),avpw$(".avpw_filter_thumb").show(),avpw$(".avpw_filter_thumb").removeClass("avpw_filter_thumb_panelmode"))},execute:function(a,c,f){AV.usageTracker.addUsage("filter_"+a);AV_launchData.useServerFilters?(this.paintWidget.setMode("serverfilter"),this.paintWidget.module_serverfilter.applyFilter(a,
c,!0,f)):(this.paintWidget.setMode("flashfilter"),this.paintWidget.module_flashfilter.applyFilter(a,c,!0,f));this.filterEggs.setMode(null);return!1}}}();
AV.ControlsWidget.prototype.populateSizePulldownPresets=function(a,c){for(var d,e,f,j=this.paintWidget.canvas.width*this.paintWidget.actionListScaleFactor,k=this.paintWidget.canvas.height*this.paintWidget.actionListScaleFactor,m=a.find(".avpw_dropdown_body_entry"),l=0;lj&&f>d&&(e=!1);j>k&&d>f&&(e=!1);if(f>j||
d>k)e=!1;break;case "cursize":if(f>j||d>k)e=!1;break;case "maxspect":k>j&&f>d&&(e=!1);j>k&&d>f&&(e=!1);if(f>this.maxWidth||d>this.maxHeight)e=!1;break;case "max":if(f>this.maxWidth||d>this.maxHeight)e=!1}else e=d.indexOf(":"),e=e==-1?!1:!0;e?avpw$(m[l]).show():avpw$(m[l]).hide()}AV__dropdown_style_reset(a,!1)};
AV.ControlsWidget.prototype.populatePulldown=function(a){var c=AV_launchData[a+"Sizes"];typeof c==="string"&&(c=c.split(","));var d=!1;c[0]instanceof Array&&(d=!0);var e,f,a=a==="crop"?avpw$("#avpw_crop_presets"):avpw$("#avpw_resize_presets");a.find(".avpw_isa_populated_dropdown_body_entry").remove();f=a.find(".avpw_dropdown_body_wrapper");e=f.html();for(a=0;a

'+
k+"

n"}f.html(e)};AV.ControlsWidget.prototype.setImageScaledIndicator=function(){this.imageIsScaled()?avpw$(".avpw_scale_warn").show():avpw$(".avpw_scale_warn").hide()};AV.ControlsWidget.prototype._drawUICircle=function(a,c,d,e,f){AV__featherUseFlash?this._drawUICircle_Flash(a,c,d,e,f):this._drawUICircle_HTML(a,c,d,e,f)};
AV.ControlsWidget.prototype._drawUICircle_Flash=function(a,c,d,e,f){c=parseInt(c);d=AV__color_to_int(d);e=="transparent"?(a=!0,e=0):(a=!1,e=e?parseInt(e.slice(1),16):16777215);f?(f=parseInt(f),f/=10):f=0;AV_getFlashMovie("thumb1").setBrushThumb(c,d,e,f,a)};
AV.ControlsWidget.prototype._drawUICircle_HTML=function(a,c,d,e,f){if(f!=null&&e!="transparent")return this._drawUICircleSoft(a,c,d,e,f);a=avpw$(a)[0];f=a.getContext("2d");f.globalCompositeOperation="copy";f.clearRect(0,0,a.width,a.height);f.globalCompositeOperation="source-over";f.beginPath();f.strokeStyle=d!=null?d=="transparent"||AV__color_is_white(d)||e==null?"#444":d:"rgba(0,0,0,0)";f.lineWidth=3;f.arc(a.width/2,a.height/2,c,0,6.2831852,!1);f.closePath();f.stroke();if(e!=null)f.save(),f.clip(),
e=="transparent"?this._drawUIGrid(f,a.width,a.height):(f.fillStyle=e,f.fillRect(0,0,a.width,a.height)),f.restore()};
AV.ControlsWidget.prototype._drawUICircleSoft=function(a,c,d,e){var d=this.paintWidget.module_drawing.getHardFactor(),f=avpw$(a)[0],a=f.getContext("2d");c*=2;var j=f.width/2,k=f.height/2;f.width=f.width;this._drawUIGrid(a,f.width,f.height);d=Math.max(2,c*d);d=(d+c)*0.5;a.lineWidth=d;a.shadowBlur=c-d;a.shadowOffsetX=-100;a.shadowOffsetY=-100;a.lineCap="round";a.lineJoin="round";a.fillStyle=e;a.strokeStyle=e;a.shadowColor=a.strokeStyle;a.beginPath();a.moveTo(j+0.01+100,k+100);a.lineTo(j+100,k+100);
a.stroke();a.closePath()};AV.ControlsWidget.prototype._drawUIGrid=function(a,c,d,e){var f;e||(e=5);for(f=0;f AV.ControlsWidget.prototype.showFlashThumbs=function(a,c){if(AV__featherUseFlash){var d,e,f,j;d=a?avpw$("#avpw_controlpanel_"+a+" .avpw_flashthumb_holder"):avpw$(".avpw_flashthumb_holder");c?avpw$(d).each(function(a,c){a+=1;e="thumb"+a;j=AV_getFlashMovie(e);j.width=avpw$(c).width();j.height=avpw$(c).height();f=avpw$(c).offset();f.top+=1;f.left+=1;avpw$("#"+e).offset(f)}):avpw$(d).each(function(a){a+=1;e="thumb"+a;avpw$("#"+e).offset({top:-9999,left:-9999})})}};
AV.ControlsWidget.prototype.resizeFlashThumbs=function(a){if(AV__featherUseFlash){var c,d,a=avpw$("#avpw_controlpanel_"+a+" .avpw_flashthumb_holder");avpw$(a).each(function(a,f){a+=1;c="thumb"+a;d=AV_getFlashMovie(c);var j=avpw$(f).attr("width"),k=avpw$(f).attr("height");j||(j=avpw$(f).width());k||(k=avpw$(f).height());if(j&&k)d.width=j,d.height=k})}};
AV.ControlsWidget.prototype.tool.flip={flipNone_flash:function(){this.controls.paintWidget.module_flip.flashFlip(!1,!1)},flipHoriz_flash:function(){this.controls.paintWidget.module_flip.flashFlip(!0,!1)},flipVert_flash:function(){this.controls.paintWidget.module_flip.flashFlip(!1,!0)},flipBoth_flash:function(){this.controls.paintWidget.module_flip.flashFlip(!0,!0)},init:function(a){var c=this;this.controls=a;this.flippedV=this.flippedH=!1;avpw$("#avpw_flip_none_thumb").click(function(){if(c.flippedV)a.paintWidget.module_flip.vflip(!0),
c.flippedV=!c.flippedV;if(c.flippedH)a.paintWidget.module_flip.hflip(!0),c.flippedH=!c.flippedH;return!1});avpw$("#avpw_flip_horizontal_thumb").click(function(){if(c.flippedV)a.paintWidget.module_flip.vflip(!0),c.flippedV=!c.flippedV;if(!c.flippedH)a.paintWidget.module_flip.hflip(!0),c.flippedH=!c.flippedH;return!1});avpw$("#avpw_flip_vertical_thumb").click(function(){if(!c.flippedV)a.paintWidget.module_flip.vflip(!0),c.flippedV=!c.flippedV;if(c.flippedH)a.paintWidget.module_flip.hflip(!0),c.flippedH=
!c.flippedH;return!1});avpw$("#avpw_flip_both_thumb").click(function(){if(!c.flippedV)a.paintWidget.module_flip.vflip(!0),c.flippedV=!c.flippedV;if(!c.flippedH)a.paintWidget.module_flip.hflip(!0),c.flippedH=!c.flippedH;return!1})},panelWillOpen:function(){this.flippedV=this.flippedH=!1},panelDidOpen:function(){this.controls.showFlashThumbs("flip",!0);AV.flashThumbSet.addListener("thumb1",this.flipNone_flash.AV_bindInst(this));AV.flashThumbSet.addListener("thumb2",this.flipHoriz_flash.AV_bindInst(this));
AV.flashThumbSet.addListener("thumb3",this.flipVert_flash.AV_bindInst(this));AV.flashThumbSet.addListener("thumb4",this.flipBoth_flash.AV_bindInst(this))},panelWillClose:function(){this.controls.showFlashThumbs("flip",!1);AV.flashThumbSet.removeAllListeners()},resetUI:function(){var a=this.controls.paintWidget.module_flip;a.makeThumb(avpw$("#avpw_flip_none_thumb")[0],!1,!1);a.makeThumb(avpw$("#avpw_flip_horizontal_thumb")[0],!0,!1);a.makeThumb(avpw$("#avpw_flip_vertical_thumb")[0],!1,!0);a.makeThumb(avpw$("#avpw_flip_both_thumb")[0],
!0,!0)},shutdown:function(){avpw$("#avpw_flip_none_thumb").unbind("click");avpw$("#avpw_flip_horizontal_thumb").unbind("click");avpw$("#avpw_flip_vertical_thumb").unbind("click");avpw$("#avpw_flip_both_thumb").unbind("click");this.controls=null}};
AV.ControlsWidget.prototype.tool.redeye={init:function(a){this.controls=a;var c=AV.toolDefaults.redeye.initialvalue,d=!1;a.paintWidget.module_redeye.radius=c;d=!0;avpw$("#avpw_redeye_slider").slider({range:"min",value:c,max:20,min:3,slide:function(c,f){d||a._drawUICircle("#avpw_redeye_ui_circle",f.value,"#444")},change:function(c,d){a.paintWidget.module_redeye.setRadius(d.value)}});d=!1},shutdown:function(){avpw$("#avpw_redeye_slider").unbind("slide");avpw$("#avpw_redeye_slider").unbind("slidechange");
avpw$("#avpw_redeye_slider").slider({slide:null,change:null});this.controls=null},panelDidOpen:function(){this.controls.showFlashThumbs("redeye",!0);var a=avpw$("#avpw_redeye_slider").slider("value");this.controls.paintWidget.module_redeye.setRadius(a);this.controls._drawUICircle("#avpw_redeye_ui_circle",a,"#444")},panelWillOpen:function(){this.controls.paintWidget.module_redeye.mode="redeye"},panelWillClose:function(){this.controls.showFlashThumbs("redeye",!1);AV.flashThumbSet.removeAllListeners()}};
AV.ControlsWidget.prototype.tool.bulge={init:function(a){this.controls=a;var c=AV.toolDefaults.bulge.radius,d=AV.toolDefaults.bulge.maxradius,e=AV.toolDefaults.bulge.power;a.paintWidget.module_bulge.radius=c;a.paintWidget.module_bulge.power=e;avpw$("#avpw_bulge_slider_radius").slider({range:"min",value:c,max:d,min:3,slide:function(){},change:function(c,d){a.paintWidget.module_bulge.radius=d.value}});avpw$("#avpw_bulge_slider_power").slider({range:"min",value:e,max:100,min:0,change:function(c,d){a.paintWidget.module_bulge.power=
d.value}})},panelWillOpen:function(){this.controls.paintWidget.module_bulge.radius=avpw$("#avpw_bulge_slider_radius").slider("value");this.controls.paintWidget.module_bulge.power=avpw$("#avpw_bulge_slider_power").slider("value");this.controls.paintWidget.setMode("flatten");this.controls.paintWidget.module_flatten.flatten();this.controls.paintWidget.actionImplicit(!0)},panelWillClose:function(){this.controls.paintWidget.undoImplicitActions(!0)},shutdown:function(){avpw$("#avpw_bulge_slider_radius").unbind("slide");
avpw$("#avpw_bulge_slider_radius").unbind("slidechange");avpw$("#avpw_bulge_slider_radius").slider({slide:null,change:null});avpw$("#avpw_bulge_slider_power").unbind("slide");avpw$("#avpw_bulge_slider_power").unbind("slidechange");avpw$("#avpw_bulge_slider_power").slider({slide:null,change:null});this.controls=null}};
AV.ControlsWidget.prototype.tool.pinch={init:function(a){this.controls=a;var c=AV.toolDefaults.pinch.radius,d=AV.toolDefaults.pinch.maxradius,e=AV.toolDefaults.pinch.power;a.paintWidget.module_bulge.radius=c;a.paintWidget.module_bulge.power=e;avpw$("#avpw_pinch_slider_radius").slider({range:"min",value:c,max:d,min:3,slide:function(){},change:function(c,d){a.paintWidget.module_bulge.radius=d.value}});avpw$("#avpw_pinch_slider_power").slider({range:"min",value:e,max:100,min:0,change:function(c,d){a.paintWidget.module_bulge.power=
-d.value}})},panelWillOpen:function(){this.controls.paintWidget.module_bulge.radius=avpw$("#avpw_pinch_slider_radius").slider("value");this.controls.paintWidget.module_bulge.power=-avpw$("#avpw_pinch_slider_power").slider("value");this.controls.paintWidget.setMode("flatten");this.controls.paintWidget.module_flatten.flatten();this.controls.paintWidget.actionImplicit(!0)},panelWillClose:function(){this.controls.paintWidget.undoImplicitActions(!0)},shutdown:function(){avpw$("#avpw_pinch_slider_radius").unbind("slide");
avpw$("#avpw_pinch_slider_radius").unbind("slidechange");avpw$("#avpw_pinch_slider_radius").slider({slide:null,change:null});avpw$("#avpw_pinch_slider_power").unbind("slide");avpw$("#avpw_pinch_slider_power").unbind("slidechange");avpw$("#avpw_pinch_slider_power").slider({slide:null,change:null});this.controls=null}};
AV.ControlsWidget.prototype.tool.whiten={init:function(a){this.controls=a;var c=AV.toolDefaults.whiten.initialvalue;avpw$("#avpw_whiten_slider").slider({range:"min",value:c,max:20,min:3,slide:function(c,e){a._drawUICircle("#avpw_whiten_ui_circle",e.value,"#444")},change:function(c,e){a.paintWidget.module_whiten.radius=e.value}});a._drawUICircle("#avpw_whiten_ui_circle",c,"#444");a.paintWidget.module_whiten.radius=c},shutdown:function(){avpw$("#avpw_whiten_slider").unbind("slide");avpw$("#avpw_whiten_slider").unbind("slidechange");
avpw$("#avpw_whiten_slider").slider({slide:null,change:null});this.controls=null}};
AV.ControlsWidget.prototype.tool.greeneye={init:function(a){var c=this,d=AV.toolDefaults.greeneye.initialvalue;this.controls=a;avpw$("#avpw_greeneye_slider").slider({range:"min",value:d,max:20,min:3,slide:function(a,d){c.controls._drawUICircle("#avpw_greeneye_ui_circle",d.value,"#444")},change:function(a,d){c.controls.paintWidget.module_redeye.radius=d.value}});a._drawUICircle("#avpw_greeneye_ui_circle",d,"#444")},panelWillOpen:function(){this.controls.paintWidget.module_redeye.mode="greeneye"},shutdown:function(){this.controls=
null;avpw$("#avpw_greeneye_slider").unbind("slide");avpw$("#avpw_greeneye_slider").unbind("slidechange");avpw$("#avpw_greeneye_slider").slider({slide:null,change:null})}};
AV.ControlsWidget.prototype.tool.blemish={init:function(a){this.controls=a;var c=!1,d=AV.toolDefaults.blemish.initialvalue,c=!0;avpw$("#avpw_blemish_slider").slider({range:"min",value:d,max:20,min:3,slide:function(d,f){var j=f.value;c||a._drawUICircle("#avpw_blemish_ui_circle",j,"#444")},change:function(c,d){a.paintWidget.module_blemish.setRadius(d.value)}});c=!1},panelDidOpen:function(){this.controls.showFlashThumbs("blemish",!0);var a=avpw$("#avpw_blemish_slider").slider("value");this.controls.paintWidget.module_blemish.setRadius(a);
this.controls._drawUICircle("#avpw_blemish_ui_circle",a,"#444")},panelWillClose:function(){this.controls.showFlashThumbs("blemish",!1)},shutdown:function(){avpw$("#avpw_blemish_slider").unbind("slide");avpw$("#avpw_blemish_slider").unbind("slidechange");avpw$("#avpw_blemish_slider").slider({slide:null,change:null});this.controls=null}};
AV.ControlsWidget.prototype.tool.barrel={init:function(a){var c=this;this.controls=a;this.ignoreslider=this.dirty=!1;avpw$("#avpw_barrel_slider").slider({range:"min",max:100,min:-100,change:function(a,e){if(c.ignoreslider)return!0;avpw$("#avpw_barrel_slider").slider("option","value");c.controls.paintWidget.module_barrel.set(e.value,!0);c.dirty=!0}});avpw$("#avpw_barrel_thumb1").click(function(){avpw$("#avpw_barrel_slider").slider("value",-100)});avpw$("#avpw_barrel_thumb2").click(function(){avpw$("#avpw_barrel_slider").slider("value",
-33)});avpw$("#avpw_barrel_thumb3").click(function(){avpw$("#avpw_barrel_slider").slider("value",33)});avpw$("#avpw_barrel_thumb4").click(function(){avpw$("#avpw_barrel_slider").slider("value",100)})},commit:function(){this.controls.paintWidget.module_barrel.commit()},cancel:function(){this.controls.paintWidget.module_barrel.reset();this.resetUI();this.dirty=!1},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1},onUndo:function(){if(this.dirty)return this.cancel(),!1},onRedo:function(){this.dirty&&
this.cancel()},resetUI:function(){this.ignoreslider=!0;avpw$("#avpw_barrel_slider").slider("option","value",0);this.ignoreslider=!1;this.controls.paintWidget.module_barrel.makeThumb(avpw$("#avpw_barrel_thumb1")[0],-100);this.controls.paintWidget.module_barrel.makeThumb(avpw$("#avpw_barrel_thumb2")[0],-33);this.controls.paintWidget.module_barrel.makeThumb(avpw$("#avpw_barrel_thumb3")[0],33);this.controls.paintWidget.module_barrel.makeThumb(avpw$("#avpw_barrel_thumb4")[0],100)},shutdown:function(){this.controls=
null;avpw$("#avpw_barrel_slider").unbind("slidechange");avpw$("#avpw_barrel_slider").slider({slide:null,change:null});avpw$("#avpw_barrel_thumb1").unbind("click");avpw$("#avpw_barrel_thumb2").unbind("click");avpw$("#avpw_barrel_thumb3").unbind("click");avpw$("#avpw_barrel_thumb4").unbind("click")}};
AV.ControlsWidget.prototype.tool.sharpen={thumb1Hit:function(){avpw$("#avpw_sharpen_slider").slider("value",0)},thumb2Hit:function(){avpw$("#avpw_sharpen_slider").slider("value",33)},thumb3Hit:function(){avpw$("#avpw_sharpen_slider").slider("value",66)},thumb4Hit:function(){avpw$("#avpw_sharpen_slider").slider("value",100)},init:function(a){var c=this;this.controls=a;this.ignoreslider=this.dirty=!1;avpw$("#avpw_sharpen_slider").slider({range:"min",max:100,min:0,change:function(d,e){if(!c.ignoreslider)avpw$("#avpw_sharpen_slider").slider("option",
"value"),a.paintWidget.module_sharpen.set(e.value,!0),c.dirty=!0}});avpw$("#avpw_sharpen_thumb1").click(this.thumb1Hit);avpw$("#avpw_sharpen_thumb2").click(this.thumb2Hit);avpw$("#avpw_sharpen_thumb3").click(this.thumb3Hit);avpw$("#avpw_sharpen_thumb4").click(this.thumb4Hit)},commit:function(){this.controls.paintWidget.module_sharpen.commit()},cancel:function(){this.controls.paintWidget.module_sharpen.reset();this.resetUI();this.dirty=!1},panelWillOpen:function(){this.dirty=!1},panelDidOpen:function(){this.controls.showFlashThumbs("sharpen",
!0);AV.flashThumbSet.addListener("thumb1",this.thumb1Hit);AV.flashThumbSet.addListener("thumb2",this.thumb2Hit);AV.flashThumbSet.addListener("thumb3",this.thumb3Hit);AV.flashThumbSet.addListener("thumb4",this.thumb4Hit)},panelWillClose:function(){this.dirty&&this.commit();this.dirty=!1;this.controls.showFlashThumbs("sharpen",!1);AV.flashThumbSet.removeAllListeners()},onUndo:function(){if(this.dirty&&(this.cancel(),!AV__featherUseFlash))return!1},onRedo:function(){this.dirty&&this.cancel()},resetUI:function(){this.ignoreslider=
!0;avpw$("#avpw_sharpen_slider").slider("option","value",0);this.ignoreslider=!1;this.controls.paintWidget.module_sharpen.makeThumb(avpw$("#avpw_sharpen_thumb1")[0],0);this.controls.paintWidget.module_sharpen.makeThumb(avpw$("#avpw_sharpen_thumb2")[0],33);this.controls.paintWidget.module_sharpen.makeThumb(avpw$("#avpw_sharpen_thumb3")[0],67);this.controls.paintWidget.module_sharpen.makeThumb(avpw$("#avpw_sharpen_thumb4")[0],100)},shutdown:function(){avpw$("#avpw_sharpen_slider").unbind("slidechange");
avpw$("#avpw_sharpen_slider").slider({slide:null,change:null});avpw$("#avpw_sharpen_thumb1").unbind();avpw$("#avpw_sharpen_thumb2").unbind();avpw$("#avpw_sharpen_thumb3").unbind();avpw$("#avpw_sharpen_thumb4").unbind();this.controls=null}};
AV.ControlsWidget.prototype.tool.saturation={thumb1Hit:function(){avpw$("#avpw_saturation_slider").slider("value",0)},thumb2Hit:function(){avpw$("#avpw_saturation_slider").slider("value",66)},thumb3Hit:function(){avpw$("#avpw_saturation_slider").slider("value",133)},thumb4Hit:function(){avpw$("#avpw_saturation_slider").slider("value",200)},init:function(a){var c=this;this.ignoreslider=!1;this.controls=a;this.dirty=!1;avpw$("#avpw_saturation_slider").slider({range:"min",max:200,min:0,change:function(d,
e){if(c.ignoreslider)return!0;avpw$("#avpw_saturation_slider").slider("option","value");a.paintWidget.module_saturation.set(e.value/100,!0);c.dirty=!0}});avpw$("#avpw_saturation_thumb1").click(this.thumb1Hit);avpw$("#avpw_saturation_thumb2").click(this.thumb2Hit);avpw$("#avpw_saturation_thumb3").click(this.thumb3Hit);avpw$("#avpw_saturation_thumb4").click(this.thumb4Hit)},shutdown:function(){avpw$("#avpw_saturation_slider").unbind("slidechange");avpw$("#avpw_saturation_slider").slider({slide:null,
change:null});avpw$("#avpw_saturation_thumb1").unbind("click");avpw$("#avpw_saturation_thumb2").unbind("click");avpw$("#avpw_saturation_thumb3").unbind("click");avpw$("#avpw_saturation_thumb4").unbind("click");this.controls=null},commit:function(){this.controls.paintWidget.module_saturation.commit();return!1},cancel:function(){this.controls.paintWidget.module_saturation.reset();this.resetUI();return this.dirty=!1},panelDidOpen:function(){this.controls.showFlashThumbs("saturation",!0);AV.flashThumbSet.addListener("thumb1",
this.thumb1Hit);AV.flashThumbSet.addListener("thumb2",this.thumb2Hit);AV.flashThumbSet.addListener("thumb3",this.thumb3Hit);AV.flashThumbSet.addListener("thumb4",this.thumb4Hit)},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1;this.controls.showFlashThumbs("saturation",!1);AV.flashThumbSet.removeAllListeners()},onUndo:function(){if(this.dirty&&(this.cancel(),!AV__featherUseFlash))return!1},onRedo:function(){this.dirty&&this.cancel()},resetUI:function(){this.ignoreslider=!0;avpw$("#avpw_saturation_slider").slider("option",
"value",100);this.ignoreslider=!1;var a=this.controls.paintWidget.module_saturation;a.makeThumb(avpw$("#avpw_saturation_thumb1")[0],0);a.makeThumb(avpw$("#avpw_saturation_thumb2")[0],0.66);a.makeThumb(avpw$("#avpw_saturation_thumb3")[0],1.33);a.makeThumb(avpw$("#avpw_saturation_thumb4")[0],2)}};
AV.ControlsWidget.prototype.tool.brightness={thumb1Hit:function(){avpw$("#avpw_brightness_slider").slider("value",33)},thumb2Hit:function(){avpw$("#avpw_brightness_slider").slider("value",77)},thumb3Hit:function(){avpw$("#avpw_brightness_slider").slider("value",122)},thumb4Hit:function(){avpw$("#avpw_brightness_slider").slider("value",166)},init:function(a){var c=this;this.controls=a;this.dirty=this.ignoreslider=!1;avpw$("#avpw_brightness_slider").slider({range:"min",max:166,min:33,change:function(a,
e){if(c.ignoreslider)return!0;avpw$("#avpw_brightness_slider").slider("option","value");c.controls.paintWidget.module_brightness.set(e.value/100,1,!0);c.dirty=!0}});avpw$("#avpw_brightness_thumb1").click(this.thumb1Hit);avpw$("#avpw_brightness_thumb2").click(this.thumb2Hit);avpw$("#avpw_brightness_thumb3").click(this.thumb3Hit);avpw$("#avpw_brightness_thumb4").click(this.thumb4Hit)},commit:function(){this.controls.paintWidget.module_brightness.commit()},cancel:function(){this.controls.paintWidget.module_brightness.reset();
this.resetUI();this.dirty=!1},panelDidOpen:function(){this.controls.showFlashThumbs("brightness",!0);AV.flashThumbSet.addListener("thumb1",this.thumb1Hit);AV.flashThumbSet.addListener("thumb2",this.thumb2Hit);AV.flashThumbSet.addListener("thumb3",this.thumb3Hit);AV.flashThumbSet.addListener("thumb4",this.thumb4Hit)},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1;this.controls.showFlashThumbs("brightness",!1);AV.flashThumbSet.removeAllListeners()},onUndo:function(){if(this.dirty&&
(this.cancel(),!AV__featherUseFlash))return!1},onRedo:function(){this.dirty&&this.cancel()},resetUI:function(){this.ignoreslider=!0;avpw$("#avpw_brightness_slider").slider("option","value",100);this.ignoreslider=!1;this.controls.paintWidget.module_brightness.makeThumb(avpw$("#avpw_brightness_thumb1")[0],0.33,1);this.controls.paintWidget.module_brightness.makeThumb(avpw$("#avpw_brightness_thumb2")[0],0.77,1);this.controls.paintWidget.module_brightness.makeThumb(avpw$("#avpw_brightness_thumb3")[0],
1.22,1);this.controls.paintWidget.module_brightness.makeThumb(avpw$("#avpw_brightness_thumb4")[0],1.66,1)},shutdown:function(){this.controls=null;avpw$("#avpw_brightness_slider").unbind("slidechange");avpw$("#avpw_brightness_slider").slider({slide:null,change:null});avpw$("#avpw_brightness_thumb1").unbind("click");avpw$("#avpw_brightness_thumb2").unbind("click");avpw$("#avpw_brightness_thumb3").unbind("click");avpw$("#avpw_brightness_thumb4").unbind("click")}};
AV.ControlsWidget.prototype.tool.contrast={thumb1Hit:function(){avpw$("#avpw_contrast_slider").slider("value",33)},thumb2Hit:function(){avpw$("#avpw_contrast_slider").slider("value",77)},thumb3Hit:function(){avpw$("#avpw_contrast_slider").slider("value",122)},thumb4Hit:function(){avpw$("#avpw_contrast_slider").slider("value",166)},init:function(a){var c=this;this.controls=a;this.dirty=this.ignoreslider=!1;avpw$("#avpw_contrast_slider").slider({range:"min",max:166,min:33,change:function(a,e){if(c.ignoreslider)return!0;
avpw$("#avpw_contrast_slider").slider("option","value");c.controls.paintWidget.module_contrast.set(1,e.value/100,!0);c.dirty=!0}});avpw$("#avpw_contrast_thumb1").click(this.thumb1Hit);avpw$("#avpw_contrast_thumb2").click(this.thumb2Hit);avpw$("#avpw_contrast_thumb3").click(this.thumb3Hit);avpw$("#avpw_contrast_thumb4").click(this.thumb4Hit)},commit:function(){this.controls.paintWidget.module_contrast.commit()},cancel:function(){this.controls.paintWidget.module_contrast.reset();this.resetUI();this.dirty=
!1},panelDidOpen:function(){this.controls.showFlashThumbs("contrast",!0);AV.flashThumbSet.addListener("thumb1",this.thumb1Hit);AV.flashThumbSet.addListener("thumb2",this.thumb2Hit);AV.flashThumbSet.addListener("thumb3",this.thumb3Hit);AV.flashThumbSet.addListener("thumb4",this.thumb4Hit)},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1;this.controls.showFlashThumbs("contrast",!1);AV.flashThumbSet.removeAllListeners()},onUndo:function(){if(this.dirty&&(this.cancel(),!AV__featherUseFlash))return!1},
onRedo:function(){this.dirty&&this.cancel()},resetUI:function(){this.ignoreslider=!0;avpw$("#avpw_contrast_slider").slider("option","value",100);this.ignoreslider=!1;this.controls.paintWidget.module_contrast.makeThumb(avpw$("#avpw_contrast_thumb1")[0],1,0.33);this.controls.paintWidget.module_contrast.makeThumb(avpw$("#avpw_contrast_thumb2")[0],1,0.77);this.controls.paintWidget.module_contrast.makeThumb(avpw$("#avpw_contrast_thumb3")[0],1,1.22);this.controls.paintWidget.module_contrast.makeThumb(avpw$("#avpw_contrast_thumb4")[0],
1,1.66)},shutdown:function(){this.controls=null;avpw$("#avpw_contrast_slider").unbind("slidechange");avpw$("#avpw_contrast_slider").slider({slide:null,change:null});avpw$("#avpw_contrast_thumb1").unbind("click");avpw$("#avpw_contrast_thumb2").unbind("click");avpw$("#avpw_contrast_thumb3").unbind("click");avpw$("#avpw_contrast_thumb4").unbind("click")}};
AV.ControlsWidget.prototype.tool.blur={thumb1Hit:function(){avpw$("#avpw_blur_slider").slider("value",0)},thumb2Hit:function(){avpw$("#avpw_blur_slider").slider("value",5)},thumb3Hit:function(){avpw$("#avpw_blur_slider").slider("value",10)},thumb4Hit:function(){avpw$("#avpw_blur_slider").slider("value",15)},init:function(a){var c=this;this.controls=a;this.dirty=this.ignoreslider=!1;avpw$("#avpw_blur_slider").slider({range:"min",max:15,min:0,change:function(a,e){if(c.ignoreslider)return!0;avpw$("#avpw_blur_slider").slider("option",
"value");c.controls.paintWidget.module_blur.set(e.value,!0);c.dirty=!0}});avpw$("#avpw_blur_thumb1").click(this.thumb1Hit);avpw$("#avpw_blur_thumb2").click(this.thumb2Hit);avpw$("#avpw_blur_thumb3").click(this.thumb3Hit);avpw$("#avpw_blur_thumb4").click(this.thumb4Hit)},commit:function(){this.controls.paintWidget.module_blur.commit()},cancel:function(){this.controls.paintWidget.module_blur.reset();this.resetUI();this.dirty=!1},panelWillOpen:function(){this.dirty=!1},panelDidOpen:function(){this.controls.showFlashThumbs("blur",
!0);AV.flashThumbSet.addListener("thumb1",this.thumb1Hit);AV.flashThumbSet.addListener("thumb2",this.thumb2Hit);AV.flashThumbSet.addListener("thumb3",this.thumb3Hit);AV.flashThumbSet.addListener("thumb4",this.thumb4Hit)},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1;this.controls.showFlashThumbs("blur",!1);AV.flashThumbSet.removeAllListeners()},onUndo:function(){if(this.dirty&&(this.cancel(),!AV__featherUseFlash))return!1},onRedo:function(){this.dirty&&this.cancel()},resetUI:function(){this.ignoreslider=
!0;avpw$("#avpw_blur_slider").slider("option","value",0);this.ignoreslider=!1;this.controls.paintWidget.module_blur.makeThumb(avpw$("#avpw_blur_thumb1")[0],0);this.controls.paintWidget.module_blur.makeThumb(avpw$("#avpw_blur_thumb2")[0],2);this.controls.paintWidget.module_blur.makeThumb(avpw$("#avpw_blur_thumb3")[0],4);this.controls.paintWidget.module_blur.makeThumb(avpw$("#avpw_blur_thumb4")[0],6)},shutdown:function(){this.controls=null;avpw$("#avpw_blur_slider").unbind("slidechange");avpw$("#avpw_blur_slider").slider({slide:null,
change:null});avpw$("#avpw_blur_thumb1").unbind("click");avpw$("#avpw_blur_thumb2").unbind("click");avpw$("#avpw_blur_thumb3").unbind("click");avpw$("#avpw_blur_thumb4").unbind("click");this.controls=null}};
AV.ControlsWidget.prototype.tool.colors={init:function(a){var c=this;this.dirty=this.ignoresliders=!1;this.controls=a;avpw$("#avpw_r_slider").slider({range:"min",max:100,min:-100,change:function(d,e){if(c.ignoresliders)return!0;var f=avpw$("#avpw_g_slider").slider("option","value"),j=avpw$("#avpw_b_slider").slider("option","value");a.paintWidget.module_colors.set(e.value,f,j,!0);c.dirty=!0}});avpw$("#avpw_g_slider").slider({range:"min",max:100,min:-100,change:function(d,e){if(c.ignoresliders)return!0;
var f=avpw$("#avpw_r_slider").slider("option","value"),j=avpw$("#avpw_b_slider").slider("option","value");a.paintWidget.module_colors.set(f,e.value,j,!0);c.dirty=!0}});avpw$("#avpw_b_slider").slider({range:"min",max:100,min:-100,change:function(d,e){if(c.ignoresliders)return!0;var f=avpw$("#avpw_r_slider").slider("option","value"),j=avpw$("#avpw_g_slider").slider("option","value");a.paintWidget.module_colors.set(f,j,e.value,!0);c.dirty=!0}});avpw$("#avpw_color_reset").click(function(a,e){return c.cancel(a,
e)})},commit:function(){this.controls.paintWidget.module_colors.commit();return!1},cancel:function(){this.controls.paintWidget.module_colors.reset();this.resetUI();return this.dirty=!1},resetUI:function(){this.ignoresliders=!0;avpw$("#avpw_r_slider").slider("option","value",0);avpw$("#avpw_g_slider").slider("option","value",0);avpw$("#avpw_b_slider").slider("option","value",0);this.ignoresliders=!1},onUndo:function(){if(this.dirty)return this.cancel(),!1},onRedo:function(){this.dirty&&this.cancel()},
panelWillOpen:function(){this.ignoresliders=this.dirty=!1},panelWillClose:function(){if(this.dirty)this.commit(),this.dirty=!1},shutdown:function(){avpw$("#avpw_r_slider").unbind("slidechange");avpw$("#avpw_r_slider").slider({slide:null,change:null});avpw$("#avpw_g_slider").unbind("slidechange");avpw$("#avpw_g_slider").slider({slide:null,change:null});avpw$("#avpw_b_slider").unbind("slidechange");avpw$("#avpw_b_slider").slider({slide:null,change:null});avpw$("#avpw_color_reset").unbind("click");this.controls=
null}};
AV.ControlsWidget.prototype.tool.drawing={init:function(a){var c=this,d=AV.toolDefaults.drawing.width;this.uiCircleRadius=d/2;this.controls=a;this.ignoreslider=!1;this.ignoreslider=!0;avpw$("#avpw_drawing_width_slider").slider({range:"min",value:d,max:50,min:1,slide:function(a,d){var j;c.uiCircleRadius=d.value/2;j=c.controls.paintWidget.module_drawing.erase?"transparent":c.controls.paintWidget.module_drawing.color;this.ignoreslider||c.controls._drawUICircle("#avpw_drawing_ui_circle",c.uiCircleRadius,j,
j,c.controls.paintWidget.module_drawing.softness)},change:function(a,d){c.controls.paintWidget.module_drawing.setWidth(d.value)}});avpw$("#avpw_drawing_softness_slider").slider({range:"min",value:0,max:100,min:0,slide:function(a,d){var j;c.controls.paintWidget.module_drawing.setSoftness(d.value);j=c.controls.paintWidget.module_drawing.erase?"transparent":c.controls.paintWidget.module_drawing.color;this.ignoreslider||c.controls._drawUICircle("#avpw_drawing_ui_circle",c.uiCircleRadius,j,j,c.controls.paintWidget.module_drawing.softness)},
change:function(a,d){c.controls.paintWidget.module_drawing.setSoftness(d.value)}});this.ignoreslider=!1;avpw$("#avpw_draweraser_outer").click(function(){c.controls.paintWidget.module_drawing.erase?(avpw$("#avpw_draweraser").removeClass("avpw_selected"),c.controls.paintWidget.module_drawing.setErase(!1),avpw$("#avpw_drawing_color_selector").show(),c.controls._drawUICircle("#avpw_drawing_ui_circle",c.uiCircleRadius,c.controls.paintWidget.module_drawing.color,c.controls.paintWidget.module_drawing.color,
c.controls.paintWidget.module_drawing.softness)):(avpw$("#avpw_draweraser").addClass("avpw_selected"),c.controls.paintWidget.module_drawing.setErase(!0),avpw$("#avpw_drawing_color_selector").hide(),c.controls._drawUICircle("#avpw_drawing_ui_circle",c.uiCircleRadius,"white","transparent",c.controls.paintWidget.module_drawing.softness))});avpw$(".avpw_color_picker_drawing").click(function(a){a=a.currentTarget;a.id=="avpw_drawing_color_selector"||avpw$(a).parent().attr("id")=="avpw_drawing_color_selector"||
c.setColor(a)});this.doReset=!0},setColor:function(a){var c=avpw$(a).css("background-color");this.controls.paintWidget.module_drawing.setColor(c);var d=avpw$("#avpw_drawing_color_selector"),c=AV__color_is_light(c)?"#969696":"#fff";avpw$(d).detach();avpw$(d).css("border","1px solid "+c);avpw$(a).children(".avpw_relative100").append(d);avpw$(d).show();avpw$("#avpw_draweraser").removeClass("avpw_selected");this.controls.paintWidget.module_drawing.setErase(!1);this.controls._drawUICircle("#avpw_drawing_ui_circle",
this.uiCircleRadius,this.controls.paintWidget.module_drawing.color,this.controls.paintWidget.module_drawing.color,this.controls.paintWidget.module_drawing.softness);return!1},panelDidOpen:function(){this.controls.showFlashThumbs("drawing",!0);this.doReset?(this.controls.paintWidget.module_drawing.setWidth(AV.toolDefaults.drawing.width),this.controls.paintWidget.module_drawing.setSoftness(0),this.setColor(avpw$("#avpw_drawing_colors_white")),this.doReset=!1):AV__featherUseFlash&&this.controls.paintWidget.module_drawing.flashReset();
this.controls._drawUICircle("#avpw_drawing_ui_circle",this.uiCircleRadius,this.controls.paintWidget.module_drawing.color,this.controls.paintWidget.module_drawing.color,this.controls.paintWidget.module_drawing.softness);this.controls.paintWidget.setCurrentLayerByName("drawing");this.controls.paintWidget.module_drawing.erase?avpw$("#avpw_draweraser").addClass("avpw_selected"):avpw$("#avpw_draweraser").removeClass("avpw_selected");this.ignoreslider=!1},panelWillClose:function(){this.controls.showFlashThumbs("drawing",
!1)},shutdown:function(){this.controls=null;avpw$("#avpw_drawing_width_slider").unbind("slide");avpw$("#avpw_drawing_width_slider").unbind("slidechange");avpw$("#avpw_drawing_width_slider").slider({slide:null,change:null});avpw$("#avpw_draweraser_outer").unbind("click");avpw$(".avpw_colorpicker_drawing").unbind("click");avpw$("#avpw_drawing_softness_slider").unbind("slide");avpw$("#avpw_drawing_softness_slider").unbind("slidechange");avpw$("#avpw_drawing_softness_slider").slider({slide:null,change:null})}};
AV.ControlsWidget.prototype.tool.rotate={rotate0_flash:function(){this.controls.paintWidget.module_rotate90.rotate90(0,!0);this.controls.setMinWidth(this.controls.paintWidget.width)},rotate90_flash:function(){this.controls.paintWidget.module_rotate90.rotate90(90,!0);this.controls.setMinWidth(this.controls.paintWidget.width)},rotate180_flash:function(){this.controls.paintWidget.module_rotate90.rotate90(180,!0);this.controls.setMinWidth(this.controls.paintWidget.width)},rotate270_flash:function(){this.controls.paintWidget.module_rotate90.rotate90(270,
!0);this.controls.setMinWidth(this.controls.paintWidget.width)},init:function(a){var c=this;this.curRotation=0;this.controls=a;avpw$("#avpw_rotate0_thumb").click(function(){a.paintWidget.module_rotate90.rotate90(0-c.curRotation,!0);c.curRotation=0});avpw$("#avpw_rotate90_thumb").click(function(){a.paintWidget.module_rotate90.rotate90(90-c.curRotation,!0);c.curRotation=90});avpw$("#avpw_rotate180_thumb").click(function(){a.paintWidget.module_rotate90.rotate90(180-c.curRotation,!0);c.curRotation=180});
avpw$("#avpw_rotate270_thumb").click(function(){a.paintWidget.module_rotate90.rotate90(270-c.curRotation,!0);c.curRotation=270})},panelWillOpen:function(){this.curRotation=0},panelDidOpen:function(){this.controls.showFlashThumbs("rotate",!0);AV.flashThumbSet.addListener("thumb1",this.rotate0_flash.AV_bindInst(this));AV.flashThumbSet.addListener("thumb2",this.rotate90_flash.AV_bindInst(this));AV.flashThumbSet.addListener("thumb3",this.rotate180_flash.AV_bindInst(this));AV.flashThumbSet.addListener("thumb4",
this.rotate270_flash.AV_bindInst(this))},panelWillClose:function(){this.controls.showFlashThumbs("rotate",!1);AV.flashThumbSet.removeAllListeners()},resetUI:function(){this.controls.paintWidget.module_rotate90.makeThumb(avpw$("#avpw_rotate0_thumb")[0],0);this.controls.paintWidget.module_rotate90.makeThumb(avpw$("#avpw_rotate90_thumb")[0],90);this.controls.paintWidget.module_rotate90.makeThumb(avpw$("#avpw_rotate180_thumb")[0],180);this.controls.paintWidget.module_rotate90.makeThumb(avpw$("#avpw_rotate270_thumb")[0],
270)},shutdown:function(){avpw$("#avpw_rotate0_thumb").unbind();avpw$("#avpw_rotate90_thumb").unbind();avpw$("#avpw_rotate180_thumb").unbind();avpw$("#avpw_rotate270_thumb").unbind();this.controls=null}};
AV.ControlsWidget.prototype.tool.resize=function(){var a,c,d,e,f,j,k=function(){var c=a.paintWidget.getScaledSize();d.val(c.width);e.val(c.height);a.setImageScaledIndicator()},m=function(){var c,f=d.val(),j=e.val(),f=Math.max(1,f),j=Math.max(1,j);c=a.setActionListScaleFactor(Math.max(f,j));f/=c;j/=c;!isNaN(f)&&!isNaN(j)&&(a.paintWidget.module_resize.resize(f,j,!0),a.setMinWidth(f));a.setImageScaledIndicator();return!1},l=function(){var a=c.val(),f=a.indexOf("x");if(f!=-1){var j=a.substr(0,f),a=a.substr(f+
1),j=parseInt(j),a=parseInt(a);d.val(j);e.val(a);AV__checkbox_set("avpw_constrain_prop",!1);return!1}},p=function(){var j,k,l;f.attr("checked")&&AV_nextFrame(function(){k=d.val();j=k/a.paintWidget.width;l=Math.floor(a.paintWidget.height*j,10);l<1&&(l=1);e.val(l)},1);AV__dropdown_style_reset(c,!0)},q=function(){var e,j;f.attr("checked")&&AV_nextFrame(function(){e=avpw$("#avpw_resize_height").val();scale=e/a.paintWidget.height;j=Math.floor(a.paintWidget.width*scale,10);j<1&&(j=1);d.val(j)});AV__dropdown_style_reset(c,
!0)},v=function(){avpw$(this).attr("checked")&&(p(),AV__dropdown_style_reset(c,!0))};return{init:function(k){a=k;d=d||avpw$("#avpw_resize_width");d.keydown(p);e=e||avpw$("#avpw_resize_height");e.keydown(q);f=f||avpw$("#avpw_constrain_prop");f.click(v);j=j||avpw$("#avpw_resize_submit");j.click(m);c=c||avpw$("#avpw_resize_sizes");c.change(l)},panelWillOpen:function(){k();f.attr("checked")&&p();a.populateSizePulldownPresets(c)},onRedoComplete:function(){k()},onUndoComplete:function(){k()},shutdown:function(){d.unbind("keydown");
e.unbind("keydown");f.unbind("click");j.unbind("click");c.unbind("change");a=null}}}();
AV.ControlsWidget.prototype.tool.crop=function(){var a,c=0,d=!1,e="fixed",f="",j,k,m,l,p=function(a,c,f){f&&(!d||e==="fixed")&&AV__dropdown_style_reset(m,!1)},q=function(a){var d=c;c=a;switch(a){case 0:avpw$("#avpw_crop_body_checkbox").css("visibility","visible");l.html("

Crop

");avpw$("#avpw_crop_body_help_text").html(f);j.css("visibility","visible");AV__dropdown_style_reset(m,!0);break;case 1:avpw$("#avpw_crop_body_help_text").html("Your image was cropped."),l.html("

  Crop Again  

"),
avpw$("#avpw_crop_body_checkbox").css("visibility","hidden"),j.css("visibility","hidden")}return d},v=function(){var c=k[0].checked;a.paintWidget.module_crop.forceAspect(c);d=c},u=function(){switch(c){case 0:a.paintWidget.module_crop.crop();a.paintWidget.module_crop.hideSelection();a.setMinWidth(a.paintWidget.width);a.setImageScaledIndicator();q(1);break;case 1:a.paintWidget.module_crop.setInitialSelection(),avpw$("#avpw_crop_body_help_text").html(f),l.html("

Crop

"),avpw$("#avpw_crop_body_checkbox").css("visibility",
"visible"),q(0)}return!1},z=function(){var c=m.val(),d,f;if(c&&c!=="null"){var j=c.indexOf("x");f=!1;j!=-1?(e="fixed",d=c.substr(0,j),c=c.substr(j+1),d=parseInt(d),c=parseInt(c),d=a.paintWidget.a2c(d,!0),c=a.paintWidget.a2c(c,!0),a.paintWidget.module_crop.setInitialSelectionTo(d,c)):(j=c.indexOf(":"),j!=-1&&(e="ratio",d=c.substr(0,j),c=c.substr(j+1),f=parseInt(d),d=parseInt(c),a.paintWidget.module_crop.setInitialSelectionByRatio(f/d),f=!0));AV__checkbox_set("avpw_crop_prop",f);v()}return!1};return{init:function(e){a=
e;c=0;d=!1;f=avpw$("#avpw_crop_body_help_text").html();m=m||avpw$("#avpw_crop_sizes");m.change(z);l=l||avpw$("#avpw_crop_button");l.click(u);k=k||avpw$("#avpw_crop_prop");k.click(v);e.paintWidget.module_crop.setMouseDownCallback(p);j=j||avpw$("#avpw_crop_presets")},onUndo:function(){q(0)},onRedo:function(){q(0)},shutdown:function(){m.unbind("change");l.unbind("click");k.unbind("click");a.paintWidget.module_crop.setMouseDownCallback(null);a=null},panelWillOpen:function(){a.populateSizePulldownPresets(m,
"cursize");q(0);a.setImageScaledIndicator()},panelDidOpen:function(){AV__checkbox_set("avpw_crop_prop",!1);a.paintWidget.module_crop.forceAspect(!1);a.paintWidget.module_crop.setInitialSelection()}}}();
AV.ControlsWidget.prototype.tool.text={init:function(a){function c(){d.updateThumb()}var d=this;this.controls=a;this.textColor="#000";this.textShadowColor="#fff";this.firstTextTime=!0;avpw$("#avpw_text_font_size").change(c);avpw$("#avpw_text_font").change(c);avpw$("#avpw_text_area").keyup(function(){if(d.firstTextTime)avpw$("#avpw_text_area").val(""),d.firstTextTime=!1;d.updateThumb()});avpw$("#avpw_text_area").mousedown(function(){if(d.firstTextTime)avpw$("#avpw_text_area").val(""),d.firstTextTime=
!1,d.updateThumb()});avpw$(".avpw_color_picker_text").click(function(a){a=a.currentTarget;if(!(a.id=="avpw_text_color_selector"||avpw$(a).parent().attr("id")=="avpw_text_color_selector")){var c=avpw$(a).css("background-color"),j=avpw$(a).attr("shadowcolor");d.textColor=c;d.textShadowColor=j;d.updateThumb();j=avpw$("#avpw_text_color_selector");c=AV__color_is_light(c)?"#969696":"#fff";avpw$(j).detach();avpw$(j).css("border","1px solid "+c);avpw$(a).children(".avpw_relative100").append(j);return!1}});
avpw$("#avpw_add_text").click(function(){var a=avpw$("#avpw_text_font_size").val(),c=d.textColor,j=d.textShadowColor,k=avpw$("#avpw_text_font").val(),m=avpw$("#avpw_text_area").val();a==""&&(a=avpw$("#avpw_text_font_size").attr("value"));a==""&&(a="60");k==""&&(k=avpw$("#avpw_text_font").attr("value"));k==""&&(k="sans-serif");k=="sans-serif"&&(k='"Arial", sans-serif');a=parseFloat(a)/60;d.controls.paintWidget.module_text.newText(m,k,60,c,j,null,null,a,a,0);return!1});avpw$("#avpw_text_delete").click(function(){d.controls.paintWidget.module_text.deleteSelectedText();
return!1})},resetUI:function(){this.updateThumb()},updateThumb:function(){if(!AV__featherUseFlash){var a=avpw$("#avpw_text_thumb")[0],c=avpw$("#avpw_text_area").val(),d=avpw$("#avpw_text_font").val(),e=avpw$("#avpw_text_font_size").val(),f=""+e+"px "+d,d=a.getContext("2d");d.font=f;var c=c.split("n"),j,f=e;d.globalCompositeOperation="copy";d.clearRect(0,0,a.width,a.height);d.globalCompositeOperation="source-over";a=e/19;a<1&&(a=1);for(j=0;j0){avpw$("#avpw_overlay_progress_holder").hide();avpw$("#avpw_overlay_images_scroll_window").show();for(j=d=0;j

';for(e=0;e

';for(f=0;f

a[d][0],m=a[d][1],l+='

',l+='

',l+='',l+="

",l+='

',l+="

",l+='',l+="

",l+="

",l+="

",d++;l+="

"}l+="

"}avpw$("#avpw_overlay_images_scroll_region").html(l);
avpw$("#avpw_overlay_images_scroll_region .avpw_isa_overlay_waiter").hide();avpw$(".avpw_isa_control_selector_overlay").mousedown(this.controlOverlayClicked.AV_bindInst(this));overlayPipsHTML="";for(d=0;d

n';avpw$("#avpw_overlay_pager ul").html(overlayPipsHTML);this.setOverlayNavPip(this.overlayCurrentPage);avpw$(".avpw_is_overlay_navpip").click(function(a){this.scrollOverlayTo(avpw$(a.currentTarget).attr("pagenum"));
return!1}.AV_bindInst(this));this.overlayPanelWidthPx=parseInt(avpw$(".avpw_overlay_page").css("width"));this.scrollOverlay(!0)}else this.overlayDownloadCount=this.overlayCount=0,this.overlayPages=1,avpw$("#avpw_overlay_images_scroll_region").html("No stickers defined in Feather_Stickers");this.stickerLoadStarted[c]=!1}},scrollOverlayTo:function(a){this.overlayCurrentPage=parseInt(a);this.scrollOverlay()},scrollOverlayDir:function(a){this.overlayCurrentPage+=a;this.scrollOverlay()},scrollOverlay:function(a){var c,
d=avpw$("#avpw_overlay_images_scroll_window");if(this.overlayCurrentPage<0)this.overlayCurrentPage=0;else if(this.overlayCurrentPage>this.overlayPages-1)this.overlayCurrentPage=this.overlayPages-1;c=this.overlayCurrentPage*this.overlayPanelWidthPx;a?avpw$(d).animate({scrollLeft:c},1):avpw$(d).animate({scrollLeft:c},300);this.setOverlayNavPip(this.overlayCurrentPage);this.overlayCurrentPage==0?(avpw$("#avpw_overlay_lftArrow").addClass("avpw_overlay_prev_disabled"),avpw$("#avpw_overlay_lftArrow").removeClass("avpw_overlay_prev_enabled")):
(avpw$("#avpw_overlay_lftArrow").removeClass("avpw_overlay_prev_disabled"),avpw$("#avpw_overlay_lftArrow").addClass("avpw_overlay_prev_enabled"));this.overlayCurrentPage==this.overlayPages-1?(avpw$("#avpw_overlay_rghtArrow").addClass("avpw_overlay_next_disabled"),avpw$("#avpw_overlay_rghtArrow").removeClass("avpw_overlay_next_enabled")):(avpw$("#avpw_overlay_rghtArrow").removeClass("avpw_overlay_next_disabled"),avpw$("#avpw_overlay_rghtArrow").addClass("avpw_overlay_next_enabled"))},setOverlayNavPip:function(a){avpw$(".avpw_is_overlay_navpip").removeClass("avpw_page_selected");
avpw$("#avpw_overlay_navpip_"+a).addClass("avpw_page_selected")},shutdown:function(){this.controls=null;avpw$("#avpw_overlay_delete").unbind("click");avpw$(".avpw_isa_control_selector_overlay").unbind();avpw$(".avpw_isa_control_selector_overlay").remove();avpw$("#avpw_overlay_lftArrow").unbind("click");avpw$("#avpw_overlay_rghtArrow").unbind("click");avpw$(".avpw_is_overlay_navpip").unbind("click");avpw$("#avpw_overlay_images_scroll_region").html("")}};
AV.ControlsWidget.prototype.layout.popup={onClose:function(){},onShutdown:function(){var a=avpw$("#avpw_canvas_embed_popup");avpw$(a).children().remove();avpw$(a).hide();avpw$("#"+AV_controlsWidget.paintImgId).show();avpw$(AV_getImageElem(AV_controlsWidget.paintImgIdElem)).show()},placeControls:function(){},hideOriginalImage:function(a){avpw$(a).hide()},getScrollPanelDims:function(){return{across:4,down:2}},getStickerRowsPerPage:function(){return 3},getEmbedElement:function(a){return AV_paintWidgetGetPopupEmbedDiv(a)},
onLaunch:function(){avpw$("#avpw_controls").draggable({handle:"#avpw_drag_handle",cursor:"pointer"})},getScaledImageDims_Flash:function(a,c){return{width:c.width,height:c.height}},placeControls_Flash:function(){},launchStage2_Flash:function(){}};
AV.ControlsWidget.prototype.layout.lightbox={onClose:function(a){a?avpw$("#avpw_fullscreen_bg").hide():avpw$("#avpw_fullscreen_bg").fadeOut(300)},onShutdown:function(){var a=avpw$("#avpw_canvas_embed");avpw$(a).children().remove();avpw$(a).hide()},placeControls:function(){avpw$("#avpw_fullscreen_bg").fadeIn(300)},getScrollPanelDims:function(){return{across:4,down:4}},getStickerRowsPerPage:function(){return 4},getEmbedElement:function(){return avpw$("#avpw_canvas_embed")},getScaledImageDims_Flash:function(a,
c){var d;d=AV_controlsWidget.getScaledDims(c.width,c.height);avpw$(a).width(c.width);avpw$(a).height(c.height);return d},placeControls_Flash:function(){var a=AV__getInternetExplorerVersion();a>0&&a<9&&(avpw$("#avpw_fullscreen_bg").width(avpw$(document).width()),avpw$("#avpw_fullscreen_bg").height(avpw$(document).height()),avpw$("#avpw_fullscreen_bg").css("filter","alpha(opacity=80)"))},launchStage2_Flash:function(){avpw$("#avpw_canvas_embed").width("auto");avpw$("#avpw_canvas_embed").height("auto")}};
AV.ControlsWidget.prototype.layout.inject={onClose:function(){},onShutdown:function(){return AV_controlsWidget.layoutNotify("lightbox","onShutdown",arguments)},placeControls:function(a){avpw$("#"+a).append(avpw$("#avpw_holder"));avpw$("#avpw_holder").css("position","relative");avpw$("#avpw_holder").css("text-align","inherit");avpw$("#avpw_controls").css("position","relative");avpw$("#avpw_controls").css("text-align","inherit");avpw$("#avpw_controls").css("top","inherit")},getScrollPanelDims:function(){return{across:4,
down:4}},getStickerRowsPerPage:function(){return 4},getEmbedElement:function(){return AV_controlsWidget.layoutNotify("lightbox","getEmbedElement",arguments)},getScaledImageDims_Flash:function(){return AV_controlsWidget.layoutNotify("lightbox","getScaledImageDims_Flash",arguments)},placeControls_Flash:function(a){var c=AV__getInternetExplorerVersion();avpw$("#"+a).append(avpw$("#avpw_holder"));avpw$("#avpw_holder").css("position","relative");avpw$("#avpw_controls").css("position","relative");if(c< 0||c>=8)avpw$("#avpw_controls").css("top","inherit"),avpw$("#avpw_controls").css("left","inherit"),avpw$("#avpw_holder").css("text-align","inherit"),avpw$("#avpw_controls").css("text-align","inherit")},launchStage2_Flash:function(){return AV_controlsWidget.layoutNotify("lightbox","launchStage2_Flash",arguments)}};
AV.ControlsWidget.prototype.save=function(a){if(AV_controlsWidget.loaderPhase<2)return!1;if(this.saving)return!1;this.showView("main");this.setPanelMode(null);this.paintWidget.setMode(null);this.saving=!0;AV.prevActionList=this.paintWidget.actionExportJSON(!0);if(AV__featherUseFlash)return this.save_Flash(a);return this.save_HTML(a)};AV.ControlsWidget.prototype.save_Flash=function(){Aviary.API.save();return!1}; AV.ControlsWidget.prototype.save_HTML=function(){function a(){var a="avpw_img_submit_target_"+Math.floor(Math.random()*4294967295).toString(16);avpw$("#avpw_img_submit_target_holder").html(AV.buildHiddenFrame("avpw_img_submit_target",a));avpw$("#avpw_save_form").attr("target",a);avpw$("#avpw_img_submit_target").load(function(){this.saveCallback_form(a)}.AV_bindInst(c));avpw$("#avpw_save_form_data").val(d);avpw$("#avpw_save_form_postdata").val(c.postdata);avpw$("#avpw_save_form_posturl").val(AV_launchData.postURL); avpw$("#avpw_save_form_apikey").val(AV_launchData.APIKey);avpw$("#avpw_save_form_sessionid").val(AV.usageTracker.getUUID());avpw$("#avpw_save_form_actionlist").val(c.paintWidget.actionExportJSON(!0));avpw$("#avpw_save_form_origurl").val(c.origURL);avpw$("#avpw_save_form_hiresurl").val(AV_launchData.hiResURL);avpw$("#avpw_save_form_fileformat").val(AV_launchData.fileFormat);avpw$("#avpw_save_form_jpgquality").val(AV_launchData.jpgQuality);avpw$("#avpw_save_form_debug").val(AV_launchData.debug);avpw$("#avpw_save_form_asyncsave").val(AV_launchData.asyncSave); avpw$("#avpw_save_form").submit()}var c=this,d=this.paintWidget.exportImage().base64data;this.paintWidget.showWaitThrobber(!0,function(){avpw$.support.cors&&(!AV.firefox||AV.firefox>=4)?AV.simpleXHRPost(AV_imgrecvServer,{postdata:c.postdata,posturl:AV_launchData.postURL,apikey:AV_launchData.APIKey,sessionid:AV.usageTracker.getUUID(),actionlist:c.paintWidget.actionExportJSON(!0),origurl:c.origURL,encodedas:"base64text",hiresurl:AV_launchData.hiResURL,contenttype:AV_launchData.fileFormat,jpgquality:AV_launchData.jpgQuality,
debug:AV_launchData.debug,asyncsave:AV_launchData.asyncSave,file:d},c.saveCallback_XHR.AV_bindInst(c))||a():a()});return!1};AV.ControlsWidget.prototype.saveCallback_form=function(a){this.paintWidget&&(this.paintWidget.showWaitThrobber(!1),window.avpw_img_submit_target_announcer.postMessage("avpw_load:"+a,"*"))};
AV.ControlsWidget.prototype.saveCallback_XHR=function(a){this.paintWidget.showWaitThrobber(!1);var c=avpw$(a).find("error");c.length>0?alert("file submission error: "+c.text()):(a=avpw$(a).find("url").text(),a=a.replace(/^s+|s+$/g,""),c=avpw$(AV_getImageElem(this.paintImgIdElem)),c.src=a,c.avpw_prevURL=a,AV__controlsWidget_onImageSaved(a))};
AV.ControlsWidget.prototype.showAreYouSure=function(){this.showView("main");this.setPanelMode(null);this.paintWidget.setMode(null);this.setLastPanel("avpw_aviary_quitareyousure");setTimeout(function(){this.scrollPanelInfo.prevPanel=this.scrollPanelInfo.curPanel;this.scrollMainTo(this.scrollPanelInfo.panelCount-1)}.AV_bindInst(this),5)};AV.ControlsWidget.prototype.cancel=function(){this.quitCount++;this.quitCount==1&&this.paintWidget.dirty?this.showAreYouSure():AV_paintWidgetCloser();return!1};
AV.ControlsWidget.prototype.undo=function(){if(this.paintWidget.busy)return!1;if(this.moduleNotify(this.curMode,"onUndo")===!1)return!1;this.paintWidget.undo();this.setMinWidth(this.paintWidget.width);this.moduleNotify(this.curMode,"onUndoComplete");return!1};
AV.ControlsWidget.prototype.redo=function(){if(this.paintWidget.busy)return!1;if(this.moduleNotify(this.curMode,"onRedo")===!1)return!1;this.paintWidget.redo();this.setMinWidth(this.paintWidget.width);this.moduleNotify(this.curMode,"onRedoComplete");return!1};AV.ControlsWidget.prototype._resetUI=function(a){this.moduleNotify(a,"resetUI")};
AV.ControlsWidget.prototype.getScaledDims=function(a,c){var d;if(a>this.maxWidth)d=this.maxWidth/a,a=this.maxWidth,c*=d;if(c>this.maxHeight)d=this.maxHeight/c,c=this.maxHeight,a*=d;return{width:a,height:c}};
AV__checkbox_style_startup=function(){var a=function(a){a=a.currentTarget;a.avpw_checkboxpeer.checked=!a.avpw_checkboxpeer.checked;avpw$(a.avpw_checkboxpeer).triggerHandler("click");AV__styledcheckbox_setbg(a,a.avpw_checkboxpeer.checked)},c=avpw$("#avpw_controls input[type=checkbox]");avpw$(c).each(function(c,e){if(!(e.avpw_styledcheckboxpeer!==void 0&&e.avpw_styledcheckboxpeer)){var f=document.createElement("div");f.avpw_checkboxpeer=e;f.avpw_checkboxpeer_display=avpw$(e).css("display");avpw$(f).addClass("avpw__is_styled_checkbox");
AV__styledcheckbox_setbg(f,f.avpw_checkboxpeer.checked);avpw$(f).click(a);avpw$(e).before(f);avpw$(e).css("display","none");e.avpw_styledcheckboxpeer=f}})};AV__styledcheckbox_setbg=function(a,c){c?(avpw$(a).removeClass("avpw__is_styled_checkbox_unchecked"),avpw$(a).addClass("avpw__is_styled_checkbox_checked")):(avpw$(a).removeClass("avpw__is_styled_checkbox_checked"),avpw$(a).addClass("avpw__is_styled_checkbox_unchecked"))};
AV__checkbox_set=function(a,c){if(avpw$("#"+a).attr("checked")!=c){var d=avpw$("#"+a)[0].avpw_styledcheckboxpeer;avpw$(d).trigger("click")}};AV__checkbox_style_shutdown=function(){var a=avpw$(".avpw__is_styled_checkbox");avpw$(a).each(function(a,d){d.avpw_checkboxpeer.avpw_styledcheckboxpeer=null;avpw$(d.avpw_checkboxpeer).css("display",d.avpw_checkboxpeer_display);avpw$(d).unbind("click");avpw$(d).detach();d.avpw_checkboxpeer=null})};
AV__xml_escape=function(a){return a.replace(/&/g,"&").replace(//g,">")};function AV__dropdown_style_window_mouseup_handler(){avpw$(".avpw_dropdown .avpw_dropdown_body_wrapper").css("display","none");return!0}
function AV__dropdown_style_startup(){function a(a){a=avpw$(a.target).parents(".avpw_dropdown").children(".avpw_dropdown_body_wrapper");avpw$(a).css("display")=="none"?avpw$(a).css("display","block"):avpw$(a).css("display","none");return!1}avpw$(document).mouseup(AV__dropdown_style_window_mouseup_handler);avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").mousedown(a);avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").click(a);avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").mouseup(function(){avpw$(".avpw_dropdown .avpw_dropdown_body_wrapper").css("display",
"none");return!1});avpw$(".avpw_dropdown .avpw_dropdown_body_wrapper").mouseup(function(a){var d=avpw$(a.target).parents(".avpw_dropdown"),e=avpw$(a.target).attr("value");e&&(avpw$(d).val(e),avpw$(d).trigger("change"),avpw$(d).find(".avpw_dropdown_header_text").html(avpw$(a.target).html()));a=avpw$(d).children(".avpw_dropdown_body_wrapper");avpw$(a).css("display","none");return!1});avpw$(".avpw_dropdown_body_entry").mouseenter(function(a){avpw$(a.currentTarget).addClass("avpw_dropdown_hover")});avpw$(".avpw_dropdown_body_entry").mouseleave(function(a){avpw$(a.currentTarget).removeClass("avpw_dropdown_hover")})}
function AV__dropdown_style_reset(a,c){var d=a.find(".avpw_dropdown_body_entry"),e=d.attr("value");a.val(e);c&&a.trigger("change");a.find(".avpw_dropdown_header_text").html(d.html())}
function AV__dropdown_style_shutdown(){avpw$(window).unbind("mouseup",AV__dropdown_style_window_mouseup_handler);avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").unbind("mousedown");avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").unbind("click");avpw$(".avpw_dropdown .avpw_dropdown_header_wrapper").unbind("mouseup");avpw$(".avpw_dropdown .avpw_dropdown_body_wrapper").unbind("mouseup");avpw$(".avpw_dropdown_body_entry").unbind("mouseenter");avpw$(".avpw_dropdown_body_entry").unbind("mouseleave")}
function AV__color_is_light(a){return a=="#fff"||a=="#ffffff"||a=="rgb(255, 255, 255)"}function AV__color_is_white(a){a=a.toLowerCase();return a=="#fff"||a=="#ffffff"||a=="white"||a=="rgb(255, 255, 255)"}function AV__color_expand(a){a.length==4&&(r=a.charAt(1),g=a.charAt(2),b=a.charAt(3),a="#"+r+r+g+g+b+b);return a}
function AV__color_to_rgb(a){var c,d;a.charAt(0)=="#"&&(a=AV__color_expand(a),c=parseInt(a.substr(1,2),16),d=parseInt(a.substr(3,2),16),a=parseInt(a.substr(5,2),16),a="rgb("+c+","+d+","+a+")");return a}function AV__rgb_to_color(a){var c,d;if(d=a.match(/s*rgbs*(s*(d+)s*,s*(d+)s*,s*(d+)/))return a=parseInt(d[1]).toString(16),a.length==1&&(a="0"+a),c=parseInt(d[2]).toString(16),c.length==1&&(c="0"+c),d=parseInt(d[3]).toString(16),d.length==1&&(d="0"+d),"#"+a+c+d;return a}
function AV__color_to_int(a){a=AV__color_expand(a);a=AV__rgb_to_color(a);return parseInt(a.substr(1),16)}function AV_FlashThumbClickCallback(a){AV.flashThumbSet.doCallbacks(a)}
AV.flashThumbSet={listenerList:{},addListener:function(a,c){this.listenerList.hasOwnProperty(a)||(this.listenerList[a]=[]);this.listenerList[a].push(c)},removeAllListeners:function(){this.listenerList={}},doCallbacks:function(a){var c,d;if(this.listenerList.hasOwnProperty(a)){d=this.listenerList[a];for(c=0;c typeof AV__featherFilterAnnounce=="undefined"&&(AV__featherFilterAnnounce="feather_filter_announce.html");typeof AV_version=="undefined"&&(AV_version="");typeof AV_betaversion=="undefined"&&(AV_betaversion="");typeof Feather_ForceFlash!="undefined"&&(AV_Feather_ForceFlash=Feather_ForceFlash);AV_theme=typeof Feather_Theme=="undefined"?"bluesky":Feather_Theme;typeof Feather_OpenType=="undefined"&&(Feather_OpenType="popup");
Function.prototype.AV_bindInst=function(a){var c=this;return function(){return c.apply(a,arguments)}};function AV_getX(a){for(var c=0;a!=null;)c+=a.offsetLeft,a=a.offsetParent;return c}function AV_getY(a){for(var c=0;a!=null;)c+=a.offsetTop,a=a.offsetParent;return c}
function AV__injectControls(){var a,c;c=['

','

','

'].join("");
Feather_OpenType=="popup"?a="":(a=c,c="");a=['

',
AV.buildHiddenFrame("avpw_img_submit_target_announcer","avpw_img_submit_target_announcer",AV__featherTargetAnnounce),AV.buildHiddenFrame("avpw_img_filter_target_announcer","avpw_img_filter_target_announcer",AV__featherFilterAnnounce),'

'].join("");c=document.createElement("div");c.id="avpw_holder";var d=document.getElementsByTagName("body");d&&(d=d[0]);if(!d)d=document.documentElement;d.appendChild(c);
c.innerHTML=a.replace(/__FEATHER_BASE_URL__/g,AV_feather_baseURL)}var AV_waitThrobber,AV_imageWrapper,AV_origImgElement;function AV_nextFrame(a){setTimeout(a,1)}function AV_setPopupPos(a){var c=AV_getX(a),d=AV_getY(a),a=c+a.width+15,c=document.getElementById("avpw_controls");c.style.position="absolute";c.style.left=a+"px";c.style.top=d+"px"}
function AV_setLightboxPos(){var a;a="pageYOffset"in window?window.pageYOffset:(((t=document.documentElement)||(t=document.body.parentNode))&&typeof t.ScrollTop=="number"?t:document.body).scrollTop;document.getElementById("avpw_controls").style.top=a+30+"px"}function AV_getImageElem(a){if(typeof a=="string")return document.getElementById(a);return a}function AV_getImageId(a){if(typeof a=="string")return a;return a.id}
function AV_wrapImage(a){AV_origImgElement=AV_getImageElem(a);if(!AV_imageWrapper)AV_waitThrobber=document.createElement("img"),AV_waitThrobber.src=AV_feather_baseURL+"images/eggthrobber-"+AV_theme+".gif",AV_waitThrobber.id="_AV_waitThrobber",AV_imageWrapper=document.createElement("div"),AV_imageWrapper.id="_AV_imageWrapper",AV_imageWrapper.style.position="relative",AV_imageWrapper.appendChild(AV_origImgElement);AV_origImgElement.parentNode.insertBefore(AV_imageWrapper,AV_origImgElement)}
function AV_imgOnLoad(a,c){avpw$(a).load(c);(a.complete==!0||a.readyState==4||a.readyState=="complete"||a.readyState=="loaded")&&avpw$(a).trigger("load")}
function AV_loadFile(a,c,d){var e,f;e=function(a){if(d)navigator.appName=="Microsoft Internet Explorer"?a.onreadystatechange=function(a){(this.readyState==4||this.readyState=="complete"||this.readyState=="loaded")&&d(a)}:a.onload=d};c=="js"?(f=document.createElement("script"),f.setAttribute("type","text/javascript"),e(f),f.setAttribute("src",a)):c=="css"?(f=document.createElement("link"),f.setAttribute("rel","stylesheet"),f.setAttribute("type","text/css"),e(f),f.setAttribute("href",a)):c=="img"&&
(f=document.createElement("img"),e(f),f.setAttribute("src",a));(c=="js"||c=="css")&&f&&document.getElementsByTagName("head")[0].appendChild(f)}AV.buildHiddenFrame=function(a,c,d){d||(d=AV_imgrecvBase+"blank.html");c||(c=a);return['"].join("")};
AV.simpleXHRPost=function(a,c,d){function e(){d&&k.readyState===4&&d(k.responseXML)}function f(a){var c=[];avpw$.each(a,function(a,d){if(d){var e="";e+="Content-Disposition: form-data; ";e+='name="'+a+'"rnrn';e+=d+"rn";c.push(e)}});a="--"+j+"rn";a+=c.join("--"+j+"rn");a+="--"+j+"--rn";return a}var j="FEATHER-AJAX---"+(new Date).getTime(),k=new XMLHttpRequest;try{var m="multipart/form-data; charset=UTF-8; boundary="+j;k.open("POST",a,!0);k.setRequestHeader("Content-Type",m);k.onreadystatechange=
e;var l=f(c);k.send(l)}catch(p){return!1}return!0};
function AV_loadStageFinal(){avpw_swfobject.embedSWF(AV_feather_baseURL+"ostrich/OstrichFeather.swf","avpw_OstrichFeather","1","1","10.0.0","ostrich/playerProductInstall.swf",{initializedCallback:"engineReady",allowDomains:"*",completeCallback:"AV_paintWidget_module_flashfilter_onFilterComplete"},{quality:"high",bgcolor:"#ffffff",allowscriptaccess:"always",allowfullscreen:"true",hasPriority:"true"},{id:"avpw_OstrichFeather",name:"avpw_OstrichFeather",align:"middle"});AV__feather_loaded=!0;typeof Feather_OnLoad!=
"undefined"&&Feather_OnLoad()}function AV_featherLaunch(){var a,c,d,e;if(AV_paintWidget)return!1;else a=AV_launchData.imageIDelem,c=AV_launchData.imageURL,d=AV_launchData.postdata,e=AV_launchData.inlineSite,Feather_OpenType=="popup"?AV_setPopupPos(AV_getImageElem(a)):AV_setLightboxPos(AV_getImageElem(a)),AV_paintWidgetLauncher(a,c,d,e)}
function aviaryeditor(a,c,d,e){if(!featherIsLoaded())return!1;if(AV_paintWidget)return!1;var bu=AV_sticker_baseURL;var f={imageIDelem:null,imageURL:"",inlineSite:null,editOptions:["sharpen","whiten","rotate","flip","resize","crop","redeye","blemish","colors","saturation","blur","brightness","contrast","drawing","text","overlay"],startTool:"",useServerFilters:!1,noCloseButton:!1,maxSize:800,cropSizes:["4:3","16:9","320x240","640x480","800x600","1280x1024","1600x1200","240x320","480x640","600x800","1024x1280","1200x1600"],resizeSizes:["320x240",
"640x480","800x600","1280x1024","1600x1200","240x320","480x640","600x800","1024x1280","1200x1600"],stickers:[[bu+"bandaid_01.png",bu+"thumbs/bandaid_01.png"],[bu+"beer_01.png",bu+"thumbs/beer_01.png"],[bu+"cigar_01.png",bu+"thumbs/cigar_01.png"],[bu+"glasses_01.png",
bu+"thumbs/glasses_01.png"],[bu+"glasses_02.png",bu+"thumbs/glasses_02.png"],[bu+"glasses_03.png",bu+"thumbs/glasses_03.png"],[bu+"glasses_04.png",bu+"thumbs/glasses_04.png"],[bu+"hat_01.png",
bu+"thumbs/hat_01.png"],[bu+"hat_02.png",bu+"thumbs/hat_02.png"],[bu+"hat_04.png",bu+"thumbs/hat_04.png"],[bu+"hat_05.png",bu+"thumbs/hat_05.png"],[bu+"hat_06.png",bu+"thumbs/hat_06.png"],
[bu+"hat_07.png",bu+"thumbs/hat_07.png"],[bu+"patch_01.png",bu+"thumbs/patch_01.png"],[bu+"sguriken_01.png",bu+"thumbs/sguriken_01.png"],[bu+"stache_01.png",bu+"thumbs/stache_01.png"],
[bu+"stache_02.png",bu+"thumbs/stache_02.png"],[bu+"stache_03.png",bu+"thumbs/stache_03.png"],[bu+"stache_04.png",bu+"thumbs/stache_04.png"],[bu+"stache_05.png",bu+"thumbs/stache_05.png"]],
onLaunchComplete:null,onClose:null,onSave:null,APIKey:"",hiResURL:"",postURL:"",postdata:null,fileFormat:"",jpgQuality:100,debug:!1,asyncSave:!0};if(typeof Feather_APIKey!=="undefined")f.APIKey=Feather_APIKey;if(typeof Feather_PostURL!=="undefined")f.postURL=Feather_PostURL;if(typeof Feather_HiResURL!=="undefined")f.hiResURL=Feather_HiResURL;if(typeof Feather_EditOptions!=="undefined"&&Feather_EditOptions!=="all")f.editOptions=Feather_EditOptions;if(typeof Feather_UseServerFilters!=="undefined")f.useServerFilters=
Feather_UseServerFilters;if(typeof Feather_Stickers!=="undefined"&&Feather_Stickers!=="all")f.stickers=Feather_Stickers;if(typeof Feather_CropSizes!=="undefined")f.cropSizes=Feather_CropSizes;if(typeof Feather_MaxDisplaySize!=="undefined")f.maxSize=Feather_MaxDisplaySize;typeof Feather_MaxSize!=="undefined"?f.maxSize=Feather_MaxSize:Feather_MaxSize=f.maxSize;if(typeof Feather_NoCloseButton!=="undefined")f.noCloseButton=Feather_NoCloseButton;if(typeof Feather_OnLaunchComplete!=="undefined")f.onLaunchComplete=
Feather_OnLaunchComplete;if(typeof Feather_OnSave!=="undefined")f.onSave=Feather_OnSave;if(typeof Feather_OnClose!=="undefined")f.onClose=Feather_OnClose;typeof a==="string"||a.nodeType&&a.nodeType===Node.ELEMENT_NODE?AV_launchData=avpw$.extend(f,{imageIDelem:AV_getImageElem(a),imageURL:c,postdata:d,inlineSite:e}):(a.imageIDelem=AV_getImageElem(a.imageIDelem),AV_launchData=avpw$.extend(f,a));if(AV__featherUseFlash)AV_featherLaunch();else{if(!featherSupported())return!0;setTimeout(AV_featherLaunch,
5)}return!0}function aviarynewimage(a,c){AV_paintWidgetRelauncher(a,c)}function aviaryeditor_close(a){AV_paintWidgetCloser(a)}function aviaryeditor_relaunch(){AV.isRelaunched=!0;if(typeof AV_launchData!=="undefined"&&AV_launchData)aviaryeditor(AV_launchData);else return!1}function aviaryeditor_activatetool(a){AV_paintWidgetActivateTool(a)}function featherIsLoading(){return AV__feather_loading}function featherIsLoaded(){return AV__feather_loaded}
function featherSupported(){return typeof AV_Feather_ForceSupport!="undefined"||featherHtmlOk()||featherFlashOk()}function featherFlashOk(){if(typeof AV_Feather_ForceFlash!="undefined")return!0;var a=AV__getInternetExplorerVersion();return a<0||a>=7}function featherHtmlOk(){if(typeof AV_Feather_ForceFlash!="undefined")return!1;var a=!!document.createElement("canvas").getContext,c=typeof window.postMessage==="function";return a&&c}
function AV_getFlashMovie(a){return navigator.appName.indexOf("Microsoft")!=-1?window[a]:document[a]}AV.firefox=function(){var a;navigator.product==="Gecko"&&(a=navigator.userAgent.split("Firefox/")[1],a=parseInt(a,10));return a}();function AV__getInternetExplorerVersion(){var a=-1;navigator.appName=="Microsoft Internet Explorer"&&/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)!=null&&(a=parseFloat(RegExp.$1));return a}
(function(){function a(a){var d=AV__getInternetExplorerVersion(),a=AV_feather_baseURL+"css/"+a+"-"+AV_theme;AV_loadFile(a+".css","css");AV__featherUseFlash&&AV_loadFile(a+"-flash.css","css");d>=7&&d<8?AV_loadFile(a+"-ie7.css","css"):d>=8&&d<9&&AV_loadFile(a+"-ie8.css","css")}AV__featherUseFlash=!featherHtmlOk()&&featherFlashOk();Feather_OpenType=="float"&&(Feather_OpenType="popup");Feather_OpenType=="integrated"&&(Feather_OpenType="lightbox");Feather_OpenType=="inline"&&(Feather_OpenType="inject"); AV__featherUseFlash&&Feather_OpenType=="popup"&&(Feather_OpenType="lightbox");AV__injectControls();!AV__feather_loaded&&!AV__feather_loading&&(AV__feather_loading=!0,typeof AV_closureCompiled!="undefined"?(Feather_OpenType=="popup"?a("feather"):a("feather_hd"),AV_loadFile(AV_feather_baseURL+"images/atlas-"+AV_theme+".png","img",AV_loadStageFinal)):(AV_loadFile(AV_feather_baseURL+"css/ui-lightness/jquery-ui-1.8.11.custom.css","css"),Feather_OpenType=="popup"?a("controlswidget"):a("controlswidget_hd"), AV_loadFile(AV_feather_baseURL+"js/swfobject.js","js",function(){AV_loadFile(AV_feather_baseURL+"js/avpw-jquery-1.5.1.min.js","js",function(){AV_loadFile(AV_feather_baseURL+"js/avpw-jquery-ui-1.8.11.custom.min.js","js",function(){AV_loadFile(AV_feather_baseURL+"js/widgetapi.js","js",function(){AV_loadFile(AV_feather_baseURL+"js/controlswidget.js","js",AV_loadStageFinal)})})})})))})();
// ]]>

Enhanced by Zemanta



2 Responses to “Gen X or Baby Boomers America’s Great Consumer: Infographic”

  1. Pretty great post. I just stumbled upon your blog and wished to say that I have truly loved browsing your weblog posts. In any case I will be subscribing to your feed and I’m hoping you write once more soon!

  2. I found your blog very interesting, i found it on Google!

Leave a Reply

CommentLuv badge