(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector)}return jQuery(elem)}selector=[]}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}return this.setArray(jQuery.makeArray(selector))},jquery:"1.2.6",size:function(){return this.length},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num]},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem)});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems)},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0]}else{return this.cloneNode(true)}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return }var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data)}}})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,this))},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true))}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return this.is("."+selector)},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value}values.push(value)}}return values}else{return(this[0].value||"").replace(/\r/g,"")}}return undefined}if(value.constructor==Number){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse()}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"))}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem)}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove())}callback.call(obj,elem)}});scripts.each(evalScript)})}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2}if(typeof target!="object"&&typeof target!="function"){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy=="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"")},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data}else{script.appendChild(document.createTextNode(data))}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length==undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0});val-=Math.round(padding+border)}if(jQuery(elem).is(":visible")){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,val)}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari){return false}var ret=defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem)){ret=computedStyle.getPropertyValue(name)}else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode){stack.unshift(a)}for(;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block"}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i]}}}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}jQuery.each(elems,function(i,elem){if(!elem){return }if(elem.constructor==Number){elem+=""}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}}elem=jQuery.makeArray(div.childNodes)}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return }if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}return elem[name]}if(msie&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++]){if(elem.nodeType!=8){first[pos++]=elem}}}else{while(elem=second[i++]){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret))}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this)}})}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px")}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2])},"#":function(a,i,m){return a.getAttribute("id")==m[2]},":":{lt:function(a,i,m){return i<m[3]-0},gt:function(a,i,m){return i>m[3]-0},nth:function(a,i,m){return m[3]-0==i},eq:function(a,i,m){return m[3]-0==i},first:function(a,i){return i==0},last:function(a,i,m,r){return i==r.length-1},even:function(a,i){return i%2==0},odd:function(a,i){return i%2},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling")},parent:function(a){return a.firstChild},empty:function(a){return !a.firstChild},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"},enabled:function(a){return !a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked},selected:function(a){return a.selected||jQuery.attr(a,"selected")},text:function(a){return"text"==a.type},radio:function(a){return"radio"==a.type},checkbox:function(a){return"checkbox"==a.type},file:function(a){return"file"==a.type},password:function(a){return"password"==a.type},submit:function(a){return"submit"==a.type},image:function(a){return"image"==a.type},reset:function(a){return"reset"==a.type},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button")},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},has:function(a,i,m){return jQuery.find(m[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r)}return cur},find:function(t,context){if(typeof t!="string"){return[t]}if(context&&context.nodeType!=1&&context.nodeType!=9){return[]}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c)}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue}foundToken=true}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true}r.push(n)}if(m=="+"){break}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length)}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{re2=quickClass;m=re2.exec(t)}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0]}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[]}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param"}r=jQuery.merge(r,ret[i].getElementsByTagName(tag))}if(m[1]=="."){r=jQuery.classFilter(r,m[2])}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break}}r=tmp}ret=r}t=t.replace(re2,"")}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t)}}if(t){ret=[]}if(ret&&context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);return done},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i])}}return tmp},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break}}if(!m){break}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3])}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not)}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||""}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a)}}r=tmp}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++}}merge[id]=true}var add=false;if(first==0){if(node.nodeIndex==last){add=true}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true}}if(add^not){tmp.push(node)}}r=tmp}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]]}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}")}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r)},not)}}}}}return{r:r,t:t}},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(jQuery.browser.msie&&elem.setInterval){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments)});handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered){return jQuery.event.handle.apply(arguments.callee.elem,arguments)}});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid]}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler]}}}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data)}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true}data[0].type=type;if(exclusive){data[0].exclusive=true}var handle=jQuery.data(elem,"handle");if(handle){val=handle.apply(elem,data)}if((!fn||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false}if(event){data.shift()}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false}return val},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}return val},fix:function(event){if(event[expando]==true){return event}var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--){event[props[i]]=originalEvent[props[i]]}event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};event.timeStamp=event.timeStamp||now();if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:function(){bindReady();return },teardown:function(){return }},mouseenter:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseenter";return jQuery.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseleave";return jQuery.event.handle.apply(this,arguments)}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn)})},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn)},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(function(){return fn.call(this,jQuery)})}return this}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false)}if(jQuery.browser.msie&&window==top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return }for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return }}jQuery.ready()},false)}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return }if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return }if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return }jQuery.ready()})()}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode}catch(error){parent=elem}}return parent==elem};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind()});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{params=jQuery.param(params);type="POST"}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}self.each(callback,[res.responseText,status,res])}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(s.async){xhr=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr){xhr.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined}catch(e){}return false},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(filter){data=filter(data,type)}if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=eval("("+data+")")}return data},param:function(a){var s=[];if(a.constructor==Array||a.jquery){jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value))})}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this))})}else{s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]))}}}return s.join("&").replace(/%20/g,"+")}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block"}elem.remove()}}).end()},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none"}).end()},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]()})},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback)},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback)},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback)},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback)},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false}var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx"}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type)}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn)}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.call(this)}}})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",jQuery.makeArray(array))}}return q};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].call(this)}})};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px"}jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){this.elem.style.display="none"}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}}if(done){this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now},scrollTop:function(fx){fx.elem.scrollTop=fx.now},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop)}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent)}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop)}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop))}}results={top:top,left:left}}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true))}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0}return results};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return }return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br)};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0)}})})();var $DL=jQuery.noConflict();(function(B){var A=(new Date()).getTime();B.extend({htmlencode:function(D,H,F){function E(J){var L="";for(var K=0;K<J.length;K++){var M=J.charAt(K);if(M<" "||M>"~"){M="&#"+M.charCodeAt()+";"}L+=M}return L}function I(N){F=(F>=0)?Math.floor(F):4;var S=N.split(/\r\n|\r|\n/);for(var L=0;L<S.length;L++){var R=S[L];var M="";for(var K=0;K<R.length;K++){var O=R.charAt(K);if(O==="\t"){var J=F-(M.length%F);for(var Q=0;Q<J;Q++){M+=" "}}else{M+=O}}M=M.replace(/(^ )|( $)/g,"&nbsp;");S[L]=M}var P=S.join("<br />");P=P.replace(/  /g," &nbsp;");return P}var G=D;G=G.replace(/\&/g,"&amp;");G=G.replace(/\</g,"&lt;");G=G.replace(/\>/g,"&gt;");if(H){G=I(G)}else{G=G.replace(new RegExp('"',"g"),"&quot;")}G=E(G);return G},memoization:function(G,E,D){function F(){var H=Array.prototype.splice.call(arguments,0,arguments.length),I=H.join("\u25ba");F.cache=F.cache||{};F.count=F.count||[];if(I in F.cache){return D?D(F.cache[I]):F.cache[I]}if(F.count.length>1000){delete F.cache[F.count.unshift()]}F.count.push(I);F.cache[I]=G.apply(E,H);return D?D(F.cache[I]):F.cache[I]}return F},dlid:function(D){D=D||"dlid_";A++;return D+A.toString()},keys:function(F){if(B.typeOf(F)=="object"){var E=[];for(var D in F){E.push(D)}return E}else{return false}},parseSubdomain:function(D){var E=D.match("://([^.]+).");if(E&&E[1]){return E[1]}else{return false}},deepCopy:function(G){var F=B.typeOf(G);switch(F){case"object":var H={};for(key in G){H[key]=B.deepCopy(G[key])}return H;case"array":var D=[];for(var E=0;E<G.length;E++){D.push(B.deepCopy(G[E]))}return D;default:return G}},typeOf:function(E){var D=typeof E;if(D=="object"){if(E){if(typeof E.length=="number"&&!(E.propertyIsEnumerable("length"))&&typeof E.splice=="function"){D="array"}}else{D="null"}}return D},addCommas:function(H){H+="";var D=H.split(".");var G=D[0];var E=D.length>1?"."+D[1]:"";var F=/(\d+)(\d{3})/;while(F.test(G)){G=G.replace(F,"$1,$2")}return G+E},oneTarget:function(J,I,F,G,D){for(var E=0;E<I.length;E++){var H={tagSelector:I[E][0],preventDefault:F,cancelBubbling:G,stopPropagation:D};if(I[E][1]){H.childOf=I[E][1]}if(B.targetIs(J,H,I[E][2])){return H}}},targetIs:function(I,G,H){if(!I||!G){return false}G={childOf:G.childOf||null,tagSelector:G.tagSelector||null,cancelBubbling:G.cancelBubbling||false,preventDefault:G.preventDefault||false,stopPropagation:G.stopPropagation||false};var K=I.target;var J=B(K);var E=null;var D=false;if(G.childOf){E=J.parents(G.childOf).eq(0);if(!E[0]){D=true}}if(G.tagSelector){var F=G.tagSelector;if(!J.is(F)){if(G.cancelBubbling){D=true}else{$tp=J.parents(F).eq(0);if(!$tp[0]){D=true}else{J=$tp}}}}if(D){return false}else{if(H&&typeof H=="function"){H(J,E)}if(G.preventDefault){I.preventDefault()}if(G.stopPropagation){I.stopPropagation()}return true}},make:function(){var E,M,F,K,D,J;var I=arguments;var L=I[0];if(I[1]){if(typeof I[1]=="string"){M=I[1]}else{if(typeof I[1]=="object"&&I[1].push){F=I[1]}else{J=I[1]}}}if(I[2]){if(typeof I[2]=="string"){M=I[2]}else{if(typeof I[1]=="object"&&I[2].push){F=I[2]}}}if(L=="text"&&M){return document.createTextNode(M)}else{E=B(document.createElement(L));if(J){for(var H in J){if(J.hasOwnProperty(H)){if(E.is(":input")&&H=="value"){E.val(J[H])}else{E.attr(H,J[H])}if(window.attachEvent&&!window.opera){if(E.is(":input")){E.addClass("IE-input-"+E.attr("type"))}}}}}if(F){for(var G=0;G<F.length;G++){if(F[G]){E.append(F[G])}}}if(M){E.text(M)}return E}},hash:function(E,F,D){var H=window.location.hash;var I,G;var D=B.extend({clear:false},D);if(typeof E=="undefined"){return H}if(typeof E=="object"){G=E}I=(H.length?B.querystring_to_hash(H):{});if(!G&&typeof F=="undefined"){return I[E]}else{if(G||(F&&E)){if(G){for(h in G){I[h]=G[h]}for(a in I){if(!(a in G)){DAYLIFE.log(["Removing from hash",a,I,G]);delete I[a]}}}else{I[E]=F;if(D.clear){for(a in I){if(a!=E){DAYLIFE.log(["Removing from hash (key)",a,I,E]);delete I[a]}}}}H=B.hash_to_querystring(I,false,true);window.location.hash=H;return F}}},removeHash:function(D){var E=window.location.hash;var F=(E.length?B.querystring_to_hash(E):{});if(D in F){delete F[D];E=B.hash_to_querystring(F,false,true);window.location.hash=E}return },serializeSearch:function(){return B.querystring_to_hash(window.location.search)},querystring_to_hash:function(K,H){if(K.charAt(0)=="?"||K.charAt(0)=="#"){K=K.substr(1)}var J={};var G=K.split("&");for(var I=0,D=G.length;I<D;I++){var E=G[I].split("=");if(E&&E[1]){var F=decodeURIComponent(E[1].replace(/\+/g,"%20"));var L=E[0].replace("[]","");if(J[L]&&E[0].indexOf("[]")!=-1){J[L].push(F)}else{if(E[0].indexOf("[]")!=-1){J[L]=[F]}else{J[L]=F}}}}if(H){return J[H]}return J},hash_to_querystring:function(J,I,F){var E=0;var D;if(F){D=["#"]}else{D=["?"]}for(var H in J){if(E>0){D.push("&")}if(typeof J[H]=="string"||typeof J[H]=="number"){D.push(encodeURIComponent(H)+"="+encodeURIComponent(J[H]))}else{if(B.typeOf(J[H])=="array"){for(var G=0;G<J[H].length;G++){if(G>0){D.push("&")}if(I){D.push(encodeURIComponent(H)+"[]="+encodeURIComponent(J[H][G]))}else{D.push(encodeURIComponent(H)+"="+encodeURIComponent(J[H][G]))}}}}E++}return D.join("")},update_querystring:function(D,J,F,E){J=J||{};var G=D;var K=D.indexOf("?");if(K==-1){G=D+B.hash_to_querystring(J,E)}else{var L=D.substr(K);var M=B.querystring_to_hash(L);for(var H in J){if(J[H]){M[H]=J[H]}}if(F&&B.typeOf(F)=="array"){for(var I=F.length-1;I>=0;I--){delete M[F[I]]}}G=D.replace(L,B.hash_to_querystring(M,E))}return G},rescope:function(E,D){return function(G,F,K,J,I,H){E.call(D,this,G,F,K,J,I,H)}},topic_url:function(D){if(DAYLIFE_Globals.use_hyphens){return"/topic/"+encodeURIComponent(D.replace(/\s+/g,"-"))}else{return"/topic/"+encodeURIComponent(D.replace(/\s+/g,"_"))}},get_standalone_custom_page_asset_name_from_url:function(){var D=window.location.href.match(/\page\/([^\?\/]+)/);if(D&&D[1]){return"daylife.page.custom."+D[1]}else{return null}},avoid_z_collisions:function(F,E){if(!E){for(var D=C.length-1;D>=0;D--){if(C[D]["check_against"]!=F&&B.isFunction(C[D]["close_function"])){C[D]["close_function"].apply(C[D]["check_against"])}}}else{C.push({check_against:F,close_function:E})}}});var C=[]})($DL);(function(B){var A;B.fn.bin=function(){if(!A){A=B.make("div",{className:"bin"}).css({visibility:"hidden",height:1,width:1,overflow:"hidden"});B("body").append(A)}this.appendTo(A);return this};B.fn.sort=function(){return this.pushStack($DL.makeArray([].sort.apply(this,arguments)))};B.fn.toggleAttr=function(E,D,C){(this.attr(E)==D)?this.attr(E,C):this.attr(E,D);return this};B.fn.dlid=function(C){this.each(function(){B(this).attr("id",B.dlid(C))});return this};B.fn.open_externally=function(){if(this.is("a")){this.click(function(C){window.open(B(this).attr("href"),B.dlid("daylife_external_"));C.preventDefault()})}return this};B.fn.flash=function(F,C){F=F||1000;C=C||"#ffff27";var D=this.offset();var E=B.make("div").css({position:"absolute",top:D.top,left:D.left,zIndex:"10",width:this.width(),height:this.height(),backgroundColor:C,opacity:0.7,display:"none"});this.parent().append(E);E.fadeIn(F,function(){E.fadeOut(F,function(){E.remove()})});return this};B.fn.clear_default_value=function(D){D=D||"default";function C(F){if(B(this).hasClass(D)){B(this).removeClass(D).val("")}}function E(G){var F=B(this).siblings(":text");if(F.hasClass(D)||F.val()==""){F.removeClass(D).val("").focus();return false}}if(this.is("form")){B(":text, textarea",this).focus(C);B(":submit",this).click(E)}else{if(this.is(":input")){this.focus(C)}}return this};B.fn.serializeForm=function(C){var D={};if(this.is("form")){C=C||":input";B.each(B(C,this),function(){var F=B(this);var E=F.attr("name");if(E){if(F.is(":checkbox")&&E.indexOf("[]")!=-1){E=E.replace("[]","");if(!D[E]){D[E]=[]}if(F.attr("checked")){D[E].push(F.val())}}else{if(F.is(":checkbox")&&!F.attr("checked")){D[E]=(F.attr("value")==1)?0:false}else{if(F.is(":radio")&&F.attr("checked")||(!F.is(":radio")||F.attr("checked"))){D[E]=F.val()}}}}})}return D};B.fn.unserialize=function(H,I){if(H&&this.is("form")){for(var D in H){var E=B(":input[name="+D+"]",this);if(E.length==0&&B.typeOf(H[D])=="array"){var C=this.find(":checkbox");C.each(function(){var J=B(this);if(J.attr("name")==D+"[]"){if(B.inArray(J.val(),H[D])!=-1){J.attr("checked",true)}else{J.attr("checked",false)}}})}if(E.length>0){if(E.is(":checkbox")){if(H[D]===true||H[D]==E.attr("value")){E.attr("checked",true)}else{E.attr("checked",false)}}else{if(E.is(":radio")){var G=H[D];if(G==true){G="1"}if(G==false){G="0"}B(":input[name="+D+"][value="+G+"]",this).attr("checked",true)}else{var F=H[D];if(E.is(":text")){if(F===null||F===false||F===true||B.typeOf(F)=="array"){F=""}}E.val(F)}}}}}if(I&&typeof I=="function"){I(H)}return H}})($DL);(function(B){var A=[];B.extend({include:function(K,C){if(!K){return false}C=C||{};var I;for(var G=A.length-1;G>=0;G--){if(A[G].path==K){I=A[G];break}}if(!I){var E=B.dlid();I={path:K,id:E};var F=A.push(I);var D=F-1;var J=(typeof (DAYLIFE_Globals)!="undefined"&&DAYLIFE_Globals.included_js)?true:false;var H=function(){I.complete=true;if(C.load&&typeof C.load=="function"){C.load()}if(C.ready&&typeof C.ready=="function"){B(document).ready(C.ready)}if(C.complete&&typeof C.complete=="function"){C.complete()}};if(!J||(J&&B.inArray(K,DAYLIFE_Globals.included_js)==-1&&B.inArray(K,DAYLIFE_Globals.included_smartgalleries_js)==-1&&B.inArray(K,DAYLIFE_Globals.included_wizard_js)==-1)){I.complete=false;B.ajax({type:"GET",url:K,success:H,dataType:"script",cache:true})}else{H()}}else{var H=function(){if(C.reload&&typeof C.reload=="function"){C.reload()}if(C.complete&&typeof C.complete=="function"){C.complete()}};if(C.reload||C.complete){if(I.complete){H()}else{I.load_interval=window.setInterval(function(){if(I.complete){window.clearInterval(I.load_interval);H()}},1000)}}}return I}})})($DL);(function(C){var A={};var B={};C.extend({anybind:function(I,G,H){if(!A[G]){A[G]={}}var J;for(var D in B){if(B[D]==I){J=D;break}}if(!J){J=C.dlid();B[J]=I}if(!A[G][J]){A[G][J]=[]}var F=false;for(var E=A[G][J].length;E>=0;E--){if(H==A[G][J][E]){F=true;break}}if(!F){A[G][J].push(H)}},anytrigger:function(H,G,E){if(A[G]){var I;for(var D in B){if(B[D]==H){I=D;break}}if(I&&A[G][I]){E=E||[];for(var F=0;F<A[G][I].length;F++){E.unshift(G);A[G][I][F].apply(H,E)}}}},anyunbind:function(H,F,G){if(A[F]){var I;for(var D in B){if(B[D]==H){I=D;break}}if(I&&A[F][I]){for(var E=0;E<A[F][I].length;E++){if(A[F][I][E]==G){A[F][I].splice(E,1);break}}if(A[F][I].length==0){delete A[F][I]}}E=0;for(var D in A[F]){E++}if(E==0){delete A[F]}}}})})($DL);(function(E){var A=[E.make("div"),E.make("div"),E.make("div"),E.make("div")];var D;var C;for(var B=A.length-1;B>=0;B--){A[B].css({backgroundColor:"#ffc300",opacity:0.3,position:"absolute",zIndex:800})}E(document).ready(function(){for(var G=0;G<A.length;G++){E("body").append(A[G])}});E(window).resize(function(){if(D){D.frame()}});var F=function(){};F.prototype={nodes:[],frame_out_timer:null,make_nodes:function(){var H={backgroundColor:"#ffc300",opacity:0.8,position:"absolute",zIndex:800};var G=E("body");this.nodes=[E.make("div").css(H).appendTo(G),E.make("div").css(H).appendTo(G),E.make("div").css(H).appendTo(G),E.make("div").css(H).appendTo(G)]}};E.fn.frame=function(V,T,P,U){var H=this.offset();if(H&&this.length&&this.css("display").toLowerCase()!="none"){var G=null;if(U){var J=this.data("frame");if(!J){J=new F();J.make_nodes();this.data("frame",J)}else{window.clearTimeout(J.frame_out_timer)}G=J.nodes}else{G=A;window.clearTimeout(C);D=this}var N=this.outerHeight();var R=this.outerWidth();var K=E(document).height();var O=E(document).width();if(V&&typeof V=="string"){var L=V.split(" ");var S=L.length-1;V=[];var I,Q;for(var M=0;M<4;M++){I=(L[M])?L[M]:((!L[1])?L[0]:((M==2)?L[0]:L[1]));Q=parseInt(I);V[M]=Q}}else{V=[0,0,0,0]}T=T||20;P=P||800;G[0].css({height:T,width:R+(2*T)+V[1]+V[3],top:H.top-T-V[0],left:H.left-T-V[3]});G[1].css({height:N+V[0]+V[2],width:T,top:H.top-V[0],left:H.left+R+V[3]});G[2].css({height:T,width:R+(2*T)+V[1]+V[3],top:H.top+N+V[2],left:H.left-T-V[3]});G[3].css({height:N+V[0]+V[2],width:T,top:H.top-V[0],left:H.left-T-V[3]});for(var M=G.length-1;M>=0;M--){G[M].css({display:"block",zIndex:P})}}return this};E.fn.unframe=function(G){if(this.data("frame")){var H=this.data("frame");if(G){this.removeData("frame")}H.frame_out_timer=window.setTimeout(function(){for(var I=H.nodes.length-1;I>=0;I--){if(G){H.nodes[I].remove()}else{H.nodes[I].css("display","none")}}},200)}else{C=window.setTimeout(function(){D=null;for(var I=A.length-1;I>=0;I--){A[I].css("display","none")}},200)}};E.fn.is_framed=function(){var G=(D&&this.get(0)==D.get(0))?true:false;return G};E.fn.slide_frame=function(G,I){if(this.is_framed()){for(var H=A.length-1;H>=0;H--){A[H].animate({top:parseInt(A[H].css("top"))+G},I)}}}})($DL);(function(C){var A=[];function B(E){this.success;this.failure;this.$form=E;this.original_state=E.serializeForm();this.changed=[];this.bindings={standard:C.rescope(this.do_standard_check,this),checkbox:C.rescope(this.do_checkbox_check,this),radio:C.rescope(this.do_radio_check,this)};this.set_handlers()}B.prototype={has_changed:function(E){if(E){return(C.inArray(E,this.changed)!=-1)}else{return this.changed.length>0}},serialize_changed:function(){var F=this.$form.serializeForm();for(var E in F){if(C.inArray(E,this.changed)==-1){delete F[E]}}return F},unserialize:function(F){this.$form.unserialize(F);for(var E in F){this.update_changed(C(":input[name="+E+"]",this.$form),F[E])}},restore:function(){this.$form.unserialize(this.original_state);this.changed=[]},reset:function(){this.original_state=this.$form.serializeForm();this.changed=[]},was:function(){return this.original_state},disable:function(){this.$form.find(":text, textarea").unbind("keyup",this.bindings.standard);this.$form.find("select, :file, :hidden").unbind("change",this.bindings.standard);if(DAYLIFE.Browser.IE){this.$form.find(":checkbox").unbind("click",this.bindings.checkbox);this.$form.find(":radio").unbind("click",this.bindings.radio)}else{this.$form.find(":checkbox").unbind("change",this.bindings.checkbox);this.$form.find(":radio").unbind("change",this.bindings.radio)}},enable:function(){this.$form.find(":text, textarea").bind("keyup",this.bindings.standard);this.$form.find("select, :file, :hidden").bind("change",this.bindings.standard);if(DAYLIFE.Browser.IE){this.$form.find(":checkbox").bind("click",this.bindings.checkbox);this.$form.find(":radio").bind("click",this.bindings.radio)}else{this.$form.find(":checkbox").bind("change",this.bindings.checkbox);this.$form.find(":radio").bind("change",this.bindings.radio)}},enable_field:function(E){if(E.is(":radio")){E.bind("change",this.bindings.radio)}else{if(E.is(":checkbox")){E.bind("change",this.bindings.checkbox);if(DAYLIFE.Browser.IE){E.bind("click",this.bindings.checkbox)}}else{if(E.is(":text")||E.is("textarea")){E.bind("keyup",this.bindings.standard)}else{E.bind("change",this.bindings.standard)}}}},set_handlers:function(F,E,G){this.success=(F&&typeof F=="function")?F:function(){return true};this.failure=(E&&typeof E=="function")?E:function(){return false};this.either=(G&&typeof G=="function")?G:function(){return false};this.enable()},update_field:function(E,F){E.val(F);if(E.is(":checkbox")){this.do_checkbox_check(E)}else{if(E.is(":radio")){this.do_radio_check(E)}else{this.do_standard_check(E)}}},update_changed:function(J,K){var G=J.attr("name");var F=C.inArray(G,this.changed);if(G&&G.indexOf("[]")!=-1){G=G.replace("[]","");F=C.inArray(G,this.changed);var E=((!K&&C.inArray(J.val(),this.original_state[G])!=-1)||(K&&C.inArray(J.val(),this.original_state[G])==-1))?true:false;if(!E){var I=this.$form.serializeForm();for(var H=I[G].length-1;H>=0;H--){if(C.inArray(I[G][H],this.original_state[G])==-1){E=true;break}}if(!E){for(var H=this.original_state[G].length-1;H>=0;H--){if(C.inArray(this.original_state[G][H],I[G])==-1){E=true;break}}}}if(E){J.trigger("DAYLIFE:Change_Monitor:has_changed",[])}if(F==-1&&E){this.changed.push(G)}else{if(F!=-1&&!E){this.changed.splice(F,1)}}}else{if(K!=this.original_state[G]){J.trigger("DAYLIFE:Change_Monitor:has_changed",[]);if(F==-1){this.changed.push(G)}}else{if(K==this.original_state[G]&&F>-1){this.changed.splice(F,1)}}}this.respond(J)},do_standard_check:function(F,G){var E=C(F);this.update_changed(E,E.val())},do_radio_check:function(G,H){var F=C(G);var E=this.$form.find(":checked[name="+F.attr("name")+"]");this.update_changed(F,E.val())},do_checkbox_check:function(F,G){var E=C(F);var H=(E.attr("checked")==true)?E.val():false;this.update_changed(E,H)},respond:function(E){if(this.either){this.either(E)}if(this.changed.length>0&&this.success){this.success(this.changed)}else{if(this.changed.length==0&&this.failure){this.failure(this.changed)}}},add_field:function(E){var G=E.attr("name");var F=E.val();if(G&&typeof this.original_state[G]=="undefined"){if(E.parents("form").get(0)!=this.$form.get(0)){E.appendTo(this.$form)}if(E.is(":checkbox")){F=(E.attr("checked"))?F:0}this.original_state[G]=F;this.enable_field(E)}}};C.fn.monitor_change=function(G){var E;for(var F=A.length-1;F>=0;F--){if(A[F]["form"].get(0)==this.get(0)){E=A[F]["monitor"];break}}if(!E){E=new B(this);A.push({form:this,monitor:E})}if(G&&typeof G=="string"){if(G=="enable"){E.enable()}else{if(G=="disable"){E.disable()}else{if(G=="reset"){E.reset()}}}}else{if(G){E.set_handlers(G.success,G.failure,G.either)}}return E};var D=function(G){var F,E;if(G.is("form")){F=G}else{if(G.is(":input")){F=G.parents("form")}else{return false}}if(F.length){for(var H=A.length-1;H>=0;H--){if(A[H]["form"].get(0)==F.get(0)){E=A[H]["monitor"];break}}if(!E){return false}else{return E}}return false};C.fn.get_monitor=function(){return D(this)};C.fn.has_changed=function(){var E=D(this);if(!E){return false}else{if(this.is("form")){return E.has_changed()}else{return(C.inArray(this.attr("name"),E.changed)!=-1)}}};C.fn.monitor_reset=function(){var E=D(this);if(!E){return false}else{if(this.is("form")){E.reset()}else{var G=this.attr("name");if(E.original_state[G]){E.original_state[G]=this.val()}var F=C.inArray(G,E.changed);if(F!=-1){E.changed.splice(F,1)}return this}}};C.fn.recheck=function(){var E=D(this);if(!E){return false}else{if(this.is("form")){DAYLIFE.log("WWWWAAAAAA!  This doesn't work on the whole form yet!!!!")}else{if(this.is(":checkbox")){E.do_checkbox_check(this)}else{if(this.is(":radio")){E.do_radio_check(this)}else{E.do_standard_check(this)}}return this}}}})($DL);(function(F){var A=[];var G;var C=function(){for(var I=A.length-1;I>=0;I--){var H=A[I].$node.offset();if(H.left!=A[I].offset.left||H.top!=A[I].offset.top){A[I].$form.trigger("reset")}}};var B=function(){if(A.length==0){window.clearInterval(G);G=null}else{if(!G){G=window.setInterval(function(){C()},500)}}};var E=function(I,H){for(var J=A.length-1;J>=0;J--){if(A[J].$form==H){break}}if(J<0){A.push({"$form":H,"$node":I,offset:I.offset()})}B()};var D=function(I,H){for(var J=A.length-1;J>=0;J--){if(A[J].$form==H){A.splice(J,1);break}}B()};F.fn.edit_in_place=function(K){var L=this.eq(0);if(!K){K={}}var I;var J=function(){F("form.edit_in_place").each(function(){var U=F("fieldset",F(this));U.eq(1).css("display","none");U.eq(0).css("display","block");F(this).css("display","none")});var S=(K.appendFormTo.is("body"))?L.offset():L.position();var R=10000000;var Q=L.offsetParent();while(Q&&Q.length>0&&!Q.is("body")&&!Q.is("html")){var T=parseInt(Q.css("zIndex"));if(T>R){R=T}Q=Q.offsetParent()}var M=function(){I.css({visibility:"hidden",display:"block"}).css({left:S.left+L.outerWidth()+5,top:S.top-Math.floor(((I.outerHeight()-L.outerHeight())/2))}).css({visibility:"visible"})};var P=function(){var U=F("fieldset",I);U.eq(1).css("display","none");U.eq(0).css("display","block");I.css("display","none");D(L,I);L.trigger("DAYLIFE:edit_in_place:reset",[I]);if(K.reset&&typeof K.reset=="function"){K.reset()}return false};var O=function(){L.text(F(":text",I).val());var W=window.location.toString().match("http://(.*?)/")[1];var V=(typeof L.attr("href")!="undefined")?L.attr("href").toString().match("http://(.*?)/"):null;var U=(V&&V[1])?V[1]:"";if(F("#returning_user_management").length&&W==U){F(".DL-header .DL-header-title").text(F(":text",I).val())}F("input",I).attr("disable",false);I.css("display","none");D(L,I);L.trigger("DAYLIFE:edit_in_place:complete",[I]);if(K.success&&typeof K.success=="function"){K.success(F(":text",I).val(),L)}};if(!I){I=F.make("form",{className:"edit_in_place"},[F.make("div").css({height:"100%",width:"100%",backgroundColor:"#000",opacity:0.5,position:"absolute",top:0,left:11,zIndex:-1}),F.make("div").css({height:"30px",width:"11px",backgroundImage:"url("+DAYLIFE_Globals.img_path+"/eip_arrow.png)",opacity:0.5,position:"absolute",top:6,left:0,zIndex:-1}),F.make("fieldset",[F.make("input",{type:"text",name:K.fieldName}).css({border:"0px solid #ccc",padding:"4px",fontSize:"11px",margin:"0 5px 0 0",width:parseInt(K.fieldWidth)+"px"}),F.make("input",{type:"submit",value:"update"}).css({backgroundColor:"#339933",border:"1px solid #336600",color:"#fff",margin:"0 5px 0 0"}),F.make("input",{type:"reset",value:"cancel"}).css({backgroundColor:"#ccc",margin:"0 5px 0 0"})]).css({border:"0px",padding:"0px"}),F.make("fieldset",{className:"error"},[F.make("p",{className:"error"},"Edit failed.").css({fontSize:"11px",backgroundColor:"red",padding:"3px","float":"left"}),F.make("input",{type:"reset",value:"dismiss"})]).css({overflow:"hidden",display:"none"})]).css({position:"absolute",color:"#fff",zIndex:R,padding:"10px 10px 10px 21px",overflow:"hidden"}).submit(function(Y){if(K.url){F("input",I).attr("disable",true);var X=I.serializeForm();for(var U in K.postData){X[U]=K.postData[U]}F.ajax({type:"post",url:K.url,data:X,success:O,error:function(b){var Z=F("fieldset",I);Z.eq(0).css("display","none");Z.eq(1).css("display","block");F("input",I).attr("disable",false)}})}if(K.editapi){var W=new DAYLIFE.Class.EditApi();for(var V=K.editapi.args.length-1;V>=0;V--){if(K.editapi.args[V]==K.fieldName){K.editapi.args[V]=F("[name="+K.fieldName+"]",I).val();break}}K.editapi.args.push({onSuccess:O});W[K.editapi.method].apply(W,K.editapi.args)}if(!K.url&&!K.editapi){O()}return false}).bind("reset",P);F(":submit, :reset",I).css({padding:"3px",marginLeft:"5px",fontSize:"11px"});F(":reset",I).css({border:"1px solid #ccc"});K.appendFormTo.append(I)}M();E(L,I);L.trigger("DAYLIFE:edit_in_place:edit",[I]);var N=(F.isFunction(K.formatEditText))?K.formatEditText(L.text()):L.text();F(":text",I).focus().val(N).select();return false};var H=F.make("a",{href:"#",className:"reveal"});K={linkPosition:K.linkPosition||function(){L.after(H)},linkText:K.linkText||"edit",linkHref:K.linkHref||"#",url:K.url||null,postData:K.postData||{},editapi:K.editapi||null,fieldName:K.fieldName||"name",fieldWidth:K.fieldWidth||150,success:K.success||null,noLink:K.noLink||false,appendFormTo:K.appendFormTo||F("body"),formatEditText:K.formatEditText||null};H.text(K.linkText);H.attr("href",K.linkHref);if(K.noLink){this.click(J)}else{H.click(J);K.linkPosition(H)}return this}})($DL);(function(B){var A;B.extend({iedebug:function(C){if(!A){A=B.make("div",[B.make("ol")]).css({position:"absolute",top:10,left:10,zIndex:20000,border:"1px solid #000",padding:"10px",backgroundColor:"#fff",fontFamily:"arial,helvetica,sans-serif",fontSize:"11px"});B("body").append(A)}A.find("ol").append(B.make("li",C).css({borderBottom:"1px solid #999999"}))}})})($DL);jQuery.cookie=function(A,J,I){if(typeof J!="undefined"){I=I||{};if(J===null){J="";I.expires=-1}var E="";if(I.expires&&(typeof I.expires=="number"||I.expires.toUTCString)){var B;if(typeof I.expires=="number"){B=new Date();B.setTime(B.getTime()+(I.expires*24*60*60*1000))}else{B=I.expires}E="; expires="+B.toUTCString()}var L=I.path?"; path="+(I.path):"";var C=I.domain?"; domain="+(I.domain):"";var H=I.secure?"; secure":"";document.cookie=[A,"=",encodeURIComponent(J),E,L,C,H].join("")}else{var G=null;if(document.cookie&&document.cookie!=""){var K=document.cookie.split(";");for(var D=0;D<K.length;D++){var F=jQuery.trim(K[D]);if(F.substring(0,A.length+1)==(A+"=")){G=decodeURIComponent(F.substring(A.length+1));break}}}return G}};(function(C){C.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor","borderColor"],function(E,D){C.fx.step[D]=function(F){if(F.state==0){F.start=B(F.elem,D);F.end=A(F.end)}F.elem.style[D]="rgb("+[Math.max(Math.min(parseInt((F.pos*(F.end[0]-F.start[0]))+F.start[0]),255),0),Math.max(Math.min(parseInt((F.pos*(F.end[1]-F.start[1]))+F.start[1]),255),0),Math.max(Math.min(parseInt((F.pos*(F.end[2]-F.start[2]))+F.start[2]),255),0)].join(",")+")"}});function A(D){var E;if(D&&D.constructor==Array&&D.length==3){return D}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(D)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(D)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55]}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(D)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(D)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}}function B(F,D){var E;do{E=C.curCSS(F,D);if(E!=""&&E!="transparent"||C.nodeName(F,"body")){break}D="backgroundColor"}while(F=F.parentNode);return A(E)}})($DL);(function(C){var B=C.scrollTo=function(F,E,D){B.window().scrollTo(F,E,D)};B.defaults={axis:"y",duration:1};B.window=function(){return C(C.browser.safari?"body":"html")};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}D=C.extend({},B.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=A(D.offset);D.over=A(D.over);return this.each(function(){var M=this,J=C(M),K=F,I,H={},N=J.is("html,body");switch(typeof K){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(K)){K=A(K);break}K=C(K,this);case"object":if(K.is||K.style){I=(K=C(K)).offset()}}C.each(D.axis.split(""),function(R,S){var T=S=="x"?"Left":"Top",V=T.toLowerCase(),Q="scroll"+T,O=M[Q],P=S=="x"?"Width":"Height",U=P.toLowerCase();if(I){H[Q]=I[V]+(N?0:O-J.offset()[V]);if(D.margin){H[Q]-=parseInt(K.css("margin"+T))||0;H[Q]-=parseInt(K.css("border"+T+"Width"))||0}H[Q]+=D.offset[V]||0;if(D.over[V]){H[Q]+=K[U]()*D.over[V]}}else{H[Q]=K[V]}if(/^\d+$/.test(H[Q])){H[Q]=H[Q]<=0?0:Math.min(H[Q],G(P))}if(!R&&D.queue){if(O!=H[Q]){L(D.onAfterFirst)}delete H[Q]}});L(D.onAfter);function L(O){J.animate(H,E,D.easing,O&&function(){O.call(this,F)})}function G(O){var P=N?C.browser.opera?document.body:document.documentElement:M;return P["scroll"+O]-P["client"+O]}})};function A(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);$DL.easing.jswing=$DL.easing.swing;$DL.extend($DL.easing,{def:"easeOutQuad",swing:function(B,C,A,E,D){return $DL.easing[$DL.easing.def](B,C,A,E,D)},easeInQuad:function(B,C,A,E,D){return E*(C/=D)*C+A},easeOutQuad:function(B,C,A,E,D){return -E*(C/=D)*(C-2)+A},easeInOutQuad:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C+A}return -E/2*((--C)*(C-2)-1)+A},easeInCubic:function(B,C,A,E,D){return E*(C/=D)*C*C+A},easeOutCubic:function(B,C,A,E,D){return E*((C=C/D-1)*C*C+1)+A},easeInOutCubic:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C+A}return E/2*((C-=2)*C*C+2)+A},easeInQuart:function(B,C,A,E,D){return E*(C/=D)*C*C*C+A},easeOutQuart:function(B,C,A,E,D){return -E*((C=C/D-1)*C*C*C-1)+A},easeInOutQuart:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C+A}return -E/2*((C-=2)*C*C*C-2)+A},easeInQuint:function(B,C,A,E,D){return E*(C/=D)*C*C*C*C+A},easeOutQuint:function(B,C,A,E,D){return E*((C=C/D-1)*C*C*C*C+1)+A},easeInOutQuint:function(B,C,A,E,D){if((C/=D/2)<1){return E/2*C*C*C*C*C+A}return E/2*((C-=2)*C*C*C*C+2)+A},easeInSine:function(B,C,A,E,D){return -E*Math.cos(C/D*(Math.PI/2))+E+A},easeOutSine:function(B,C,A,E,D){return E*Math.sin(C/D*(Math.PI/2))+A},easeInOutSine:function(B,C,A,E,D){return -E/2*(Math.cos(Math.PI*C/D)-1)+A},easeInExpo:function(B,C,A,E,D){return(C==0)?A:E*Math.pow(2,10*(C/D-1))+A},easeOutExpo:function(B,C,A,E,D){return(C==D)?A+E:E*(-Math.pow(2,-10*C/D)+1)+A},easeInOutExpo:function(B,C,A,E,D){if(C==0){return A}if(C==D){return A+E}if((C/=D/2)<1){return E/2*Math.pow(2,10*(C-1))+A}return E/2*(-Math.pow(2,-10*--C)+2)+A},easeInCirc:function(B,C,A,E,D){return -E*(Math.sqrt(1-(C/=D)*C)-1)+A},easeOutCirc:function(B,C,A,E,D){return E*Math.sqrt(1-(C=C/D-1)*C)+A},easeInOutCirc:function(B,C,A,E,D){if((C/=D/2)<1){return -E/2*(Math.sqrt(1-C*C)-1)+A}return E/2*(Math.sqrt(1-(C-=2)*C)+1)+A},easeInElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return -(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A},easeOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G)==1){return A+H}if(!F){F=G*0.3}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}return C*Math.pow(2,-10*D)*Math.sin((D*G-E)*(2*Math.PI)/F)+H+A},easeInOutElastic:function(B,D,A,H,G){var E=1.70158;var F=0;var C=H;if(D==0){return A}if((D/=G/2)==2){return A+H}if(!F){F=G*(0.3*1.5)}if(C<Math.abs(H)){C=H;var E=F/4}else{var E=F/(2*Math.PI)*Math.asin(H/C)}if(D<1){return -0.5*(C*Math.pow(2,10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F))+A}return C*Math.pow(2,-10*(D-=1))*Math.sin((D*G-E)*(2*Math.PI)/F)*0.5+H+A},easeInBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*(C/=E)*C*((D+1)*C-D)+A},easeOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}return F*((C=C/E-1)*C*((D+1)*C+D)+1)+A},easeInOutBack:function(B,C,A,F,E,D){if(D==undefined){D=1.70158}if((C/=E/2)<1){return F/2*(C*C*(((D*=(1.525))+1)*C-D))+A}return F/2*((C-=2)*C*(((D*=(1.525))+1)*C+D)+2)+A},easeInBounce:function(B,C,A,E,D){return E-$DL.easing.easeOutBounce(B,D-C,0,E,D)+A},easeOutBounce:function(B,C,A,E,D){if((C/=D)<(1/2.75)){return E*(7.5625*C*C)+A}else{if(C<(2/2.75)){return E*(7.5625*(C-=(1.5/2.75))*C+0.75)+A}else{if(C<(2.5/2.75)){return E*(7.5625*(C-=(2.25/2.75))*C+0.9375)+A}else{return E*(7.5625*(C-=(2.625/2.75))*C+0.984375)+A}}}},easeInOutBounce:function(B,C,A,E,D){if(C<D/2){return $DL.easing.easeInBounce(B,C*2,0,E,D)*0.5+A}return $DL.easing.easeOutBounce(B,C*2-D,0,E,D)*0.5+E*0.5+A}});(function(A){A.fn.lightBox=function(O){O=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.5,fixedNavigation:true,imageLoading:DAYLIFE_Globals.img_path+"/lightbox/lightbox-ico-loading.gif",imageBtnPrev:DAYLIFE_Globals.img_path+"/lightbox/off_arrows.png",imageBtnNext:DAYLIFE_Globals.img_path+"/lightbox/off_arrows.png",imageBtnClose:DAYLIFE_Globals.img_path+"/overlay/close.png",imageBlank:DAYLIFE_Globals.img_path+"/lightbox/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},O);var G=this;function R(){N(this,G);return false}function N(V,T){DAYLIFE.debug("objClicked is:",V);A("embed, object, select").css({visibility:"hidden"});C();O.imageArray.length=0;O.activeImage=0;if(T.length==1){O.imageArray.push(new Array(V.getAttribute("href"),V.getAttribute("title")))}else{for(var U=0;U<T.length;U++){O.imageArray.push(new Array(T[U].getAttribute("href"),T[U].getAttribute("title")))}}while(O.imageArray[O.activeImage][0]!=V.getAttribute("href")){O.activeImage++}L()}function C(){A("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox" class="DL-css"><div id="lightbox-container-image-box"><div id="lightbox-secNav"><a href="#" title="Close lightbox" id="lightbox-secNav-btnClose"><img alt="close button" src="'+O.imageBtnClose+'"></a></div><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+O.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div></div></div></div>');var U=I();A("#jquery-overlay").css({backgroundColor:O.overlayBgColor,opacity:O.overlayOpacity,width:U[0],height:U[1]}).fadeIn();var T=J();A("#jquery-lightbox").css({top:T[1]+(U[3]/10),left:T[0]}).show();A("#jquery-overlay,#jquery-lightbox").click(function(){B()});A("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){B();return false});A(window).resize(function(){var W=I();A("#jquery-overlay").css({width:W[0],height:W[1]});var V=J();A("#jquery-lightbox").css({top:V[1]+(W[3]/10),left:V[0]})})}function L(){A("#lightbox-loading").show();if(O.fixedNavigation){A("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}else{A("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide()}var T=new Image();DAYLIFE.debug(["settings image array"],O.imageArray[O.activeImage][0]);T.onload=function(){A("#lightbox-image").attr("src",O.imageArray[O.activeImage][0]);F(T.width,T.height);T.onload=function(){}};T.src=O.imageArray[O.activeImage][0]}function F(Y,Z){var T=A("#lightbox-container-image-box").width();var X=A("#lightbox-container-image-box").height();var W=(Y+(O.containerBorderSize*2));var V=(Z+(O.containerBorderSize*2));var U=T-W;var b=X-V;A("#lightbox-container-image-box").animate({width:W,height:V},O.containerResizeSpeed,function(){H()});if((U==0)&&(b==0)){if(A.browser.msie){P(250)}else{P(100)}}A("#lightbox-container-image-data-box").css({width:Y});A("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:Z+(O.containerBorderSize*2)})}function H(){A("#lightbox-loading").hide();A("#lightbox-image").fadeIn(function(){D();S()});M()}function D(){A("#lightbox-container-image-data-box").slideDown("fast");A("#lightbox-image-details-caption").hide();if(O.imageArray[O.activeImage][1]){A("#lightbox-image-details-caption").html(O.imageArray[O.activeImage][1]).show()}if(O.imageArray.length>1){A("#lightbox-image-details-currentNumber").html(O.txtImage+" "+(O.activeImage+1)+" "+O.txtOf+" "+O.imageArray.length).show()}}function S(){A("#lightbox-nav").show();A("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+O.imageBlank+") no-repeat"});if(O.activeImage!=0){if(O.fixedNavigation){A("#lightbox-nav-btnPrev").css({background:"url("+O.imageBtnPrev+") left 48% no-repeat"}).unbind().bind("click",function(){O.activeImage=O.activeImage-1;L();return false})}else{A("#lightbox-nav-btnPrev").unbind().hover(function(){A(this).css({background:"url("+O.imageBtnPrev+") left 48% no-repeat"})},function(){A(this).css({background:"transparent url("+O.imageBlank+") no-repeat"})}).show().bind("click",function(){O.activeImage=O.activeImage-1;L();return false})}}if(O.activeImage!=(O.imageArray.length-1)){if(O.fixedNavigation){A("#lightbox-nav-btnNext").css({background:"url("+O.imageBtnNext+") right 48% no-repeat"}).unbind().bind("click",function(){O.activeImage=O.activeImage+1;L();return false})}else{A("#lightbox-nav-btnNext").unbind().hover(function(){A(this).css({background:"url("+O.imageBtnNext+") right 48% no-repeat"})},function(){A(this).css({background:"transparent url("+O.imageBlank+") no-repeat"})}).show().bind("click",function(){O.activeImage=O.activeImage+1;L();return false})}}Q()}function Q(){A(document).keydown(function(T){E(T)})}function K(){A(document).unbind()}function E(T){if(T==null){keycode=event.keyCode;escapeKey=27}else{keycode=T.keyCode;escapeKey=T.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if((key==O.keyToClose)||(key=="x")||(keycode==escapeKey)){B()}if((key==O.keyToPrev)||(keycode==37)){if(O.activeImage!=0){O.activeImage=O.activeImage-1;L();K()}}if((key==O.keyToNext)||(keycode==39)){if(O.activeImage!=(O.imageArray.length-1)){O.activeImage=O.activeImage+1;L();K()}}}function M(){if((O.imageArray.length-1)>O.activeImage){objNext=new Image();objNext.src=O.imageArray[O.activeImage+1][0]}if(O.activeImage>0){objPrev=new Image();objPrev.src=O.imageArray[O.activeImage-1][0]}}function B(){A("#jquery-lightbox").remove();A("#jquery-overlay").fadeOut(function(){A("#jquery-overlay").remove()});A("embed, object, select").css({visibility:"visible"})}function I(){var V,U;if(window.innerHeight&&window.scrollMaxY){V=window.innerWidth+window.scrollMaxX;U=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){V=document.body.scrollWidth;U=document.body.scrollHeight}else{V=document.body.offsetWidth;U=document.body.offsetHeight}}var T,W;if(self.innerHeight){if(document.documentElement.clientWidth){T=document.documentElement.clientWidth}else{T=self.innerWidth}W=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){T=document.documentElement.clientWidth;W=document.documentElement.clientHeight}else{if(document.body){T=document.body.clientWidth;W=document.body.clientHeight}}}if(U<W){pageHeight=W}else{pageHeight=U}if(V<T){pageWidth=V}else{pageWidth=T}arrayPageSize=new Array(pageWidth,pageHeight,T,W);return arrayPageSize}function J(){var U,T;if(self.pageYOffset){T=self.pageYOffset;U=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){T=document.documentElement.scrollTop;U=document.documentElement.scrollLeft}else{if(document.body){T=document.body.scrollTop;U=document.body.scrollLeft}}}arrayPageScroll=new Array(U,T);return arrayPageScroll}function P(V){var U=new Date();T=null;do{var T=new Date()}while(T-U<V)}return this.unbind("click").click(R)}})($DL);$DL(document).ready(function(){$DL(".DL-photos li.DL-photo a.lightbox, .DL-ron li.DL-photo a.lightbox").lightBox()});(function(A){A.fn.extend({autocomplete:function(C,B){var D=typeof C=="string";B=A.extend({},A.Autocompleter.defaults,{url:D?C:null,data:D?null:C,delay:D?A.Autocompleter.defaults.delay:10,max:B&&!B.scroll?10:150},B);B.highlight=B.highlight||function(E){return E};B.formatMatch=B.formatMatch||B.formatItem;return this.each(function(){new A.Autocompleter(this,B)})},result:function(B){return this.bind("result",B)},search:function(B){return this.trigger("search",[B])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(B){return this.trigger("setOptions",[B])},unautocomplete:function(){return this.trigger("unautocomplete")}});A.Autocompleter=function(L,K){var B={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var C=A(L).attr("autocomplete","off").addClass(K.inputClass);var F;var V="";var M=A.Autocompleter.Cache(K);var G=0;var T;var P={mouseDownOnSelect:false};var U=A.Autocompleter.Select(K,L,E,P);var W;A.browser.opera&&A(L.form).bind("submit.autocomplete",function(){if(W){W=false;return false}});C.bind((A.browser.opera?"keypress":"keydown")+".autocomplete",function(Y){T=Y.keyCode;switch(Y.keyCode){case B.UP:Y.preventDefault();if(U.visible()){U.prev()}else{S(0,true)}break;case B.DOWN:Y.preventDefault();if(U.visible()){U.next()}else{S(0,true)}break;case B.PAGEUP:Y.preventDefault();if(U.visible()){U.pageUp()}else{S(0,true)}break;case B.PAGEDOWN:Y.preventDefault();if(U.visible()){U.pageDown()}else{S(0,true)}break;case K.multiple&&A.trim(K.multipleSeparator)==","&&B.COMMA:case B.TAB:case B.RETURN:if(E()){Y.preventDefault();W=true;return false}break;case B.ESC:U.hide();break;default:clearTimeout(F);F=setTimeout(S,K.delay);break}}).focus(function(){G++}).blur(function(){G=0;if(!P.mouseDownOnSelect){R()}}).click(function(){if(G++>1&&!U.visible()){S(0,true)}}).bind("search",function(){var Y=(arguments.length>1)?arguments[1]:null;function Z(f,d){var c;if(d&&d.length){for(var b=0;b<d.length;b++){if(d[b].result.toLowerCase()==f.toLowerCase()){c=d[b];break}}}if(typeof Y=="function"){Y(c)}else{C.trigger("result",c&&[c.data,c.value])}}A.each(J(C.val()),function(b,c){I(c,Z,Z)})}).bind("flushCache",function(){M.flush()}).bind("setOptions",function(){A.extend(K,arguments[1]);if("data" in arguments[1]){M.populate()}}).bind("unautocomplete",function(){U.unbind();C.unbind();A(L.form).unbind(".autocomplete")});function E(){var Z=U.selected();if(!Z){return false}var Y=Z.result;V=Y;if(K.multiple){var b=J(C.val());if(b.length>1){Y=b.slice(0,b.length-1).join(K.multipleSeparator)+K.multipleSeparator+Y}Y+=K.multipleSeparator}C.val(Y);Q();C.trigger("result",[Z.data,Z.value]);return true}function S(b,Z){if(T==B.DEL){U.hide();return }var Y=C.val();if(!Z&&Y==V){return }V=Y;Y=H(Y);if(Y.length>=K.minChars){C.addClass(K.loadingClass);if(!K.matchCase){Y=Y.toLowerCase()}I(Y,D,Q)}else{X();U.hide()}}function J(Z){if(!Z){return[""]}var b=Z.split(K.multipleSeparator);var Y=[];A.each(b,function(c,d){if(A.trim(d)){Y[c]=A.trim(d)}});return Y}function H(Y){if(!K.multiple){return Y}var Z=J(Y);return Z[Z.length-1]}function O(Y,Z){if(K.autoFill&&(H(C.val()).toLowerCase()==Y.toLowerCase())&&T!=B.BACKSPACE){C.val(C.val()+Z.substring(H(V).length));A.Autocompleter.Selection(L,V.length,V.length+Z.length)}}function R(){clearTimeout(F);F=setTimeout(Q,200)}function Q(){var Y=U.visible();U.hide();clearTimeout(F);X();if(K.mustMatch){C.search(function(Z){if(!Z){if(K.multiple){var b=J(C.val()).slice(0,-1);C.val(b.join(K.multipleSeparator)+(b.length?K.multipleSeparator:""))}else{C.val("")}}})}if(Y){A.Autocompleter.Selection(L,L.value.length,L.value.length)}}function D(Z,Y){if(Y&&Y.length&&G){X();U.display(Y,Z);O(Z,Y[0].value);U.show()}else{Q()}}function I(Z,c,Y){if(!K.matchCase){Z=Z.toLowerCase()}var b=M.load(Z);if(b&&b.length){c(Z,b)}else{if((typeof K.url=="string")&&(K.url.length>0)){var d={timestamp:+new Date()};A.each(K.extraParams,function(f,g){d[f]=typeof g=="function"?g():g});A.ajax({mode:"abort",port:"autocomplete"+L.name,dataType:K.dataType,url:K.url,data:A.extend({q:H(Z),limit:K.max},d),success:function(g){var f=K.parse&&K.parse(g)||N(g);M.add(Z,f);c(Z,f)}})}else{U.emptyList();Y(Z)}}}function N(c){var Z=[];var b=c.split("\n");for(var Y=0;Y<b.length;Y++){var d=A.trim(b[Y]);if(d){d=d.split("|");Z[Z.length]={data:d,value:d[0],result:K.formatResult&&K.formatResult(d,d[0])||d[0]}}}return Z}function X(){C.removeClass(K.loadingClass)}};A.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",positionSelector:"body",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(B){return B[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(C,B){return C.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+B.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};A.Autocompleter.Cache=function(D){var F={};var C=0;function H(K,J){if(!D.matchCase){K=K.toLowerCase()}var I=K.indexOf(J);if(I==-1){return false}return I==0||D.matchContains}function G(J,I){if(C>D.cacheLength){B()}if(!F[J]){C++}F[J]=I}function E(){if(!D.data){return false}var I={},O=0;if(!D.url){D.cacheLength=1}I[""]=[];for(var K=0,J=D.data.length;K<J;K++){var N=D.data[K];N=(typeof N=="string")?[N]:N;var M=D.formatMatch(N,K+1,D.data.length);if(M===false){continue}var L=M.charAt(0).toLowerCase();if(!I[L]){I[L]=[]}var P={value:M,data:N,result:D.formatResult&&D.formatResult(N)||M};I[L].push(P);if(O++<D.max){I[""].push(P)}}A.each(I,function(Q,R){D.cacheLength++;G(Q,R)})}setTimeout(E,25);function B(){F={};C=0}return{flush:B,add:G,populate:E,load:function(L){if(!D.cacheLength||!C){return null}if(!D.url&&D.matchContains){var K=[];for(var I in F){if(I.length>0){var M=F[I];A.each(M,function(O,N){if(H(N.value,L)){K.push(N)}})}}return K}else{if(F[L]){return F[L]}else{if(D.matchSubset){for(var J=L.length-1;J>=D.minChars;J--){var M=F[L.substr(0,J)];if(M){var K=[];A.each(M,function(O,N){if(H(N.value,L)){K[K.length]=N}});return K}}}}}return null}}};A.Autocompleter.Select=function(F,J,P,L){var I={ACTIVE:"ac_over"};var S,D=-1,Q,M="",R=true,H,O;function N(){if(!R){return }H=A("<div/>").hide().addClass(F.resultsClass).css("position","absolute").appendTo(F.positionSelector);O=A("<ul/>").appendTo(H).mouseover(function(T){if(K(T).nodeName&&K(T).nodeName.toUpperCase()=="LI"){D=A("li",O).removeClass(I.ACTIVE).index(K(T));A(K(T)).addClass(I.ACTIVE)}}).click(function(T){A(K(T)).addClass(I.ACTIVE);P();J.focus();return false}).mousedown(function(){L.mouseDownOnSelect=true}).mouseup(function(){L.mouseDownOnSelect=false});if(F.width>0){H.css("width",F.width)}R=false}function K(U){var T=U.target;while(T&&T.tagName!="LI"){T=T.parentNode}if(!T){return[]}return T}function C(T){S.slice(D,D+1).removeClass(I.ACTIVE);E(T);var V=S.slice(D,D+1).addClass(I.ACTIVE);if(F.scroll){var U=0;S.slice(0,D).each(function(){U+=this.offsetHeight});if((U+V[0].offsetHeight-O.scrollTop())>O[0].clientHeight){O.scrollTop(U+V[0].offsetHeight-O.innerHeight())}else{if(U<O.scrollTop()){O.scrollTop(U)}}}}function E(T){D+=T;if(D<0){D=S.size()-1}else{if(D>=S.size()){D=0}}}function B(T){return F.max&&F.max<T?F.max:T}function G(){O.empty();var U=B(Q.length);for(var V=0;V<U;V++){if(!Q[V]){continue}var W=F.formatItem(Q[V].data,V+1,U,Q[V].value,M);if(W===false){continue}var T=A("<li/>").html(F.highlight(W,M)).addClass(V%2==0?"ac_even":"ac_odd").appendTo(O)[0];A.data(T,"ac_data",Q[V])}S=O.find("li");if(F.selectFirst){S.slice(0,1).addClass(I.ACTIVE);D=0}if(A.fn.bgiframe){O.bgiframe()}}return{display:function(U,T){N();Q=U;M=T;G()},next:function(){C(1)},prev:function(){C(-1)},pageUp:function(){if(D!=0&&D-8<0){C(-D)}else{C(-8)}},pageDown:function(){if(D!=S.size()-1&&D+8>S.size()){C(S.size()-1-D)}else{C(8)}},hide:function(){H&&H.hide();S&&S.removeClass(I.ACTIVE);D=-1},visible:function(){return H&&H.is(":visible")},current:function(){return this.visible()&&(S.filter("."+I.ACTIVE)[0]||F.selectFirst&&S[0])},show:function(){var V=A(J).offset();H.css({width:typeof F.width=="string"||F.width>0?F.width:A(J).width(),top:V.top+J.offsetHeight,left:V.left}).show();if(F.scroll){O.scrollTop(0);O.css({maxHeight:F.scrollHeight,overflow:"auto"});if(A.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var T=0;S.each(function(){T+=this.offsetHeight});var U=T>F.scrollHeight;O.css("height",U?F.scrollHeight:T);if(!U){S.width(O.width()-parseInt(S.css("padding-left"))-parseInt(S.css("padding-right")))}}}},selected:function(){var T=S&&S.filter("."+I.ACTIVE).removeClass(I.ACTIVE);return T&&T.length&&A.data(T[0],"ac_data")},emptyList:function(){O&&O.empty()},unbind:function(){H&&H.remove()}}};A.Autocompleter.Selection=function(D,E,C){if(D.createTextRange){var B=D.createTextRange();B.collapse(true);B.moveStart("character",E);B.moveEnd("character",C);B.select()}else{if(D.setSelectionRange){D.setSelectionRange(E,C)}else{if(D.selectionStart){D.selectionStart=E;D.selectionEnd=C}}}D.focus()}})($DL);if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]]}}return E};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C)}else{return false}};YAHOO.register=function(A,C,F){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]}}var B=I[A],H=F.version,G=F.build,E=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=C;for(var D=0;D<E.length;D=D+1){E[D](B)}if(C){C.VERSION=H;C.BUILD=G}else{YAHOO.log("mainClass is undefined for module "+A,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0]}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0]}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0]}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1])}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1])}}}}}return C}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break}}if(D){A.push(B)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice)}return false},isBoolean:function(D){return typeof D==="boolean"},isFunction:function(D){return typeof D==="function"},isNull:function(D){return D===null},isNumber:function(D){return typeof D==="number"&&isFinite(D)},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false},isString:function(D){return typeof D==="string"},isUndefined:function(D){return typeof D==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G}}}:function(){},extend:function(I,G,H){if(!G||!I){throw new Error("extend failed, please check that all dependencies are included.")}var E=function(){};E.prototype=G.prototype;I.prototype=new E();I.prototype.constructor=I;I.superclass=G.prototype;if(G.prototype.constructor==Object.prototype.constructor){G.prototype.constructor=G}if(H){for(var D in H){if(A.hasOwnProperty(H,D)){I.prototype[D]=H[D]}}A._IEEnumFix(I.prototype,H)}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.")}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]]}}else{for(I in G){if(E||!(I in H)){H[I]=G[I]}}A._IEEnumFix(H,G)}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.")}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E])}A.augmentObject.apply(this,D)},dump:function(D,I){var F,H,L=[],K="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+""}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D}else{if(A.isFunction(D)){return E}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){L.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){L.push((I>0)?A.dump(D[F],I-1):K)}else{L.push(D[F])}L.push(J)}if(L.length>1){L.pop()}L.push("]")}else{L.push("{");for(F in D){if(A.hasOwnProperty(D,F)){L.push(F+G);if(A.isObject(D[F])){L.push((I>0)?A.dump(D[F],I-1):K)}else{L.push(D[F])}L.push(J)}}if(L.length>1){L.pop()}L.push("}")}return L.join("")},substitute:function(S,D,K){var H,G,F,Q,P,R,O=[],E,I="dump",M=" ",L="{",N="}";for(;;){H=S.lastIndexOf(L);if(H<0){break}G=S.indexOf(N,H);if(H+1>=G){break}E=S.substring(H+1,G);Q=E;R=null;F=Q.indexOf(M);if(F>-1){R=Q.substring(F+1);Q=Q.substring(0,F)}P=D[Q];if(K){P=K(Q,P,R)}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10))}else{R=R||"";var J=R.indexOf(I);if(J>-1){R=R.substring(4)}if(P.toString===Object.prototype.toString||J>-1){P=A.dump(P,parseInt(R,10))}else{P=P.toString()}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+O.length+"-~";O[O.length]=E}}S=S.substring(0,H)+P+S.substring(G+1)}for(H=O.length-1;H>=0;H=H-1){S=S.replace(new RegExp("~-"+H+"-~"),"{"+O[H]+"}","g")}return S},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"")}catch(E){return D}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true)}return G},later:function(J,E,L,G,I){J=J||0;E=E||{};var F=L,K=G,H,D;if(A.isString(L)){F=E[L]}if(!F){throw new TypeError("method undefined")}if(!A.isArray(K)){K=[G]}H=function(){F.apply(E,K)};D=(I)?setInterval(H,J):setTimeout(H,J);return{interval:I,cancel:function(){if(this.interval){clearInterval(D)}else{clearTimeout(D)}}}},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D))}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E)}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E]};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});YAHOO.util.Get=function(){var N={},J=0,R=0,I=false,M=YAHOO.env.ua,S=YAHOO.lang;var F=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V])}}return Z};var E=function(T,U,W){var V=W||"utf-8";return F("link",{id:"yui__dyn_"+(R++),type:"text/css",charset:V,rel:"stylesheet",href:T},U)};var P=function(T,U,W){var V=W||"utf-8";return F("script",{id:"yui__dyn_"+(R++),type:"text/javascript",charset:V,src:T},U)};var L=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){K(this.tId)}}};var B=function(T,W){var U=N[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T)}return V};var Q=function(W,V){var T=N[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,L(T,V))}};var A=function(W){var T=N[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return }if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,L(T))}};var O=function(V){var T=N[V];if(T.onTimeout){var U=T.context||T;T.onTimeout.call(U,L(T))}};var C=function(V,Z){var U=N[V];if(U.timer){U.timer.cancel()}if(U.aborted){var W="transaction "+V+" was aborted";Q(V,W);return }if(Z){U.url.shift();if(U.varName){U.varName.shift()}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName}}var f=U.win,c=f.document,b=c.getElementsByTagName("head")[0],X;if(U.url.length===0){if(U.type==="script"&&M.webkit&&M.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);b.appendChild(Y)}else{A(V)}return }var T=U.url[0];if(!T){U.url.shift();return C(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){X=P(T,f,U.charset)}else{X=E(T,f,U.charset)}H(U.type,X,V,T,f,U.url.length);U.nodes.push(X);if(U.insertBefore){var g=B(U.insertBefore,V);if(g){g.parentNode.insertBefore(X,g)}}else{b.appendChild(X)}if((M.webkit||M.gecko)&&U.type==="css"){C(V,T)}};var G=function(){if(I){return }I=true;for(var T in N){var U=N[T];if(U.autopurge&&U.finished){K(U.tId);delete N[T]}}I=false};var K=function(b){var X=N[b];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,b);if(V){W=V.parentNode}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U])}X.nodes=[]}};var D=function(U,T,V){var X="q"+(J++);V=V||{};if(J%YAHOO.util.Get.PURGE_THRESH===0){G()}N[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=N[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopurge" in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,C,X);return{tId:X}};var H=function(d,Y,X,U,c,b,V){var Z=V||C;if(M.ie){Y.onreadystatechange=function(){var f=this.readyState;if("loaded"===f||"complete"===f){Y.onreadystatechange=null;Z(X,U)}}}else{if(M.webkit){if(d==="script"){if(M.webkit>=420){Y.addEventListener("load",function(){Z(X,U)})}else{var T=N[X];if(T.varName){var W=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/W;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(W,T,function(q){var j=this._cache,g=j.length,f=this.win,k;for(k=0;k<g;k=k+1){f=f[j[k]];if(!f){this.attempts++;if(this.attempts++>this.maxattempts){var n="Over retry limit, giving up";T.timer.cancel();Q(X,n)}else{}return }}T.timer.cancel();Z(X,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,Z,[X,U])}}}}else{Y.onload=function(){Z(X,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,A,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=N[V];if(T){T.aborted=true}},script:function(T,U){return D("script",T,U)},css:function(T,U){return D("css",T,U)}}}();YAHOO.register("get",YAHOO.util.Get,{version:"2.6.0",build:"1321"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{yahoo:true,get:true},info:{root:"2.6.0/build/",base:"http://yui.yahooapis.com/2.6.0/build/",comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["reset","fonts","grids","base"],rollup:3},dupsAllowed:["yahoo","get"],moduleInfo:{animation:{type:"js",path:"animation/animation-min.js",requires:["dom","event"]},autocomplete:{type:"js",path:"autocomplete/autocomplete-min.js",requires:["dom","event","datasource"],optional:["connection","animation"],skinnable:true},base:{type:"css",path:"base/base-min.css",after:["reset","fonts","grids"]},button:{type:"js",path:"button/button-min.js",requires:["element"],optional:["menu"],skinnable:true},calendar:{type:"js",path:"calendar/calendar-min.js",requires:["event","dom"],skinnable:true},carousel:{type:"js",path:"carousel/carousel-beta-min.js",requires:["element"],optional:["animation"],skinnable:true},charts:{type:"js",path:"charts/charts-experimental-min.js",requires:["element","json","datasource"]},colorpicker:{type:"js",path:"colorpicker/colorpicker-min.js",requires:["slider","element"],optional:["animation"],skinnable:true},connection:{type:"js",path:"connection/connection-min.js",requires:["event"]},container:{type:"js",path:"container/container-min.js",requires:["dom","event"],optional:["dragdrop","animation","connection"],supersedes:["containercore"],skinnable:true},containercore:{type:"js",path:"container/container_core-min.js",requires:["dom","event"],pkg:"container"},cookie:{type:"js",path:"cookie/cookie-min.js",requires:["yahoo"]},datasource:{type:"js",path:"datasource/datasource-min.js",requires:["event"],optional:["connection"]},datatable:{type:"js",path:"datatable/datatable-min.js",requires:["element","datasource"],optional:["calendar","dragdrop","paginator"],skinnable:true},dom:{type:"js",path:"dom/dom-min.js",requires:["yahoo"]},dragdrop:{type:"js",path:"dragdrop/dragdrop-min.js",requires:["dom","event"]},editor:{type:"js",path:"editor/editor-min.js",requires:["menu","element","button"],optional:["animation","dragdrop"],supersedes:["simpleeditor"],skinnable:true},element:{type:"js",path:"element/element-beta-min.js",requires:["dom","event"]},event:{type:"js",path:"event/event-min.js",requires:["yahoo"]},fonts:{type:"css",path:"fonts/fonts-min.css"},get:{type:"js",path:"get/get-min.js",requires:["yahoo"]},grids:{type:"css",path:"grids/grids-min.css",requires:["fonts"],optional:["reset"]},history:{type:"js",path:"history/history-min.js",requires:["event"]},imagecropper:{type:"js",path:"imagecropper/imagecropper-beta-min.js",requires:["dom","event","dragdrop","element","resize"],skinnable:true},imageloader:{type:"js",path:"imageloader/imageloader-min.js",requires:["event","dom"]},json:{type:"js",path:"json/json-min.js",requires:["yahoo"]},layout:{type:"js",path:"layout/layout-min.js",requires:["dom","event","element"],optional:["animation","dragdrop","resize","selector"],skinnable:true},logger:{type:"js",path:"logger/logger-min.js",requires:["event","dom"],optional:["dragdrop"],skinnable:true},menu:{type:"js",path:"menu/menu-min.js",requires:["containercore"],skinnable:true},paginator:{type:"js",path:"paginator/paginator-min.js",requires:["element"],skinnable:true},profiler:{type:"js",path:"profiler/profiler-min.js",requires:["yahoo"]},profilerviewer:{type:"js",path:"profilerviewer/profilerviewer-beta-min.js",requires:["profiler","yuiloader","element"],skinnable:true},reset:{type:"css",path:"reset/reset-min.css"},"reset-fonts-grids":{type:"css",path:"reset-fonts-grids/reset-fonts-grids.css",supersedes:["reset","fonts","grids","reset-fonts"],rollup:4},"reset-fonts":{type:"css",path:"reset-fonts/reset-fonts.css",supersedes:["reset","fonts"],rollup:2},resize:{type:"js",path:"resize/resize-min.js",requires:["dom","event","dragdrop","element"],optional:["animation"],skinnable:true},selector:{type:"js",path:"selector/selector-beta-min.js",requires:["yahoo","dom"]},simpleeditor:{type:"js",path:"editor/simpleeditor-min.js",requires:["element"],optional:["containercore","menu","button","animation","dragdrop"],skinnable:true,pkg:"editor"},slider:{type:"js",path:"slider/slider-min.js",requires:["dragdrop"],optional:["animation"],skinnable:true},tabview:{type:"js",path:"tabview/tabview-min.js",requires:["element"],optional:["connection"],skinnable:true},treeview:{type:"js",path:"treeview/treeview-min.js",requires:["event","dom"],skinnable:true},uploader:{type:"js",path:"uploader/uploader-experimental.js",requires:["element"]},utilities:{type:"js",path:"utilities/utilities.js",supersedes:["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],rollup:8},yahoo:{type:"js",path:"yahoo/yahoo-min.js"},"yahoo-dom-event":{type:"js",path:"yahoo-dom-event/yahoo-dom-event.js",supersedes:["yahoo","event","dom"],rollup:3},yuiloader:{type:"js",path:"yuiloader/yuiloader-min.js",supersedes:["yahoo","get"]},"yuiloader-dom-event":{type:"js",path:"yuiloader-dom-event/yuiloader-dom-event.js",supersedes:["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],rollup:5},yuitest:{type:"js",path:"yuitest/yuitest-min.js",requires:["logger"],skinnable:true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i)}}return a}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2)},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i}}return -1},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true}return o},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a))}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name)}});this.skin=lang.merge(YUI.info.skin);this._config(o)};Y.util.YUILoader.prototype={FILTERS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i])}else{this[i]=o[i]}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger")}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y}}this.filter=this.FILTERS[f]}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a)},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({name:name,type:"css",path:sinf.base+skin+"/"+sinf.path,after:sinf.after,rollup:sinf.rollup,ext:ext})}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({name:name,type:"css",after:sinf.after,path:pkg+"/"+sinf.base+skin+"/"+mod+".css",ext:ext})}}return name},getRequires:function(mod){if(!mod){return[]}if(!this.dirty&&mod.expanded){return mod.expanded}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m))}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]))}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o}if(m[ckey]){return m[ckey]}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm))}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i])}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey]},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup()}this._reduce();this._sort();this.dirty=false}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name)}}else{smod=this._addSkin(this.skin.defaultSkin,name)}m.requires.push(smod)}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules)}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore)}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]]}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j))}}this.loaded=l},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req)}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod}return s},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]}}return null},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m}}}this.rollups=rollups}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m)}}}if(!rolled){break}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i]}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j]}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]]}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false})}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true}return false};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i)}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break}}if(moved){break}else{p=p+1}}if(!moved){break}}this.sorted=s},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1)},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target}else{css+=target}this._combining.push(s[i])}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true}this.loadNext(o.data)},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self})}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self})}else{loadScript()}return }else{this.loadNext(this._loading)}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine()}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js")};this.insert(null,"css");return }this.loadNext()},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox")}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js")};this.insert(null,"css");return }if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js")},scope:this},"js");return }this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort()}return }if(m.type!=="js"){this._loadCount++;continue}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data})}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data})}else{this._onFailure.call(this.varName+" reference failure")}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data})},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData))}},loadNext:function(mname){if(!this._loading){return }if(mname){if(mname!==this._loading){return }this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data})}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue}if(s[i]===this._loading){return }m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return }if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data)};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return }}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this)}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data})}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load()}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp),f.replaceStr):str},_url:function(path){var u=this.base||"",f=this.filter;u=u+path;return this._filter(u)}}})();if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var F=arguments,G=null,I,J,H;for(I=0;I<F.length;I=I+1){H=F[I].split(".");G=YAHOO;for(J=(H[0]=="YAHOO")?1:0;J<H.length;J=J+1){G[H[J]]=G[H[J]]||{};G=G[H[J]]}}return G};YAHOO.log=function(F,E,G){var H=YAHOO.widget.Logger;if(H&&H.log){return H.log(F,E,G)}else{return false}};YAHOO.register=function(M,R,J){var N=YAHOO.env.modules;if(!N[M]){N[M]={versions:[],builds:[]}}var L=N[M],O=J.version,P=J.build,Q=YAHOO.env.listeners;L.name=M;L.version=O;L.build=P;L.versions.push(O);L.builds.push(P);L.mainClass=R;for(var K=0;K<Q.length;K=K+1){Q[K](L)}if(R){R.VERSION=O;R.BUILD=P}else{YAHOO.log("mainClass is undefined for module "+M,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(B){return YAHOO.env.modules[B]||null};YAHOO.env.ua=function(){var E={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1]);if(/ Mobile\//.test(F)){E.mobile="Apple"}else{D=F.match(/NokiaN[^\/]*/);if(D){E.mobile=D[0]}}D=F.match(/AdobeAIR\/([^\s]*)/);if(D){E.air=D[0]}}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1]);D=F.match(/Opera Mini[^;]*/);if(D){E.mobile=D[0]}}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1])}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1])}}}}}return E}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var H=YAHOO_config.listener,E=YAHOO.env.listeners,F=true,G;if(H){for(G=0;G<E.length;G=G+1){if(E[G]==H){F=false;break}}if(F){E.push(H)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var D=YAHOO.lang,E=["toString","valueOf"],F={isArray:function(A){if(A){return D.isNumber(A.length)&&D.isFunction(A.splice)}return false},isBoolean:function(A){return typeof A==="boolean"},isFunction:function(A){return typeof A==="function"},isNull:function(A){return A===null},isNumber:function(A){return typeof A==="number"&&isFinite(A)},isObject:function(A){return(A&&(typeof A==="object"||D.isFunction(A)))||false},isString:function(A){return typeof A==="string"},isUndefined:function(A){return typeof A==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(C,I){for(var J=0;J<E.length;J=J+1){var A=E[J],B=I[A];if(D.isFunction(B)&&B!=Object.prototype[A]){C[A]=B}}}:function(){},extend:function(B,A,C){if(!A||!B){throw new Error("extend failed, please check that all dependencies are included.")}var J=function(){};J.prototype=A.prototype;B.prototype=new J();B.prototype.constructor=B;B.superclass=A.prototype;if(A.prototype.constructor==Object.prototype.constructor){A.prototype.constructor=A}if(C){for(var K in C){if(D.hasOwnProperty(C,K)){B.prototype[K]=C[K]}}D._IEEnumFix(B.prototype,C)}},augmentObject:function(B,C){if(!C||!B){throw new Error("Absorb failed, verify dependencies.")}var L=arguments,J,A,K=L[2];if(K&&K!==true){for(J=2;J<L.length;J=J+1){B[L[J]]=C[L[J]]}}else{for(A in C){if(K||!(A in B)){B[A]=C[A]}}D._IEEnumFix(B,C)}},augmentProto:function(A,B){if(!B||!A){throw new Error("Augment failed, verify dependencies.")}var H=[A.prototype,B.prototype];for(var C=2;C<arguments.length;C=C+1){H.push(arguments[C])}D.augmentObject.apply(this,H)},dump:function(A,N){var Q,O,C=[],B="{...}",R="f(){...}",M=", ",P=" => ";if(!D.isObject(A)){return A+""}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A}else{if(D.isFunction(A)){return R}}}N=(D.isNumber(N))?N:3;if(D.isArray(A)){C.push("[");for(Q=0,O=A.length;Q<O;Q=Q+1){if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B)}else{C.push(A[Q])}C.push(M)}if(C.length>1){C.pop()}C.push("]")}else{C.push("{");for(Q in A){if(D.hasOwnProperty(A,Q)){C.push(Q+P);if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B)}else{C.push(A[Q])}C.push(M)}}if(C.length>1){C.pop()}C.push("}")}return C.join("")},substitute:function(B,j,Y){var c,d,f,V,U,C,W=[],g,b="dump",X=" ",A="{",T="}";for(;;){c=B.lastIndexOf(A);if(c<0){break}d=B.indexOf(T,c);if(c+1>=d){break}g=B.substring(c+1,d);V=g;C=null;f=V.indexOf(X);if(f>-1){C=V.substring(f+1);V=V.substring(0,f)}U=j[V];if(Y){U=Y(V,U,C)}if(D.isObject(U)){if(D.isArray(U)){U=D.dump(U,parseInt(C,10))}else{C=C||"";var Z=C.indexOf(b);if(Z>-1){C=C.substring(4)}if(U.toString===Object.prototype.toString||Z>-1){U=D.dump(U,parseInt(C,10))}else{U=U.toString()}}}else{if(!D.isString(U)&&!D.isNumber(U)){U="~-"+W.length+"-~";W[W.length]=g}}B=B.substring(0,c)+U+B.substring(d+1)}for(c=W.length-1;c>=0;c=c-1){B=B.replace(new RegExp("~-"+c+"-~"),"{"+W[c]+"}","g")}return B},trim:function(B){try{return B.replace(/^\s+|\s+$/g,"")}catch(A){return B}},merge:function(){var A={},C=arguments;for(var B=0,H=C.length;B<H;B=B+1){D.augmentObject(A,C[B],true)}return A},later:function(C,R,B,P,O){C=C||0;R=R||{};var Q=B,M=P,N,A;if(D.isString(B)){Q=R[B]}if(!Q){throw new TypeError("method undefined")}if(!D.isArray(M)){M=[P]}N=function(){Q.apply(R,M)};A=(O)?setInterval(N,C):setTimeout(N,C);return{interval:O,cancel:function(){if(this.interval){clearInterval(A)}else{clearTimeout(A)}}}},isValue:function(A){return(D.isObject(A)||D.isString(A)||D.isNumber(A)||D.isBoolean(A))}};D.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(B,A){return B&&B.hasOwnProperty(A)}:function(B,A){return !D.isUndefined(B[A])&&B.constructor.prototype[A]!==B[A]};F.augmentObject(D,F,true);YAHOO.util.Lang=D;D.augment=D.augmentProto;YAHOO.augment=D.augmentProto;YAHOO.extend=D.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});(function(){var S=YAHOO.util,g=YAHOO.lang,Y,b,Z={},f={},W=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var R=YAHOO.env.ua.opera,X=YAHOO.env.ua.webkit,T=YAHOO.env.ua.gecko,d=YAHOO.env.ua.ie;var j={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var V=function(B){if(!j.HYPHEN.test(B)){return B}if(Z[B]){return Z[B]}var A=B;while(j.HYPHEN.exec(A)){A=A.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}Z[B]=A;return A};var U=function(A){var B=f[A];if(!B){B=new RegExp("(?:^|\\s+)"+A+"(?:\\s+|$)");f[A]=B}return B};if(W.defaultView&&W.defaultView.getComputedStyle){Y=function(D,A){var B=null;if(A=="float"){A="cssFloat"}var C=D.ownerDocument.defaultView.getComputedStyle(D,"");if(C){B=C[V(A)]}return D.style[A]||B}}else{if(W.documentElement.currentStyle&&d){Y=function(E,C){switch(V(C)){case"opacity":var A=100;try{A=E.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(B){try{A=E.filters("alpha").opacity}catch(B){}}return A/100;case"float":C="styleFloat";default:var D=E.currentStyle?E.currentStyle[C]:null;return(E.style[C]||D)}}}else{Y=function(B,A){return B.style[A]}}}if(d){b=function(C,B,A){switch(B){case"opacity":if(g.isString(C.style.filter)){C.style.filter="alpha(opacity="+A*100+")";if(!C.currentStyle||!C.currentStyle.hasLayout){C.style.zoom=1}}break;case"float":B="styleFloat";default:C.style[B]=A}}}else{b=function(C,B,A){if(B=="float"){B="cssFloat"}C.style[B]=A}}var Q=function(B,A){return B&&B.nodeType==1&&(!A||A(B))};YAHOO.util.Dom={get:function(B){if(B){if(B.nodeType||B.item){return B}if(typeof B==="string"){return W.getElementById(B)}if("length" in B){var A=[];for(var C=0,D=B.length;C<D;++C){A[A.length]=S.Dom.get(B[C])}return A}return B}return null},getStyle:function(C,A){A=V(A);var B=function(D){return Y(D,A)};return S.Dom.batch(C,B,S.Dom,true)},setStyle:function(D,B,A){B=V(B);var C=function(E){b(E,B,A)};S.Dom.batch(D,C,S.Dom,true)},getXY:function(B){var A=function(C){if((C.parentNode===null||C.offsetParent===null||this.getStyle(C,"display")=="none")&&C!=C.ownerDocument.body){return false}return c(C)};return S.Dom.batch(B,A,S.Dom,true)},getX:function(B){var A=function(C){return S.Dom.getXY(C)[0]};return S.Dom.batch(B,A,S.Dom,true)},getY:function(B){var A=function(C){return S.Dom.getXY(C)[1]};return S.Dom.batch(B,A,S.Dom,true)},setXY:function(D,A,B){var C=function(E){var F=this.getStyle(E,"position");if(F=="static"){this.setStyle(E,"position","relative");F="relative"}var H=this.getXY(E);if(H===false){return false}var I=[parseInt(this.getStyle(E,"left"),10),parseInt(this.getStyle(E,"top"),10)];if(isNaN(I[0])){I[0]=(F=="relative")?0:E.offsetLeft}if(isNaN(I[1])){I[1]=(F=="relative")?0:E.offsetTop}if(A[0]!==null){E.style.left=A[0]-H[0]+I[0]+"px"}if(A[1]!==null){E.style.top=A[1]-H[1]+I[1]+"px"}if(!B){var G=this.getXY(E);if((A[0]!==null&&G[0]!=A[0])||(A[1]!==null&&G[1]!=A[1])){this.setXY(E,A,true)}}};S.Dom.batch(D,C,S.Dom,true)},setX:function(A,B){S.Dom.setXY(A,[B,null])},setY:function(B,A){S.Dom.setXY(B,[null,A])},getRegion:function(B){var A=function(D){if((D.parentNode===null||D.offsetParent===null||this.getStyle(D,"display")=="none")&&D!=D.ownerDocument.body){return false}var C=S.Region.getRegion(D);return C};return S.Dom.batch(B,A,S.Dom,true)},getClientWidth:function(){return S.Dom.getViewportWidth()},getClientHeight:function(){return S.Dom.getViewportHeight()},getElementsByClassName:function(E,A,D,C){E=g.trim(E);A=A||"*";D=(D)?S.Dom.get(D):null||W;if(!D){return[]}var H=[],I=D.getElementsByTagName(A),B=U(E);for(var G=0,F=I.length;G<F;++G){if(B.test(I[G].className)){H[H.length]=I[G];if(C){C.call(I[G],I[G])}}}return H},hasClass:function(B,C){var D=U(C);var A=function(E){return D.test(E.className)};return S.Dom.batch(B,A,S.Dom,true)},addClass:function(B,C){var A=function(D){if(this.hasClass(D,C)){return false}D.className=g.trim([D.className,C].join(" "));return true};return S.Dom.batch(B,A,S.Dom,true)},removeClass:function(B,C){var D=U(C);var A=function(E){var F=false,H=E.className;if(C&&H&&this.hasClass(E,C)){E.className=H.replace(D," ");if(this.hasClass(E,C)){this.removeClass(E,C)}E.className=g.trim(E.className);if(E.className===""){var G=(E.hasAttribute)?"class":"className";E.removeAttribute(G)}F=true}return F};return S.Dom.batch(B,A,S.Dom,true)},replaceClass:function(B,D,E){if(!E||D===E){return false}var C=U(D);var A=function(F){if(!this.hasClass(F,D)){this.addClass(F,E);return true}F.className=F.className.replace(C," "+E+" ");if(this.hasClass(F,D)){this.removeClass(F,D)}F.className=g.trim(F.className);return true};return S.Dom.batch(B,A,S.Dom,true)},generateId:function(C,A){A=A||"yui-gen";var B=function(E){if(E&&E.id){return E.id}var D=A+YAHOO.env._id_counter++;if(E){E.id=D}return D};return S.Dom.batch(C,B,S.Dom,true)||B.apply(S.Dom,arguments)},isAncestor:function(B,A){B=S.Dom.get(B);A=S.Dom.get(A);var C=false;if((B&&A)&&(B.nodeType&&A.nodeType)){if(B.contains&&B!==A){C=B.contains(A)}else{if(B.compareDocumentPosition){C=!!(B.compareDocumentPosition(A)&16)}}}else{}return C},inDocument:function(A){return this.isAncestor(W.documentElement,A)},getElementsBy:function(H,F,E,C){F=F||"*";E=(E)?S.Dom.get(E):null||W;if(!E){return[]}var D=[],A=E.getElementsByTagName(F);for(var B=0,G=A.length;B<G;++B){if(H(A[B])){D[D.length]=A[B];if(C){C(A[B])}}}return D},batch:function(C,H,A,E){C=(C&&(C.tagName||C.item))?C:S.Dom.get(C);if(!C||!H){return false}var D=(E)?A:window;if(C.tagName||C.length===undefined){return H.call(D,C,A)}var B=[];for(var F=0,G=C.length;F<G;++F){B[B.length]=H.call(D,C[F],A)}return B},getDocumentHeight:function(){var A=(W.compatMode!="CSS1Compat")?W.body.scrollHeight:W.documentElement.scrollHeight;var B=Math.max(A,S.Dom.getViewportHeight());return B},getDocumentWidth:function(){var A=(W.compatMode!="CSS1Compat")?W.body.scrollWidth:W.documentElement.scrollWidth;var B=Math.max(A,S.Dom.getViewportWidth());return B},getViewportHeight:function(){var B=self.innerHeight;var A=W.compatMode;if((A||d)&&!R){B=(A=="CSS1Compat")?W.documentElement.clientHeight:W.body.clientHeight}return B},getViewportWidth:function(){var B=self.innerWidth;var A=W.compatMode;if(A||d){B=(A=="CSS1Compat")?W.documentElement.clientWidth:W.body.clientWidth}return B},getAncestorBy:function(B,A){while((B=B.parentNode)){if(Q(B,A)){return B}}return null},getAncestorByClassName:function(B,C){B=S.Dom.get(B);if(!B){return null}var A=function(D){return S.Dom.hasClass(D,C)};return S.Dom.getAncestorBy(B,A)},getAncestorByTagName:function(B,C){B=S.Dom.get(B);if(!B){return null}var A=function(D){return D.tagName&&D.tagName.toUpperCase()==C.toUpperCase()};return S.Dom.getAncestorBy(B,A)},getPreviousSiblingBy:function(B,A){while(B){B=B.previousSibling;if(Q(B,A)){return B}}return null},getPreviousSibling:function(A){A=S.Dom.get(A);if(!A){return null}return S.Dom.getPreviousSiblingBy(A)},getNextSiblingBy:function(B,A){while(B){B=B.nextSibling;if(Q(B,A)){return B}}return null},getNextSibling:function(A){A=S.Dom.get(A);if(!A){return null}return S.Dom.getNextSiblingBy(A)},getFirstChildBy:function(C,A){var B=(Q(C.firstChild,A))?C.firstChild:null;return B||S.Dom.getNextSiblingBy(C.firstChild,A)},getFirstChild:function(B,A){B=S.Dom.get(B);if(!B){return null}return S.Dom.getFirstChildBy(B)},getLastChildBy:function(C,A){if(!C){return null}var B=(Q(C.lastChild,A))?C.lastChild:null;return B||S.Dom.getPreviousSiblingBy(C.lastChild,A)},getLastChild:function(A){A=S.Dom.get(A);return S.Dom.getLastChildBy(A)},getChildrenBy:function(C,A){var B=S.Dom.getFirstChildBy(C,A);var D=B?[B]:[];S.Dom.getNextSiblingBy(B,function(E){if(!A||A(E)){D[D.length]=E}return false});return D},getChildren:function(A){A=S.Dom.get(A);if(!A){}return S.Dom.getChildrenBy(A)},getDocumentScrollLeft:function(A){A=A||W;return Math.max(A.documentElement.scrollLeft,A.body.scrollLeft)},getDocumentScrollTop:function(A){A=A||W;return Math.max(A.documentElement.scrollTop,A.body.scrollTop)},insertBefore:function(A,B){A=S.Dom.get(A);B=S.Dom.get(B);if(!A||!B||!B.parentNode){return null}return B.parentNode.insertBefore(A,B)},insertAfter:function(A,B){A=S.Dom.get(A);B=S.Dom.get(B);if(!A||!B||!B.parentNode){return null}if(B.nextSibling){return B.parentNode.insertBefore(A,B.nextSibling)}else{return B.parentNode.appendChild(A)}},getClientRegion:function(){var B=S.Dom.getDocumentScrollTop(),C=S.Dom.getDocumentScrollLeft(),A=S.Dom.getViewportWidth()+C,D=S.Dom.getViewportHeight()+B;return new S.Region(B,A,D,C)}};var c=function(){if(W.documentElement.getBoundingClientRect){return function(B){var A=B.getBoundingClientRect(),C=Math.round;var D=B.ownerDocument;return[C(A.left+S.Dom.getDocumentScrollLeft(D)),C(A.top+S.Dom.getDocumentScrollTop(D))]}}else{return function(B){var A=[B.offsetLeft,B.offsetTop];var C=B.offsetParent;var D=(X&&S.Dom.getStyle(B,"position")=="absolute"&&B.offsetParent==B.ownerDocument.body);if(C!=B){while(C){A[0]+=C.offsetLeft;A[1]+=C.offsetTop;if(!D&&X&&S.Dom.getStyle(C,"position")=="absolute"){D=true}C=C.offsetParent}}if(D){A[0]-=B.ownerDocument.body.offsetLeft;A[1]-=B.ownerDocument.body.offsetTop}C=B.parentNode;while(C.tagName&&!j.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft){A[0]-=C.scrollLeft;A[1]-=C.scrollTop}C=C.parentNode}return A}}}()})();YAHOO.util.Region=function(G,F,E,H){this.top=G;this[1]=G;this.right=F;this.bottom=E;this.left=H;this[0]=H};YAHOO.util.Region.prototype.contains=function(B){return(B.left>=this.left&&B.right<=this.right&&B.top>=this.top&&B.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(G){var I=Math.max(this.top,G.top);var H=Math.min(this.right,G.right);var F=Math.min(this.bottom,G.bottom);var J=Math.max(this.left,G.left);if(F>=I&&H>=J){return new YAHOO.util.Region(I,H,F,J)}else{return null}};YAHOO.util.Region.prototype.union=function(G){var I=Math.min(this.top,G.top);var H=Math.max(this.right,G.right);var F=Math.max(this.bottom,G.bottom);var J=Math.min(this.left,G.left);return new YAHOO.util.Region(I,H,F,J)};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(J){var H=YAHOO.util.Dom.getXY(J);var K=H[1];var I=H[0]+J.offsetWidth;var G=H[1]+J.offsetHeight;var L=H[0];return new YAHOO.util.Region(K,I,G,L)};YAHOO.util.Point=function(C,D){if(YAHOO.lang.isArray(C)){D=C[1];C=C[0]}this.x=this.right=this.left=this[0]=C;this.y=this.top=this.bottom=this[1]=D};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(H,J,I,F){this.type=H;this.scope=J||window;this.silent=I;this.signature=F||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var G="_YUICEOnSubscribe";if(H!==G){this.subscribeEvent=new YAHOO.util.CustomEvent(G,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(F,E,D){if(!F){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(F,E,D)}this.subscribers.push(new YAHOO.util.Subscriber(F,E,D))},unsubscribe:function(J,H){if(!J){return this.unsubscribeAll()}var I=false;for(var L=0,G=this.subscribers.length;L<G;++L){var K=this.subscribers[L];if(K&&K.contains(J,H)){this._delete(L);I=true}}return I},fire:function(){this.lastError=null;var T=[],Z=this.subscribers.length;if(!Z&&this.silent){return true}var V=[].slice.call(arguments,0),X=true,N,U=false;if(!this.silent){}var O=this.subscribers.slice(),Q=YAHOO.util.Event.throwErrors;for(N=0;N<Z;++N){var R=O[N];if(!R){U=true}else{if(!this.silent){}var S=R.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var P=null;if(V.length>0){P=V[0]}try{X=R.fn.call(S,P,R.obj)}catch(Y){this.lastError=Y;if(Q){throw Y}}}else{try{X=R.fn.call(S,this.type,V,R.obj)}catch(W){this.lastError=W;if(Q){throw W}}}if(false===X){if(!this.silent){}break}}}return(X!==false)},unsubscribeAll:function(){for(var B=this.subscribers.length-1;B>-1;B--){this._delete(B)}this.subscribers=[];return B},_delete:function(C){var D=this.subscribers[C];if(D){delete D.fn;delete D.obj}this.subscribers.splice(C,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(F,E,D){this.fn=F;this.obj=YAHOO.lang.isUndefined(E)?null:E;this.override=D};YAHOO.util.Subscriber.prototype.getScope=function(B){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return B};YAHOO.util.Subscriber.prototype.contains=function(C,D){if(D){return(this.fn==C&&this.obj==D)}else{return(this.fn==C)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var U=false;var T=[];var S=[];var V=[];var X=[];var N=0;var W=[];var O=[];var P=0;var M={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var R=YAHOO.env.ua.ie?"focusin":"focus";var Q=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var B=this;var A=function(){B._tryPreloadAttach()};this._interval=setInterval(A,this.POLL_INTERVAL)}},onAvailable:function(B,E,A,C,D){var G=(YAHOO.lang.isString(B))?[B]:B;for(var F=0;F<G.length;F=F+1){W.push({id:G[F],fn:E,obj:A,override:C,checkReady:D})}N=this.POLL_RETRYS;this.startInterval()},onContentReady:function(B,D,A,C){this.onAvailable(B,D,A,C,true)},onDOMReady:function(C,A,B){if(this.DOMReady){setTimeout(function(){var D=window;if(B){if(B===true){D=A}else{D=B}}C.call(D,"DOMReady",[],A)},0)}else{this.DOMReadyEvent.subscribe(C,A,B)}},_addListener:function(L,d,C,H,c,g){if(!C||!C.call){return false}if(this._isValidCollection(L)){var B=true;for(var G=0,E=L.length;G<E;++G){B=this._addListener(L[G],d,C,H,c,g)&&B}return B}else{if(YAHOO.lang.isString(L)){var I=this.getEl(L);if(I){L=I}else{this.onAvailable(L,function(){YAHOO.util.Event._addListener(L,d,C,H,c,g)});return true}}}if(!L){return false}if("unload"==d&&H!==this){S[S.length]=[L,d,C,H,c,g];return true}var f=L;if(c){if(c===true){f=H}else{f=c}}var K=function(Y){return C.call(f,YAHOO.util.Event.getEvent(Y,L),H)};var A=[L,d,C,K,f,H,c,g];var F=T.length;T[F]=A;if(this.useLegacyEvent(L,d)){var J=this.getLegacyIndex(L,d);if(J==-1||L!=V[J][0]){J=V.length;O[L.id+d]=J;V[J]=[L,d,L["on"+d]];X[J]=[];L["on"+d]=function(Y){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Y),J)}}X[J].push(A)}else{try{this._simpleAdd(L,d,K,g)}catch(D){this.lastError=D;this._removeListener(L,d,C,g);return false}}return true},addListener:function(C,A,D,B,E){return this._addListener(C,A,D,B,E,false)},addFocusListener:function(B,C,A,D){return this._addListener(B,R,C,A,D,true)},removeFocusListener:function(A,B){return this._removeListener(A,R,B,true)},addBlurListener:function(B,C,A,D){return this._addListener(B,Q,C,A,D,true)},removeBlurListener:function(A,B){return this._removeListener(A,Q,B,true)},fireLegacyEvent:function(F,H){var D=true,J,B,C,A,E;B=X[H].slice();for(var I=0,G=B.length;I<G;++I){C=B[I];if(C&&C[this.WFN]){A=C[this.ADJ_SCOPE];E=C[this.WFN].call(A,F);D=(D&&E)}}J=V[H];if(J&&J[2]){J[2](F)}return D},getLegacyIndex:function(B,A){var C=this.generateId(B)+A;if(typeof O[C]=="undefined"){return -1}else{return O[C]}},useLegacyEvent:function(B,A){return(this.webkit&&this.webkit<419&&("click"==A||"dblclick"==A))},_removeListener:function(L,Z,D,A){var I,F,B;if(typeof L=="string"){L=this.getEl(L)}else{if(this._isValidCollection(L)){var C=true;for(I=L.length-1;I>-1;I--){C=(this._removeListener(L[I],Z,D,A)&&C)}return C}}if(!D||!D.call){return this.purgeElement(L,false,Z)}if("unload"==Z){for(I=S.length-1;I>-1;I--){B=S[I];if(B&&B[0]==L&&B[1]==Z&&B[2]==D){S.splice(I,1);return true}}return false}var H=null;var G=arguments[4];if("undefined"===typeof G){G=this._getCacheIndex(L,Z,D)}if(G>=0){H=T[G]}if(!L||!H){return false}if(this.useLegacyEvent(L,Z)){var J=this.getLegacyIndex(L,Z);var K=X[J];if(K){for(I=0,F=K.length;I<F;++I){B=K[I];if(B&&B[this.EL]==L&&B[this.TYPE]==Z&&B[this.FN]==D){K.splice(I,1);break}}}}else{try{this._simpleRemove(L,Z,H[this.WFN],A)}catch(E){this.lastError=E;return false}}delete T[G][this.WFN];delete T[G][this.FN];T.splice(G,1);return true},removeListener:function(B,A,C){return this._removeListener(B,A,C,false)},getTarget:function(A,B){var C=A.target||A.srcElement;return this.resolveTextNode(C)},resolveTextNode:function(A){try{if(A&&3==A.nodeType){return A.parentNode}}catch(B){}return A},getPageX:function(A){var B=A.pageX;if(!B&&0!==B){B=A.clientX||0;if(this.isIE){B+=this._getScrollLeft()}}return B},getPageY:function(B){var A=B.pageY;if(!A&&0!==A){A=B.clientY||0;if(this.isIE){A+=this._getScrollTop()}}return A},getXY:function(A){return[this.getPageX(A),this.getPageY(A)]},getRelatedTarget:function(A){var B=A.relatedTarget;if(!B){if(A.type=="mouseout"){B=A.toElement}else{if(A.type=="mouseover"){B=A.fromElement}}}return this.resolveTextNode(B)},getTime:function(A){if(!A.time){var B=new Date().getTime();try{A.time=B}catch(C){this.lastError=C;return B}}return A.time},stopEvent:function(A){this.stopPropagation(A);this.preventDefault(A)},stopPropagation:function(A){if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}},preventDefault:function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}},getEvent:function(B,D){var C=B||window.event;if(!C){var A=this.getEvent.caller;while(A){C=A.arguments[0];if(C&&Event==C.constructor){break}A=A.caller}}return C},getCharCode:function(A){var B=A.keyCode||A.charCode||0;if(YAHOO.env.ua.webkit&&(B in M)){B=M[B]}return B},_getCacheIndex:function(B,A,C){for(var D=0,E=T.length;D<E;D=D+1){var F=T[D];if(F&&F[this.FN]==C&&F[this.EL]==B&&F[this.TYPE]==A){return D}}return -1},generateId:function(B){var A=B.id;if(!A){A="yuievtautoid-"+P;++P;B.id=A}return A},_isValidCollection:function(A){try{return(A&&typeof A!=="string"&&A.length&&!A.tagName&&!A.alert&&typeof A[0]!=="undefined")}catch(B){return false}},elCache:{},getEl:function(A){return(typeof A==="string")?document.getElementById(A):A},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(A){if(!U){U=true;var B=YAHOO.util.Event;B._ready();B._tryPreloadAttach()}},_ready:function(A){var B=YAHOO.util.Event;if(!B.DOMReady){B.DOMReady=true;B.DOMReadyEvent.fire();B._simpleRemove(document,"DOMContentLoaded",B._ready)}},_tryPreloadAttach:function(){if(W.length===0){N=0;clearInterval(this._interval);this._interval=null;return }if(this.locked){return }if(this.isIE){if(!this.DOMReady){this.startInterval();return }}this.locked=true;var B=!U;if(!B){B=(N>0&&W.length>0)}var C=[];var A=function(J,I){var K=J;if(I.override){if(I.override===true){K=I.obj}else{K=I.override}}I.fn.call(K,I.obj)};var G,H,D,E,F=[];for(G=0,H=W.length;G<H;G=G+1){D=W[G];if(D){E=this.getEl(D.id);if(E){if(D.checkReady){if(U||E.nextSibling||!B){F.push(D);W[G]=null}}else{A(E,D);W[G]=null}}else{C.push(D)}}}for(G=0,H=F.length;G<H;G=G+1){D=F[G];A(this.getEl(D.id),D)}N--;if(B){for(G=W.length-1;G>-1;G--){D=W[G];if(!D||!D.id){W.splice(G,1)}}this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false},purgeElement:function(D,C,A){var F=(YAHOO.lang.isString(D))?this.getEl(D):D;var B=this.getListeners(F,A),E,H;if(B){for(E=B.length-1;E>-1;E--){var G=B[E];this._removeListener(F,G.type,G.fn,G.capture)}}if(C&&F&&F.childNodes){for(E=0,H=F.childNodes.length;E<H;++E){this.purgeElement(F.childNodes[E],C,A)}}},getListeners:function(H,J){var E=[],I;if(!J){I=[T,S]}else{if(J==="unload"){I=[S]}else{I=[T]}}var C=(YAHOO.lang.isString(H))?this.getEl(H):H;for(var F=0;F<I.length;F=F+1){var A=I[F];if(A){for(var D=0,B=A.length;D<B;++D){var G=A[D];if(G&&G[this.EL]===C&&(!J||J===G[this.TYPE])){E.push({type:G[this.TYPE],fn:G[this.FN],obj:G[this.OBJ],adjust:G[this.OVERRIDE],scope:G[this.ADJ_SCOPE],capture:G[this.CAPTURE],index:D})}}}}return(E.length)?E:null},_unload:function(C){var I=YAHOO.util.Event,F,G,H,D,E,B=S.slice();for(F=0,D=S.length;F<D;++F){H=B[F];if(H){var A=window;if(H[I.ADJ_SCOPE]){if(H[I.ADJ_SCOPE]===true){A=H[I.UNLOAD_OBJ]}else{A=H[I.ADJ_SCOPE]}}H[I.FN].call(A,I.getEvent(C,H[I.EL]),H[I.UNLOAD_OBJ]);B[F]=null;H=null;A=null}}S=null;if(T){for(G=T.length-1;G>-1;G--){H=T[G];if(H){I._removeListener(H[I.EL],H[I.TYPE],H[I.FN],H[I.CAPTURE],G)}}H=null}V=null;I._simpleRemove(window,"unload",I._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var B=document.documentElement,A=document.body;if(B&&(B.scrollTop||B.scrollLeft)){return[B.scrollTop,B.scrollLeft]}else{if(A){return[A.scrollTop,A.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(B,A,C,D){B.addEventListener(A,C,(D))}}else{if(window.attachEvent){return function(B,A,C,D){B.attachEvent("on"+A,C)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(B,A,C,D){B.removeEventListener(A,C,(D))}}else{if(window.detachEvent){return function(B,A,C){B.detachEvent("on"+A,C)}}else{return function(){}}}}()}}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;A.onFocus=A.addFocusListener;A.onBlur=A.addBlurListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B=document.createElement("p");A._dri=setInterval(function(){try{B.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();B=null}catch(C){}},A.POLL_INTERVAL)}else{if(A.webkit&&A.webkit<525){A._dri=setInterval(function(){var C=document.readyState;if("loaded"==C||"complete"==C){clearInterval(A._dri);A._dri=null;A._ready()}},A.POLL_INTERVAL)}else{A._simpleAdd(document,"DOMContentLoaded",A._ready)}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(G,K,H,I){this.__yui_events=this.__yui_events||{};var J=this.__yui_events[G];if(J){J.subscribe(K,H,I)}else{this.__yui_subscribers=this.__yui_subscribers||{};var L=this.__yui_subscribers;if(!L[G]){L[G]=[]}L[G].push({fn:K,obj:H,override:I})}},unsubscribe:function(M,K,I){this.__yui_events=this.__yui_events||{};var H=this.__yui_events;if(M){var J=H[M];if(J){return J.unsubscribe(K,I)}}else{var N=true;for(var L in H){if(YAHOO.lang.hasOwnProperty(H,L)){N=N&&H[L].unsubscribe(K,I)}}return N}return false},unsubscribeAll:function(B){return this.unsubscribe(B)},createEvent:function(P,J){this.__yui_events=this.__yui_events||{};var M=J||{};var N=this.__yui_events;if(N[P]){}else{var O=M.scope||this;var R=(M.silent);var L=new YAHOO.util.CustomEvent(P,O,R,YAHOO.util.CustomEvent.FLAT);N[P]=L;if(M.onSubscribeCallback){L.subscribeEvent.subscribe(M.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var Q=this.__yui_subscribers[P];if(Q){for(var K=0;K<Q.length;++K){L.subscribe(Q[K].fn,Q[K].obj,Q[K].override)}}}return N[P]},fireEvent:function(K,L,H,M){this.__yui_events=this.__yui_events||{};var I=this.__yui_events[K];if(!I){return null}var N=[];for(var J=1;J<arguments.length;++J){N.push(arguments[J])}return I.fire.apply(I,N)},hasEvent:function(B){if(this.__yui_events){if(this.__yui_events[B]){return true}}return false}};YAHOO.util.KeyListener=function(G,H,L,K){if(!G){}else{if(!H){}else{if(!L){}}}if(!K){K=YAHOO.util.KeyListener.KEYDOWN}var J=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof G=="string"){G=document.getElementById(G)}if(typeof L=="function"){J.subscribe(L)}else{J.subscribe(L.fn,L.scope,L.correctScope)}function I(A,B){if(!H.shift){H.shift=false}if(!H.alt){H.alt=false}if(!H.ctrl){H.ctrl=false}if(A.shiftKey==H.shift&&A.altKey==H.alt&&A.ctrlKey==H.ctrl){var D;if(H.keys instanceof Array){for(var C=0;C<H.keys.length;C++){D=H.keys[C];if(D==A.charCode){J.fire(A.charCode,A);break}else{if(D==A.keyCode){J.fire(A.keyCode,A);break}}}}else{D=H.keys;if(D==A.charCode){J.fire(A.charCode,A)}else{if(D==A.keyCode){J.fire(A.keyCode,A)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(G,K,I);this.enabledEvent.fire(H)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(G,K,I);this.disabledEvent.fire(H)}this.enabled=false};this.toString=function(){return"KeyListener ["+H.keys+"] "+G.tagName+(G.id?"["+G.id+"]":"")}};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.6.0",build:"1321"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.6.0",build:"1321"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild)}else{document.body.appendChild(C)}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5"}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block"}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue}G[E].apply(G,D)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(C){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init()}if(!this.ids[C]){this.ids[C]={}}this.ids[C][D.id]=D},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={}}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id]}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id]}}}delete this.handleIds[E.id]},regHandle:function(C,D){if(!this.handleIds[C]){this.handleIds[C]={}}this.handleIds[C][D]=D},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,F){var G=[];for(var E in H.groups){for(var D in this.ids[E]){var C=this.ids[E][D];if(!this.isTypeOfDD(C)){continue}if(!F||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var E=this.getRelated(G,true);for(var D=0,C=E.length;D<C;++D){if(E[D].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(C,D){return(this.handleIds[C]&&this.handleIds[C][D])},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D]}}return null},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true},this.clickTimeThresh)},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E})}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E})}this.dragThreshMet=true},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C)}this.fromTimeout=false;this.fireEvents(C,true)}else{}this.stopDrag(C);this.stopEvent(C)}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C)}if(this.preventDefault){YAHOO.util.Event.preventDefault(C)}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E})}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E})}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E})}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false}}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F)}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F})}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F})}if(C){this.fireEvents(F,false)}}this.stopEvent(F)}},fireEvents:function(U,G){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return }var M=YAHOO.util.Event.getPageX(U),L=YAHOO.util.Event.getPageY(U),P=new YAHOO.util.Point(M,L),K=c.getTargetCoord(P.x,P.y),E=c.getDragEl(),N=["out","over","drop","enter"],Q=new YAHOO.util.Region(K.y,K.x+E.offsetWidth,K.y+E.offsetHeight,K.x),I=[],D={},Y=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var R in this.dragOvers){var f=this.dragOvers[R];if(!this.isTypeOfDD(f)){continue}if(!this.isOverTarget(P,f,this.mode,Q)){d.outEvts.push(f)}I[R]=true;delete this.dragOvers[R]}for(var T in c.groups){if("string"!=typeof T){continue}for(R in this.ids[T]){var F=this.ids[T][R];if(!this.isTypeOfDD(F)){continue}if(F.isTarget&&!F.isLocked()&&F!=c){if(this.isOverTarget(P,F,this.mode,Q)){D[T]=true;if(G){d.dropEvts.push(F)}else{if(!I[F.id]){d.enterEvts.push(F)}else{d.overEvts.push(F)}this.dragOvers[F.id]=F}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:P,draggedRegion:Q,sourceRegion:this.locationCache[c.id],validDrop:G};for(var C in D){Y.push(C)}if(G&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(U);c.fireEvent("invalidDropEvent",{e:U})}}for(R=0;R<N.length;R++){var X=null;if(d[N[R]+"Evts"]){X=d[N[R]+"Evts"]}if(X&&X.length){var H=N[R].charAt(0).toUpperCase()+N[R].substr(1),W="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",V="drag"+H;if(this.mode){if(c.events[J]){c[J](U,X,Y);c.fireEvent(J+"Event",{event:U,info:X,group:Y})}if(c.events[V]){c[W](U,X,Y);c.fireEvent(O,{event:U,info:X,group:Y})}}else{for(var Z=0,S=X.length;Z<S;++Z){if(c.events[J]){c[J](U,X[Z].id,Y[0]);c.fireEvent(J+"Event",{event:U,info:X[Z].id,group:Y[0]})}if(c.events[V]){c[W](U,X[Z].id,Y[0]);c.fireEvent(O,{event:U,info:X[Z].id,group:Y[0]})}}}}}},getBestMatch:function(F){var E=null;var D=F.length;if(D==1){E=F[0]}else{for(var G=0;G<D;++G){var C=F[G];if(this.mode==this.INTERSECT&&C.cursorIsOver){E=C;break}else{if(!E||!E.overlap||(C.overlap&&E.overlap.getArea()<C.overlap.getArea())){E=C}}}}return E},refreshCache:function(F){var D=F||this.ids;for(var E in D){if("string"!=typeof E){continue}for(var C in this.ids[E]){var G=this.ids[E][C];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H}else{delete this.locationCache[G.id]}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true}}}catch(E){}return false},getLocation:function(H){if(!this.isTypeOfDD(H)){return null}var F=H.getEl(),L,E,D,M,K,N,C,J,G;try{L=YAHOO.util.Dom.getXY(F)}catch(I){}if(!L){return null}E=L[0];D=E+F.offsetWidth;M=L[1];K=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=K+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,G,D,E){var F=this.locationCache[G.id];if(!F||!this.useCache){F=this.getLocation(G);this.locationCache[G.id]=F}if(!F){return false}G.cursorIsOver=F.contains(K);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return G.cursorIsOver}G.overlap=null;if(!E){var H=I.getTargetCoord(K.x,K.y);var C=I.getDragEl();E=new YAHOO.util.Region(H.y,H.x+C.offsetWidth,H.y+C.offsetHeight,H.x)}var J=E.intersect(F);if(J){G.overlap=J;return(D)?true:G.cursorIsOver}else{return false}},_onUnload:function(D,C){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D))}return C},getElement:function(C){return YAHOO.util.Dom.get(C)},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style},getPosX:function(C){return YAHOO.util.Dom.getX(C)},getPosY:function(C){return YAHOO.util.Dom.getY(C)},swapNode:function(E,C){if(E.swapNode){E.swapNode(C)}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C)}else{if(C==E.nextSibling){F.insertBefore(C,E)}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D)}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft}else{if(D){E=D.scrollTop;C=D.scrollLeft}else{}}return{top:E,left:C}},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(D,C){return(D-C)},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad()}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true}else{D=D.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,D,C){if(E){this.init(E,D,C)}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments)},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},unlock:function(){this.locked=false},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id)}return this._domRef},getDragEl:function(){return B.get(this.dragElId)},init:function(F,E,D){this.initTarget(F,E,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var C in this.events){this.createEvent(C+"Event")}},initTarget:function(E,D,C){this.config=C||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E)}this.id=E;this.addToGroup((D)?D:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig()},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E]}else{if(!F&&0!==F){this.padding=[E,C,E,C]}else{this.padding=[E,C,F,D]}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return }var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H)},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1]},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C)},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C]}this.DDM.removeDDFromGroup(this,C)},setDragElId:function(C){this.dragElId=C},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.handleElId=C;this.DDM.regHandle(this.id,C)},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C)}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(I,H){var E=I.which||I.button;if(this.primaryButtonOnly&&E>1){return }if(this.isLocked()){return }var D=this.b4MouseDown(I),C=true;if(this.events.b4MouseDown){C=this.fireEvent("b4MouseDownEvent",I)}var F=this.onMouseDown(I),J=true;if(this.events.mouseDown){J=this.fireEvent("mouseDownEvent",I)}if((D===false)||(F===false)||(C===false)||(J===false)){return }this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(I),A.getPageY(I));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(I)){this.setStartPosition();this.DDM.handleMouseDown(I,this);this.DDM.stopEvent(I)}else{}}},clickValidator:function(C){var D=YAHOO.util.Event.getTarget(C);return(this.isValidHandleChild(D)&&(this.id==this.handleElId||this.DDM.handleWasClicked(D,this.id)))},getTargetCoord:function(D,E){var C=D-this.deltaX;var F=E-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX}if(C>this.maxX){C=this.maxX}}if(this.constrainY){if(F<this.minY){F=this.minY}if(F>this.maxY){F=this.maxY}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F}},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}this.invalidHandleIds[C]=C},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C)},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D]},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C)}delete this.invalidHandleIds[C]},removeInvalidHandleClass:function(E){for(var D=0,C=this.invalidHandleClasses.length;D<C;++D){if(this.invalidHandleClasses[D]==E){delete this.invalidHandleClasses[D]}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase()}catch(G){H=F.nodeName}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D])}return E},setXTicks:function(F,D){this.xTicks=[];this.xTickSize=D;var C={};for(var E=this.initPageX;E>=this.minX;E=E-D){if(!C[E]){this.xTicks[this.xTicks.length]=E;C[E]=true}}for(E=this.initPageX;E<=this.maxX;E=E+D){if(!C[E]){this.xTicks[this.xTicks.length]=E;C[E]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,D){this.yTicks=[];this.yTickSize=D;var C={};for(var E=this.initPageY;E>=this.minY;E=E-D){if(!C[E]){this.yTicks[this.yTicks.length]=E;C[E]=true}}for(E=this.initPageY;E<=this.maxY;E=E+D){if(!C[E]){this.yTicks[this.yTicks.length]=E;C[E]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,C,D){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(C,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(D){this.setXTicks(this.initPageX,D)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,D){if(!D){return I}else{if(D[0]>=I){return D[0]}else{for(var E=0,C=D.length;E<C;++E){var F=E+1;if(D[F]&&D[F]>=I){var H=I-D[E];var G=D[F]-I;return(G>H)?D[E]:D[F]}}return D[D.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,B,A){if(C){this.init(C,B,A)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(B,C){var A=B-this.startPageX;var D=C-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(A,B){var C=this.getDragEl();this.alignElWithMouse(C,A,B)},alignElWithMouse:function(F,A,C){var B=this.getTargetCoord(A,C);if(!this.deltaSetXY){var H=[B.x,B.y];YAHOO.util.Dom.setXY(F,H);var G=parseInt(YAHOO.util.Dom.getStyle(F,"left"),10);var E=parseInt(YAHOO.util.Dom.getStyle(F,"top"),10);this.deltaSetXY=[G-B.x,E-B.y]}else{YAHOO.util.Dom.setStyle(F,"left",(B.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(F,"top",(B.y+this.deltaSetXY[1])+"px")}this.cachePosition(B.x,B.y);var D=this;setTimeout(function(){D.autoScroll.call(D,B.x,B.y,F.offsetHeight,F.offsetWidth)},0)},cachePosition:function(A,B){if(A){this.lastPageX=A;this.lastPageY=B}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,D,L){if(this.scroll){var K=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var C=this.DDM.getScrollLeft();var H=D+I;var M=L+J;var G=(K+N-I-this.deltaY);var A=(B+C-J-this.deltaX);var E=40;var F=(document.all)?80:30;if(H>K&&G<E){window.scrollTo(C,N+F)}if(I<N&&N>0&&I-N<E){window.scrollTo(C,N-F)}if(M>B&&A<E){window.scrollTo(C+F,N)}if(J<C&&C>0&&J-C<E){window.scrollTo(C-F,N)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(C,B,A){if(C){this.init(C,B,A);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return }var G=this.getDragEl(),E=YAHOO.util.Dom;if(!G){G=document.createElement("div");G.id=this.dragElId;var D=G.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");G.appendChild(C);if(YAHOO.env.ua.ie){var F=document.createElement("iframe");F.setAttribute("src","javascript: false;");F.setAttribute("scrolling","no");F.setAttribute("frameborder","0");G.insertBefore(F,G.firstChild);E.setStyle(F,"height","100%");E.setStyle(F,"width","100%");E.setStyle(F,"position","absolute");E.setStyle(F,"top","0");E.setStyle(F,"left","0");E.setStyle(F,"opacity","0");E.setStyle(F,"zIndex","-1");E.setStyle(F.nextSibling,"zIndex","2")}A.insertBefore(G,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId)},showFrame:function(A,B){var D=this.getEl();var E=this.getDragEl();var C=E.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(C.width,10)/2),Math.round(parseInt(C.height,10)/2))}this.setDragElPos(A,B);YAHOO.util.Dom.setStyle(E,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var I=YAHOO.util.Dom;var A=this.getEl();var D=this.getDragEl();var G=parseInt(I.getStyle(D,"borderTopWidth"),10);var H=parseInt(I.getStyle(D,"borderRightWidth"),10);var E=parseInt(I.getStyle(D,"borderBottomWidth"),10);var B=parseInt(I.getStyle(D,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(H)){H=0}if(isNaN(E)){E=0}if(isNaN(B)){B=0}var C=Math.max(0,A.offsetWidth-H-B);var F=Math.max(0,A.offsetHeight-G-E);I.setStyle(D,"width",C+"px");I.setStyle(D,"height",F+"px")}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(C,B,A){if(C){this.initTarget(C,B,A)}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id)}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.6.0",build:"1321"});YAHOO.widget.Slider=function(C,A,B,D){YAHOO.widget.Slider.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(C){this.init(C,A,true);this.initSlider(D);this.initThumb(B)}};YAHOO.widget.Slider.getHorizSlider=function(D,C,E,A,B){return new YAHOO.widget.Slider(D,D,new YAHOO.widget.SliderThumb(C,D,E,A,0,0,B),"horiz")};YAHOO.widget.Slider.getVertSlider=function(D,C,A,E,B){return new YAHOO.widget.Slider(D,D,new YAHOO.widget.SliderThumb(C,D,0,0,A,E,B),"vert")};YAHOO.widget.Slider.getSliderRegion=function(E,D,F,B,A,G,C){return new YAHOO.widget.Slider(E,E,new YAHOO.widget.SliderThumb(D,E,F,B,A,G,C),"region")};YAHOO.widget.Slider.ANIM_AVAIL=false;YAHOO.extend(YAHOO.widget.Slider,YAHOO.util.DragDrop,{dragOnly:true,initSlider:function(A){this.type=A;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=YAHOO.widget.Slider.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0]},initThumb:function(B){var A=this;this.thumb=B;B.cacheBetweenDrags=true;if(B._isHoriz&&B.xTicks&&B.xTicks.length){this.tickPause=Math.round(360/B.xTicks.length)}else{if(B.yTicks&&B.yTicks.length){this.tickPause=Math.round(360/B.yTicks.length)}}B.onAvailable=function(){return A.setStartSliderState()};B.onMouseDown=function(){return A.focus()};B.startDrag=function(){A._slideStart()};B.onDrag=function(){A.fireEvents(true)};B.onMouseUp=function(){A.thumbMouseUp()}},onAvailable:function(){var A=YAHOO.util.Event;A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true)},handleKeyPress:function(C){if(this.enableKeys){var A=YAHOO.util.Event;var B=A.getCharCode(C);switch(B){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(C);break;default:}}},handleKeyDown:function(E){if(this.enableKeys){var F=YAHOO.util.Event;var B=F.getCharCode(E),H=this.thumb;var C=this.getXValue(),G=this.getYValue();var I=false;var A=true;switch(B){case 37:C-=this.keyIncrement;break;case 38:G-=this.keyIncrement;break;case 39:C+=this.keyIncrement;break;case 40:G+=this.keyIncrement;break;case 36:C=H.leftConstraint;G=H.topConstraint;break;case 35:C=H.rightConstraint;G=H.bottomConstraint;break;default:A=false}if(A){if(H._isRegion){this.setRegionValue(C,G,true)}else{var D=(H._isHoriz)?C:G;this.setValue(D,true)}F.stopEvent(E)}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=YAHOO.util.Dom.getXY(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this.setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null}else{this.setRegionValue(0,0,true,true,true)}}else{if(this.deferredSetValue){this.setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null}else{this.setValue(0,true,true,true)}}},setThumbCenterPoint:function(){var A=this.thumb.getEl();if(A){this.thumbCenterPoint={x:parseInt(A.offsetWidth/2,10),y:parseInt(A.offsetHeight/2,10)}}},lock:function(){this.thumb.lock();this.locked=true},unlock:function(){this.thumb.unlock();this.locked=false},thumbMouseUp:function(){if(!this.isLocked()&&!this.moveComplete){this.endMove()}},onMouseUp:function(){if(this.backgroundEnabled&&!this.isLocked()&&!this.moveComplete){this.endMove()}},getThumb:function(){return this.thumb},focus:function(){this.valueChangeSource=this.SOURCE_UI_EVENT;var A=this.getEl();if(A.focus){try{A.focus()}catch(B){}}this.verifyOffset();if(this.isLocked()){return false}else{this._slideStart();return true}},onChange:function(B,A){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue()},getXValue:function(){return this.thumb.getXValue()},getYValue:function(){return this.thumb.getYValue()},handleThumbChange:function(){},setValue:function(F,C,D,B){this._silent=B;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetValue=arguments;return false}if(this.isLocked()&&!D){return false}if(isNaN(F)){return false}var A=this.thumb;A.lastOffset=[F,F];var G,E;this.verifyOffset(true);if(A._isRegion){return false}else{if(A._isHoriz){this._slideStart();G=A.initPageX+F+this.thumbCenterPoint.x;this.moveThumb(G,A.initPageY,C)}else{this._slideStart();E=A.initPageY+F+this.thumbCenterPoint.y;this.moveThumb(A.initPageX,E,C)}}return true},setRegionValue:function(G,E,C,D,B){this._silent=B;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetRegionValue=arguments;return false}if(this.isLocked()&&!D){return false}if(isNaN(G)){return false}var A=this.thumb;A.lastOffset=[G,E];this.verifyOffset(true);if(A._isRegion){this._slideStart();var H=A.initPageX+G+this.thumbCenterPoint.x;var F=A.initPageY+E+this.thumbCenterPoint.y;this.moveThumb(H,F,C);return true}return false},verifyOffset:function(B){var C=YAHOO.util.Dom.getXY(this.getEl()),A=this.thumb;if(C){if(C[0]!=this.baselinePos[0]||C[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=C;A.initPageX=this.initPageX+A.startOffset[0];A.initPageY=this.initPageY+A.startOffset[1];A.deltaSetXY=null;this.resetThumbConstraints();return false}}return true},moveThumb:function(G,F,E,D){var I=this.thumb;var H=this;if(!I.available){return }I.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);var B=I.getTargetCoord(G,F);var C=[Math.round(B.x),Math.round(B.y)];this._slideStart();if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&I._graduated&&!E){this.lock();this.curCoord=YAHOO.util.Dom.getXY(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){H.moveOneTick(C)},this.tickPause)}else{if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!E){this.lock();var A=new YAHOO.util.Motion(I.id,{points:{to:C}},this.animationDuration,YAHOO.util.Easing.easeOut);A.onComplete.subscribe(function(){H.endMove()});A.animate()}else{I.setDragElPos(G,F);if(!D){this.endMove()}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart")}this._sliding=true}},_slideEnd:function(){if(this._sliding&&this.moveComplete){var A=this._silent;this._sliding=false;this._silent=false;this.moveComplete=false;if(!A){this.onSlideEnd();this.fireEvent("slideEnd")}}},moveOneTick:function(E){var D=this.thumb,C;var F=null,A,G;if(D._isRegion){F=this._getNextX(this.curCoord,E);A=(F!==null)?F[0]:this.curCoord[0];F=this._getNextY(this.curCoord,E);G=(F!==null)?F[1]:this.curCoord[1];F=A!==this.curCoord[0]||G!==this.curCoord[1]?[A,G]:null}else{if(D._isHoriz){F=this._getNextX(this.curCoord,E)}else{F=this._getNextY(this.curCoord,E)}}if(F){this.curCoord=F;this.thumb.alignElWithMouse(D.getEl(),F[0]+this.thumbCenterPoint.x,F[1]+this.thumbCenterPoint.y);if(!(F[0]==E[0]&&F[1]==E[1])){var B=this;setTimeout(function(){B.moveOneTick(E)},this.tickPause)}else{this.endMove()}}else{this.endMove()}},_getNextX:function(A,D){var C=this.thumb;var F;var B=[];var E=null;if(A[0]>D[0]){F=C.tickSize-this.thumbCenterPoint.x;B=C.getTargetCoord(A[0]-F,A[1]);E=[B.x,B.y]}else{if(A[0]<D[0]){F=C.tickSize+this.thumbCenterPoint.x;B=C.getTargetCoord(A[0]+F,A[1]);E=[B.x,B.y]}else{}}return E},_getNextY:function(A,D){var C=this.thumb;var F;var B=[];var E=null;if(A[1]>D[1]){F=C.tickSize-this.thumbCenterPoint.y;B=C.getTargetCoord(A[0],A[1]-F);E=[B.x,B.y]}else{if(A[1]<D[1]){F=C.tickSize+this.thumbCenterPoint.y;B=C.getTargetCoord(A[0],A[1]+F);E=[B.x,B.y]}else{}}return E},b4MouseDown:function(A){if(!this.backgroundEnabled){return false}this.thumb.autoOffset();this.resetThumbConstraints()},onMouseDown:function(B){if(!this.backgroundEnabled||this.isLocked()){return false}var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.focus();this.moveThumb(A,C)},onDrag:function(B){if(this.backgroundEnabled&&!this.isLocked()){var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.moveThumb(A,C,true,true);this.fireEvents()}},endMove:function(){this.unlock();this.moveComplete=true;this.fireEvents()},resetThumbConstraints:function(){var A=this.thumb;A.setXConstraint(A.leftConstraint,A.rightConstraint,A.xTickSize);A.setYConstraint(A.topConstraint,A.bottomConstraint,A.xTickSize)},fireEvents:function(A){var C=this.thumb;if(!A){C.cachePosition()}if(!this.isLocked()){if(C._isRegion){var E=C.getXValue();var D=C.getYValue();if(E!=this.previousX||D!=this.previousY){if(!this._silent){this.onChange(E,D);this.fireEvent("change",{x:E,y:D})}}this.previousX=E;this.previousY=D}else{var B=C.getValue();if(B!=this.previousVal){if(!this._silent){this.onChange(B);this.fireEvent("change",B)}}this.previousVal=B}this._slideEnd()}},toString:function(){return("Slider ("+this.type+") "+this.id)}});YAHOO.augment(YAHOO.widget.Slider,YAHOO.util.EventProvider);YAHOO.widget.SliderThumb=function(G,D,E,B,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,D);this.parentElId=D}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,B,A,F,C);this.scroll=false};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl());var B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])]},getOffsetFromParent:function(H){var B=this.getEl(),C;if(!this.deltaOffset){var I=YAHOO.util.Dom.getXY(B);var G=H||YAHOO.util.Dom.getXY(this.parentElId);C=[(I[0]-G[0]),(I[1]-G[1])];var D=parseInt(YAHOO.util.Dom.getStyle(B,"left"),10);var K=parseInt(YAHOO.util.Dom.getStyle(B,"top"),10);var E=D-C[0];var F=K-C[1];if(isNaN(E)||isNaN(F)){}else{this.deltaOffset=[E,F]}}else{var J=parseInt(YAHOO.util.Dom.getStyle(B,"left"),10);var A=parseInt(YAHOO.util.Dom.getStyle(B,"top"),10);C=[J+this.deltaOffset[0],A+this.deltaOffset[1]]}return C},initSlider:function(D,B,A,E,C){this.initLeft=D;this.initRight=B;this.initUp=A;this.initDown=E;this.setXConstraint(D,B,C);this.setYConstraint(A,E,C);if(C&&C>1){this._graduated=true}this._isHoriz=(D||B);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert)},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue()},getXValue:function(){if(!this.available){return 0}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0])}else{return(this.lastOffset[0]-this.startOffset[0])}},getYValue:function(){if(!this.available){return 0}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1])}else{return(this.lastOffset[1]-this.startOffset[1])}},toString:function(){return"SliderThumb "+this.id},onChange:function(A,B){}});YAHOO.widget.DualSlider=function(D,F,C,A){var B=this,G=YAHOO.lang;this.minSlider=D;this.maxSlider=F;this.activeSlider=D;this.isHoriz=D.thumb._isHoriz;A=YAHOO.lang.isArray(A)?A:[0,C];A[0]=Math.min(Math.max(parseInt(A[0],10)|0,0),C);A[1]=Math.max(Math.min(parseInt(A[1],10)|0,C),0);if(A[0]>A[1]){A.splice(0,2,A[1],A[0])}var E={min:false,max:false};this.minSlider.thumb.onAvailable=function(){D.setStartSliderState();E.min=true;if(E.max){D.setValue(A[0],true,true,true);F.setValue(A[1],true,true,true);B.updateValue(true);B.fireEvent("ready",B)}};this.maxSlider.thumb.onAvailable=function(){F.setStartSliderState();E.max=true;if(E.min){D.setValue(A[0],true,true,true);F.setValue(A[1],true,true,true);B.updateValue(true);B.fireEvent("ready",B)}};D.onMouseDown=function(H){return B._handleMouseDown(H)};F.onMouseDown=function(H){if(B.minSlider.isLocked()&&!B.minSlider._sliding){return B._handleMouseDown(H)}else{YAHOO.util.Event.stopEvent(H);return false}};D.onDrag=F.onDrag=function(H){B._handleDrag(H)};D.subscribe("change",this._handleMinChange,D,this);D.subscribe("slideStart",this._handleSlideStart,D,this);D.subscribe("slideEnd",this._handleSlideEnd,D,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this)};YAHOO.widget.DualSlider.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(B,A){this.fireEvent("slideStart",A)},_handleSlideEnd:function(B,A){this.fireEvent("slideEnd",A)},_handleDrag:function(A){YAHOO.widget.Slider.prototype.onDrag.call(this.activeSlider,A)},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue()},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue()},setValues:function(F,H,G,D,B){var C=this.minSlider,J=this.maxSlider,A=C.thumb,I=J.thumb,K=this,E={min:false,max:false};if(A._isHoriz){A.setXConstraint(A.leftConstraint,I.rightConstraint,A.tickSize);I.setXConstraint(A.leftConstraint,I.rightConstraint,I.tickSize)}else{A.setYConstraint(A.topConstraint,I.bottomConstraint,A.tickSize);I.setYConstraint(A.topConstraint,I.bottomConstraint,I.tickSize)}this._oneTimeCallback(C,"slideEnd",function(){E.min=true;if(E.max){K.updateValue(B);setTimeout(function(){K._cleanEvent(C,"slideEnd");K._cleanEvent(J,"slideEnd")},0)}});this._oneTimeCallback(J,"slideEnd",function(){E.max=true;if(E.min){K.updateValue(B);setTimeout(function(){K._cleanEvent(C,"slideEnd");K._cleanEvent(J,"slideEnd")},0)}});C.setValue(F,G,D,false);J.setValue(H,G,D,false)},setMinValue:function(B,E,F,C){var D=this.minSlider;this.activeSlider=D;var A=this;this._oneTimeCallback(D,"slideEnd",function(){A.updateValue(C);setTimeout(function(){A._cleanEvent(D,"slideEnd")},0)});D.setValue(B,E,F,C)},setMaxValue:function(A,E,F,D){var C=this.maxSlider;this.activeSlider=C;var B=this;this._oneTimeCallback(C,"slideEnd",function(){B.updateValue(D);setTimeout(function(){B._cleanEvent(C,"slideEnd")},0)});C.setValue(A,E,F,D)},updateValue:function(B){var C=this.minSlider.getValue(),H=this.maxSlider.getValue(),D=false;if(C!=this.minVal||H!=this.maxVal){D=true;var A=this.minSlider.thumb,I=this.maxSlider.thumb,F=this.isHoriz?"x":"y";var E=this.minSlider.thumbCenterPoint[F]+this.maxSlider.thumbCenterPoint[F];var G=Math.max(H-E-this.minRange,0);var J=Math.min(-C-E-this.minRange,0);if(this.isHoriz){G=Math.min(G,I.rightConstraint);A.setXConstraint(A.leftConstraint,G,A.tickSize);I.setXConstraint(J,I.rightConstraint,I.tickSize)}else{G=Math.min(G,I.bottomConstraint);A.setYConstraint(A.leftConstraint,G,A.tickSize);I.setYConstraint(J,I.bottomConstraint,I.tickSize)}}this.minVal=C;this.maxVal=H;if(D&&!B){this.fireEvent("change",this)}},selectActiveSlider:function(D){var B=this.minSlider,A=this.maxSlider,F=B.isLocked(),G=A.isLocked(),C=YAHOO.util.Event,E;if(F||G){this.activeSlider=F?A:B}else{if(this.isHoriz){E=C.getPageX(D)-B.thumb.initPageX-B.thumbCenterPoint.x}else{E=C.getPageY(D)-B.thumb.initPageY-B.thumbCenterPoint.y}this.activeSlider=E*2>A.getValue()+B.getValue()?A:B}},_handleMouseDown:function(A){this.selectActiveSlider(A);YAHOO.widget.Slider.prototype.onMouseDown.call(this.activeSlider,A)},_oneTimeCallback:function(C,A,B){C.subscribe(A,function(){C.unsubscribe(A,arguments.callee);B.apply({},[].slice.apply(arguments))})},_cleanEvent:function(H,B){if(H.__yui_events&&H.events[B]){var G,F,A;for(F=H.__yui_events.length;F>=0;--F){if(H.__yui_events[F].type===B){G=H.__yui_events[F];break}}if(G){var E=G.subscribers,C=[],D=0;for(F=0,A=E.length;F<A;++F){if(E[F]){C[D++]=E[F]}}G.subscribers=C}}}};YAHOO.augment(YAHOO.widget.DualSlider,YAHOO.util.EventProvider);YAHOO.widget.Slider.getHorizDualSlider=function(E,G,K,F,H,B){var A,J;var C=YAHOO.widget,D=C.Slider,I=C.SliderThumb;A=new I(G,E,0,F,0,0,H);J=new I(K,E,0,F,0,0,H);return new C.DualSlider(new D(E,E,A,"horiz"),new D(E,E,J,"horiz"),F,B)};YAHOO.widget.Slider.getVertDualSlider=function(E,G,K,F,H,B){var A,J;var C=YAHOO.widget,D=C.Slider,I=C.SliderThumb;A=new I(G,E,0,0,0,F,H);J=new I(K,E,0,0,0,F,H);return new C.DualSlider(new D(E,E,A,"vert"),new D(E,E,J,"vert"),F,B)};YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.6.0",build:"1321"});
/*	SWFObject v2.0 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
/*@cc_on
			ie = true;
			@if (@_win32)
				windows = true;
			@elif (@_mac)
				mac = true;
			@end
		@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return }addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var s=getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions()}}}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function callDomLoadFunctions(){if(isDomLoaded){return }if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return }}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){win.attachEvent("onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName.toLowerCase()=="data"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function fixObjectLeaks(id){if(ua.ie&&ua.win&&hasPlayerVersion("8.0.0")){win.attachEvent("onunload",function(){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=function(){}}}obj.parentNode.removeChild(obj)}})}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj)})}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj)})}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";fixObjectLeaks(attObj.id);r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function getElementById(id){return doc.getElementById(id)}function createElement(el){return doc.createElement(el)}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return }var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return }var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom&&isDomLoaded){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return }widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att=(typeof attObj==OBJECT)?attObj:{};att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par=(typeof parObj==OBJECT)?parObj:{};if(typeof flashvarsObj==OBJECT){for(var i in flashvarsObj){if(flashvarsObj[i]!=Object.prototype[i]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+i+"="+flashvarsObj[i]}else{par.flashvars=i+"="+flashvarsObj[i]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom&&isDomLoaded){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return q}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();if(typeof DAYLIFE=="undefined"){var DAYLIFE={}}DAYLIFE.Packages={load:function(A){$DL.each(A,function(){var B=DAYLIFE.Packages[this];if(B&&typeof B=="function"&&!DAYLIFE[this]){DAYLIFE[this]=B();if(DAYLIFE[this].init&&typeof DAYLIFE[this].init=="function"){DAYLIFE[this].init()}}})}};DAYLIFE.Browser={IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)};DAYLIFE.Browser.IE6=!!(DAYLIFE.Browser.IE&&(typeof window.XMLHttpRequest=="undefined"));DAYLIFE.Browser.IE7=!!(DAYLIFE.Browser.IE&&(typeof window.XMLHttpRequest=="object"));DAYLIFE.Class={};DAYLIFE.Sequence={};DAYLIFE.loaded=[];DAYLIFE.log=function(A){try{if(typeof o=="object"){var C=[];for(var B=0;B<A.length;B++){if(B!=0){C.push(A[B])}}console.debug(A[0],C)}else{console.log(A)}}catch(D){}};DAYLIFE.debug=function(A,C){try{if(typeof C=="object"&&DAYLIFE.Browser.Gecko){console.debug(A,C)}else{console.log(A,C)}}catch(B){console={log:function(){}}}};DAYLIFE.error=function(A,C){try{if(typeof C=="object"&&DAYLIFE.Browser.Gecko){console.error(A,C)}else{console.log(A,C)}}catch(B){console={log:function(){}}}};(function(B){var A=[];function C(){var D=[];for(var E=0;E<A.length;E++){var F=A[E]();if(F){D.push(F)}}if(D.length>0){return D.join(" ")}}if(window.onbeforeunload){A.push(window.onbeforeunload)}DAYLIFE.onbeforeunload=function(D){if(B.inArray(D,A)==-1){A.push(D);if(window.onbeforeunload!=C){window.onbeforeunload=C}}}})($DL);window.Raphael=(function(){var AC=/[, ]+/,H=document,s=window,D={was:"Raphael" in window,is:window.Raphael},F=function(){return j.apply(F,arguments)},A={},c={cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",skewX:0,skewY:0,matrix:"1 0 0 1 0 0",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},Z={cx:"number",cy:"number",fill:"colour","fill-opacity":"number","font-size":"number",height:"number",opacity:"number",path:"path",r:"number",rotation:"csv",rx:"number",ry:"number",scale:"csv",skewX:"number",skewY:"number",matrix:"csv",stroke:"colour","stroke-opacity":"number","stroke-width":"number",translation:"csv",width:"number",x:"number",y:"number"},Y=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"];F.version="0.8.6";F.type=(window.SVGAngle||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");F.svg=!(F.vml=F.type=="VML");F.idGenerator=0;F.fn={};F.isArray=function(R){return Object.prototype.toString.call(R)=="[object Array]"};F.setWindow=function(R){s=R;H=s.document};F.hsb2rgb=function(AK,AF,AO){if(typeof AK=="object"&&"h" in AK&&"s" in AK&&"b" in AK){AO=AK.b;AF=AK.s;AK=AK.h}var AG,AH,AP;if(AO==0){return{r:0,g:0,b:0,hex:"#000"}}if(AK>1||AF>1||AO>1){AK/=255;AF/=255;AO/=255}var AI=Math.floor(AK*6),AL=(AK*6)-AI,AE=AO*(1-AF),AD=AO*(1-(AF*AL)),AQ=AO*(1-(AF*(1-AL)));AG=[AO,AD,AE,AE,AQ,AO,AO][AI];AH=[AQ,AO,AO,AD,AE,AE,AQ][AI];AP=[AE,AE,AQ,AO,AO,AD,AE][AI];AG*=255;AH*=255;AP*=255;var AM={r:AG,g:AH,b:AP},R=Math.round(AG).toString(16),AJ=Math.round(AH).toString(16),AN=Math.round(AP).toString(16);if(R.length==1){R="0"+R}if(AJ.length==1){AJ="0"+AJ}if(AN.length==1){AN="0"+AN}AM.hex="#"+R+AJ+AN;return AM};F.rgb2hsb=function(AD,AE,AJ){if(typeof AD=="object"&&"r" in AD&&"g" in AD&&"b" in AD){AJ=AD.b;AE=AD.g;AD=AD.r}if(typeof AD=="string"){var AL=F.getRGB(AD);AD=AL.r;AE=AL.g;AJ=AL.b}if(AD>1||AE>1||AJ>1){AD/=255;AE/=255;AJ/=255}var AI=Math.max(AD,AE,AJ),AF=Math.min(AD,AE,AJ),AG,R,AH=AI;if(AF==AI){return{h:0,s:0,b:AI}}else{var AK=(AI-AF);R=AK/AI;if(AD==AI){AG=(AE-AJ)/AK}else{if(AE==AI){AG=2+((AJ-AD)/AK)}else{AG=4+((AD-AE)/AK)}}AG/=6;if(AG<0){AG+=1}if(AG>1){AG-=1}}return{h:AG,s:R,b:AH}};var f={},G=[];F.getRGB=function(AI){if(AI in f){return f[AI]}var AK={aliceblue:"#f0f8ff",amethyst:"#96c",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},AG;if((AI+"").toLowerCase() in AK){AI=AK[AI.toString().toLowerCase()]}if(!AI){return{r:0,g:0,b:0,hex:"#000"}}if(AI=="none"){return{r:-1,g:-1,b:-1,hex:"none"}}var AD,AE,AL,AH=(AI+"").match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);if(AH){if(AH[2]){AL=parseInt(AH[2].substring(5),16);AE=parseInt(AH[2].substring(3,5),16);AD=parseInt(AH[2].substring(1,3),16)}if(AH[3]){AL=parseInt(AH[3].substring(3)+AH[3].substring(3),16);AE=parseInt(AH[3].substring(2,3)+AH[3].substring(2,3),16);AD=parseInt(AH[3].substring(1,2)+AH[3].substring(1,2),16)}if(AH[4]){AH=AH[4].split(/\s*,\s*/);AD=parseFloat(AH[0]);AE=parseFloat(AH[1]);AL=parseFloat(AH[2])}if(AH[5]){AH=AH[5].split(/\s*,\s*/);AD=parseFloat(AH[0])*2.55;AE=parseFloat(AH[1])*2.55;AL=parseFloat(AH[2])*2.55}if(AH[6]){AH=AH[6].split(/\s*,\s*/);AD=parseFloat(AH[0]);AE=parseFloat(AH[1]);AL=parseFloat(AH[2]);return F.hsb2rgb(AD,AE,AL)}if(AH[7]){AH=AH[7].split(/\s*,\s*/);AD=parseFloat(AH[0])*2.55;AE=parseFloat(AH[1])*2.55;AL=parseFloat(AH[2])*2.55;return F.hsb2rgb(AD,AE,AL)}var AH={r:AD,g:AE,b:AL},R=Math.round(AD).toString(16),AF=Math.round(AE).toString(16),AJ=Math.round(AL).toString(16);(R.length==1)&&(R="0"+R);(AF.length==1)&&(AF="0"+AF);(AJ.length==1)&&(AJ="0"+AJ);AH.hex="#"+R+AF+AJ;AG=AH}else{AG={r:-1,g:-1,b:-1,hex:"none"}}if(G.length>20){delete f[G.unshift()]}G.push(AI);f[AI]=AG;return AG};F.getColor=function(AD){var AE=this.getColor.start=this.getColor.start||{h:0,s:1,b:AD||0.75},R=this.hsb2rgb(AE.h,AE.s,AE.b);AE.h+=0.075;if(AE.h>1){AE.h=0;AE.s-=0.2;if(AE.s<=0){this.getColor.start={h:0,s:1,b:AE.b}}}return R.hex};F.getColor.reset=function(){delete this.start};F.easing_formulas={linear:function(AF,R,AE,AD){return R+AE*AF}};F.easing=function(AG,AF,R,AE,AD){return F.easing_formulas[AG](AF,R,AE,AD)};var X={},w=[];F.parsePathString=function(R){if(R in X){return X[R]}var AF={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},AD=[],AE=function(){var AH="";for(var AG=0,AI=this.length;AG<AI;AG++){AH+=this[AG][0]+this[AG].join(",").substring(2)}return AH};if(R.toString.toString()==AE.toString()){AD=R}if(!AD.length){R.replace(/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(AH,AG,AK){var AJ=[],AI=AG.toLowerCase();AK.replace(/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(AM,AL){AL&&AJ.push(+AL)});while(AJ.length>=AF[AI]){AD.push([AG].concat(AJ.splice(0,AF[AI])));if(!AF[AI]){break}}});AD.toString=AE}if(w.length>20){delete X[w.unshift()]}w.push(R);X[R]=AD;return AD};var Q=function(AN){var AF=AN;if(typeof AN=="string"){AF=F.parsePathString(AN)}AF=b(AF);var AI=[],AH=[],AG=0;for(var AD=0,AM=AF.length;AD<AM;AD++){var AJ=AF[AD];switch(AJ[0]){case"Z":break;case"A":AI.push(AJ[AJ.length-2]);AH.push(AJ[AJ.length-1]);break;default:for(var R=1,AE=AJ.length;R<AE;R++){(R%2?AI:AH).push(AJ[R])}}}var AL=Math.min.apply(Math,AI),AK=Math.min.apply(Math,AH);if(!AI.length){return{x:0,y:0,width:0,height:0,X:0,Y:0}}else{return{x:AL,y:AK,width:Math.max.apply(Math,AI)-AL,height:Math.max.apply(Math,AH)-AK,X:AI,Y:AH}}},d=function(AF,AD){var AE=0.5522*AF,AG=this.isAbsolute,AI=this;if(AG){this.relatively();AG=function(){AI.absolutely()}}else{AG=function(){}}var AH={l:function(){return{u:function(){AI.curveTo(-AE,0,-AF,-(AF-AE),-AF,-AF)},d:function(){AI.curveTo(-AE,0,-AF,AF-AE,-AF,AF)}}},r:function(){return{u:function(){AI.curveTo(AE,0,AF,-(AF-AE),AF,-AF)},d:function(){AI.curveTo(AE,0,AF,AF-AE,AF,AF)}}},u:function(){return{r:function(){AI.curveTo(0,-AE,-(AE-AF),-AF,AF,-AF)},l:function(){AI.curveTo(0,-AE,AE-AF,-AF,-AF,-AF)}}},d:function(){return{r:function(){AI.curveTo(0,AE,-(AE-AF),AF,AF,AF)},l:function(){AI.curveTo(0,AE,AE-AF,AF,-AF,AF)}}}};AH[AD.charAt(0)]()[AD.charAt(1)]();AG();return AI},C=function(AK){var AL=[],AN=0,AM=0,AE=0;if(typeof AK=="string"){AK=F.parsePathString(AK)}if(AK[0][0]=="M"){AN=AK[0][1];AM=AK[0][2];AE++;AL.push(["M",AN,AM])}for(var AH=AE,AP=AK.length;AH<AP;AH++){var R=AL[AH]=[],AO=AK[AH];if(AO[0]!=AO[0].toLowerCase()){R[0]=AO[0].toLowerCase();switch(R[0]){case"a":R[1]=AO[1];R[2]=AO[2];R[3]=AO[3];R[4]=AO[4];R[5]=AO[5];R[6]=+(AO[6]-AN).toFixed(3);R[7]=+(AO[7]-AM).toFixed(3);break;case"v":R[1]=+(AO[1]-AM).toFixed(3);break;default:for(var AG=1,AI=AO.length;AG<AI;AG++){R[AG]=+(AO[AG]-((AG%2)?AN:AM)).toFixed(3)}}}else{R=AL[AH]=[];for(var AF=0,AD=AO.length;AF<AD;AF++){AL[AH][AF]=AO[AF]}}var AJ=AL[AH].length;switch(AL[AH][0]){case"z":break;case"h":AN+=+AL[AH][AJ-1];break;case"v":AM+=+AL[AH][AJ-1];break;default:AN+=+AL[AH][AJ-2];AM+=+AL[AH][AJ-1]}}AL.toString=AK.toString;return AL},b=function(AJ){var AK=[];if(typeof AJ=="string"){AJ=F.parsePathString(AJ)}var AM=0,AL=0,AE=0;if(AJ[0][0]=="M"){AM=+AJ[0][1];AL=+AJ[0][2];AE++;AK[0]=["M",AM,AL]}for(var AH=AE,AO=AJ.length;AH<AO;AH++){var R=AK[AH]=[],AN=AJ[AH];if(AN[0]!=(AN[0]+"").toUpperCase()){R[0]=(AN[0]+"").toUpperCase();switch(R[0]){case"A":R[1]=AN[1];R[2]=AN[2];R[3]=0;R[4]=AN[4];R[5]=AN[5];R[6]=+(AN[6]+AM).toFixed(3);R[7]=+(AN[7]+AL).toFixed(3);break;case"V":R[1]=+AN[1]+AL;break;case"H":R[1]=+AN[1]+AM;break;default:for(var AG=1,AI=AN.length;AG<AI;AG++){R[AG]=+AN[AG]+((AG%2)?AM:AL)}}}else{R=AK[AH]=[];for(var AF=0,AD=AN.length;AF<AD;AF++){AK[AH][AF]=AN[AF]}}switch(R[0]){case"Z":break;case"H":AM=R[1];break;case"V":AL=R[1];break;default:AM=AK[AH][AK[AH].length-2];AL=AK[AH][AK[AH].length-1]}}AK.toString=AJ.toString;return AK},U={},k=[],P=function(AH,AG){if((AH+AG) in U){return U[AH+AG]}var AF=[b(F.parsePathString(AH)),b(F.parsePathString(AG))],AD=[{x:0,y:0,bx:0,by:0,X:0,Y:0},{x:0,y:0,bx:0,by:0,X:0,Y:0}],R=function(AK,AL){if(!AK){return["U"]}switch(AK[0]){case"M":AL.X=AK[1];AL.Y=AK[2];break;case"S":var AJ=AL.x+(AL.x-(AL.bx||AL.x)),AM=AL.y+(AL.y-(AL.by||AL.y));AK=["C",AJ,AM,AK[1],AK[2],AK[3],AK[4]];break;case"T":var AJ=AL.x+(AL.x-(AL.bx||AL.x)),AM=AL.y+(AL.y-(AL.by||AL.y));AK=["Q",AJ,AM,AK[1],AK[2]];break;case"H":AK=["L",AK[1],AL.y];break;case"V":AK=["L",AL.x,AK[1]];break;case"Z":AK=["L",AL.X,AL.Y];break}return AK},AI=function(AL,AK,AN){if(AF[AL][AN][0]=="M"&&AF[AK][AN][0]!="M"){AF[AK].splice(AN,0,["M",AD[AK].x,AD[AK].y]);AD[AL].bx=AF[AL][AN][AF[AL][AN].length-4]||0;AD[AL].by=AF[AL][AN][AF[AL][AN].length-3]||0;AD[AL].x=AF[AL][AN][AF[AL][AN].length-2];AD[AL].y=AF[AL][AN][AF[AL][AN].length-1];return true}else{if(AF[AL][AN][0]=="L"&&AF[AK][AN][0]=="C"){AF[AL][AN]=["C",AD[AL].x,AD[AL].y,AF[AL][AN][1],AF[AL][AN][2],AF[AL][AN][1],AF[AL][AN][2]]}else{if(AF[AL][AN][0]=="L"&&AF[AK][AN][0]=="Q"){AF[AL][AN]=["Q",AF[AL][AN][1],AF[AL][AN][2],AF[AL][AN][1],AF[AL][AN][2]]}else{if(AF[AL][AN][0]=="Q"&&AF[AK][AN][0]=="C"){var AJ=AF[AK][AN][AF[AK][AN].length-2],AP=AF[AK][AN][AF[AK][AN].length-1];AF[AK].splice(AN+1,0,["Q",AJ,AP,AJ,AP]);AF[AL].splice(AN,0,["C",AD[AL].x,AD[AL].y,AD[AL].x,AD[AL].y,AD[AL].x,AD[AL].y]);AN++;AD[AK].bx=AF[AK][AN][AF[AK][AN].length-4]||0;AD[AK].by=AF[AK][AN][AF[AK][AN].length-3]||0;AD[AK].x=AF[AK][AN][AF[AK][AN].length-2];AD[AK].y=AF[AK][AN][AF[AK][AN].length-1];return true}else{if(AF[AL][AN][0]=="A"&&AF[AK][AN][0]=="C"){var AJ=AF[AK][AN][AF[AK][AN].length-2],AP=AF[AK][AN][AF[AK][AN].length-1];AF[AK].splice(AN+1,0,["A",0,0,AF[AL][AN][3],AF[AL][AN][4],AF[AL][AN][5],AJ,AP]);AF[AL].splice(AN,0,["C",AD[AL].x,AD[AL].y,AD[AL].x,AD[AL].y,AD[AL].x,AD[AL].y]);AN++;AD[AK].bx=AF[AK][AN][AF[AK][AN].length-4]||0;AD[AK].by=AF[AK][AN][AF[AK][AN].length-3]||0;AD[AK].x=AF[AK][AN][AF[AK][AN].length-2];AD[AK].y=AF[AK][AN][AF[AK][AN].length-1];return true}else{if(AF[AL][AN][0]=="U"){AF[AL][AN][0]=AF[AK][AN][0];for(var AM=1,AO=AF[AK][AN].length;AM<AO;AM++){AF[AL][AN][AM]=(AM%2)?AD[AL].x:AD[AL].y}}}}}}}return false};for(var AE=0;AE<Math.max(AF[0].length,AF[1].length);AE++){AF[0][AE]=R(AF[0][AE],AD[0]);AF[1][AE]=R(AF[1][AE],AD[1]);if(AF[0][AE][0]!=AF[1][AE][0]&&(AI(0,1,AE)||AI(1,0,AE))){continue}AD[0].bx=AF[0][AE][AF[0][AE].length-4]||0;AD[0].by=AF[0][AE][AF[0][AE].length-3]||0;AD[0].x=AF[0][AE][AF[0][AE].length-2];AD[0].y=AF[0][AE][AF[0][AE].length-1];AD[1].bx=AF[1][AE][AF[1][AE].length-4]||0;AD[1].by=AF[1][AE][AF[1][AE].length-3]||0;AD[1].x=AF[1][AE][AF[1][AE].length-2];AD[1].y=AF[1][AE][AF[1][AE].length-1]}if(k.length>20){delete U[k.unshift()]}k.push(AH+AG);U[AH+AG]=AF;return AF},K=function(AM){if(typeof AM=="string"){AM=AM.split(/\s*\-\s*/);var AE=AM.shift();if(AE.toLowerCase()=="v"){AE=90}else{if(AE.toLowerCase()=="h"){AE=0}else{AE=parseFloat(AE)}}AE=-AE;var AL={angle:AE,type:"linear",dots:[],vector:[0,0,Math.cos(AE*Math.PI/180).toFixed(3),Math.sin(AE*Math.PI/180).toFixed(3)]},AK=1/(Math.max(Math.abs(AL.vector[2]),Math.abs(AL.vector[3]))||1);AL.vector[2]*=AK;AL.vector[3]*=AK;if(AL.vector[2]<0){AL.vector[0]=-AL.vector[2];AL.vector[2]=0}if(AL.vector[3]<0){AL.vector[1]=-AL.vector[3];AL.vector[3]=0}AL.vector[0]=AL.vector[0].toFixed(3);AL.vector[1]=AL.vector[1].toFixed(3);AL.vector[2]=AL.vector[2].toFixed(3);AL.vector[3]=AL.vector[3].toFixed(3);for(var AH=0,AN=AM.length;AH<AN;AH++){var R={},AJ=AM[AH].match(/^([^:]*):?([\d\.]*)/);R.color=F.getRGB(AJ[1]).hex;AJ[2]&&(R.offset=AJ[2]+"%");AL.dots.push(R)}for(var AH=1,AN=AL.dots.length-1;AH<AN;AH++){if(!AL.dots[AH].offset){var AD=parseFloat(AL.dots[AH-1].offset||0),AF=false;for(var AG=AH+1;AG<AN;AG++){if(AL.dots[AG].offset){AF=AL.dots[AG].offset;break}}if(!AF){AF=100;AG=AN}AF=parseFloat(AF);var AI=(AF-AD)/(AG-AH+1);for(;AH<AG;AH++){AD+=AI;AL.dots[AH].offset=AD+"%"}}}return AL}else{return AM}},O=function(){var AE,R,AG,AD,AF;if(typeof arguments[0]=="string"||typeof arguments[0]=="object"){if(typeof arguments[0]=="string"){AE=H.getElementById(arguments[0])}else{AE=arguments[0]}if(AE.tagName){if(arguments[1]==null){return{container:AE,width:AE.style.pixelWidth||AE.offsetWidth,height:AE.style.pixelHeight||AE.offsetHeight}}else{return{container:AE,width:arguments[1],height:arguments[2]}}}}else{if(typeof arguments[0]=="number"&&arguments.length>3){return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]}}}},z=function(R,AE){var AD=this;for(var AF in AE){if(AE.hasOwnProperty(AF)&&!(AF in R)){switch(typeof AE[AF]){case"function":(function(AG){R[AF]=R===AD?AG:function(){return AG.apply(AD,arguments)}})(AE[AF]);break;case"object":R[AF]=R[AF]||{};z.call(this,R[AF],AE[AF]);break;default:R[AF]=AE[AF];break}}}};if(F.svg){F.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var q={absolutely:function(){this.isAbsolute=true;return this},relatively:function(){this.isAbsolute=false;return this},moveTo:function(R,AF){var AE=this.isAbsolute?"M":"m";AE+=parseFloat(R).toFixed(3)+" "+parseFloat(AF).toFixed(3)+" ";var AD=this[0].getAttribute("d")||"";(AD=="M0,0")&&(AD="");this[0].setAttribute("d",AD+AE);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(R);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AF);this.attrs.path=AD+AE;return this},lineTo:function(R,AF){this.last.x=(!this.isAbsolute*this.last.x)+parseFloat(R);this.last.y=(!this.isAbsolute*this.last.y)+parseFloat(AF);var AE=this.isAbsolute?"L":"l";AE+=parseFloat(R).toFixed(3)+" "+parseFloat(AF).toFixed(3)+" ";var AD=this.node.getAttribute("d")||"";this.node.setAttribute("d",AD+AE);this.attrs.path=AD+AE;return this},arcTo:function(AH,AG,AF,AE,R,AJ){var AI=this.isAbsolute?"A":"a";AI+=[parseFloat(AH).toFixed(3),parseFloat(AG).toFixed(3),0,AF,AE,parseFloat(R).toFixed(3),parseFloat(AJ).toFixed(3)].join(" ");var AD=this[0].getAttribute("d")||"";this.node.setAttribute("d",AD+AI);this.last.x=parseFloat(R);this.last.y=parseFloat(AJ);this.attrs.path=AD+AI;return this},cplineTo:function(R,AL,AF){if(!AF){return this.lineTo(R,AL)}else{var AD={},AK=parseFloat(R),AI=parseFloat(AL),AM=parseFloat(AF),AH=this.isAbsolute?"C":"c",AG=[+this.last.x+AM,+this.last.y,AK-AM,AI,AK,AI];for(var AE=0,AN=AG.length;AE<AN;AE++){AH+=AG[AE]+" "}this.last.x=(this.isAbsolute?0:this.last.x)+AG[4];this.last.y=(this.isAbsolute?0:this.last.y)+AG[5];this.last.bx=AG[2];this.last.by=AG[3];var AJ=this.node.getAttribute("d")||"";this.node.setAttribute("d",AJ+AH);this.attrs.path=AJ+AH;return this}},curveTo:function(){var AF={},AG=[0,1,2,3,"s",5,"c"][arguments.length];if(this.isAbsolute){AG=AG.toUpperCase()}for(var AD=0,AE=arguments.length;AD<AE;AD++){AG+=parseFloat(arguments[AD]).toFixed(3)+" "}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1]);this.last.bx=parseFloat(arguments[arguments.length-4]);this.last.by=parseFloat(arguments[arguments.length-3]);var R=this.node.getAttribute("d")||"";this.node.setAttribute("d",R+AG);this.attrs.path=R+AG;return this},qcurveTo:function(){var AF={},AG=[0,1,"t",3,"q"][arguments.length];if(this.isAbsolute){AG=AG.toUpperCase()}for(var AD=0,AE=arguments.length;AD<AE;AD++){AG+=parseFloat(arguments[AD]).toFixed(3)+" "}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1]);if(arguments.length!=2){this.last.qx=parseFloat(arguments[arguments.length-4]);this.last.qy=parseFloat(arguments[arguments.length-3])}var R=this.node.getAttribute("d")||"";this.node.setAttribute("d",R+AG);this.attrs.path=R+AG;return this},addRoundedCorner:d,andClose:function(){var R=this[0].getAttribute("d")||"";this[0].setAttribute("d",R+"Z ");this.attrs.path=R+"Z ";return this}};var AB=function(AG,R,AH){AG=AG||{};var AD=H.createElementNS(AH.svgns,"path");if(AH.canvas){AH.canvas.appendChild(AD)}var AF=new L(AD,AH);AF.isAbsolute=true;for(var AE in q){AF[AE]=q[AE]}AF.type="path";AF.last={x:0,y:0,bx:0,by:0};if(R){AF.attrs.path=""+R;AF.absolutely();A.pathfinder(AF,AF.attrs.path)}if(AG){!AG.gradient&&(AG.fill=AG.fill||"none");AG.stroke=AG.stroke||"#000"}else{AG={fill:"none",stroke:"#000"}}N(AF,AG);return AF};var E=function(AI,AG,AJ){AG=K(AG);var AF=H.createElementNS(AJ.svgns,(AG.type||"linear")+"Gradient");AF.id="raphael-gradient-"+F.idGenerator++;if(AG.vector&&AG.vector.length){AF.setAttribute("x1",AG.vector[0]);AF.setAttribute("y1",AG.vector[1]);AF.setAttribute("x2",AG.vector[2]);AF.setAttribute("y2",AG.vector[3])}AJ.defs.appendChild(AF);var AH=true;for(var AD=0,AE=AG.dots.length;AD<AE;AD++){var R=H.createElementNS(AJ.svgns,"stop");if(AG.dots[AD].offset){AH=false}R.setAttribute("offset",AG.dots[AD].offset?AG.dots[AD].offset:(AD==0)?"0%":"100%");R.setAttribute("stop-color",F.getRGB(AG.dots[AD].color).hex||"#fff");AF.appendChild(R)}if(AH&&typeof AG.dots[AE-1].opacity!="undefined"){R.setAttribute("stop-opacity",AG.dots[AE-1].opacity)}AI.setAttribute("fill","url(#"+AF.id+")");AI.style.fill="";AI.style.opacity=1;AI.style.fillOpacity=1;AI.setAttribute("opacity",1);AI.setAttribute("fill-opacity",1)};var W=function(AD){if(AD.pattern){var R=AD.getBBox();AD.pattern.setAttribute("patternTransform","translate(".concat(R.x,",",R.y,")"))}};var N=function(AM,AN){var AT={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},AP=AM.node,AO=AM.attrs,AJ=AO.rotation,AH=function(Ab,Aa){Aa=AT[Aa.toString().toLowerCase()];if(Aa){var AZ=Ab.attrs["stroke-width"]||"1",AW={round:AZ,square:AZ,butt:0}[Ab.attrs["stroke-linecap"]||AN["stroke-linecap"]]||0,AV=[];for(var AX=0,AY=Aa.length;AX<AY;AX++){AV.push(Aa[AX]*AZ+((AX%2)?1:-1)*AW)}Aa=AV.join(",");AP.setAttribute("stroke-dasharray",Aa)}};AM.rotate(0,true);for(var AQ in AN){if(!(AQ in c)){continue}var AR=AN[AQ];AO[AQ]=AR;switch(AQ){case"href":case"title":case"target":var AS=AP.parentNode;if(AS.tagName.toLowerCase()!="a"){var AE=H.createElementNS(AM.paper.svgns,"a");AS.insertBefore(AE,AP);AE.appendChild(AP);AS=AE}AS.setAttributeNS(AM.paper.xlink,AQ,AR);break;case"path":if(AM.type=="path"){AP.setAttribute("d","M0,0");A.pathfinder(AM,AR)}case"width":AP.setAttribute(AQ,AR);if(AO.fx){AQ="x";AR=AO.x}else{break}case"x":if(AO.fx){AR=-AO.x-(AO.width||0)}case"rx":case"cx":AP.setAttribute(AQ,AR);W(AM);break;case"height":AP.setAttribute(AQ,AR);if(AO.fy){AQ="y";AR=AO.y}else{break}case"y":if(AO.fy){AR=-AO.y-(AO.height||0)}case"ry":case"cy":AP.setAttribute(AQ,AR);W(AM);break;case"r":if(AM.type=="rect"){AP.setAttribute("rx",AR);AP.setAttribute("ry",AR)}else{AP.setAttribute(AQ,AR)}break;case"src":if(AM.type=="image"){AP.setAttributeNS(AM.paper.xlink,"href",AR)}break;case"stroke-width":AP.style.strokeWidth=AR;AP.setAttribute(AQ,AR);if(AO["stroke-dasharray"]){AH(AM,AO["stroke-dasharray"])}break;case"stroke-dasharray":AH(AM,AR);break;case"rotation":AM.rotate(AR,true);break;case"skewX":AM.skewY(AR);break;case"skewY":AM.skewY(AR);break;case"translation":var AG=(AR+"").split(AC);AM.translate((+AG[0]+1||2)-1,(+AG[1]+1||2)-1);break;case"scale":var AG=(AR+"").split(AC);AM.scale(+AG[0]||1,+AG[1]||+AG[0]||1,+AG[2]||null,+AG[3]||null);break;case"matrix":var AG=(AR+"").split(AC);AM.matrix(+AG[0]||1,+AG[1]||0,+AG[2]||0,+AG[3]||1,+AG[4]||0,+AG[5]||0);break;case"fill":var AF=(AR+"").match(/^url\(([^\)]+)\)$/i);if(AF){var R=H.createElementNS(AM.paper.svgns,"pattern"),AL=H.createElementNS(AM.paper.svgns,"image");R.id="raphael-pattern-"+F.idGenerator++;R.setAttribute("x",0);R.setAttribute("y",0);R.setAttribute("patternUnits","userSpaceOnUse");AL.setAttribute("x",0);AL.setAttribute("y",0);AL.setAttributeNS(AM.paper.xlink,"href",AF[1]);R.appendChild(AL);var AU=H.createElement("img");AU.style.position="absolute";AU.style.top="-9999em";AU.style.left="-9999em";AU.onload=function(){R.setAttribute("width",this.offsetWidth);R.setAttribute("height",this.offsetHeight);AL.setAttribute("width",this.offsetWidth);AL.setAttribute("height",this.offsetHeight);H.body.removeChild(this);A.safari()};H.body.appendChild(AU);AU.src=AF[1];AM.paper.defs.appendChild(R);AP.style.fill="url(#"+R.id+")";AP.setAttribute("fill","url(#"+R.id+")");AM.pattern=R;W(AM);break}delete AN.gradient;delete AO.gradient;if(typeof AO.opacity!="undefined"&&typeof AN.opacity=="undefined"){AP.style.opacity=AO.opacity;AP.setAttribute("opacity",AO.opacity)}if(typeof AO["fill-opacity"]!="undefined"&&typeof AN["fill-opacity"]=="undefined"){AP.style.fillOpacity=AM.attrs["fill-opacity"];AP.setAttribute("fill-opacity",AO["fill-opacity"])}case"stroke":AP.style[AQ]=F.getRGB(AR).hex;AP.setAttribute(AQ,F.getRGB(AR).hex);break;case"gradient":E(AP,AR,AM.paper);break;case"opacity":case"fill-opacity":if(AO.gradient){var AD=H.getElementById(AP.getAttribute("fill").replace(/^url\(#|\)$/g,""));if(AD){var AI=AD.getElementsByTagName("stop");AI[AI.length-1].setAttribute("stop-opacity",AR)}break}default:var AK=AQ.replace(/(\-.)/g,function(AV){return AV.substring(1).toUpperCase()});AP.style[AK]=AR;AP.setAttribute(AQ,AR);break}}x(AM,AN);AM.rotate(AO.rotation,true)};var r=1.2;var x=function(R,AF){if(R.type!="text"||!("text" in AF||"font" in AF||"font-size" in AF||"x" in AF||"y" in AF)){return }var AK=R.attrs,AD=R.node,AM=AD.firstChild?parseInt(H.defaultView.getComputedStyle(AD.firstChild,"").getPropertyValue("font-size"),10):10;if("text" in AF){while(AD.firstChild){AD.removeChild(AD.firstChild)}var AE=(AF.text+"").split("\n");for(var AG=0,AL=AE.length;AG<AL;AG++){var AI=H.createElementNS(R.paper.svgns,"tspan");AG&&AI.setAttribute("dy",AM*r);AG&&AI.setAttribute("x",AK.x);AI.appendChild(H.createTextNode(AE[AG]));AD.appendChild(AI)}}else{var AE=AD.getElementsByTagName("tspan");for(var AG=0,AL=AE.length;AG<AL;AG++){AG&&AE[AG].setAttribute("dy",AM*r);AG&&AE[AG].setAttribute("x",AK.x)}}AD.setAttribute("y",AK.y);var AH=R.getBBox(),AJ=AK.y-(AH.y+AH.height/2);AJ&&AD.setAttribute("y",AK.y+AJ)};var L=function(AD,R){var AF=0,AE=0;this[0]=AD;this.node=AD;this.paper=R;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,x:0,y:0},sx:1,sy:1,kx:0,ky:0}};L.prototype.rotate=function(AD,R,AF){if(AD==null){return this._.rt.deg}var AE=this.getBBox();AD=AD.toString().split(AC);if(AD.length-1){R=parseFloat(AD[1]);AF=parseFloat(AD[2])}AD=parseFloat(AD[0]);if(R!=null){this._.rt.deg=AD}else{this._.rt.deg+=AD}if(AF==null){R=null}R=R==null?AE.x+AE.width/2:R;AF=AF==null?AE.y+AE.height/2:AF;if(this._.rt.deg){this.transformations[0]=("rotate("+this._.rt.deg+" "+R+" "+AF+")")}else{this.transformations[0]=""}this.node.setAttribute("transform",this.transformations.join(" "));return this};L.prototype.skewX=function(R){if(R==null){return this._.kx}this._.kx=R;this.transformations[3]=("skewX("+this._.kx+")");this.node.setAttribute("transform",this.transformations.join(" "));return this};L.prototype.skewY=function(R){if(R==null){return this._.ky}this._.ky=R;this.transformations[4]=("skewY("+this._.ky+")");this.node.setAttribute("transform",this.transformations.join(" "));return this};L.prototype.matrix=function(AD,R,AH,AG,AF,AE){if(AD==null){return this._.m}this._.m={a:AD,b:R,c:AH,d:AG,e:AF,f:AE};this.transformations[5]=("matrix("+this._.m.a+", "+this._.m.b+", "+this._.m.c+", "+this._.m.d+", "+this._.m.e+", "+this._.m.f+")");this.node.setAttribute("transform",this.transformations.join(" "));return this};L.prototype.hide=function(){this.node.style.display="none";return this};L.prototype.show=function(){this.node.style.display="block";return this};L.prototype.remove=function(){this.node.parentNode.removeChild(this.node)};L.prototype.getBBox=function(){if(this.node.style.display=="none"){this.show();var AD=true}var AH={};try{AH=this.node.getBBox()}catch(AF){}finally{AH=AH||{}}if(this.type=="text"){AH={x:AH.x,y:Infinity,width:AH.width,height:0};for(var R=0,AE=this.node.getNumberOfChars();R<AE;R++){var AG=this.node.getExtentOfChar(R);(AG.y<AH.y)&&(AH.y=AG.y);(AG.y+AG.height-AH.y>AH.height)&&(AH.height=AG.y+AG.height-AH.y)}}AD&&this.hide();return AH};L.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate()}return this.attrs[arguments[0]]}if(arguments.length==1&&F.isArray(arguments[0])){var AD={};for(var R in arguments[0]){AD[arguments[0][R]]=this.attrs[arguments[0][R]]}return AD}if(arguments.length==2){var AE={};AE[arguments[0]]=arguments[1];N(this,AE)}else{if(arguments.length==1&&typeof arguments[0]=="object"){N(this,arguments[0])}}return this};L.prototype.toFront=function(){this.node.parentNode.appendChild(this.node);return this};L.prototype.toBack=function(){if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild)}return this};L.prototype.insertAfter=function(R){if(R.node.nextSibling){R.node.parentNode.insertBefore(this.node,R.node.nextSibling)}else{R.node.parentNode.appendChild(this.node)}return this};L.prototype.insertBefore=function(R){var AD=R.node;AD.parentNode.insertBefore(this.node,AD);return this};var S=function(AD,R,AH,AG){var AF=H.createElementNS(AD.svgns,"circle");AF.setAttribute("cx",R);AF.setAttribute("cy",AH);AF.setAttribute("r",AG);AF.setAttribute("fill","none");AF.setAttribute("stroke","#000");if(AD.canvas){AD.canvas.appendChild(AF)}var AE=new L(AF,AD);AE.attrs=AE.attrs||{};AE.attrs.cx=R;AE.attrs.cy=AH;AE.attrs.r=AG;AE.attrs.stroke="#000";AE.type="circle";return AE};var I=function(AE,R,AJ,AD,AH,AI){var AG=H.createElementNS(AE.svgns,"rect");AG.setAttribute("x",R);AG.setAttribute("y",AJ);AG.setAttribute("width",AD);AG.setAttribute("height",AH);if(AI){AG.setAttribute("rx",AI);AG.setAttribute("ry",AI)}AG.setAttribute("fill","none");AG.setAttribute("stroke","#000");if(AE.canvas){AE.canvas.appendChild(AG)}var AF=new L(AG,AE);AF.attrs=AF.attrs||{};AF.attrs.x=R;AF.attrs.y=AJ;AF.attrs.width=AD;AF.attrs.height=AH;AF.attrs.stroke="#000";if(AI){AF.attrs.rx=AF.attrs.ry=AI}AF.type="rect";return AF};var n=function(AD,R,AI,AH,AG){var AF=H.createElementNS(AD.svgns,"ellipse");AF.setAttribute("cx",R);AF.setAttribute("cy",AI);AF.setAttribute("rx",AH);AF.setAttribute("ry",AG);AF.setAttribute("fill","none");AF.setAttribute("stroke","#000");if(AD.canvas){AD.canvas.appendChild(AF)}var AE=new L(AF,AD);AE.attrs=AE.attrs||{};AE.attrs.cx=R;AE.attrs.cy=AI;AE.attrs.rx=AH;AE.attrs.ry=AG;AE.attrs.stroke="#000";AE.type="ellipse";return AE};var V=function(AE,AI,R,AJ,AD,AH){var AG=H.createElementNS(AE.svgns,"image");AG.setAttribute("x",R);AG.setAttribute("y",AJ);AG.setAttribute("width",AD);AG.setAttribute("height",AH);AG.setAttribute("preserveAspectRatio","none");AG.setAttributeNS(AE.xlink,"href",AI);if(AE.canvas){AE.canvas.appendChild(AG)}var AF=new L(AG,AE);AF.attrs=AF.attrs||{};AF.attrs.x=R;AF.attrs.y=AJ;AF.attrs.width=AD;AF.attrs.height=AH;AF.type="image";return AF};var M=function(AD,R,AH,AG){var AF=H.createElementNS(AD.svgns,"text");AF.setAttribute("x",R);AF.setAttribute("y",AH);AF.setAttribute("text-anchor","middle");if(AD.canvas){AD.canvas.appendChild(AF)}var AE=new L(AF,AD);AE.attrs=AE.attrs||{};AE.attrs.x=R;AE.attrs.y=AH;AE.type="text";N(AE,{font:c.font,stroke:"none",fill:"#000",text:AG});return AE};var g=function(R,AD){this.width=R||this.width;this.height=AD||this.height;this.canvas.setAttribute("width",this.width);this.canvas.setAttribute("height",this.height);return this};var j=function(){var AD=O.apply(null,arguments),AF=AD.container,R=AD.x,AI=AD.y,AE=AD.width,AG=AD.height;if(!AF){throw new Error("SVG container not found.")}A.canvas=H.createElementNS(A.svgns,"svg");A.canvas.setAttribute("width",AE||512);A.width=AE||512;A.canvas.setAttribute("height",AG||342);A.height=AG||342;if(AF==1){H.body.appendChild(A.canvas);A.canvas.style.position="absolute";A.canvas.style.left=R+"px";A.canvas.style.top=AI+"px"}else{if(AF.firstChild){AF.insertBefore(A.canvas,AF.firstChild)}else{AF.appendChild(A.canvas)}}AF={canvas:A.canvas,clear:function(){while(this.canvas.firstChild){this.canvas.removeChild(this.canvas.firstChild)}this.defs=H.createElementNS(A.svgns,"defs");this.canvas.appendChild(this.defs)}};for(var AH in A){if(AH!="create"){AF[AH]=A[AH]}}z.call(AF,AF,F.fn);AF.clear();AF.raphael=F;return AF};A.remove=function(){this.canvas.parentNode.removeChild(this.canvas)};A.svgns="http://www.w3.org/2000/svg";A.xlink="http://www.w3.org/1999/xlink";A.safari=function(){if({"Apple Computer, Inc.":1,"Google Inc.":1}[navigator.vendor]){var R=this.rect(-this.width,-this.height,this.width*3,this.height*3).attr({stroke:"none"});setTimeout(function(){R.remove()})}}}if(F.vml){F.toString=function(){return"Your browser doesn\u2019t support SVG. Assuming it is Internet Explorer and falling down to VML.\nYou are running Rapha\u00ebl "+this.version};var q={absolutely:function(){this.isAbsolute=true;return this},relatively:function(){this.isAbsolute=false;return this},moveTo:function(R,AG){var AF=Math.round(parseFloat(R))-1,AE=Math.round(parseFloat(AG))-1,AD=this.isAbsolute?"m":"t";AD+=AF+" "+AE;this.node.path=this.Path+=AD;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(R);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AG);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"M":"m")+[R,AG];return this},lineTo:function(R,AG){var AF=Math.round(parseFloat(R))-1,AE=Math.round(parseFloat(AG))-1,AD=this.isAbsolute?"l":"r";AD+=AF+" "+AE;this.node.path=this.Path+=AD;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(R);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AG);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"L":"l")+[R,AG];return this},arcTo:function(AJ,AI,AG,AR,AP,AD){var AK=(this.isAbsolute?0:this.last.x)+parseFloat(AP)-1,AT=(this.isAbsolute?0:this.last.y)+parseFloat(AD)-1,AQ=this.last.x-1,AF=this.last.y-1,AM=(AQ-AK)/2,AL=(AF-AT)/2,AO=(AG==AR?-1:1)*Math.sqrt(Math.abs(AJ*AJ*AI*AI-AJ*AJ*AL*AL-AI*AI*AM*AM)/(AJ*AJ*AL*AL+AI*AI*AM*AM)),AE=AO*AJ*AL/AI+(AQ+AK)/2,R=AO*-AI*AM/AJ+(AF+AT)/2,AS=AR?(this.isAbsolute?"wa":"wr"):(this.isAbsolute?"at":"ar"),AH=Math.round(AE-AJ),AN=Math.round(R-AI);AS+=[AH,AN,Math.round(AH+AJ*2),Math.round(AN+AI*2),Math.round(AQ),Math.round(AF),Math.round(AK),Math.round(AT)].join(", ");this.node.path=this.Path+=AS;this.last.x=(this.isAbsolute?0:this.last.x)+AP;this.last.y=(this.isAbsolute?0:this.last.y)+AD;this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"A":"a")+[AJ,AI,0,AG,AR,AP,AD];return this},cplineTo:function(R,AJ,AE){if(!AE){return this.lineTo(R,AJ)}else{var AI=Math.round(parseFloat(R))-1,AH=Math.round(parseFloat(AJ))-1,AK=Math.round(parseFloat(AE)),AG=this.isAbsolute?"c":"v",AF=[Math.round(this.last.x)-1+AK,Math.round(this.last.y)-1,AI-AK,AH,AI,AH],AD=[this.last.x+AE,this.last.y,R-AE,AJ,R,AJ];AG+=AF.join(" ")+" ";this.last.x=(this.isAbsolute?0:this.last.x)+AF[4];this.last.y=(this.isAbsolute?0:this.last.y)+AF[5];this.last.bx=AF[2];this.last.by=AF[3];this.node.path=this.Path+=AG;this.attrs.path+=(this.isAbsolute?"C":"c")+AD;return this}},curveTo:function(){var AE=this.isAbsolute?"c":"v";if(arguments.length==6){this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[4]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[5]);AE+=[Math.round(parseFloat(arguments[0]))-1,Math.round(parseFloat(arguments[1]))-1,Math.round(parseFloat(arguments[2]))-1,Math.round(parseFloat(arguments[3]))-1,Math.round(parseFloat(arguments[4]))-1,Math.round(parseFloat(arguments[5]))-1].join(" ")+" ";this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"C":"c")+Array.prototype.splice.call(arguments,0,arguments.length)}if(arguments.length==4){var AD=this.last.x*2-this.last.bx,R=this.last.y*2-this.last.by;this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[0]);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[1]);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);AE+=[Math.round(AD)-1,Math.round(R)-1,Math.round(parseFloat(arguments[0]))-1,Math.round(parseFloat(arguments[1]))-1,Math.round(parseFloat(arguments[2]))-1,Math.round(parseFloat(arguments[3]))-1].join(" ")+" ";this.attrs.path+=(this.isAbsolute?"S":"s")+Array.prototype.splice.call(arguments,0,arguments.length)}this.node.path=this.Path+=AE;return this},qcurveTo:function(){var AE=Math.round(this.last.x)-1,AD=Math.round(this.last.y)-1,R=[];if(arguments.length==4){this.last.qx=(!this.isAbsolute*this.last.x)+parseFloat(arguments[0]);this.last.qy=(!this.isAbsolute*this.last.y)+parseFloat(arguments[1]);this.last.x=(!this.isAbsolute*this.last.x)+parseFloat(arguments[2]);this.last.y=(!this.isAbsolute*this.last.y)+parseFloat(arguments[3]);R=[this.last.qx,this.last.qy,this.last.x,this.last.y];this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"Q":"q")+Array.prototype.splice.call(arguments,0,arguments.length)}if(arguments.length==2){this.last.qx=this.last.x*2-this.last.qx;this.last.qy=this.last.y*2-this.last.qy;this.last.x=(!this.isAbsolute*this.last.x)+parseFloat(arguments[2]);this.last.y=(!this.isAbsolute*this.last.y)+parseFloat(arguments[3]);R=[this.last.qx,this.last.qy,this.last.x,this.last.y];this.attrs.path+=(this.isAbsolute?"T":"t")+Array.prototype.splice.call(arguments,0,arguments.length)}var AF="c"+[Math.round(2/3*R[0]+1/3*AE)-1,Math.round(2/3*R[1]+1/3*AD)-1,Math.round(2/3*R[0]+1/3*R[2])-1,Math.round(2/3*R[1]+1/3*R[3])-1,Math.round(R[2])-1,Math.round(R[3])-1].join(" ")+" ";this.node.path=this.Path+=AF;return this},addRoundedCorner:d,andClose:function(){this.node.path=(this.Path+="x");this.attrs.path+="z";return this}};var AB=function(AF,AE,AI){AF=AF||{};var AH=AA("group"),AG=AH.style;AG.position="absolute";AG.left=0;AG.top=0;AG.width=AI.width+"px";AG.height=AI.height+"px";AH.coordsize=AI.coordsize;AH.coordorigin=AI.coordorigin;var AD=AA("shape"),AK=AD.style;AK.width=AI.width+"px";AK.height=AI.height+"px";AD.path="";if(AF["class"]){AD.className="rvml "+AF["class"]}AD.coordsize=this.coordsize;AD.coordorigin=this.coordorigin;AH.appendChild(AD);var R=new L(AD,AH,AI);R.isAbsolute=true;R.type="path";R.path=[];R.last={x:0,y:0,bx:0,by:0,isAbsolute:true};R.Path="";for(var AJ in q){R[AJ]=q[AJ]}if(AE){R.absolutely();R.attrs.path="";A.pathfinder(R,""+AE)}if(AF){AF.fill=AF.fill||"none";AF.stroke=AF.stroke||"#000"}else{AF={fill:"none",stroke:"#000"}}N(R,AF);if(AF.gradient){E(R,AF.gradient)}R.setBox();AI.canvas.appendChild(AH);return R};var N=function(AD,AF){var AE=AD.node,AN=AE.style,AO,AH=AD;AD.attrs=AD.attrs||{};for(var AI in AF){AD.attrs[AI]=AF[AI]}AF.href&&(AE.href=AF.href);AF.title&&(AE.title=AF.title);AF.target&&(AE.target=AF.target);if(AF.path&&AD.type=="path"){AD.Path="";AD.path=[];AD.attrs.path="";A.pathfinder(AD,AF.path)}if(AF.rotation!=null){AD.rotate(AF.rotation,true)}if(AF.translation){AO=(AF.translation+"").split(AC);AD.translate(AO[0],AO[1])}if(AF.scale){AO=(AF.scale+"").split(AC);AD.scale(+AO[0]||1,+AO[1]||+AO[0]||1,+AO[2]||null,+AO[3]||null)}if(AD.type=="image"&&AF.src){AE.src=AF.src}if(AD.type=="image"&&AF.opacity){AE.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(AF.opacity*100)+")";AE.style.filter=(AE.filterMatrix||"")+(AE.filterOpacity||"")}AF.font&&(AN.font=AF.font);AF["font-family"]&&(AN.fontFamily='"'+AF["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,"")+'"');AF["font-size"]&&(AN.fontSize=AF["font-size"]);AF["font-weight"]&&(AN.fontWeight=AF["font-weight"]);AF["font-style"]&&(AN.fontStyle=AF["font-style"]);if(typeof AF.opacity!="undefined"||typeof AF["stroke-width"]!="undefined"||typeof AF.fill!="undefined"||typeof AF.stroke!="undefined"||AF["stroke-width"]||AF["stroke-opacity"]||AF["fill-opacity"]||AF["stroke-dasharray"]||AF["stroke-miterlimit"]||AF["stroke-linejoin"]||AF["stroke-linecap"]){AD=AD.shape||AE;var AL=(AD.getElementsByTagName("fill")&&AD.getElementsByTagName("fill")[0])||AA("fill");if("fill-opacity" in AF||"opacity" in AF){var R=((+AF["fill-opacity"]+1||2)-1)*((+AF.opacity+1||2)-1);R<0&&(R=0);R>1&&(R=1);AL.opacity=R}AF.fill&&(AL.on=true);if(typeof AL.on=="undefined"||AF.fill=="none"){AL.on=false}if(AL.on&&AF.fill){var AG=AF.fill.match(/^url\(([^\)]+)\)$/i);if(AG){AL.src=AG[1];AL.type="tile"}else{AL.color=F.getRGB(AF.fill).hex;AL.src="";AL.type="solid"}}AD.appendChild(AL);var AK=(AD.getElementsByTagName("stroke")&&AD.getElementsByTagName("stroke")[0])||AA("stroke");if((AF.stroke&&AF.stroke!="none")||AF["stroke-width"]||typeof AF["stroke-opacity"]!="undefined"||AF["stroke-dasharray"]||AF["stroke-miterlimit"]||AF["stroke-linejoin"]||AF["stroke-linecap"]){AK.on=true}if(AF.stroke=="none"||typeof AK.on=="undefined"||AF.stroke==0){AK.on=false}if(AK.on&&AF.stroke){AK.color=F.getRGB(AF.stroke).hex}var R=((+AF["stroke-opacity"]+1||2)-1)*((+AF.opacity+1||2)-1);R<0&&(R=0);R>1&&(R=1);AK.opacity=R;AF["stroke-linejoin"]&&(AK.joinstyle=AF["stroke-linejoin"]||"miter");AK.miterlimit=AF["stroke-miterlimit"]||8;AF["stroke-linecap"]&&(AK.endcap={butt:"flat",square:"square",round:"round"}[AF["stroke-linecap"]]||"miter");AF["stroke-width"]&&(AK.weight=(parseFloat(AF["stroke-width"])||1)*12/16);if(AF["stroke-dasharray"]){var AM={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};AK.dashstyle=AM[AF["stroke-dasharray"]]||""}AD.appendChild(AK)}if(AH.type=="text"){var AN=A.span.style,AJ=AH.attrs;AJ.font&&(AN.font=AJ.font);AJ["font-family"]&&(AN.fontFamily=AJ["font-family"]);AJ["font-size"]&&(AN.fontSize=AJ["font-size"]);AJ["font-weight"]&&(AN.fontWeight=AJ["font-weight"]);AJ["font-style"]&&(AN.fontStyle=AJ["font-style"]);A.span.innerText=AH.node.string;AH.W=AJ.w=A.span.offsetWidth;AH.H=AJ.h=A.span.offsetHeight;AH.X=AJ.x;AH.Y=AJ.y+Math.round(AH.H/2);switch(AJ["text-anchor"]){case"start":AH.node.style["v-text-align"]="left";AH.bbx=Math.round(AH.W/2);break;case"end":AH.node.style["v-text-align"]="right";AH.bbx=-Math.round(AH.W/2);break;default:AH.node.style["v-text-align"]="center";break}}};var T=function(AD,R,AG,AF){var AE=Math.round(Math.atan((parseFloat(AG)-parseFloat(AD))/(parseFloat(AF)-parseFloat(R)))*57.29)||0;if(!AE&&parseFloat(AD)<parseFloat(R)){AE=180}AE-=180;if(AE<0){AE+=360}return AE};var E=function(AI,AH){AH=K(AH);AI.attrs=AI.attrs||{};var R=AI.attrs,AG=AI.node.getElementsByTagName("fill");AI.attrs.gradient=AH;AI=AI.shape||AI.node;if(AG.length){AG=AG[0]}else{AG=AA("fill")}if(AH.dots.length){AG.on=true;AG.method="none";AG.type=((AH.type+"").toLowerCase()=="radial")?"gradientTitle":"gradient";if(typeof AH.dots[0].color!="undefined"){AG.color=F.getRGB(AH.dots[0].color).hex}if(typeof AH.dots[AH.dots.length-1].color!="undefined"){AG.color2=F.getRGB(AH.dots[AH.dots.length-1].color).hex}var AJ=[];for(var AD=0,AF=AH.dots.length;AD<AF;AD++){if(AH.dots[AD].offset){AJ.push(AH.dots[AD].offset+" "+F.getRGB(AH.dots[AD].color).hex)}}var AE=typeof AH.dots[AH.dots.length-1].opacity=="undefined"?(typeof R.opacity=="undefined"?1:R.opacity):AH.dots[AH.dots.length-1].opacity;if(AJ.length){AG.colors.value=AJ.join(",");AE=typeof R.opacity=="undefined"?1:R.opacity}else{AG.colors&&(AG.colors.value="0% "+AG.color)}AG.opacity=AE;if(typeof AH.angle!="undefined"){AG.angle=(-AH.angle+270)%360}else{if(AH.vector){AG.angle=T.apply(null,AH.vector)}}if((AH.type+"").toLowerCase()=="radial"){AG.focus="100%";AG.focusposition="0.5 0.5"}}};var L=function(AG,AI,R){var AH=0,AE=0,AD=0,AF=1;this[0]=AG;this.node=AG;this.X=0;this.Y=0;this.attrs={};this.Group=AI;this.paper=R;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1}};L.prototype.rotate=function(AD,R,AE){if(AD==null){return this._.rt.deg}AD=(AD+"").split(AC);if(AD.length-1){R=parseFloat(AD[1]);AE=parseFloat(AD[2])}AD=parseFloat(AD[0]);if(R!=null){this._.rt.deg=AD}else{this._.rt.deg+=AD}if(AE==null){R=null}this._.rt.cx=R;this._.rt.cy=AE;this.setBox(this.attrs,R,AE);this.Group.style.rotation=this._.rt.deg;return this};L.prototype.setBox=function(AI,AG,AF){var AD=this.Group.style,AH=(this.shape&&this.shape.style)||this.node.style;AI=AI||{};for(var AJ in AI){this.attrs[AJ]=AI[AJ]}AG=AG||this._.rt.cx;AF=AF||this._.rt.cy;var AM=this.attrs,AQ,AO,AR,AL;switch(this.type){case"circle":AQ=AM.cx-AM.r;AO=AM.cy-AM.r;AR=AL=AM.r*2;break;case"ellipse":AQ=AM.cx-AM.rx;AO=AM.cy-AM.ry;AR=AM.rx*2;AL=AM.ry*2;break;case"rect":case"image":AQ=AM.x;AO=AM.y;AR=AM.width||0;AL=AM.height||0;break;case"text":this.textpath.v=["m",Math.round(AM.x),", ",Math.round(AM.y-2),"l",Math.round(AM.x)+1,", ",Math.round(AM.y-2)].join("");AQ=AM.x-Math.round(this.W/2);AO=AM.y-this.H/2;AR=this.W;AL=this.H;break;case"path":if(!this.attrs.path){AQ=0;AO=0;AR=this.paper.width;AL=this.paper.height}else{var AK=Q(this.attrs.path),AQ=AK.x;AO=AK.y;AR=AK.width;AL=AK.height}break;default:AQ=0;AO=0;AR=this.paper.width;AL=this.paper.height;break}AG=(AG==null)?AQ+AR/2:AG;AF=(AF==null)?AO+AL/2:AF;var AE=AG-this.paper.width/2,AN=AF-this.paper.height/2;if(this.type=="path"||this.type=="text"){(AD.left!=AE+"px")&&(AD.left=AE+"px");(AD.top!=AN+"px")&&(AD.top=AN+"px");this.X=this.type=="text"?AQ:-AE;this.Y=this.type=="text"?AO:-AN;this.W=AR;this.H=AL;(AH.left!=-AE+"px")&&(AH.left=-AE+"px");(AH.top!=-AN+"px")&&(AH.top=-AN+"px")}else{(AD.left!=AE+"px")&&(AD.left=AE+"px");(AD.top!=AN+"px")&&(AD.top=AN+"px");this.X=AQ;this.Y=AO;this.W=AR;this.H=AL;(AD.width!=this.paper.width+"px")&&(AD.width=this.paper.width+"px");(AD.height!=this.paper.height+"px")&&(AD.height=this.paper.height+"px");(AH.left!=AQ-AE+"px")&&(AH.left=AQ-AE+"px");(AH.top!=AO-AN+"px")&&(AH.top=AO-AN+"px");(AH.width!=AR+"px")&&(AH.width=AR+"px");(AH.height!=AL+"px")&&(AH.height=AL+"px");var AP=(+AI.r||0)/(Math.min(AR,AL));if(this.type=="rect"&&this.arcsize!=AP&&(AP||this.arcsize)){var R=AA(AP?"roundrect":"rect");R.arcsize=AP;this.Group.appendChild(R);this.node.parentNode.removeChild(this.node);this.node=R;this.arcsize=AP;N(this,this.attrs);this.setBox(this.attrs)}}};L.prototype.hide=function(){this.Group.style.display="none";return this};L.prototype.show=function(){this.Group.style.display="block";return this};L.prototype.getBBox=function(){if(this.type=="path"){return Q(this.attr("path"))}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};L.prototype.remove=function(){this[0].parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape)};L.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate()}return this.attrs[arguments[0]]}if(this.attrs&&arguments.length==1&&F.isArray(arguments[0])){var AE={};for(var R=0,AD=arguments[0].length;R<AD;R++){AE[arguments[0][R]]=this.attrs[arguments[0][R]]}return AE}var AF;if(arguments.length==2){AF={};AF[arguments[0]]=arguments[1]}if(arguments.length==1&&typeof arguments[0]=="object"){AF=arguments[0]}if(AF){if(AF.gradient){E(this,AF.gradient)}if(AF.text&&this.type=="text"){this.node.string=AF.text}N(this,AF);this.setBox(this.attrs)}return this};L.prototype.toFront=function(){this.Group.parentNode.appendChild(this.Group);return this};L.prototype.toBack=function(){if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild)}return this};L.prototype.insertAfter=function(R){if(R.Group.nextSibling){R.Group.parentNode.insertBefore(this.Group,R.Group.nextSibling)}else{R.Group.parentNode.appendChild(this.Group)}return this};L.prototype.insertBefore=function(R){R.Group.parentNode.insertBefore(this.Group,R.Group);return this};var S=function(R,AK,AJ,AD){var AG=AA("group"),AF=AG.style,AE=AA("oval"),AI=AE.style;AF.position="absolute";AF.left=0;AF.top=0;AF.width=R.width+"px";AF.height=R.height+"px";AG.coordsize=R.coordsize;AG.coordorigin=R.coordorigin;AG.appendChild(AE);var AH=new L(AE,AG,R);AH.type="circle";N(AH,{stroke:"#000",fill:"none"});AH.attrs.cx=AK;AH.attrs.cy=AJ;AH.attrs.r=AD;AH.setBox({x:AK-AD,y:AJ-AD,width:AD*2,height:AD*2});R.canvas.appendChild(AG);return AH};var I=function(R,AL,AJ,AM,AF,AD){var AH=AA("group"),AG=AH.style,AE=AA(AD?"roundrect":"rect"),AK=(+AD||0)/(Math.min(AM,AF));AE.arcsize=AK;AG.position="absolute";AG.left=0;AG.top=0;AG.width=R.width+"px";AG.height=R.height+"px";AH.coordsize=R.coordsize;AH.coordorigin=R.coordorigin;AH.appendChild(AE);var AI=new L(AE,AH,R);AI.type="rect";N(AI,{stroke:"#000"});AI.arcsize=AK;AI.setBox({x:AL,y:AJ,width:AM,height:AF,r:+AD});R.canvas.appendChild(AH);return AI};var n=function(R,AL,AK,AE,AD){var AH=AA("group"),AG=AH.style,AF=AA("oval"),AJ=AF.style;AG.position="absolute";AG.left=0;AG.top=0;AG.width=R.width+"px";AG.height=R.height+"px";AH.coordsize=R.coordsize;AH.coordorigin=R.coordorigin;AH.appendChild(AF);var AI=new L(AF,AH,R);AI.type="ellipse";N(AI,{stroke:"#000"});AI.attrs.cx=AL;AI.attrs.cy=AK;AI.attrs.rx=AE;AI.attrs.ry=AD;AI.setBox({x:AL-AE,y:AK-AD,width:AE*2,height:AD*2});R.canvas.appendChild(AH);return AI};var V=function(R,AD,AL,AK,AM,AF){var AH=AA("group"),AG=AH.style,AE=AA("image"),AJ=AE.style;AG.position="absolute";AG.left=0;AG.top=0;AG.width=R.width+"px";AG.height=R.height+"px";AH.coordsize=R.coordsize;AH.coordorigin=R.coordorigin;AE.src=AD;AH.appendChild(AE);var AI=new L(AE,AH,R);AI.type="image";AI.attrs.x=AL;AI.attrs.y=AK;AI.attrs.w=AM;AI.attrs.h=AF;AI.setBox({x:AL,y:AK,width:AM,height:AF});R.canvas.appendChild(AH);return AI};var M=function(AD,AL,AK,AM){var AH=AA("group"),AF=AH.style,AG=AA("shape"),AJ=AG.style,AN=AA("path"),R=AN.style,AE=AA("textpath");AF.position="absolute";AF.left=0;AF.top=0;AF.width=AD.width+"px";AF.height=AD.height+"px";AH.coordsize=AD.coordsize;AH.coordorigin=AD.coordorigin;AN.v=["m",Math.round(AL),", ",Math.round(AK),"l",Math.round(AL)+1,", ",Math.round(AK)].join("");AN.textpathok=true;AJ.width=AD.width;AJ.height=AD.height;AF.position="absolute";AF.left=0;AF.top=0;AF.width=AD.width;AF.height=AD.height;AE.string=AM;AE.on=true;AG.appendChild(AE);AG.appendChild(AN);AH.appendChild(AG);var AI=new L(AE,AH,AD);AI.shape=AG;AI.textpath=AN;AI.type="text";AI.attrs.x=AL;AI.attrs.y=AK;AI.attrs.w=1;AI.attrs.h=1;N(AI,{font:c.font,stroke:"none",fill:"#000"});AI.setBox();AD.canvas.appendChild(AH);return AI};var g=function(AD,AE){var R=this.canvas.style;this.width=AD||this.width;this.height=AE||this.height;R.width=this.width+"px";R.height=this.height+"px";R.clip="rect(0 "+this.width+"px "+this.height+"px 0)";this.canvas.coordsize=this.width+" "+this.height;return this};H.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{if(!H.namespaces.rvml){H.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}var AA=function(R){return H.createElement("<rvml:"+R+' class="rvml">')}}catch(y){var AA=function(R){return H.createElement("<"+R+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}var j=function(){var AD=O.apply(null,arguments),AG=AD.container,AJ=AD.x,AI=AD.y,AE=AD.width,AL,AK=AD.height;if(!AG){throw new Error("VML container not found.")}var AH=A.canvas=H.createElement("div"),AF=AH.style;AE=parseFloat(AE)||"512px";AK=parseFloat(AK)||"342px";A.width=AE;A.height=AK;A.coordsize=AE+" "+AK;A.coordorigin="0 0";A.span=H.createElement("span");AL=A.span.style;AH.appendChild(A.span);AL.position="absolute";AL.left="-99999px";AL.top="-99999px";AL.padding=0;AL.margin=0;AL.lineHeight=1;AL.display="inline";AF.width=AE+"px";AF.height=AK+"px";AF.position="absolute";AF.clip="rect(0 "+AE+"px "+AK+"px 0)";if(AG==1){H.body.appendChild(AH);AF.left=AJ+"px";AF.top=AI+"px";AG={style:{width:AE,height:AK}}}else{AG.style.width=AE;AG.style.height=AK;if(AG.firstChild){AG.insertBefore(AH,AG.firstChild)}else{AG.appendChild(AH)}}for(var R in A){AG[R]=A[R]}z.call(AG,AG,F.fn);AG.clear=function(){while(AH.firstChild){AH.removeChild(AH.firstChild)}};AG.raphael=F;return AG};A.remove=function(){this.canvas.parentNode.removeChild(this.canvas)};A.safari=function(){}}var l=(function(){if(H.addEventListener){return function(AG,AE,AD,R){var AF=function(AH){return AD.call(R,AH)};AG.addEventListener(AE,AF,false);return function(){AG.removeEventListener(AE,AF,false);return true}}}else{if(H.attachEvent){return function(AH,AF,AE,AD){var AG=function(AI){return AE.call(AD,AI||s.event)};AH.attachEvent("on"+AF,AG);var R=function(){AH.detachEvent("on"+AF,AG);return true};if(AF=="mouseover"){AH.attachEvent("onmouseenter",AG);return function(){AH.detachEvent("onmouseenter",AG);return R()}}else{if(AF=="mouseout"){AH.attachEvent("onmouseleave",AG);return function(){AH.detachEvent("onmouseleave",AG);return R()}}}return R}}}})();for(var u=Y.length;u--;){(function(R){L.prototype[R]=function(AD){if(typeof AD=="function"){this.events=this.events||{};this.events[R]=this.events[R]||{};this.events[R][AD]=this.events[R][AD]||[];this.events[R][AD].push(l(this.shape||this.node,R,AD,this))}return this};L.prototype["un"+R]=function(AD){this.events&&this.events[R]&&this.events[R][AD]&&this.events[R][AD].length&&this.events[R][AD].shift()()&&!this.events[R][AD].length&&delete this.events[R][AD]}})(Y[u])}A.circle=function(R,AE,AD){return S(this,R,AE,AD)};A.rect=function(R,AG,AD,AE,AF){return I(this,R,AG,AD,AE,AF)};A.ellipse=function(R,AF,AE,AD){return n(this,R,AF,AE,AD)};A.path=function(AD,R){return AB(AD,R,this)};A.image=function(AF,R,AG,AD,AE){return V(this,AF,R,AG,AD,AE)};A.text=function(R,AE,AD){return M(this,R,AE,AD)};A.drawGrid=function(AK,AJ,AL,AF,AG,AI,AD){AD=AD||"#000";var AM=["M",AK,AJ,"L",AK+AL,AJ,AK+AL,AJ+AF,AK,AJ+AF,AK,AJ],R=AF/AI,AH=AL/AG;for(var AE=1;AE<AI;AE++){AM=AM.concat(["M",AK,AJ+AE*R,"L",AK+AL,AJ+AE*R])}for(var AE=1;AE<AG;AE++){AM=AM.concat(["M",AK+AE*AH,AJ,"L",AK+AE*AH,AJ+AF])}return this.path({stroke:AD,"stroke-width":1},AM.join(","))};A.pathfinder=function(AH,AG){var AF={M:function(AI,AJ){this.moveTo(AI,AJ)},C:function(AL,AN,AJ,AM,AI,AK){this.curveTo(AL,AN,AJ,AM,AI,AK)},Q:function(AJ,AL,AI,AK){this.qcurveTo(AJ,AL,AI,AK)},T:function(AI,AJ){this.qcurveTo(AI,AJ)},S:function(AJ,AL,AI,AK){AH.curveTo(AJ,AL,AI,AK)},L:function(AI,AJ){AH.lineTo(AI,AJ)},H:function(AI){this.lineTo(AI,this.last.y)},V:function(AI){this.lineTo(this.last.x,AI)},A:function(AM,AL,AJ,AK,AN,AI,AO){this.arcTo(AM,AL,AK,AN,AI,AO)},Z:function(){this.andClose()}};AG=b(AG);for(var AD=0,AE=AG.length;AD<AE;AD++){var R=AG[AD].shift();AF[R].apply(AH,AG[AD]);AG[AD].unshift(R)}};A.set=function(R){return new J(R)};A.setSize=g;L.prototype.stop=function(){clearTimeout(this.animation_in_progress)};L.prototype.scale=function(AP,AN,AE,AD){if(AP==null&&AN==null){return{x:this._.sx,y:this._.sy,toString:function(){return this.x.toFixed(3)+" "+this.y.toFixed(3)}}}AN=AN||AP;!+AN&&(AN=AP);var AS,AR,AQ,AO,Ae=this.attrs;if(AP!=0){var AM=this.type=="path"?Q(Ae.path):this.getBBox(),AI=AM.x+AM.width/2,AG=AM.y+AM.height/2,Ad=AP/this._.sx,Ac=AN/this._.sy;AE=(+AE||AE==0)?AE:AI;AD=(+AD||AD==0)?AD:AG;var AL=Math.round(AP/Math.abs(AP)),AJ=Math.round(AN/Math.abs(AN)),AV=this.node.style,Ag=AE+(AI-AE)*AL*Ad,Af=AD+(AG-AD)*AJ*Ac;switch(this.type){case"rect":case"image":var AK=Ae.width*AL*Ad,AU=Ae.height*AJ*Ac,AH=Ag-AK/2,AF=Af-AU/2;this.attr({width:AK,height:AU,x:AH,y:AF});break;case"circle":case"ellipse":this.attr({rx:Ae.rx*Ad,ry:Ae.ry*Ac,r:Ae.r*Ad,cx:Ag,cy:Af});break;case"path":var AX=C(Ae.path),AY=true;for(var Aa=0,AT=AX.length;Aa<AT;Aa++){var AW=AX[Aa];if(AW[0].toUpperCase()=="M"&&AY){continue}else{AY=false}if(F.svg&&AW[0].toUpperCase()=="A"){AW[AX[Aa].length-2]*=Ad;AW[AX[Aa].length-1]*=Ac;AW[1]*=Ad;AW[2]*=Ac;AW[5]=+(AL+AJ?!!+AW[5]:!+AW[5])}else{for(var AZ=1,Ab=AW.length;AZ<Ab;AZ++){AW[AZ]*=(AZ%2)?Ad:Ac}}}var R=Q(AX),AS=Ag-R.x-R.width/2,AR=Af-R.y-R.height/2;AX=C(AX);AX[0][1]+=AS;AX[0][2]+=AR;this.attr({path:AX.join(" ")});break}if(this.type in {text:1,image:1}&&(AL!=1||AJ!=1)){if(this.transformations){this.transformations[2]="scale(".concat(AL,",",AJ,")");this.node.setAttribute("transform",this.transformations.join(" "));AS=(AL==-1)?-Ae.x-(AK||0):Ae.x;AR=(AJ==-1)?-Ae.y-(AU||0):Ae.y;this.attr({x:AS,y:AR});Ae.fx=AL-1;Ae.fy=AJ-1}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11=".concat(AL,", M12=0, M21=0, M22=",AJ,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");AV.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"")}}else{if(this.transformations){this.transformations[2]="";this.node.setAttribute("transform",this.transformations.join(" "));Ae.fx=0;Ae.fy=0}else{this.node.filterMatrix="";AV.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"")}}Ae.scale=[AP,AN,AE,AD].join(" ");this._.sx=AP;this._.sy=AN}return this};F.easing_formulas={linear:function(R){return R},"<":function(R){return Math.pow(R,3)},">":function(R){return Math.pow(R-1,3)+1},"<>":function(R){R=R*2;if(R<1){return Math.pow(R,3)/2}R-=2;return(Math.pow(R,3)+2)/2},backIn:function(AD){var R=1.70158;return Math.pow(AD,2)*((R+1)*AD-R)},backOut:function(AD){AD=AD-1;var R=1.70158;return Math.pow(AD,2)*((R+1)*AD+R)+1},elastic:function(AE){if(AE==0||AE==1){return AE}var AD=0.3,R=AD/4;return Math.pow(2,-10*AE)*Math.sin((AE-R)*(2*Math.PI)/AD)+1},bounce:function(AF){var AD=7.5625,AE=2.75,R;if(AF<(1/AE)){R=AD*Math.pow(AF,2)}else{if(AF<(2/AE)){AF-=(1.5/AE);R=AD*Math.pow(AF,2)+0.75}else{if(AF<(2.5/AE)){AF-=(2.25/AE);R=AD*Math.pow(AF,2)+0.9375}else{AF-=(2.625/AE);R=AD*Math.pow(AF,2)+0.984375}}}return R}};F.easing=function(R,AD){return F.easing_formulas[R]?F.easing_formulas[R](AD):AD};L.prototype.animate=function(AO,AN,AW,AF){clearTimeout(this.animation_in_progress);if(typeof AW=="function"||!AW){AF=AW||null;AW="linear"}var AR={},R={},AK={},AL={x:0,y:0};if(typeof AW=="function"||!AW){AF=AW||null;AW="linear"}for(var AP in AO){if(AP in Z){AR[AP]=this.attr(AP);(typeof AR[AP]=="undefined")&&(AR[AP]=c[AP]);R[AP]=AO[AP];switch(Z[AP]){case"number":AK[AP]=(R[AP]-AR[AP])/AN;break;case"colour":AR[AP]=F.getRGB(AR[AP]);var AQ=F.getRGB(R[AP]);AK[AP]={r:(AQ.r-AR[AP].r)/AN,g:(AQ.g-AR[AP].g)/AN,b:(AQ.b-AR[AP].b)/AN};break;case"path":var AD=P(AR[AP],R[AP]);AR[AP]=AD[0];R[AP]=AD[1];AK[AP]=[];for(var AT=0,AJ=AR[AP].length;AT<AJ;AT++){AK[AP][AT]=[0];for(var AS=1,AV=AR[AP][AT].length;AS<AV;AS++){AK[AP][AT][AS]=(R[AP][AT][AS]-AR[AP][AT][AS])/AN}}break;case"csv":var AI=(AO[AP]+"").split(AC),AH=(AR[AP]+"").split(AC);switch(AP){case"translation":AR[AP]=[0,0];AK[AP]=[AI[0]/AN,AI[1]/AN];break;case"rotation":AR[AP]=(AH[1]==AI[1]&&AH[2]==AI[2])?AH:[0,AI[1],AI[2]];AK[AP]=[(AI[0]-AR[AP][0])/AN,0,0];break;case"scale":AO[AP]=AI;AR[AP]=(AR[AP]+"").split(AC);AK[AP]=[(AI[0]-AR[AP][0])/AN,(AI[1]-AR[AP][1])/AN,0,0];break;case"matrix":AO[AP]=AI;AR[AP]=(AR[AP]+"").split(AC);AK[AP]=[];for(var AT=0;AT<6;AT++){AK[AP][AT]=(AI[AT]-AR[AP][AT])/AN}}R[AP]=AI}}}var AE=+new Date,AM=0,AG=this;(function AU(){var AY=new Date-AE,Ag={},Ae,AX;if(AY<AN){Ae=F.easing(AW,AY/AN);for(var Ac in AR){switch(Z[Ac]){case"number":AX=+AR[Ac]+Ae*AN*AK[Ac];break;case"colour":AX="rgb("+[Math.round(AR[Ac].r+Ae*AN*AK[Ac].r),Math.round(AR[Ac].g+Ae*AN*AK[Ac].g),Math.round(AR[Ac].b+Ae*AN*AK[Ac].b)].join(",")+")";break;case"path":AX=[];for(var Aa=0,Ah=AR[Ac].length;Aa<Ah;Aa++){AX[Aa]=[AR[Ac][Aa][0]];for(var AZ=1,Ab=AR[Ac][Aa].length;AZ<Ab;AZ++){AX[Aa][AZ]=AR[Ac][Aa][AZ]+Ae*AN*AK[Ac][Aa][AZ]}AX[Aa]=AX[Aa].join(" ")}AX=AX.join(" ");break;case"csv":switch(Ac){case"translation":var Af=AK[Ac][0]*(AY-AM),Ad=AK[Ac][1]*(AY-AM);AL.x+=Af;AL.y+=Ad;AX=[Af,Ad].join(" ");break;case"rotation":AX=+AR[Ac][0]+Ae*AN*AK[Ac][0];AR[Ac][1]&&(AX+=","+AR[Ac][1]+","+AR[Ac][2]);break;case"scale":AX=[+AR[Ac][0]+Ae*AN*AK[Ac][0],+AR[Ac][1]+Ae*AN*AK[Ac][1],(2 in AO[Ac]?AO[Ac][2]:""),(3 in AO[Ac]?AO[Ac][3]:"")].join(" ")}break}if(Ac=="font-size"){Ag[Ac]=AX+"px"}else{Ag[Ac]=AX}}AG.attr(Ag);AG.animation_in_progress=setTimeout(AU);F.svg&&A.safari()}else{(AL.x||AL.y)&&AG.translate(-AL.x,-AL.y);AG.attr(AO);clearTimeout(AG.animation_in_progress);A.safari();(typeof AF=="function")&&AF.call(AG)}AM=AY})();return this};L.prototype.translate=function(R,AE){if(R==null){return{x:this._.tx,y:this._.ty}}this._.tx+=+R;this._.ty+=+AE;switch(this.type){case"circle":case"ellipse":this.attr({cx:+R+this.attrs.cx,cy:+AE+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+R+this.attrs.x,y:+AE+this.attrs.y});break;case"path":var AD=C(this.attrs.path);AD[0][1]+=+R;AD[0][2]+=+AE;this.attr({path:AD.join(" ")});break}return this};var J=function(R){this.items=[];this.length=0;if(R){for(var AD=0,AE=R.length;AD<AE;AD++){if(R[AD]&&(R[AD].constructor==L||R[AD].constructor==J)){this[this.items.length]=this.items[this.items.length]=R[AD];this.length++}}}};J.prototype.push=function(){var AF,R;for(var AD=0,AE=arguments.length;AD<AE;AD++){AF=arguments[AD];if(AF&&(AF.constructor==L||AF.constructor==J)){R=this.items.length;this[R]=this.items[R]=AF;this.length++}}return this};J.prototype.pop=function(AF){var AD=this.items.splice(AF,1)[0];for(var R=AF,AE=this.items.length;R<AE;R++){this[R]=this[R+1]}delete this[AE+1];this.length--;return AD};for(var B in L.prototype){J.prototype[B]=(function(R){return function(){for(var AD=0,AE=this.items.length;AD<AE;AD++){this.items[AD][R].apply(this.items[AD],arguments)}return this}})(B)}J.prototype.attr=function(AD,AH){if(AD&&F.isArray(AD)&&typeof AD[0]=="object"){for(var R=0,AG=AD.length;R<AG;R++){this.items[R].attr(AD[R])}}else{for(var AE=0,AF=this.items.length;AE<AF;AE++){this.items[AE].attr.apply(this.items[AE],arguments)}}return this};J.prototype.getBBox=function(){var R=[],AH=[],AD=[],AF=[];for(var AE=this.items.length;AE--;){var AG=this.items[AE].getBBox();R.push(AG.x);AH.push(AG.y);AD.push(AG.x+AG.width);AF.push(AG.y+AG.height)}R=Math.min.apply(Math,R);AH=Math.min.apply(Math,AH);return{x:R,y:AH,width:Math.max.apply(Math,AD)-R,height:Math.max.apply(Math,AF)-AH}};F.registerFont=function(AE){if(!AE.face){return AE}this.fonts=this.fonts||{};var AF={w:AE.w,face:{},glyphs:{}},AD=AE.face["font-family"];for(var AI in AE.face){AF.face[AI]=AE.face[AI]}if(this.fonts[AD]){this.fonts[AD].push(AF)}else{this.fonts[AD]=[AF]}if(!AE.svg){AF.face["units-per-em"]=parseInt(AE.face["units-per-em"],10);for(var AG in AE.glyphs){var AH=AE.glyphs[AG];AF.glyphs[AG]={w:AH.w,k:{},d:AH.d&&"M"+AH.d.replace(/[mlcxtrv]/g,function(AJ){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[AJ]||"M"})+"z"};if(AH.k){for(var R in AH.k){AF.glyphs[AG].k[R]=AH.k[R]}}}}return AE};A.getFont=function(AH,AG,AD,AK){AK=AK||"normal";AD=AD||"normal";AG=+AG||{normal:400,bold:700,lighter:300,bolder:800}[AG]||400;var AF=F.fonts[AH];if(!AF){var R=new RegExp("(^|\\s)"+AH.replace(/[^\w\d\s+!~.:_-]/g,"")+"(\\s|$)","i");for(var AE in F.fonts){if(R.test(AE)){AF=F.fonts[AE];break}}}var AJ;if(AF){for(var AI=0,AL=AF.length;AI<AL;AI++){AJ=AF[AI];if(AJ.face["font-weight"]==AG&&(AJ.face["font-style"]==AD||!AJ.face["font-style"])&&AJ.face["font-stretch"]==AK){break}}}return AJ};A.print=function(AL,AK,AE,AD,AP){var AH=this.set(),AJ=(AE+"").split(""),R=0,AO="",AG;if(AD){AG=(AP||16)/AD.face["units-per-em"];for(var AI=0,AM=AJ.length;AI<AM;AI++){var AF=AI&&AD.glyphs[AJ[AI-1]]||{},AN=AD.glyphs[AJ[AI]];R+=AI?(AF.w||AD.w)+(AF.k&&AF.k[AJ[AI]]||0):0;AN&&AN.d&&AH.push(this.path({fill:"#000",stroke:"none"},AN.d).translate(R,0))}AH.scale(AG,AG,0,AK).translate(AL,(AP||16)/2)}return AH};F.ninja=function(){var R=window.Raphael;if(D.was){window.Raphael=D.is}else{try{delete window.Raphael}catch(AD){window.Raphael=void (0)}}return R};F.el=L.prototype;return F})();Raphael.easing_formulas={linear:function(D,A,C,B){return D/B},easeInQuad:function(D,A,C,B){return C*(D/=B)*D+A},easeOutQuad:function(D,A,C,B){return -C*(D/=B)*(D-2)+A},easeInOutQuad:function(D,A,C,B){if((D/=B/2)<1){return C/2*D*D+A}return -C/2*((--D)*(D-2)-1)+A},easeInCubic:function(D,A,C,B){return C*(D/=B)*D*D+A},easeOutCubic:function(D,A,C,B){return C*((D=D/B-1)*D*D+1)+A},easeInOutCubic:function(D,A,C,B){if((D/=B/2)<1){return C/2*D*D*D+A}return C/2*((D-=2)*D*D+2)+A},easeInQuart:function(D,A,C,B){return C*(D/=B)*D*D*D+A},easeOutQuart:function(D,A,C,B){return -C*((D=D/B-1)*D*D*D-1)+A},easeInOutQuart:function(D,A,C,B){if((D/=B/2)<1){return C/2*D*D*D*D+A}return -C/2*((D-=2)*D*D*D-2)+A},easeInQuint:function(D,A,C,B){return C*(D/=B)*D*D*D*D+A},easeOutQuint:function(D,A,C,B){return C*((D=D/B-1)*D*D*D*D+1)+A},easeInOutQuint:function(D,A,C,B){if((D/=B/2)<1){return C/2*D*D*D*D*D+A}return C/2*((D-=2)*D*D*D*D+2)+A},easeInSine:function(D,A,C,B){return -C*Math.cos(D/B*(Math.PI/2))+C+A},easeOutSine:function(D,A,C,B){return C*Math.sin(D/B*(Math.PI/2))+A},easeInOutSine:function(D,A,C,B){return -C/2*(Math.cos(Math.PI*D/B)-1)+A},easeInExpo:function(D,A,C,B){return(D==0)?A:C*Math.pow(2,10*(D/B-1))+A},easeOutExpo:function(D,A,C,B){return(D==B)?A+C:C*(-Math.pow(2,-10*D/B)+1)+A},easeInOutExpo:function(D,A,C,B){if(D==0){return A}if(D==B){return A+C}if((D/=B/2)<1){return C/2*Math.pow(2,10*(D-1))+A}return C/2*(-Math.pow(2,-10*--D)+2)+A},easeInCirc:function(D,A,C,B){return -C*(Math.sqrt(1-(D/=B)*D)-1)+A},easeOutCirc:function(D,A,C,B){return C*Math.sqrt(1-(D=D/B-1)*D)+A},easeInOutCirc:function(D,A,C,B){if((D/=B/2)<1){return -C/2*(Math.sqrt(1-D*D)-1)+A}return C/2*(Math.sqrt(1-(D-=2)*D)+1)+A},easeInElastic:function(G,B,F,D){var C=1.70158;var E=0;var A=F;if(G==0){return B}if((G/=D)==1){return B+F}if(!E){E=D*0.3}if(A<Math.abs(F)){A=F;var C=E/4}else{var C=E/(2*Math.PI)*Math.asin(F/A)}return -(A*Math.pow(2,10*(G-=1))*Math.sin((G*D-C)*(2*Math.PI)/E))+B},easeOutElastic:function(G,B,F,D){var C=1.70158;var E=0;var A=F;if(G==0){return B}if((G/=D)==1){return B+F}if(!E){E=D*0.3}if(A<Math.abs(F)){A=F;var C=E/4}else{var C=E/(2*Math.PI)*Math.asin(F/A)}return A*Math.pow(2,-10*G)*Math.sin((G*D-C)*(2*Math.PI)/E)+F+B},easeInOutElastic:function(G,B,F,D){var C=1.70158;var E=0;var A=F;if(G==0){return B}if((G/=D/2)==2){return B+F}if(!E){E=D*(0.3*1.5)}if(A<Math.abs(F)){A=F;var C=E/4}else{var C=E/(2*Math.PI)*Math.asin(F/A)}if(G<1){return -0.5*(A*Math.pow(2,10*(G-=1))*Math.sin((G*D-C)*(2*Math.PI)/E))+B}return A*Math.pow(2,-10*(G-=1))*Math.sin((G*D-C)*(2*Math.PI)/E)*0.5+F+B},easeInBounce:function(D,A,C,B){return C-Raphael.easing_formulas.easeOutBounce(B-D,0,C,B)+A},easeOutBounce:function(D,A,C,B){if((D/=B)<(1/2.75)){return C*(7.5625*D*D)+A}else{if(D<(2/2.75)){return C*(7.5625*(D-=(1.5/2.75))*D+0.75)+A}else{if(D<(2.5/2.75)){return C*(7.5625*(D-=(2.25/2.75))*D+0.9375)+A}else{return C*(7.5625*(D-=(2.625/2.75))*D+0.984375)+A}}}},easeInOutBounce:function(D,A,C,B){if(D<B/2){return Raphael.easing_formulas.easeInBounce(D*2,0,C,B)*0.5+A}return Raphael.easing_formulas.easeOutBounce(D*2-B,0,C,B)*0.5+C*0.5+A}};(function(C){var D=[];var B=function(E){C.targetIs(E,{tagSelector:"li"},function(I){var G=C(".DL-zoomed-location",I);var F=C(".DL-zoomed-location-arrow",I);var H=6;if(G.length>0){G.css({left:Math.floor((G.parent().outerWidth()/2)-(G.outerWidth()/2)),bottom:Math.floor((G.parent().outerHeight())-1),visibility:"visible"});F.css({left:Math.floor((G.parent().outerWidth()/2)-(F.outerWidth()/2)),visibility:"visible"});if(DAYLIFE.Browser.IE6){F.css({top:-H-1})}else{F.css({top:-H})}I.parents(".DL-module").css("z-index",1000);I.css("z-index",1000)}})};var A=function(E){C.targetIs(E,{tagSelector:"li"},function(F){C(".DL-zoomed-location",F).css("visibility","hidden");C(".DL-zoomed-location-arrow",F).css("visibility","hidden");F.parents(".DL-module").css("z-index",0);F.css("z-index",0)})};C.extend({make_location_zooms:function(){var E=[];C("li.DL-location").each(function(){var F=C(this);if(C.inArray(F.get(0),D)==-1&&C(".DL-zoomed-location",F).length>0){D.push(F.get(0));E.push(F);F.mouseover(B);F.mouseout(A)}});return E}})})($DL);if(typeof DAYLIFE=="undefined"){var DAYLIFE={}}DAYLIFE.user=function(){var A=$DL;var B=DAYLIFE_Globals.user_prefs;return{get_pref:function(C){return B[C]},retrieve_pref:function(C,D){A.ajax({url:"/ajax/user_attribute/get/"+C,dataType:"json",type:"GET",success:function(E,F){if(A.isFunction(D)){D(C,E.response.payload.value)}}})},update_pref:function(C,D,E){A.ajax({url:"/ajax/user_attribute/update/"+C,data:{new_value:D},dataType:"json",type:"POST",success:function(F,G){B[C]=D;if(A.isFunction(E)){E(C,F.response.payload[0].ins_upd_webuser_attribute)}}})}}}();(function(D){var A=function(){D(".DL-site-wrapper").addClass("DL-js-enhanced")};var E=function(){DAYLIFE.Packages.load(["Modules","QuotesCarousels","PhotoZoom"])};var B=function(){D("a.DL-external").open_externally()};var F=function(){D(".DL-topic a").hover(function(){D(this).siblings().addClass("DL-active")},function(){D(this).siblings().removeClass("DL-active")})};var C=function(){D(".DL-video a").hover(function(){D("h6 a",D(this).parents(".DL-video")).addClass("DL-active")},function(){D("h6 a",D(this).parents(".DL-video")).removeClass("DL-active")})};D(document).ready(function(){A();E();B();F();C()})})($DL);DAYLIFE.Class.EditApi=function EditApi(){this.page_size=10;this.params={};qs=location.search.substring(1,location.search.length);if(qs.length>0){qs=qs.replace(/\+/g," ");qs=qs.replace(/&amp;/g,"&");var B=qs.split("&");for(var C=0;C<B.length;C++){var E=B[C].split("=");var A=decodeURIComponent(E[0]);var D=(E.length==2)?decodeURIComponent(E[1]):A;this.params[A]=D}}};DAYLIFE.Class.EditApi.prototype={makeCallback:function(A){return function(C,B){if(A&&A.onCode&&C&&$DL.isFunction(A.onCode[C.response.code.toString()])){A.onCode[C.response.code.toString()](C.response)}else{if((C&&C.response.code>=0)&&A&&A.onSuccess){A.onSuccess(C.response.payload,A)}else{if(!C&&!B&&A&&A.onFailure){A.onFailure(A)}}}}},makeCallbackCode:function(A){return function(C,B){if((C&&C.response.code>=0)&&A&&A.onSuccess){A.onSuccess(C.response.code,A)}}},get:function(A,C,B){if(this.params.__themeid&&!C.theme_id){C.theme_id=this.params.__themeid}$DL.ajax({type:"GET",url:A,data:C,cache:true,success:this.makeCallback(B),dataType:"json"})},post:function(A,C,B){if(this.params.__themeid){C.theme_id=this.params.__themeid}$DL.ajax({type:"post",url:A,data:C,cache:false,success:this.makeCallback(B),dataType:"json"})},getConstraints:function(B,A){return this.get("/asset/constraint/"+B,{},A)},getAsset:function(B,C,D){var A="/asset/"+C+"/"+B;return this.get(A,{},D)},getAssets:function(A,B){return this.get("/edit/api/publisherapi.getAssets",{asset_type:A},B)},getRegionBlueprintAssets:function(B){var A="/asset/region_blueprint/";return this.get(A,{},B)},getRawAsset:function(A,B,C){return this.get("/edit/api/publisherapi.getAsset",{asset_type:B,asset_name:A},C)},jsonEncode:function(E){switch($DL.typeOf(E)){case"array":var D=[];for(var C=0;C<E.length;C++){D.push(this.jsonEncode(E[C]))}return"["+D.join(",")+"]";case"object":var B=[];for(C in E){var A=E[C];if(typeof A!="undefined"&&typeof A!="function"){B.push(this.jsonEncode(C)+":"+this.jsonEncode(A))}}return"{"+B.join(",")+"}";case"number":return isFinite(E)?String(E):"null";case"string":return this.enquote(E);case"boolean":return String(E);default:return"null"}},enquote:function(C){var E,B,A=C.length,D='"';for(B=0;B<A;B+=1){E=C.charAt(B);if(E>=" "){if(E==="\\"||E==='"'){D+="\\"}D+=E}else{switch(E){case"\b":D+="\\b";break;case"\f":D+="\\f";break;case"\n":D+="\\n";break;case"\r":D+="\\r";break;case"\t":D+="\\t";break;default:E=E.charCodeAt();D+="\\u00"+Math.floor(E/16).toString(16)+(E%16).toString(16)}}}return D+'"'},encode_data:function(A,B){if(typeof B=="object"){return this.jsonEncode(B)}else{return B}},setAsset:function(A,B,E,D,C){D=D||"";E=this.encode_data(B,E);query={asset_data:E,asset_type:B,asset_name:A,new_asset_name:D};if(C.site_asset){query.site_asset=C.site_asset}if(this.params.__themeid){query.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateAsset",data:query,success:this.makeCallback(C),dataType:"json"})},addAsset:function(A,B,D,C){D=this.encode_data(B,D);query={asset_data:D,asset_type:B,asset_name:A};if(C.site_asset){query.site_asset=C.site_asset}if(this.params.__themeid){query.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.addAsset",data:query,success:this.makeCallback(C),dataType:"json"})},deleteAsset:function(A,B,C){query={asset_name:A,asset_type:B};if(this.params.__themeid){query.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.deleteAsset",data:query,success:this.makeCallback(C),dataType:"json"});if(B=="region_blueprint"){this.modifyBlueprints("region","delete",A)}},modifyBlueprints:function(E,A,B,D,C){query={method:E,action:A,name:B,new_name:D};if(this.params.__themeid){query.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/modify_blueprints",data:query,success:this.makeCallback(C),dataType:"json"})},getTags:function(A,B){query={tag:A};$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/tag_browser",data:query,success:this.makeCallback(B),dataType:"json"})},getSiteByDomain:function(C,A){var B={};if(C){B.domain_name=C}return this.get("/edit/api/publisherapi.getSite",B,A)},getSite:function(A){return this.get("/edit/api/publisherapi.getSite",{},A)},updateSite:function(B,A){return this.post("/ajax/update_site",B,A)},getTheme:function(A,B){return this.get("/edit/api/publisherapi.getTheme",{theme_id:A},B)},getThemeAssets:function(A,B,C){var D={asset_type:B};if(A){D.theme_id=A}return this.get("/edit/api/publisherapi.getAssets",D,C)},getSiteAssets:function(A,B){return this.get("/edit/api/publisherapi.getAssets",{site_assets:true,asset_type:A},B)},getBatchAssets:function(B,A){B=this.encode_data(null,B);return this.get("/assets",{dataset_types:B},A)},getMyThemes:function(B){var A=(B&&B.limit)?B.limit:20;return this.get("/edit/api/publisherapi.getThemes",{owner:"site",limit:A},B)},renameTheme:function(C,A,B){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateTheme",data:{theme_id:C,theme_name:A},success:this.makeCallback(B),dataType:"json"})},updateTheme:function(B,C,A){C.theme_id=B;$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateTheme",data:C,success:this.makeCallback(A),dataType:"json"})},createDraft:function(A,C,D){var B=(!A)?"":"/"+A;var E=(C)?{copy_name:C}:null;$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/create_draft"+B,data:E,success:this.makeCallback(D),dataType:"json"})},publishTheme:function(A,B){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/publish_theme/"+A,success:this.makeCallback(B),dataType:"json"})},updatePageMeta:function(A,C,B){if(this.params.__themeid){C.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/update_meta/"+A,data:C,success:this.makeCallback(B),dataType:"json"})},deleteTheme:function(B,A){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.deleteTheme",data:{theme_id:B},success:this.makeCallbackCode(A),dataType:"json"})},undeleteTheme:function(C,A,B){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.undeleteTheme",data:{theme_id:C,site_id:A},success:this.makeCallbackCode(B),dataType:"json"})},choosePageTemplate:function(D,C,A){var B={template_group_name:D};if(C){B.ref_blueprint=C}if(this.params.__themeid){B.theme_id=this.params.__themeid}$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/choose_page_template/",data:B,success:this.makeCallback(A),dataType:"json"})},setTheme:function(B,A){data=this.encode_data(type,data);$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateSite",data:{theme_id:B},success:this.makeCallback(A),dataType:"json"})},get_page_templates:function(B,A){var C={ref_blueprint:B};if(this.params.__themeid){C.theme_id=this.params.__themeid}$DL.ajax({type:"GET",contentType:"application/x-www-form-urlencoded",url:"/ajax/page_template/",data:C,success:this.makeCallback(A),dataType:"json"})}};DAYLIFE.AssetModels=function(){var G=null;var A={};var D=null;var F=null;var C=null;var E=null;var B=null;return{destroy_models:function(){A={};D=null;F=null;C=null;E=null;B=null;return null},get_blueprint_model:function(I,H){H=H||DAYLIFE_Globals.page_id;if(!A[H]){A[H]=new DAYLIFE.AssetModels.Blueprint(H);A[H].get_blueprint_and_constraints()}A[H].onready(function(){if(I&&typeof I=="function"){I(A[H])}});return A[H]},destroy_blueprint_model:function(H){H=H||DAYLIFE_Globals.page_id;if(A[H]){A[H].snapshots.splice(1)}delete A[H];return null},get_css:function(){if(!D){D=new DAYLIFE.AssetModels.CSS();D.getCSS()}return D},get_batch_data_sets:function(H,K,I,J){if(!F){F=new DAYLIFE.AssetModels.DataSets()}F.get_batch_data_sets(H,K,I,J);return F},get_custom_pages:function(J,I){var H="custom_page_blueprint";return DAYLIFE.AssetModels.get_batch_data_sets([H],function(K,L){if($DL.isFunction(J)){J(K[H].sets,L)}},null,I)},get_page_layouts:function(H){if(!F){F=new DAYLIFE.AssetModels.DataSets()}F.get_page_layouts(H);return F},get_theme_manager:function(H){if(!C){C=new DAYLIFE.AssetModels.ThemeManager();C.load(H)}else{C.load(H)}return C},get_basics:function(){if(!E){E=new DAYLIFE.AssetModels.Basics()}return E},get_page_templates:function(){if(!B){B=new DAYLIFE.AssetModels.PageTemplates()}return B}}}();DAYLIFE.AssetModels.Blueprint=function(A){this.blueprint_id=A||DAYLIFE_Globals.page_id;this.constraints=null;this.classname=null;this.bindings=null;this.css_files=null;this.page_group=null;this.name=null;this.query=null;this.current_layout_regions=null;this.current_layout_slots=null;this.layout=null;this.regions={};this.slots={};this.modules={};this.api=new DAYLIFE.Class.EditApi();this.snapshots=[];this.last_commit=null;this.at_snapshot_position=null;this.has_blueprint=false;this.has_constraints=false;this.ready_queue=[];this.ready_timer;this.available_regions=null;this.unsaved_regions=[];this.simple_css_module=null;this.simple_css_module_asset_exists=false};DAYLIFE.AssetModels.Blueprint.prototype={onready:function(A){if(A&&typeof A=="function"){this.ready_queue.push(A)}if(this.hasBlueprint()){window.clearInterval(this.ready_timer);while(this.ready_queue.length>0){this.ready_queue[0](this);this.ready_queue.shift()}}else{if(!this.ready_timer&&this.ready_queue.length>0){this.ready_timer=window.setInterval($DL.rescope(this.onready,this),200)}}},setConstraints:function(A){this.constraints=A;$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:set_constraints",[this]);this.has_constraints=true},setHeaderConstraints:function(A){this.header_constraints=A;$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:set_header_constraints",[this]);this.has_header_constraints=true},saveModule:function(C,G){var E=this.getModule(C);var B=this;if(E.classname.indexOf(".css.")!=-1){var H=function(I){$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:save_module",[B,E]);if($DL.isFunction(G)){G(I)}};var A=this.serializeModule(C);var D=E.classname;var F="module_blueprint";if(A){if(this.simple_css_module_asset_exists){this.api.setAsset(D,F,A,null,{onSuccess:H})}else{this.api.addAsset(D,F,A,{onSuccess:H})}}return E}return false},saveRegion:function(E,F){var H=this.getRegion(E);var A,C,D;var B=this;var G=function(I){$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:save_region",[B,H]);if($DL.isFunction(F)){F(I)}if(H.is_new){H.is_new=false;if(!B.available_regions){B.available_regions=[]}B.available_regions.push(H)}B.remove_from_unsaved_regions(E)};if(H.asset_name){A=this.serializeRegion(E);C=H.asset_name;D="region_blueprint"}else{A=this.serializePageBlueprint();C=this.blueprint_id;D="page_blueprint"}if(A){if(H.is_new){this.api.addAsset(C,D,A,{onSuccess:G})}else{this.api.setAsset(C,D,A,null,{onSuccess:G})}}},savePageMeta:function(B){var A;if($DL.isFunction(B)){A={onSuccess:function(C){B(C)}}}this.api.updatePageMeta(this.blueprint_id,this.meta,A)},deleteRegion:function(B,C){var E=this.getRegion(B);if(E&&E.asset_name){var A=this;var D=function(G){if(A.available_regions){for(var F=A.available_regions.length-1;F>=0;F--){if(A.available_regions[F]==E){A.available_regions.splice(F,1);break}}}A.remove_from_unsaved_regions(B);for(var F=A.layout.regions.length-1;F>=0;F--){if(A.layout.regions[F]==E){A.layout.regions.splice(F,1);A.saveRegion(A.getContentRegionID());break}}delete A.regions[B];if($DL.isFunction(C)){C(G)}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:delete_region",[this,E])};this.api.deleteAsset(E.asset_name,"region_blueprint",{onSuccess:D})}},serializePageBlueprint:function(){var A={classname:this.classname,page_group:this.page_group,name:this.name,query:this.query,bindings:this.bindings,css_files:this.css_files,meta:this.meta,custom_hero_image:this.custom_hero_image,template_classname:this.template_classname,regions:[]};var B=this.getLayout();var E=B.regions;for(var C=0;C<E.length;C++){var D=E[C];A.regions.push({asset_name:D.asset_name,editable:D.editable,region:D.region,removable:D.removable,asset_data:null});if(!D.asset_name){A.regions[C].asset_data=this.serializeRegion(D.id)}}return A},serializeSlot:function(D,B){var F=this.getRegion(D);var E=F.slots[B];var A={name:E.name,modules:[]};for(var C=0;C<E.modules.length;C++){A.modules.push(this.serializeModule(E.modules[C].id))}return A},serializeModule:function(B){var D=this.getModule(B);var A={classname:D.classname,alias:D.alias,bindings:{}};for(var C in D.attribute_idx){var E=D.attribute_idx[C];A.bindings[E.id]={value:E.value}}return A},serializeRegion:function(C){var D=this.getRegion(C);var A={classname:D.asset_name,bindings:{},alias:D.alias,slots:[]};if(D.asset_name&&D.asset_name!="daylife.header"&&D.asset_name!="daylife.footer"){A.css_id=D.css_id}for(var B=0;B<D.slots.length;B++){A.slots.push(this.serializeSlot(C,B))}return A},get_blueprint_and_constraints:function(E){var C=this,A=false,D=null,F=false;function B(){if(A&&D&&!F){F=true;C.loadBlueprint_new(D);if(E&&typeof E=="function"){E(C)}}}this.api.getConstraints(this.blueprint_id,{onSuccess:function(G){C.setConstraints(G);A=true;B()}});this.api.getConstraints("daylife.header",{onSuccess:function(G){C.setHeaderConstraints(G)}});this.api.getAsset(this.blueprint_id,"page_blueprint",{onSuccess:function(G){D=G.asset.data;B()}})},get_orig_blueprint:function(A){this.api.getRawAsset(this.blueprint_id,"page_blueprint",{onSuccess:function(C){var B=C.asset.data;if(A&&typeof A=="function"){A(B)}}});return null},createRegion:function(A,H,G){if(this.has_blueprint){var L=(A)?this.getRegionByAssetName(A):null;if(L){return L}}var D=(!this.has_blueprint&&!A&&G);H=H||((G&&G.alias)?G.alias:"New Region");A=(A||D)?A:$DL.dlid("region_");var B=(D)?false:true;var C=(G&&$DL.typeOf(G.bindings)=="object")?G.bindings:{};var J=(G&&$DL.typeOf(G.css_id)=="string")?G.css_id:"DL-"+A+"-region";L={slots:[],id:$DL.dlid(),asset_name:A,editable:true,region:H,removable:B,classname:A,bindings:C,alias:H,css_id:J};this.regions[L.id]=L;if(!G){var K=this.createSlot();L.slots.push(K);L.is_new=true}else{if(G.slots){var K,I;for(var F=0;F<G.slots.length;F++){K=this.createSlot(G.slots[F].name);L.slots.push(K);for(var E=0;E<G.slots[F].modules.length;E++){I=this.createModule(G.slots[F].modules[E].classname,G.slots[F].modules[E].alias,G.slots[F].modules[E].bindings);if(!I){continue}else{K.modules.push(I)}}}}}return L},createSlot:function(A){A=A||"New Section";var B={name:A,id:$DL.dlid(),modules:[]};this.slots[B.id]=B;return B},createModule:function(H,F,G){if(!H){return false}F=F||"Untitled";if(this.constraints.module_classes[H]==undefined){return false}var B=$DL.deepCopy(this.constraints.module_classes[H].attributes);var A=this.constraints.module_classes[H].description||"No description has been provided for this module.";var D=this.constraints.module_classes[H].name;var C={id:$DL.dlid(),classname:H,name:D,description:A,alias:F,attributes:B,attribute_idx:{}};for(var E=0;E<C.attributes.simple.length;E++){C.attribute_idx[C.attributes.simple[E].id]=C.attributes.simple[E]}for(var E=0;E<C.attributes.advanced.length;E++){C.attribute_idx[C.attributes.advanced[E].id]=C.attributes.advanced[E]}if(G){for(id in G){if(G[id]){if(C.attribute_idx[id]){C.attribute_idx[id].value=(typeof (G[id])=="object"?G[id].value:G[id])}}}}this.modules[C.id]=C;return C},loadBlueprint_new:function(D,E){this.classname=D.classname;this.bindings=D.bindings;this.css_files=D.css_files;this.page_group=D.page_group;this.template_classname=D.template_classname;this.name=D.name;this.query=D.query;this.meta=D.meta||{};this.custom_hero_image=D.custom_hero_image;var A={regions:[]};var F,C;for(var B=0;B<D.regions.length;B++){C=D.regions[B].asset_data.alias||D.regions[B].region;F=this.createRegion(D.regions[B].asset_name,C,D.regions[B].asset_data);A.regions.push(F)}this.layout=A;$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:load_blueprint",[this]);this.has_blueprint=true;if($DL.isFunction(E)){E(this)}return A},getLayoutClasses:function(){return this.constraints.layouts},getLayout:function(){return this.layout},hasBlueprint:function(){return this.has_blueprint},getBlueprintQuery:function(){return this.query},getModuleRegion:function(A){for(id in this.regions){var E=this.regions[id];for(var C=E.slots.length-1;C>=0;C--){var D=E.slots[C];for(var B=D.modules.length-1;B>=0;B--){if(D.modules[B].id==A){return E}}}}return false},updateRegionAlias:function(B,A){var C=this.getRegion(B);if(C){C.alias=A}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_region_alias",[this,C]);return C},updateRegionCssId:function(A,B){var C=this.getRegion(A);if(C){C.css_id=B}return C},getRegionLayout:function(D){var A=[],G=this.getRegion(D),F,E;for(var C=0;C<G.slots.length;C++){F=G.slots[C];E=F.modules;slot_schema={slot_id:F.id,slot_name:F.name,modules:[]};for(var B=0;B<E.length;B++){slot_schema.modules.push(E[B].id)}A.push(slot_schema)}return A},updateRegionLayout:function(D,A){if(this.regions[D]&&A&&$DL.typeOf(A)=="array"){var E=[];for(var C=0;C<A.length;C++){var G=this.getSlot(A[C].slot_id);E.push(G);var F=[];for(var B=0;B<A[C].modules.length;B++){F.push(this.getModule(A[C].modules[B]))}G.modules=F;G.name=A[C].slot_name}this.regions[D].slots=E;this.add_to_unsaved_regions(D);$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_region_layout",[this,this.layout.regions[C]])}return this.getRegion(D)},add_to_unsaved_regions:function(A){if($DL.inArray(A,this.unsaved_regions)==-1){this.unsaved_regions.push(A)}return this.unsaved_regions},remove_from_unsaved_regions:function(B){var A=$DL.inArray(B,this.unsaved_regions);if(A>-1){this.unsaved_regions.splice(A,1)}return this.unsaved_regions},updatePageLayout:function(A){var B=[];for(var C=0;C<A.length;C++){B.push(this.getRegion(A[C]))}this.layout.regions=B;var D=this.getContentRegionID();this.add_to_unsaved_regions(D);$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_page_layout",[this,this.layout.regions]);return D},updatePageMeta:function(B){if($DL.typeOf(B)=="object"){for(var A in B){this.meta[A]=B[A]}}return this.meta},createModuleFromInstance:function(B){if(this.modules[B]){var A=this.serializeModule(B);return this.createModule(A.classname,A.alias,A.bindings)}else{return false}},createModuleFromClass:function(A){return this.createModule(A)},createModuleFromName:function(B,A){if(B=="daylife.custom_html"&&A){return this.createModule(B,A,{html:{value:A}})}else{return this.createModule(B)}},getModuleClasses:function(){var D=[];var A=this.constraints.module_class_order;var C=this.constraints.module_classes;for(var B=0;B<A.length;B++){if(C[A[B]]){var E={classname:A[B],name:C[A[B]].name,order:B};D.push(E)}}return D},getHeaderClasses:function(){var D=[];var A=this.header_constraints.module_class_order;var C=this.header_constraints.module_classes;for(var B=0;B<A.length;B++){if(C[A[B]]){var E={classname:A[B],name:C[A[B]].name,order:B};D.push(E)}}return D},getCustomModuleClasses:function(D){var B=[];var A=0;for(html_data_set in D.sets){var C={classname:"daylife.custom_html",name:html_data_set,data:D.sets[html_data_set],order:A++};B.push(C)}return B},getModule:function(A){if(typeof A=="string"){return this.modules[A]}else{return A}},getModules:function(){var A=[];for(id in this.modules){A.push(this.modules[id])}return A},getModulesByClass:function(B){var A=[];for(id in this.modules){if(this.modules[id].classname==B){A.push(this.modules[id])}}return A},getModuleIds:function(){var A=[];for(id in this.modules){A.push(id)}return A},getSimpleCSSModule:function(B){if(this.simple_css_module){if($DL.isFunction(B)){B(this.simple_css_module)}return this.simple_css_module}else{var A=this;this.api.getAsset("daylife.css.simple_css","module_blueprint",{onSuccess:function(D){A.simple_css_module_asset_exists=true;var C=D.asset.data;A.simple_css_module=(C)?A.createModule(C.classname,C.alias,C.bindings):A.createModule("daylife.css.simple_css","Simple CSS");if($DL.isFunction(B)){B(A.simple_css_module)}},onFailure:function(C){A.simple_css_module=A.createModule("daylife.css.simple_css","Simple CSS");if($DL.isFunction(B)){B(A.simple_css_module)}}})}},getSlot:function(A){return this.slots[A]},getSlotIndex:function(A){for(var C=0;C<this.layout.regions.length;C++){for(var B=0;B<this.layout.regions[C].slots.length;B++){if(this.layout.regions[C].slots[B].id==A){return B}}}},getSlots:function(){var A=[];for(id in this.slots){A.push(this.slots[id])}return A},getSlotIds:function(){var A=[];for(id in this.slots){A.push(id)}return A},getRegion:function(B){if(!B){for(var A=0;A<this.layout.regions.length;A++){if(this.layout.regions[A].region=="content"){return this.layout.regions[A]}}}else{if(this.regions[B]){return this.regions[B]}else{return false}}},getRegionModules:function(D){var B=[];var E=this.getRegion(D);for(var C=0;C<E.slots.length;C++){for(var A=0;A<E.slots[C].modules.length;A++){B.push(E.slots[C].modules[A])}}return B},getRegionByAssetName:function(A){var C=null;if(!A){return this.getRegion()}for(var B in this.regions){if(this.regions[B].asset_name==A){return this.regions[B]}}return C},getContentRegionID:function(){for(var A=0;A<this.layout.regions.length;A++){if(this.layout.regions[A].region=="content"){return this.layout.regions[A].id}}},getHeaderRegionID:function(){for(var A=0;A<this.layout.regions.length;A++){if(this.layout.regions[A].region=="header"){return this.layout.regions[A].id}}},getRegions:function(){return this.layout.regions},regionInLayout:function(B){for(var A=0;A<this.layout.regions.length;A++){if(this.layout.regions[A].id==B){return true}}return false},getRegionIds:function(){var A=[];for(id in this.regions){A.push(id)}return A},getAvailableRegions:function(){var A=this;var B=this.available_regions;if(!B){this.api.getRegionBlueprintAssets({onSuccess:function(E){A.available_regions=[];if((E.assets&&$DL.typeOf(E.assets)=="array")){for(var C=E.assets.length-1;C>=0;C--){var D=E.assets[C];A.available_regions.push(A.createRegion(D.asset_name,D.data.alias,D.data))}}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:get_available_regions",[A.available_regions])}})}return B},getModuleSlot:function(F,C){var E=F.slots;for(var D=0;D<E.length;D++){var B=E[D].modules;for(var A=0;A<B.length;A++){if(C.id==B[A].id){return{slot_index:D,position:A}}}}return null},restoreModuleDefaults:function(B){var C=this.modules[B];var A=this.createModule(C.classname,C.alias);C.attributes=A.attributes;C.attribute_idx=A.attribute_idx;delete this.modules[A.id];$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:restore_module_defaults",[this,C])},getModuleAttributeValue:function(A,C){var B=this.modules[A];if(B.attribute_idx[C]){return B.attribute_idx[C].value}else{return null}},updateModuleAttributes:function(B,G,I,A){var D=this.modules[B];var E;var F=[];for(var C in G){E=D.attribute_idx[C];if(E===undefined){continue}E.value=G[C];F.push(E.name)}var H=this.getModuleRegion(B);if(H){this.add_to_unsaved_regions(H.id)}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_module_attributes",[this,D,G,I,A]);return D},getGlue:function(){return this.constraints.glue},getTrait:function(C){var A=this.constraints.trait_pattern.split("/").slice(1);var C=C.split("/").slice(1);var F={};var B=Math.min(C.length,A.length);for(var E=0;E<B;E++){if(A[E].charAt(0)==":"){var D=A[E].slice(1);F[D]=C[E]}else{if(A[E].charAt(0)=="*"){var D=A[E].slice(1);var G=C.slice(E).join("/");F[D]=G;return F}else{if(A[E]!=C[E]){break}}}}return F}};DAYLIFE.AssetModels.CSS=function(){this.api=new DAYLIFE.Class.EditApi();this.css={customize:{asset_exists:false,states:[]}};this.css_to_commit=[];this.has_css=false;$DL(window).unload($DL.rescope(this.unload,this))};DAYLIFE.AssetModels.CSS.prototype={has_unsaved_edits:function(){return(this.css_to_commit.length>0)},unload:function(){if(this.has_unsaved_edits()){if(confirm("You made changes to this page you have not yet committed.  Click OK to commit them, or Cancel to discard.")){this.save()}}},save:function(){if(this.has_unsaved_edits()){for(var C=0;C<this.css_to_commit.length;C++){var B=this.css_to_commit[C];var A=this.css[B];if(A&&A.states.length>0){var D=(B=="page")?DAYLIFE_Globals.page_id+".css":B+".css";var E=A.states[A.states.length-1];if(A.asset_exists){this.api.setAsset(D,"css",E)}else{this.api.addAsset(D,"css",E)}}}this.css_to_commit=[]}},getCSS:function(){var A=this;this.api.getAsset("customize.css","css",{onSuccess:function(B){if(B.asset){A.css.customize.states=[B.asset.data];A.css.customize.asset_exists=true;$DL(document).trigger("DAYLIFE:AssetModels:CSS:load_css",[this]);this.has_css=true}}})},updateCSS:function(B,A){var C=this.css[B].states;if(C){C.push(A);if($DL.inArray(B,this.css_to_commit)==-1){this.css_to_commit.push(B)}}}};DAYLIFE.AssetModels.DataSets=function(){this.api=new DAYLIFE.Class.EditApi();this.data_sets_types=["source_filter","link_list","html","css","javascript","topic_filter","defaults","image","page_blueprint","page_collection","topic_collection","lightbox","gallery"];this.loaded_types=[];this.data_sets={custom_page_blueprint:{name:"Custom Page Blueprints",sets:{}},source_filter:{name:"Source Filters",sets:{}},link_list:{name:"Link Lists",sets:{}},html:{name:"Custom HTML",sets:{}},javascript:{name:"Custom Javascript",sets:{}},css:{name:"Custom CSS",sets:{},blueprints:{}},topic_filter:{name:"Topic Filters",sets:{}},defaults:{name:"Default Topic/Source Filter",sets:{}},image:{name:"Uploaded Images",sets:{}},page_blueprint:{name:"Page Blueprints",sets:{}},page_template_group:{name:"Page Template Groups",sets:{}},content_filter:{name:"Removed Content Filter",sets:{},site_asset:true},page_collection:{name:"Pinned Content Collection",sets:{},site_asset:true},topic_collection:{name:"Pinned Content Collection",sets:{},site_asset:true},content_expiration:{name:"Pinned Content Start and End Dates",sets:{},site_asset:true},lightbox:{name:"Photo Editor Lightboxes",sets:{},site_asset:true},gallery:{name:"SmartGalleries Gallery",sets:{},site_asset:true}};this.update_custom_pages_queue=[]};$DL(document).ready(function(){var B=$DL;var A=function(H,F,E,G){var C="daylife.page.custom.";if(F=="custom_page_blueprint"&&E.indexOf(C)==0){var D=DAYLIFE.AssetModels.get_custom_pages(function(J,I){B(document).trigger("DAYLIFE:AssetModels:DataSets:updated_custom_pages",[I,J,H.type,E,G])})}};B(document).bind("DAYLIFE:AssetModels:DataSets:remove_data_set",A);B(document).bind("DAYLIFE:AssetModels:DataSets:save_asset",A);B(document).bind("DAYLIFE:AssetModels:DataSets:update_data_set",A);B(document).bind("DAYLIFE:AssetModels:DataSets:update_data_set_name",A)});DAYLIFE.AssetModels.DataSets.prototype={has_unsaved_edits:function(){return false},capture_data_sets:function(type,asset_name,data){this.data_sets[type].sets[asset_name]=eval("("+data+")")},get_batch_data_sets:function(E,G,K,A){var J=this;var H=[];var C=E.length;var B=0;for(var I=0;I<E.length;I++){var F=E[I];var D=this.is_type_loaded(F);if(!D||A){H.push({type:F,site_asset:(this.data_sets[F].site_asset==true)})}if(A){continue}if(D){B++}if((I==C-1)&&B==C){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:load_data_sets",[this]);if(G&&typeof G=="function"){G(this.data_sets,this)}}}if(H.length){this.api.getBatchAssets(H,{onSuccess:function(M,L){J.complete_get_batch_data_sets(M,L,G)}})}},complete_get_batch_data_sets:function(o,opts,callback){var self=this;for(dt in o){var dataset_type=dt;var dataset_data=o[dt];var fetched_asset_names=[];var original_asset_names=$DL.keys(this.data_sets[dataset_type].sets);$DL.each(dataset_data,function(){if(dataset_type!="javascript"&&dataset_type!="css"&&(this.data.indexOf("{")==0||this.data.indexOf("[")==0)){try{self.data_sets[dataset_type].sets[this.asset_name]=eval("("+this.data+")")}catch(e){self.data_sets[dataset_type].sets[this.asset_name]=this.data}}else{self.data_sets[dataset_type].sets[this.asset_name]=this.data}fetched_asset_names.push(this.asset_name)});for(var i=original_asset_names.length-1;i>=0;i--){if($DL.inArray(original_asset_names[i],fetched_asset_names)==-1){delete this.data_sets[dataset_type].sets[original_asset_names[i]]}}self.loaded_types.push(dataset_type)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:load_data_sets",[self]);if(callback&&typeof callback=="function"){callback(self.data_sets,self)}},get_page_layouts:function(B){var A=this;this.api.getSiteByDomain("assets",{onSuccess:function(C){if(C.site){A.get_batch_data_sets(["page_template_group"],B,C.site.active_theme_id)}}})},is_type_loaded:function(A){for(t in this.loaded_types){if(A==this.loaded_types[t]){return true}}return false},load_css_blueprint_includes:function(){var self=this;this.api.getAssets("page_blueprint",{onSuccess:function(o){self.data_sets.css.blueprints=o;for(var i=0;i<o.assets.length;i++){if(o.assets[i].data){self.data_sets.css.blueprints.assets[i].data=eval("("+o.assets[i].data+")")}}}})},add_data_set:function(C,B,E){var A=this;if(C=="html"||C=="css"){var D=" "}else{var D={items:[]}}if(!this.data_sets[C].sets[B]){this.api.addAsset(B,C,D,{onSuccess:function(F){A.data_sets[C].sets[B]=D;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_data_set",[C,B]);if(E&&typeof E=="function"){E(F)}}})}else{$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_data_set",[C,B])}},get_data_sets_by_type:function(A){return this.data_sets[A].sets},get_data_set:function(B,A){if(this.data_sets[B]){return this.data_sets[B].sets[A]}else{return{}}},get_custom_pages:function(){return this.get_data_sets_by_type("custom_page_blueprint")},copy_data_set:function(C,B){var A=this;var E=this.data_sets[C].sets[B];var D=B+" copy";if(!this.data_sets[C].sets[D]){this.api.addAsset(D,C,E,{onSuccess:function(F){A.data_sets[C].sets[D]=E;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_data_set",[C,D])}})}else{alert("Please rename the existing copy of this data set before copying again.")}},update_data_set_name:function(C,B,E,F){var A=this;var D=this.data_sets[C].sets[B];this.api.setAsset(B,C,D,E,{onSuccess:function(G){DAYLIFE.log(["update_data_set_name",G]);A.data_sets[C].sets[E]=A.data_sets[C].sets[B];delete A.data_sets[C].sets[B];$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_data_set_name",[C,B,E]);$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_data_set",[C,E]);if(F&&typeof F=="function"){F(G)}},onError:function(G){DAYLIFE.log(["update_data_set_name error",G]);if(F&&typeof F=="function"){F(G)}}})},save_html:function(C,B,D){var A=this;if(!this.data_sets[C].sets[B]){this.api.addAsset(B,C,D,{onSuccess:function(E){A.data_sets[C].sets[B]=D;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_html",[C,B])}})}else{this.api.setAsset(B,C,D,"",{onSuccess:function(E){A.data_sets[C].sets[B]=D;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_html",[C,B])}})}},set_custom_page:function(E,A,B,D){var G="custom";var F={};var C={classname:E,name:A,query:B,page_group:G,bindings:F};this.datasets_model.save_asset("page_blueprint",E,data,D)},save_asset:function(C,B,D,E){var A=this;DAYLIFE.log(["Save asset",this.data_sets[C].sets,C,B,D,this.data_sets[C].sets[B]===null]);if(typeof this.data_sets[C].sets[B]=="undefined"||this.data_sets[C].sets[B]===null){this.api.addAsset(B,C,D,{site_asset:this.data_sets[C].site_asset,onSuccess:function(F){A.data_sets[C].sets[B]=D;if(E&&typeof E=="function"){E(F)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_asset",[C,B])}})}else{this.api.setAsset(B,C,D,"",{site_asset:this.data_sets[C].site_asset,onSuccess:function(F){A.data_sets[C].sets[B]=D;if(E&&typeof E=="function"){E(F)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_asset",[C,B])}})}},save_css:function(D,C,A,E,F){var B=this;this.api.setAsset(C,D,E,"",{onSuccess:function(I){B.data_sets[D].sets[C]=E;if(A){var H=B.changed_blueprints(A,C);for(var G=0;G<H.length;G++){B.api.setAsset(H[G].asset_name,"page_blueprint",H[G].data)}if(F&&typeof F=="function"){F(I)}}else{if(F&&typeof F=="function"){F(I)}}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_css",[D,C])}})},delete_css:function(C,E){var B=[];var D=this.changed_blueprints(B,C);for(var A=0;A<D.length;A++){this.api.setAsset(D[A].asset_name,"page_blueprint",D[A].data)}this.remove_data_set("css",C,E)},save_image:function(A){yuiImgUploader(A,"/edit/api/publisherapi.addAsset")},changed_blueprints:function(A,E){var G=this.data_sets.css.blueprints;var D=new Array();for(var C=0;C<G.assets.length;C++){var B=G.assets[C];if($DL.inArray(B.asset_name,A)!=-1&&$DL.inArray(E,B.data.css_files||[])==-1){if(!B.data.css_files){B.data.css_files=new Array()}B.data.css_files.push(E);D.push(B)}if($DL.inArray(B.asset_name,A)==-1&&$DL.inArray(E,B.data.css_files||[])!=-1){var F=B.data.css_files.indexOf(E);B.data.css_files.splice(F,1);D.push(B)}}return D},modify_blueprints:function(E,A,B,C,D){this.api.modifyBlueprints(E,A,B,C,{onSuccess:function(F){if(D&&typeof D=="function"){D(F)}}})},add_item_to_data_set:function(D,B,C,F){var A=this;var E=this.data_sets[D].sets[B];if(this.validate_add_item(D,B,C)){E.items.push(C);this.api.setAsset(B,D,E,"",{onSuccess:function(G){A.data_sets[D].sets[B]=E;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_item_to_data_set",[D,B]);if(F&&typeof F=="function"){F(G)}}})}},add_filter:function(D,B,C,F){DAYLIFE.log(["add_source_filter",D,B,C,F]);var A=this;var E={items:C};this.api.addAsset(B,D,E,{onSuccess:function(G){DAYLIFE.log(["add_filter success",D,B,C,F]);A.data_sets[D].sets[B]=E;if(F&&typeof F=="function"){F(G)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_filter",[D,B])}})},update_filter:function(D,B,C,F){var A=this;var E={items:C};this.api.setAsset(B,D,E,"",{onSuccess:function(G){DAYLIFE.log(["update_filter success",D,B,C,F]);A.data_sets[D].sets[B]=E;if(F&&typeof F=="function"){F(G)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_filter",[D,B])}})},update_item_in_data_set:function(E,B,G,D){var F=this.data_sets[E].sets[B];var A=F.items;for(var C=0;C<A.length;C++){if(A[C].id==G){break}}},validate_add_item:function(E,B,D){DAYLIFE.log(["validate_add_item",E,B,D,this.data_sets[E]]);var F=this.data_sets[E].sets[B];if(E=="source_filter"){for(var C=F.items.length-1;C>=0;C--){var A=F.items[C];if(A.id==D.id){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_item_to_data_set",[E,B,"Source already exists in this source filter."]);return false}}}return true},move_item_to_position:function(E,C,H,A){var G=this.data_sets[E].sets[C];var B=G.items;for(var D=0;D<B.length;D++){if(B[D].id==H){var F=B.splice(D,1);B.splice(A,0,F[0]);break}}this.api.setAsset(C,E,G,"",{onSuccess:function(I){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:move_item_to_position",[E,C,H,A])}})},remove_item_from_data_set:function(D,B,F){var E=this.data_sets[D].sets[B];var A=E.items;for(var C=0;C<A.length;C++){if(A[C].id==F){A.splice(C,1);break}}this.api.setAsset(B,D,E,"",{onSuccess:function(G){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:remove_item_from_data_set",[D,B,F])}})},remove_data_set:function(C,B,D){var A=this;this.api.deleteAsset(B,C,{onSuccess:function(E){delete A.data_sets[C].sets[B];$DL(document).trigger("DAYLIFE:AssetModels:DataSets:remove_data_set",[C,B]);if(D&&typeof D=="function"){D(E)}}})},choose_template_group:function(D,C,B){var A=this;this.api.choosePageTemplate(D,C,{onSuccess:function(E){if(B&&typeof B=="function"){B(E)}}})},make_custom_page_call:function(method,data,success,failure){var self=this;data.theme_id=$DL.serializeSearch()["__themeid"];var original_data=data;$DL.ajax({url:"/ajax/custom_page/"+method,data:data,type:"POST",dataType:"json",success:function(data,textStatus){if(data.response.code.toString()=="7001"){var asset;if(method=="add_custom_page"||method=="update_custom_page"){asset=data.response.payload.asset;asset_name=asset.asset_name;if(original_data.asset_name&&original_data.asset_name!=asset_name){delete self.data_sets.custom_page_blueprint.sets[original_data.asset_name]}self.data_sets.custom_page_blueprint.sets[asset_name]=eval("("+asset.data+")");$DL(document).trigger("DAYLIFE:AssetModels:DataSets:save_asset",["custom_page_blueprint",asset_name]);if(method=="update_custom_page"){self.get_batch_data_sets(["page_collection"],function(){},data.theme_id,true)}}else{if(method=="delete_custom_page"){delete self.data_sets.custom_page_blueprint.sets[original_data.asset_name];$DL(document).trigger("DAYLIFE:AssetModels:DataSets:remove_data_set",["custom_page_blueprint",original_data.asset_name])}}if(success&&typeof success=="function"){success(asset)}}else{if(data.response.code.toString()=="-7001"){if(failure&&typeof failure=="function"){failure(data.response.message)}}}},error:function(){if(failure&&typeof failure=="function"){failure(data.response.message)}}})},add_custom_page:function(B,A,I,E,L,C,H,F,J,D){var K=this;var G="add_custom_page";data={name:B,url:A,query:I,template_type:L,shared_template_asset_name:C,use_layout_from:H,template_name:F,custom_hero_image:E};this.make_custom_page_call(G,data,J,D)},update_custom_page:function(A,C,B,J,G,M,D,I,F,K,E){var L=this;var H="update_custom_page";data={asset_name:A,name:C,url:B,query:J,template_type:M,shared_template_asset_name:D,use_layout_from:I,template_name:F,custom_hero_image:G};this.make_custom_page_call(H,data,K,E)},delete_custom_page:function(D,E,B){var A=this;var C="delete_custom_page";data={asset_name:D};this.make_custom_page_call(C,data,E,B)}};DAYLIFE.AssetModels.ThemeManager=function(){this.api=new DAYLIFE.Class.EditApi();this.themes;this.deleted_themes=[];this.site_info;this.active_theme_id;this.site_id;this.loaded=false;this.onready=[];$DL(window).unload($DL.rescope(this.unload,this))};DAYLIFE.AssetModels.ThemeManager.prototype={ready:function(A){if(A&&typeof A=="function"){if(this.loaded){A()}else{this.onready.push(A)}}},load:function(B){var A=this;this.get_active_theme_id(function(C){A.get_my_themes(function(D){A.loaded=true;while(A.onready.length>0){A.onready[0]();A.onready.shift()}if(B&&typeof B=="function"){B(D)}return false})})},get_my_themes:function(B){var A=this;this.api.getMyThemes({limit:100,onSuccess:function(C){if(C.themes){A.themes=C.themes;if(B&&typeof B=="function"){B(C.themes)}}}})},get_site_info:function(C,B){var A=this;if(this.site_info&&!B){C(this.site_info)}else{this.api.getSite({onSuccess:function(D){if(D.site){A.site_info=D.site;if(C&&typeof C=="function"){C(D.site)}}}})}},get_active_theme_id:function(C,B){var A=this;this.get_site_info(function(D){A.active_theme_id=D.active_theme_id;A.site_id=D.site_id;if(C&&typeof C=="function"){C(D.active_theme_id)}},true)},get_inactive_themes:function(H,G){var B=this.active_theme_id;var D=function(I){if(I.theme_id==B){return false}if(H){return I.published_on}else{return !I.published_on}};var F=function(J,I){return I.published_on-J.published_on};var A=function(J,I){return I.modified_on-J.modified_on};var E=function(J){if($DL.isFunction(G)){var I=$DL.grep(J,D);if(H){I.sort(F)}else{I.sort(A)}G(I)}};if(!this.ready){var C=this;this.get_themes(function(){B=C.active_theme_id;E(C.themes)})}else{E(this.themes)}},get_drafts:function(A){this.get_inactive_themes(false,A)},get_previously_published:function(A){this.get_inactive_themes(true,A)},create_draft:function(A,B,D){var C=this;this.api.createDraft(A,B,{onSuccess:function(E){if($DL.isFunction(D)){C.themes.push(E.new_theme);D(E.new_theme)}}})},get_theme:function(A){for(var B=this.themes.length-1;B>=0;B--){if(this.themes[B].theme_id==A){return this.themes[B]}}},publish_theme:function(A,C){var B=this;B.api.publishTheme(A,{onSuccess:function(E){var D=E.site;B.active_theme_id=A;if($DL.isFunction(C)){C(D)}}})},get_saved_themes:function(C){var A=function(G,D){var F=[];for(var E=0;E<G.length;E++){if(G[E].theme_id!=D){F.push(G[E])}}return F};if(!this.ready){var B=this;this.get_themes(function(){C(A(B.themes,B.active_theme_id))})}else{C(A(this.themes,this.active_theme_id))}},get_active_theme:function(C,D){var B=function(G,E){for(var F=0;F<G.length;F++){if(G[F].theme_id==E){return G[F]}}};if(!this.ready||C){var A=this;if(this.active_theme_id){this.api.getTheme(this.active_theme_id,{onSuccess:function(E){D(E.theme)}})}else{this.load(function(){D(B(A.themes,A.active_theme_id))})}}else{D(B(this.themes,this.active_theme_id))}},delete_my_theme:function(A,E){var B=this;var C;for(var D=this.themes.length-1;D>=0;D--){if(this.themes[D].theme_id==A){C=this.themes[D];this.themes.splice(D,1);this.deleted_themes.push(C);break}}this.api.deleteTheme(A,{onSuccess:function(F){if(F=="7001"){if(E&&typeof E=="function"){E(C)}}}})},undelete_my_theme:function(B,E){var C=this;var A;for(var D=this.deleted_themes.length-1;D>=0;D--){if(this.deleted_themes[D].theme_id==B){A=this.deleted_themes[D];this.deleted_themes.splice(D,1);this.themes.push(A);break}}this.api.undeleteTheme(B,this.site_id,{onSuccess:function(F){if(F=="7001"){if(E&&typeof E=="function"){E(A)}}}})},has_unsaved_edits:function(){return false},unload:function(){},save:function(){}};DAYLIFE.AssetModels.Basics=function(){this.api=new DAYLIFE.Class.EditApi();this.site_info};DAYLIFE.AssetModels.Basics.prototype={get_site_info:function(C,B){var A=this;if(this.site_info){if(B&&typeof B=="function"){B(this.site_info)}return this.site_info}else{this.api.getSiteByDomain(C,{onSuccess:function(D){if(D.site){A.site_info=D.site;if(B&&typeof B=="function"){B(D.site)}}}});return false}},update_site_info:function(D,C){var A=this;var B=this.site_info.site_name;A.api.updateSite(D,{onSuccess:function(E){if(E.site){if(B!=E.site.site_name){$DL(document).trigger("DAYLIFE:update_site_name",[E.site.site_name,B])}A.site_info=E.site;$DL(document).trigger("DAYLIFE:AssetModels:Basics:update_site_info",[A,E.site]);if(C&&typeof C=="function"){C(E.site)}}}})},unload:function(){}};DAYLIFE.AssetModels.PageTemplates=function(){this.api=new DAYLIFE.Class.EditApi();this.page_templates={}};DAYLIFE.AssetModels.PageTemplates.prototype={get_page_templates:function(C,D,B){var A=this;if(this.page_templates[C]&&!B){if(D&&typeof D=="function"){D(this.page_templates[C])}return this.page_templates[C]}else{this.api.get_page_templates(C,{onSuccess:function(E){A.page_templates[C]=E;A.update_related_pages_data(C,E);if(D&&typeof D=="function"){D(A.page_templates[C])}}});return false}},get_current_template_information:function(A){if(this.page_templates[A]){return this.page_templates[A].current_template_information}else{return false}},update_related_pages_data:function(C,D){var A;var F=["daylife.page.custom","daylife.page.topic"];for(var B=F.length-1;B>=0;B--){if(C.indexOf(F[B])==0){A=F[B]}}for(var E in this.page_templates){if(E.indexOf(A)==0&&E!=C){this.page_templates[E].shared_templates=$DL.deepCopy(D.shared_templates);this.page_templates[E].standalone_templates=$DL.deepCopy(D.standalone_templates);if(this.page_templates[E].default_template_information&&D.default_template_information){this.page_templates[E].default_template_information=$DL.deepCopy(D.default_template_information)}}}},make_call:function(C,E,D,F,B){var A=this;$DL.ajax({url:"/ajax/page_template/"+E,data:D,type:"POST",dataType:"json",success:function(G,H){if(G.response.code.toString()=="7001"){A.page_templates[C]=G.response.payload;A.update_related_pages_data(C,G.response.payload);$DL(document).trigger("DAYLIFE:AssetModels:PageTemplates:update_page_templates",[A,C,A.page_templates[C]]);if(F&&typeof F=="function"){F(A.page_templates[C])}}else{if(G.response.code.toString()=="-7001"){if(B&&typeof B=="function"){B(G.response.message)}}}},error:function(){if(B&&typeof B=="function"){B(D.response.message)}}})},update_shared_template:function(J,C,B,G,L,F,A,I,K,E){var M=this;var D=$DL.serializeSearch()["__themeid"];var H="update_shared_template";F=(F)?this.api.jsonEncode(F):null;A=(A)?this.api.jsonEncode(A):null;data={theme_id:D,template_asset_name:C,alias:B,css_id:G,css_class:L,topic_filter_data:F,custom_pages_data:A};if(I){data.force_update=true}this.make_call(J,H,data,K,E)},update_standalone_template:function(G,F,D,H,C){var B=this;var A=$DL.serializeSearch()["__themeid"];var E="update_standalone_template";data={theme_id:A,template_asset_name:G,css_id:F,css_class:D};this.make_call(G,E,data,H,C)},add_custom_page_to_shared_template:function(F,D,G,C){var B=this;var A=$DL.serializeSearch()["__themeid"];var E="add_custom_page_to_shared_template";data={theme_id:A,template_asset_name:F,custom_page_asset_name:D};this.make_call(F,E,data,G,C)},add_shared_template:function(J,B,F,L,H,E,A,I,K,D){var M=this;var C=$DL.serializeSearch()["__themeid"];var G="add_shared_template";data={theme_id:C,ref_blueprint:J,alias:B,css_id:F,css_class:L};if(I){data.force_update=true}if(E){data.topic_filter_data=this.api.jsonEncode(E)}if(A){data.custom_pages_data=this.api.jsonEncode(A)}if(H){data.use_layout_from=H}this.make_call(J,G,data,K,D)},delete_template:function(D,F,G,C){var B=this;var A=$DL.serializeSearch()["__themeid"];var E="delete_template";data={theme_id:A,template_asset_name:F};this.make_call(D,E,data,G,C)}};DAYLIFE.Packages.Modals=function(){var C=$DL;var G={};var A,B,I,F,D,E;$DL(document).ready(function(){A=$DL(".DL-modal-base");B=$DL(".DL-modal-shield");I=$DL(".DL-modal-container");F=$DL(".DL-site-wrapper");D=F.offset();E=F.width()});var H=function(L,J,M,K){this.id=$DL.dlid();this.opts=K||{};this.opts.fixed_top=this.opts.fixed_top||false;this.opts.modal_title=this.opts.modal_title||null;this.positioned=false;this.$content=$DL.make("div",{className:"DL-modal-content"});this.$controls=$DL.make("ul",{className:"DL-modal-controls"},[$DL.make("li",[$DL.make("a",{className:"DL-close-modal",href:"#",title:"Close this window"},"Close")])]);this.$title=null;this.$node=$DL.make("div",{className:"DL-modal"},[this.$controls,this.$content,C.make("div",{className:"DL-mask"}),C.make("div",{className:"DL-mask-text"})]).css("display","none").bind("click",$DL.rescope(this.route_click,this));if(this.opts.modal_title){this.$title=$DL.make("h2",{className:"DL-modal-title"},this.opts.modal_title);this.$node.prepend(this.$title)}this.refresh(L,J,M)};H.prototype={refresh:function(M,L,N){if(M){this.$content.html(M)}var J=(N&&N instanceof Function);if(L){var K=this;this.$content.load(L,function(){if(J){N(K)}K.enhance_loaded_content(L);K.recenter()})}else{if(J){N(this);this.recenter()}}},loading:function(K,J){if(J){this.$node.removeClass("DL-ajax-load")}else{this.$node.children(".DL-mask-text").text(K||"Loading...");this.$node.addClass("DL-ajax-load")}return this},open:function(){A.css("display","block");$DL.each(G,function(){this.$node.css("display","none")});var J=this.$node;if(!this.positioned){J.css("visibility","hidden")}J.css("display","block");if(!this.positioned){this.recenter();J.css({visibility:"visible"});this.positioned=true}return this},recenter:function(){var K=($DL(window).height())-100;var N=($DL(window).width())-100;this.$node.css({width:"auto",height:"auto"});var O=this.$node.width();var L=this.$node.height();var J,M;if(O>N){J=50;this.$node.width(N)}else{J=Math.floor((N+100-O)/2)}if(L>K){M=50;this.$node.height(K)}else{if(this.opts.fixed_top){M=this.opts.fixed_top}else{M=Math.floor((K-L)/2)}this.$node.height(L)}this.$node.css({left:J+"px",top:M+"px"})},close:function(){this.$node.css("display","none");A.css("display","none");$DL(document).trigger("DAYLIFE:Modal:close",[this])},destroy:function(){this.$node.remove();delete G[this.id]},enhance_loaded_content:function(J){var L=function(N){return J.indexOf(N)!=-1};var M=this;var K=this.$content;if(L("get_invited")){$DL("input[name=rurl]",K).val(window.location);$DL(".DL-get-invited-join form",K).submit(function(N){$DL.post($DL(this).attr("action"),{email_addr:$DL("input[name=email_addr]",this).val()},function(P){var O=$DL(".DL-get-invited-join p.DL-confirmation",K);O.removeClass("DL-success DL-error");if(P.message=="success"){O.text("Thanks for your interest in Daylife Select!").addClass("DL-success")}else{O.text("Please enter a valid email address and try again.").addClass("DL-error")}O.css("display","block")},"json");return false})}},route_click:function(K,L){var M=L.target;var J=$DL(M);switch(M.tagName.toLowerCase()){case"a":if(J.hasClass("DL-close-modal")){this.close();L.preventDefault();return false}break}}};return{create:function(M,J,N,L){var K=new H(M,J,N,L);G[K.id]=K;I.append(K.$node);return K},refresh:function(M,K,J,L){G[modal.id].refresh(K,J,L)},destroy_all:function(){for(var J in G){G[J].destroy()}}}};$DL(document).ready(function(){var $=$DL;var _searches=[];var _click_away=function(e){var $target=$(e.target);for(var i=_searches.length-1;i>=0;i--){var $node=_searches[i].$node;if($target.parents(".DL-daylife-search").get(0)!=$node.get(0)||((!$target.is("input.DL-see-search-options")&&!$target.is("div.DL-search-options")&&$target.parents("div.DL-search-options").length==0))){DAYLIFE.debug("I HAVE TO HIDE",$target);_searches[i].hide_options()}}};var _Search=function($node){this.$node=$node;this.$options=$(".DL-search-options",$node);this.$query=$("input.DL-input-text",$node);this.$form=$("form",$node);this.$button=$(".DL-see-search-options",$node);this.query_error=false;this.ac_item_idclass=$.dlid("ac_id_");this.$autocompleter=null;this.is_autocomplete_positioned=false;this.$autocomplete_flag=this.$form.hasClass("DL-autocomplete-flag")};_Search.prototype={init:function(){$.avoid_z_collisions(this,this.hide_options);this.$node.bind("click",$.rescope(this.click,this));this.$query.bind("focus",$.rescope(this.clear_query_error,this));this.$form.bind("submit",$.rescope(this.check_submit,this));if(this.$autocomplete_flag){this.activate_autocomplete()}},position_autocomplete:function(){var $item=$("div."+this.ac_item_idclass);if($item.get(0)){this.$autocompleter=$item.eq(0).parents("div.ac_results");$(".DL-namespace").append(this.$autocompleter);this.is_autocomplete_positioned=true}},activate_autocomplete:function(){var self=this;var ac=this.$query.autocomplete("/ajax/topic_search",{matchSubset:0,selectOnly:1,selectFirst:0,delay:50,extraParams:{full_topic:"true",limit:"8"},parse:function(data){var hits=eval("("+data+")");var a=[];if(hits){for(var i=0;i<hits.length;i++){var hit=hits[i];a.push({value:hit.resource_name,data:hit})}}return a},formatItem:function(row,n,p,q,r){if(!self.is_autocomplete_positioned){self.position_autocomplete()}if(row.image_url){var $img=$.make("img",{src:row.image_url,height:32})}else{var $img=$.make("span",{className:"DL-no-image"})}var tags=row.tags||[];var $result=$.make("div",{className:"DL-search-result-preview"},[$img,$.make("div",{className:"DL-search-result-topic "+self.ac_item_idclass},q),$.make("div",{className:"DL-search-result-tags"},tags.join(", "))]);return $result.html()}}).result(function(e,data,formatted){$(this).val(formatted);if(data.topic_url){var url=data.topic_url;if(DAYLIFE_Globals.use_hyphens==1){url=url.replace(/-+/g,"hyphenplaceholder").replace(/_+/g,"-").replace(/hyphenplaceholder+/g,"_")}var themeid=self.get_current_theme_id();if(themeid){url+="?__themeid="+themeid}window.location.href=url}else{self.$form.submit()}})},get_current_theme_id:function(){var match=window.location.href.match(/themeid=(\d{18})/);if(match&&match[1]){return match[1]}else{return null}},check_submit:function(elem,e){if(!this.$query.val()||this.query_error){this.query_error=true;this.$query.val("Enter a search query");this.$query.addClass("DL-error");if(e){e.preventDefault()}return false}else{return true}},clear_query_error:function(){if(this.query_error){this.$query.val("");this.$query.removeClass("DL-error");this.query_error=false}},click:function(elem,e){var self=this;if($.targetIs(e,{tagSelector:":button",preventDefault:true},function($t){if($t.hasClass("selected")){self.hide_options()}else{self.show_options()}})){return false}if($.targetIs(e,{tagSelector:"a",childOf:".DL-search-options",preventDefault:true},function($t){if(self.check_submit()){window.location=$t.attr("href")+self.$query.val()}})){return false}},hide_options:function(){this.$button.removeClass("selected");this.$node.css("z-index","0").zz_untop("DL-click-on-top");this.$options.hide();this.$button.get(0).blur();$("body").unbind("click",_click_away)},show_options:function(){$.avoid_z_collisions(this);this.$button.addClass("selected");this.$node.css("z-index","1000").zz_top("DL-click-on-top");this.$options.show();this.$button.get(0).blur();$("body").bind("click",_click_away)}};$(".DL-daylife-search").each(function(){if($(this).hasClass("DL-module")){var search=new _Search($(this));search.init();_searches.push(search)}})});(function(D){DAYLIFE.Packages.load(["Modals"]);var I=function(J){if(!C){D.include(DAYLIFE_Globals.js_path+"/daylife/blueprint.js",{complete:function(){D.blueprint_ready(function(){D.include(DAYLIFE_Globals.wizard_path+"/js/jquery-validate/jquery.validate.js",{complete:function(){D.include(DAYLIFE_Globals.wizard_path+"/js/editors_manager.js",{complete:function(){D.include(DAYLIFE_Globals.wizard_path+"/js/editors.edit_content.js",{complete:function(){C=true;if(D.isFunction(J)){J()}}})}})}})})}})}else{if(D.isFunction(J)){J()}}};var C=false;var B=function(K){var J=DAYLIFE.AssetModels.get_blueprint_model();var L=K.get_embeddable_version_classname();if(L!=K.classname){return J.createModuleFromClass(L)}else{return J.createModuleFromInstance(K.id)}};var E=function(M){M.preventDefault();var K=D(this);var L=K.module();var J=B(L);var N={preview_dimensions:{height:L.$node.height(),width:L.$node.width()}};D.open_embed_interface(J.id,N)};var A="DL-embed-modal";var F=function(J,L){var K=DAYLIFE.AssetModels.get_blueprint_model();this.module=K.createModuleFromInstance(J);this.original_module=K.getModule(J);this.rendered_original_module=D.module(this.original_module.id,true).module(this.original_module.id);this.opts=D.extend({editor:"Module"},L);this.rendered_module=D.module(this.module.id,true).module(this.module.id);this.include_preview=(DAYLIFE.Browser.IE6)?false:true;this.module_editor=null;this.offsite=false;this.modal=null;this.$header=null;this.$div_embed_code=null;this.$div_module_preview=null;this.$div_customize_module=null;this.$node=null};F.prototype={init:function(){var J=this;this.$node=this.make_node();this.update_embedded_module_attributes();this.editapi=new DAYLIFE.Class.EditApi();if(this.include_preview){var J=this;var M=this.rendered_module;var L=this.modify_rendered_module(M);D(".DL-module-container",this.$div_module_preview).append(L);var K=this.set_rendered_module_width();this.display_module_loading_message(K);D.anybind(M,"DAYLIFE:blueprint:refresh_module",function(){J.size_module_container(K);if(J.opts.editor=="Module"){J.adjust_number_of_topics();J.update_preview_title()}J.disable_all_preview_links()});if(J.opts.editor=="Manage_Pinned_Content_By_Collection"){this.customize_module();this.listen_for_manage_pinned_content_editor()}else{this.customize_module();this.update_embed_code();M.refresh_module(M.make_module_url(null,null,true))}}},connect_with_manage_pinned_content_editor:function(){var J=this;this.setup_collection_selector();this.setup_collection_chooser_tab_arrows();this.module_editor.$node.unbind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:sort").bind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:sort",D.rescope(J.refresh_module_with_content_order,J));this.module_editor.$node.unbind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:close").bind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:close",D.rescope(J.hide,J));this.module_editor.$node.unbind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:save_layout").bind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:save_layout",D.rescope(J.post_save_layout,J));this.module_editor.$node.unbind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:choose_collection").bind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:choose_collection",D.rescope(J.refresh_module_with_collection,J));D(document).unbind("DAYLIFE:Modal:close").bind("DAYLIFE:Modal:close",D.rescope(J.refresh_module_on_page,J))},listen_for_manage_pinned_content_editor:function(){var J=this;this.module_editor.$node.unbind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:initialize_data").bind("DAYLIFE:Wizard:Manage_Pinned_Content_By_Collection:initialize_data",D.rescope(J.connect_with_manage_pinned_content_editor,J))},make_node:function(){var J=D.make("div",{className:"DL-embed-content-wrapper"},[this.make_div_embed_code()]);if(this.include_preview){J.append(this.make_div_module_preview())}var K=D.make("div",{className:A},[this.make_header(),J]);return K},make_header:function(){this.$header=D.make("h1","");return this.$header},make_div_embed_code:function(){this.$div_embed_code=D.make("div",{className:"DL-customize-module-grab"},[D.make("form",{className:"DL-pasteblob"},[D.make("h2","Here's Your Embed Code"),D.make("div",{className:"DL-embed-text"},["To embed this widget, simply copy and paste the code below into your website's ",D.make("strong","<HEAD>"),":"]),D.make("textarea",{className:"DL-input-text DL-pasteblob DL-head-code"},"Loading..."),D.make("div",{className:"DL-embed-text"},["And insert this small placeholder where you want the widget to appear:"]),D.make("textarea",{className:"DL-input-text DL-pasteblob DL-placeholder"},"Loading..."),D.make("div",{className:"DL-customize-module-text"},[D.make("a",{href:"#"},"« Back to Customization Options ")])])]);D("a",this.$div_embed_code).click(D.rescope(this.customize_module,this));return this.$div_embed_code},make_div_module_preview:function(){this.$div_module_preview=D.make("div",{className:"DL-customize-module-preview"},[D.make("h2",{className:"DL-module-preview-header"},"Live Preview"),D.make("div",{className:"DL-module-container"})]);return this.$div_module_preview},is_topic_content_widget:function(){var J=["topics-only"];if("display_size" in this.module.attribute_idx){return D.inArray(this.module.attribute_idx.display_size.value,J)==-1}return false},modify_rendered_module:function(O){var M="DL-active";var K=this.is_topic_content_widget();DAYLIFE.log(["is_topic_content_widget",K]);if(!K){M=""}if(this.module.classname.indexOf("daylife.embed.")!=-1&&this.module.classname.indexOf("_integration_module")!=-1){var L=$DL.make("div",{className:"DL-embed-title"},[this.module.attribute_idx.module_title.value]);var J=$DL.make("div",{className:"DL-embed-topics"},[$DL.make("ul",{className:"DL-topics"},[$DL.make("li",{className:"DL-topic DL-first "+M},[$DL.make("a",{className:"DL-topic-link",href:"/topic/LeBron_James"},[$DL.make("img",{className:"DL-topic-image",src:"http://cache.daylife.com/imageserve/07Z65uv7kDbRT/60x60.jpg?center=0.5,0"}),"LeBron James"])]).hide(),$DL.make("li",{className:"DL-topic"},[$DL.make("a",{className:"DL-topic-link",href:"/topic/Cleveland_Cavaliers"},[$DL.make("img",{className:"DL-topic-image",src:"http://cache.daylife.com/imageserve/0djXdSK1E29Cv/60x60.jpg?center=0.5,0"}),"Cleveland Cavaliers"])]).hide(),$DL.make("li",{className:"DL-topic"},[$DL.make("a",{className:"DL-topic-link",href:"/topic/National_Basketball_Association"},[$DL.make("img",{className:"DL-topic-image",src:"http://cache.daylife.com/imageserve/07Q80j99IWfYY/60x60.jpg?center=0.5,0"}),"NBA"])]).hide(),$DL.make("li",{className:"DL-topic"},[$DL.make("a",{className:"DL-topic-link",href:"/topic/Dwyane_Wade"},[$DL.make("img",{className:"DL-topic-image",src:"http://cache.daylife.com/imageserve/07nmb7RezLgzC/60x60.jpg?center=0.5,0"}),"Dwayne Wade"])]).hide()])]);var N=$DL.make("div",{className:"DL-embed-content"},O.$node);var P=$DL.make("div",{className:"DL-embed-module DL-embed-size-"+this.opts.attributes.display_size},[L,J,N]);return P}return O.$node},adjust_number_of_topics:function(){var J=D(".DL-topics .DL-topic",this.$div_module_preview);var L=this.module.attribute_idx.num_topics.value;DAYLIFE.log(["adjust_number_of_topics",L,J,this.$div_module_preview,this.module]);J.hide();for(var K=0;K<L;K++){J.eq(K).show()}},disable_all_preview_links:function(){var J=D(".DL-module-container",this.$div_module_preview);var K=D("a",J);K.each(function(){D(this).click(function(L){L.preventDefault();return false})})},update_embedded_module_attributes:function(){var L=DAYLIFE.AssetModels.get_blueprint_model();var J={};switch(this.module.classname){case"daylife.topic.related_images":L.updateModuleAttributes(this.module.id,{display_type:"list"});break}if(this.opts.attributes){for(var K in this.opts.attributes){J[K]=this.opts.attributes[K]}L.updateModuleAttributes(this.module.id,J,null,true)}},setup_collection_selector:function(){this.move_collection_chooser();this.refresh_module_with_collection()},setup_collection_chooser_tab_arrows:function(){var R=this;var J=this.$collection_chooser;var N=D(".DL-collection-chooser",J);var M=D(".DL-collection-choice",N);var O=D.make("span",{className:"left_arrow DL-disabled"},"<<");var K=D.make("span",{className:"right_arrow"},">>");var L=0;var S=4;var Q=0;M.each(function(){Q+=D(this).outerWidth(true)});if(Q>0){N.width(Q)}var P=function(T){var U=parseInt(N.css("left"));var V=J.outerWidth(true);DAYLIFE.log(["Toggle",U,V,Q,T]);if(Q+(U-T)<V){K.addClass("DL-disabled")}else{K.removeClass("DL-disabled")}if(U-T>-10){O.addClass("DL-disabled")}else{O.removeClass("DL-disabled")}};if(Q>J.width()){N.before(O);N.after(K);N.addClass("DL-scroll");K.click(function(){if(!K.hasClass("DL-disabled")){var U=0;for(var T=0;T<S;T++){if(L+T<M.length-1){U+=M.eq(L+T).outerWidth(true)}}N.animate({left:"-="+U+"px"},500);L+=S;P(U)}});O.click(function(){if(!O.hasClass("DL-disabled")){var U=0;for(var T=S;T>0;T--){if(L-T>=0){U+=M.eq(L-T).outerWidth(true)}}N.animate({left:"+="+U+"px"},500);L-=S;P(0-U)}});P(0)}},move_collection_chooser:function(){var J=D(".DL-collection-chooser-wrapper",this.$div_customize_module).css("display","block");this.$collection_chooser=J;this.$div_embed_code.before(J)},refresh_module_with_collection:function(X,S,O){var V={};var R=this.rendered_module;var K=D(".DL-active",this.$collection_chooser).data("collection_id");var N=D(".DL-active",this.$collection_chooser).data("collection_meta");var Q=D(".DL-active",this.$collection_chooser).data("collection_metatype");var L=N.name;var P=DAYLIFE_Globals.page_traits;var J;if(Q=="custom_page"){L='"'+L+'" Custom Page';var M="daylife.page.custom.";var U=K.replace(M,"");J=this.add_themeid_to_url(D.navigator().url_for("custom",{page_name:U}))}else{if(Q=="topic"){var W=encodeURIComponent(L.replace(" ","_"));L='"'+L+'" Topic Page';J=this.add_themeid_to_url(D.navigator().url_for("topic",{id:W}))}else{if(Q=="home_page"){J=this.add_themeid_to_url(D.navigator().url_for("home"))}}}var T=D.make("span",["Live Preview ",D.make("span",{className:"DL-preview-link"},["(",D.make("a",{href:J},"or view this module on the "+L).open_externally(),")"]),]);if(Q=="template"){D(".DL-preview-link",T).remove()}D(".DL-module-preview-header",this.$div_module_preview).html(T);this.opts.attributes.id=K;this.opts.attributes.blueprint=K;this.update_embedded_module_attributes();if(O){V.content_order=this.editapi.jsonEncode(O)}R.refresh_module(R.make_module_url(null,V,true,{use_glue:false}),10002)},refresh_module_on_page:function(S,O){var R=DAYLIFE.AssetModels.get_blueprint_model();var Q=[D.modules("daylife.topic.topic_collection_module"),D.modules("daylife.topic.template_collection_module"),D.modules("daylife.home.home_page_collection_module"),D.modules("daylife.custom.custom_page_collection_module")];var L=DAYLIFE_Globals.page_traits;var M=L.controller;var P=DAYLIFE_Globals.page_id;var T=this.check_collection_on_page(P);if(!T){T=this.check_collection_on_page(DAYLIFE_Globals.meta_substitutions.topic_id)}if(!T){T=this.check_collection_on_page("daylife.page.custom."+DAYLIFE_Globals.page_traits.page_name)}if(!T){for(am in Q){var K=Q[am];for(m in K){var N=K[m];DAYLIFE.log(["Module to check",N])}}}if(T){for(am in Q){var K=Q[am];for(m in K){var N=K[m];var J=N.id;if(!(N.$node.parents(".DL-modal-base").length)&&!(N.$node.parents(".bin").length)){N.refresh_module(N.make_module_url(L,null,true))}}}}},check_collection_on_page:function(M){var K=D(".DL-collection-chooser",this.$collection_chooser);var J=DAYLIFE_Globals.page_traits.controller;var L=false;D(".DL-collection-choice",this.$collection_chooser).each(function(){var N=D(this).data("collection_id");if(N==M){L=true}});return L},add_themeid_to_url:function(K){var J=D.querystring_to_hash(window.location.search);if(K.indexOf("?")!=-1){K+="&"}else{K+="?"}if(J.__themeid){K+="__themeid="+J.__themeid}return K},set_rendered_module_width:function(){var K=this.rendered_module.$node.height()||200;var J=this.rendered_module.$node.width()||300;if(this.opts.preview_dimensions){K=this.opts.preview_dimensions.height||K;J=this.opts.preview_dimensions.width||J}this.rendered_module.$node.css({height:K,width:J,position:"relative"});return{width:J,height:K}},display_module_loading_message:function(J){var K=this.rendered_module.make_loading_mask(J.height,"Loading...").css({height:J.height,width:J.width});this.rendered_module.$node.prepend(K)},update_embed_code:function(){var K=D("textarea.DL-head-code",this.$div_embed_code);var L=D("textarea.DL-placeholder",this.$div_embed_code);var J=this;this.rendered_module.get_embed_code(function(M){K.val(M)});this.rendered_module.get_embed_code_placeholder(function(M){L.val(M)});return K},refresh_module_with_content_order:function(M,N,L){DAYLIFE.log(["Content order",L]);var K=DAYLIFE_Globals.page_traits;var J=this.rendered_module.make_module_url(K,{content_order:this.editapi.jsonEncode(L)},true,{use_glue:false});this.rendered_module.refresh_module(J,10002)},show:function(){if(!this.modal){this.make_modal()}this.modal.open();this.size_modal();if(this.module_editor.datasets_model&&this.opts.editor=="Manage_Pinned_Content_By_Collection"){this.setup_collection_chooser_tab_arrows()}},hide:function(){if(this.modal){this.modal.close()}},make_modal:function(){var J={};if(this.opts.editor=="Manage_Pinned_Content_By_Collection"){J.fixed_top=50}this.modal=DAYLIFE.Modals.create(this.$node,null,null,J)},size_modal:function(){var P=this.$div_customize_module.outerHeight({margin:true});var L=D(".DL-embed-content-wrapper",this.$node);var U=parseInt(L.css("padding-left"))+parseInt(L.css("padding-right"))+32;var O=parseInt(L.css("padding-top"))+parseInt(L.css("padding-bottom"));var S=D(".DL-module-preview-header",this.$node).outerHeight({margin:true});if(this.include_preview){var T=this.rendered_module.$node;this.$node.width(this.$div_embed_code.outerWidth({margin:true})+this.$div_module_preview.outerWidth({margin:true})+U);var M=T.outerHeight({margin:true})+S;var R=(P>M)?P:M;var V=this.$header.outerHeight({margin:true});var N=D(".DL-collection-chooser-wrapper",this.$node).outerHeight({margin:true});this.$node.height(R+V+N+O)}else{this.$node.width(this.$div_embed_code.outerWidth()+U)}this.modal.recenter();var J=this.modal.$node.height();var K=J-V;try{L.css("height",K)}catch(Q){}},size_module_container:function(J){var K=D(".DL-module-container",this.$div_module_preview);if(J){}if(this.modal){this.size_modal()}},customize_module:function(J,K){if(K){K.preventDefault()}if(!this.$div_customize_module){this.make_div_customize_module();this.$div_embed_code.after(this.$div_customize_module)}this.$div_embed_code.css("display","none");this.$div_customize_module.css("display","block");if(this.module_editor.datasets_model&&this.opts.editor=="Manage_Pinned_Content_By_Collection"){this.connect_with_manage_pinned_content_editor()}},make_div_customize_module:function(){var J={module_id:this.module.id};if(this.opts.editor=="Manage_Pinned_Content_By_Collection"){J.content=this.opts.content;J.initial_collection={collection_meta:this.opts.collection_meta||{},collection_type:this.opts.collection_type||null};J.original_collections=this.opts.original_collections;J.blueprint=this.opts.blueprint}this.$div_customize_module=D.make("div",{className:"DL-customize-module-prefs"});this.module_editor=D.editor(this.opts.editor,J);this.$div_customize_module.append(this.module_editor.$node);this.module_editor.$node.find("form").addClass("DL-preferences-edit-form");this.modify_module_editor_instance_methods();if(this.opts.editor=="Module"){this.change_module_editor_form_events()}else{if(this.opts.editor=="Manage_Pinned_Content_By_Collection"){this.change_pinned_content_editor_form_events()}}this.add_title_to_module_editor_form();this.add_subtitle_to_module_editor_form();this.suppress_contextual_fields();return this.$div_customize_module},modify_module_editor_instance_methods:function(){this.module_editor.activate_save_button=function(J){var L=D(":submit",J);var K=D(":reset",J);L.removeClass("disabled");L.attr("disabled",false);K.addClass("disabled");K.attr("disabled",true);L.attr("value","Update Preview")};this.module_editor.deactivate_save_button=function(J){var L=D(":submit",J);var K=D(":reset",J);L.addClass("disabled");L.attr("disabled",true);K.removeClass("disabled");K.attr("disabled",false);L.attr("value","Update Preview")}},add_title_to_module_editor_form:function(){D("fieldset.simple_attributes",this.module_editor.$node).before(D.make("h2",{className:"DL-customize-data"},"Customize Widget"))},add_subtitle_to_module_editor_form:function(){D("fieldset.simple_attributes",this.module_editor.$node).before(D.make("h5",["What Content Do You Want to Target",D.make("br"),"with Smart Context?"]));D("fieldset.simple_attributes",this.module_editor.$node).before(D.make("p","Using a CSS Content Selector, specify the location of the content on the web page where you’ll be embedding the SmartContext widget. The SmartContext widget will target that content and display related content."))},change_pinned_content_editor_form_events:function(){var K=this;var J=this.module_editor.$node.find("form");D("fieldset.buttons",J).css("display","block")},change_module_editor_form_events:function(){var K=this.module_editor.$node.find("form");D("fieldset.buttons",K).css("display","block");D(":submit",K).attr("value","Update Preview");D(":reset",K).attr("value","Get Embed Code");K.unbind("reset");var J=this;K.bind("reset",function(){J.update_embed_code();J.$div_embed_code.css("display","block");J.$div_customize_module.css("display","none");return false});K.bind("submit",function(){J.module_editor.deactivate_save_button();return false})},update_preview_title:function(){var K=this.rendered_module.attr("module_title");var J=this.rendered_module.$node.parents(".DL-embed-module").find(".DL-embed-title");J.text(K)},post_save_layout:function(){var L=DAYLIFE_Globals.page_traits;var J=L.controller;var K=this.rendered_original_module.make_module_url(L,null,true,{use_glue:this.opts.close_on_save});this.rendered_original_module.refresh_module(K);if(this.opts.close_on_save){this.hide()}},suppress_contextual_fields:function(){var K=this.module_editor.$node.find("form");var J=this;D(":input",K).each(function(){var L=D(this);if(J.module_editor.is_contextual_field(L.attr("name"))){L.parents("div.single_attribute").css("display","none")}})}};var H={};var G=function(J){for(var K in H){if(K==J){H[K].show();D(document).trigger("DAYLIFE:Embed:open",[])}else{delete H[K]}}};D.fn.embedder=function(){var M;var K="."+A;var L=(this.is(K))?this:this.parents(K);for(var J in H){if(H[J].$node.get(0)==L.get(0)){M=H[J];break}}DAYLIFE.debug("$embed",L);DAYLIFE.debug("inst",M);return M};D.extend({open_embed_interface:function(K,L){L=L||{};L.preview_dimensions=L.preview_dimensions||null;var J=H[K];if(!J){J=new F(K,L);J.init();H[K]=J}DAYLIFE.log(["Embed",K]);G(K);return J},get_embedder:function(J){return H[J]},destroy_all_embedders:function(){H={}}})})($DL);DAYLIFE.TopicConnectionGraph=function(C,B,A,D,E,H,F){var G=Raphael(C,B,A);this.r=G;this.center_x=D||125;this.center_y=E||125;this.offset=H||35;this.sizes=F||{small:30,medium:50,large:70,xlarge:100};this.rotation=3.14/2;this.$graph=$DL("#"+C);this.$module=this.$graph.parents(".DL-module")};DAYLIFE.TopicConnectionGraph.prototype={runner:function(A,I){this.arc_step_size=2*3.14/A.length;I.img_svg=this.create_image(I.img,this.center_x+this.offset,this.center_y+this.offset,this.sizes[I.s]);for(var E=0,L=A.length;E<L;E++){var D=A[E];var H=(Math.cos(this.arc_step_size*E-this.rotation)*(this.center_x))+(this.center_x)+(this.offset);var G=(Math.sin(this.arc_step_size*E-this.rotation)*(this.center_y))+(this.center_y)+(this.offset);D.img_svg=this.create_image(D.img,H,G,this.sizes[D.s]);D.img_svg["topic_index"]=E;var J=Math.cos(this.arc_step_size*E-this.rotation)*(this.sizes[I.s]/2)+this.center_x+this.offset;var K=Math.sin(this.arc_step_size*E-this.rotation)*(this.sizes[I.s]/2)+this.center_y+this.offset;var N=H-(Math.cos(this.arc_step_size*E-this.rotation)*(this.sizes[D.s]/2));var M=G-(Math.sin(this.arc_step_size*E-this.rotation)*(this.sizes[D.s]/2));var C=Math.random()*N;var F=Math.random()*M;var B=this.r.path({stroke:"#C0C0C0","stroke-width":3}).moveTo(J,K).curveTo(N,M,N,M,N,M);this.hover_image(D.img_svg,B,I.img_svg,D);this.link_image(D,B)}this.position_topic_names(A);I.img_svg["c_2"].toFront()},create_image:function(G,M,L,P){var H=parseInt(P)/2;var R=M;var K=L;var D=(Math.sqrt(2)-1)*H;var E=3;var J=3;var I=H+(0.5*D);var S=H;var F=H-2;var Q="#C0C0C0";var N=this.r.image(G,M-H,L-H,P,P);var A=this.r.circle(R,K,I).attr({stroke:"#fff","stroke-width":D});var B=this.r.circle(R,K,S).attr({stroke:Q,"stroke-width":E});var C=this.r.circle(R,K,F).attr({stroke:"#fff","stroke-width":J});B.insertAfter(C);var O=this.r.set();O.push(N);O.push(B);O.push(C);return{img:N,c_2:B,c_1:C,set:O}},hover_image:function(D,L,J,K){var I=this;var F="#C0C0C0";var G="#ffcc00";var E=D.c_2.attr("r");var B=J.c_2.attr("r");var C=$DL(".DL-topic a.DL-name:eq("+D.topic_index+")",this.$module).parents(".DL-topic");var H=function(){J.c_2.attr({stroke:G,"stroke-width":5,r:B+1});L.attr({stroke:G,"stroke-width":5});D.c_2.attr({stroke:G,"stroke-width":5,r:E+1});$DL(D.img[0]).css("cursor","pointer");$DL(D.c_1[0]).css("cursor","pointer");$DL(D.c_2[0]).css("cursor","pointer");$DL(L[0]).css("cursor","pointer");C.addClass("DL-active");I.show_connection_info(D,E+1)};var A=function(){D.c_2.attr({stroke:F,"stroke-width":3,r:E});L.attr({stroke:F,"stroke-width":3});J.c_2.attr({stroke:F,"stroke-width":3,r:B});$DL(D.img[0]).css("cursor","default");$DL(D.c_1[0]).css("cursor","default");$DL(D.c_2[0]).css("cursor","default");$DL(L[0]).css("cursor","default");C.removeClass("DL-active");I.hide_connection_info(D)};D.set.mouseover(H);D.set.mouseout(A);C.mouseover(H);C.mouseout(A)},link_image:function(A,B){A.img_svg["set"].click(function(){window.location.href=A.link});B.click(function(){window.location.href=A.link})},position_topic_names:function(C){var K=$DL;var I=this.$graph.height();var E=this.$graph.width();for(var J=C.length-1;J>=0;J--){var F=C[J]["img_svg"]["c_2"];var H=Math.floor(F.attr("cx"));var G=Math.floor(F.attr("cy"));var B=Math.ceil(F.attr("r"));var A=(G<(I/2))?"top":"bottom";var M=0;var D=K("li.DL-topic:eq("+J+") a.DL-name",this.$module);if(D.length>0){var L=(A=="top")?G-B-M-D.outerHeight(true):G+B+M;D.css({left:H-Math.floor(D.outerWidth()/2),top:L,visibility:"visible"})}}},position_connection_info:function(H,B,I,J){var G=$DL;var D=H.c_2;var F=D.attr("cx");var E=D.attr("cy");var A=J;var C=2;B.css({left:F-Math.floor(B.width()/2),top:E-A-B.outerHeight()-I.outerHeight()-C+2});I.css({left:F-Math.floor(I.width()/2),top:E-A-I.outerHeight()-C});B.data("has_been_positioned",true)},get_$arrow:function(A){return $DL("li.DL-topic:eq("+A+") div.DL-zoomed-connection-arrow",this.$module)},get_$info:function(A){return $DL("li.DL-topic:eq("+A+") div.DL-zoomed-connection",this.$module)},show_connection_info:function(A,E){var D=$DL;var C=this.get_$info(A.topic_index);var B=this.get_$arrow(A.topic_index);if(!C.data("has_been_positioned")){this.position_connection_info(A,C,B,E)}B.css("display","block");C.css("display","block")},hide_connection_info:function(A){this.get_$info(A.topic_index).css("display","none");this.get_$arrow(A.topic_index).css("display","none")}};(function(A){var B={module:".DL-module",slideshow:".DL-covers-wrapper",thumbnail:".DL-covers-thumbnail",thumbnails:".DL-covers-thumbnails",cover:".DL-cover",covers:".DL-covers",next:".DL-next-cover",prev:".DL-prev-cover"};DAYLIFE.CoversCollection=function(C){var D={module_id:".DL-covers-module",slideshow_speed:5000,autoplay_slideshow:false,enable_pagination:true,thumbnails_mode:true};this.options=A.extend({},D,C);this.$module=A(this.options.module_id);this.timers={};this.flags={slideshow_playing:false,slideshow_paused:false,scrolling_thumbnails:false}};DAYLIFE.CoversCollection.prototype={runner:function(){this.handle_actions();this.setup_buttons();if(this.options.autoplay_slideshow){this.play_slideshow()}},activate_cover:function(G){var F=G.siblings(".DL-active");var E=A(B.prev,B.module);var D=A(B.next,B.module);var I=A(B.cover,B.module).length;F.removeClass("DL-active");G.addClass("DL-active");var H=(G.prevAll().length)+1;var C=A(B.thumbnail,this.$module).eq(H-1);if(H==1){E.addClass("DL-prev-cover-disabled");D.removeClass("DL-next-cover-disabled")}else{if(H==I){E.removeClass("DL-prev-cover-disabled");D.addClass("DL-next-cover-disabled")}else{E.removeClass("DL-prev-cover-disabled");D.removeClass("DL-next-cover-disabled")}}C.siblings(".DL-active").removeClass("DL-active");C.addClass("DL-active");F.css({opacity:1}).animate({opacity:0},{duration:800,easing:"easeOutQuad",queue:false});G.css({opacity:0}).animate({opacity:1},{duration:800,easing:"easeOutQuint",queue:false})},active_cover:function(){var D=A(B.covers,this.$module);var C=A(".DL-active",D);return C},next_cover:function(){var C=this.active_cover();var E=C.next(B.cover);var D=C.prevAll().length+1;if(E.length&&!this.flags.scrolling_thumbnails){if((D%4)==0&&this.options.thumbnails_mode){this.scroll_thumbnails(-1)}this.activate_cover(E)}},prev_cover:function(){var C=this.active_cover();var D=C.prev(B.cover);var E=C.prevAll().length+1;if(D.length&&!this.flags.scrolling_thumbnails){if((E%4)==1&&this.options.thumbnails_mode){this.scroll_thumbnails(1)}this.activate_cover(D)}},scroll_thumbnails:function(E){var D=this;function C(){D.flags.scrolling_thumbnails=false}if(!this.flags.scrolling_thumbnails){this.flags.scrolling_thumbnails=true;$ol=A(B.thumbnails,B.module);ol_width=A(B.thumbnails).parent("div").outerWidth()+10;animation_interval=(parseInt($ol.css("left"))+(E*ol_width));$ol.animate({left:animation_interval},{duration:800,complete:C})}},setup_buttons:function(){this.$buttons=A(B.next,this.$module).add(B.prev,this.$module)},fadein_buttons:function(){this.$buttons.animate({opacity:1},{duration:150,queue:false})},fadeout_buttons:function(){this.$buttons.animate({opacity:0},{duration:300,queue:false})},play_slideshow:function(){var C=this;this.flags.slideshow_playing=true;this.flags.slideshow_paused=false;if(!this.timers.slideshow){this.timers.slideshow=setInterval(function(){C.next_cover()},this.options.slideshow_speed)}},stop_slideshow:function(){if(this.timers.slideshow&&this.flags.slideshow_playing){clearInterval(this.timers.slideshow);delete this.timers.slideshow;if(this.flags.slideshow_paused){this.flags.slideshow_playing=true}else{this.flags.slideshow_playing=false}}},handle_actions:function(){this.$module.bind("click",A.rescope(this.handle_clicks,this));this.$module.bind("mouseenter",A.rescope(this.handle_mouseenter,this));this.$module.bind("mouseleave",A.rescope(this.handle_mouseleave,this))},handle_clicks:function(D,E){var C=this;A.targetIs(E,{tagSelector:".DL-covers-thumbnail"},function(H){E.preventDefault();C.flags.slideshow_playing=false;C.stop_slideshow();var G=(H.prevAll().length);var F=A(B.cover,this.$module).eq(G);if(!F.hasClass("DL-active")){C.activate_cover(F)}});A.targetIs(E,{tagSelector:B.next},function(F){E.preventDefault();C.next_cover()});A.targetIs(E,{tagSelector:B.prev},function(F){E.preventDefault();C.prev_cover()});return false},handle_mouseenter:function(D,E){var C=this;if(!this.flags.slideshow_paused&&this.flags.slideshow_playing){this.flags.slideshow_paused=true;this.stop_slideshow()}},handle_mouseleave:function(D,E){var C=this;if(this.flags.slideshow_paused&&this.flags.slideshow_playing){this.play_slideshow()}},handle_direction_buttons_hover:function(){var C=this;A(B.slideshow).hover(function(){C.fadein_buttons()},function(){C.fadeout_buttons()})}}})($DL);(function(A){var B={module:".DL-module",cover:".DL-cover",covers:".DL-covers",next:".DL-next-cover",prev:".DL-prev-cover",caption:".DL-covers-caption h5"};DAYLIFE.HomepageCoversCollection=function(C){var D={module_id:".DL-covers-module",enable_pagination:true};this.options=A.extend({},D,C);this.$module=A(this.options.module_id);this.timers={}};DAYLIFE.HomepageCoversCollection.prototype={runner:function(){this.handle_actions();this.resize_background();A(window).resize(this.resize_background)},resize_background:function(){var I=A(B.covers,this.$module),J=960,C=540,G=J/C,L=A(window).width(),E=A(window).height(),K=A("img",I),M=K.height(),H=A("#DL-body");H.removeClass();var F="100%";if(L<960){var M=540;H.addClass("Under960");F="960px";if(E<540){D="0"}}else{if(L>1600){var M=900;H.addClass("Over1600");F="1600px";D=parseInt((E-900)/2)}else{var M=L/G;H.addClass("Between960and1600")}}var D=parseInt((E-M)/2);K.css({"margin-top":D,width:F});A(document).ready(function(){var N=0;if(E<540){N=E-540}else{if(M<E){N=parseInt((E-M)/2)}}A("#DL-content-slot-2").css({bottom:N,visibility:"visible"})})},activate_cover:function(D){var F=D.siblings(".DL-active");var E=A(B.prev,B.module);var C=A(B.next,B.module);var I=A(B.cover,B.module).length;var G=A("h5",D).html();F.removeClass("DL-active");D.addClass("DL-active");var H=(D.prevAll().length)+1;E.addClass("DL-prev-cover-disabled");C.addClass("DL-next-cover-disabled");A(B.caption,B.module).html(G);A("img",F).fadeOut(750,function(){A("img",D).fadeIn(250,function(){if(H==1){E.addClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}else{if(H>=I){E.removeClass("DL-prev-cover-disabled");C.addClass("DL-next-cover-disabled")}else{E.removeClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}}})})},active_cover:function(){var D=A(B.covers,this.$module);var C=A(".DL-active",D);return C},next_cover:function(){var C=this.active_cover();var F=C.next(B.cover);var D=F.next();if(D.length){var E=A("img",D).attr("rel");A("img",D).attr("src",E)}if(F.length&&!A(B.next,B.module).hasClass("DL-next-cover-disabled")){this.activate_cover(F)}},prev_cover:function(){var C=this.active_cover();var D=C.prev(B.cover);if(D.length&&!A(B.prev,B.module).hasClass("DL-prev-cover-disabled")){this.activate_cover(D)}},handle_actions:function(){this.$module.bind("click",A.rescope(this.handle_clicks,this))},handle_clicks:function(D,E){var C=this;A.targetIs(E,{tagSelector:B.next},function(F){E.preventDefault();C.next_cover()});A.targetIs(E,{tagSelector:B.prev},function(F){E.preventDefault();C.prev_cover()});return false}}})($DL);(function(A){var B={WIDGET:{name:"widget",selector:".DL-gallery-widget",heading:".DL-gallery-header-view-widget"},FILMSTRIP:{name:"filmstrip",selector:".DL-gallery-filmstrip",heading:".DL-gallery-header-view-filmstrip"},MOSAIC:{name:"mosaic",selector:".DL-gallery-mosaic",heading:".DL-gallery-header-view-mosaic"},THUMBNAILS_COVER:{name:"thumbnails_cover",selector:".DL-gallery-thumbnails-cover",heading:".DL-gallery-header-view-thumbnails"},THUMBNAILS:{name:"thumbnails",selector:".DL-gallery-thumbnails",heading:".DL-gallery-header-view-thumbnails"},FULLSCREEN:{name:"fullscreen",selector:".DL-gallery-fullscreen",heading:".DL-gallery-header-view-fullscreen"}};DAYLIFE.ImageSlideshow=function(C,D){var E={slideshow_type:"filmstrip",image_transition_time:350,image_transition_type:"backOut",page_transition_time:900,page_transition_type:"easeInOutQuint",image_width:400,image_height:300,slideshow_id:"slideshow",canvas_width:400,canvas_height:300,scale:0.85,thumbnails_gallery_thumbnails_per_page:10,thumbnails_cover_gallery_thumbnails_per_page:40,filmstrip_gallery_thumbnails_per_page:24,images_per_ad_rotation:3,page_type:"embed",default_view:"filmstrip"};this.opts=A.extend({},E,C);this.$ss=$DL("#"+this.opts.slideshow_id);this.$module=this.$ss.parents(".DL-module").eq(0);this.filmstrip_loaded_pages={};this.views=B;this.locks={};this.cache={};this.timers={};this.counters={filmstrip_image_index:0,thumbnails_gallery:0,filmstrip_thumbnail_page:0,thumbnails_gallery_page:0,thumbnails_cover_page:0,mosaic_page:0,images_viewed:0};if(this.opts.slideshow_type=="svg"){this.images=D;this.num_images=D.length;this.R=Raphael(this.opts.slideshow_id,this.opts.canvas_width*this.num_images,this.opts.canvas_height)}else{if(this.opts.slideshow_type=="filmstrip"){this.num_images=A(".DL-slideshow .DL-photo-filmstrip-photos .DL-photo",this.$module).length}}};DAYLIFE.ImageSlideshow.prototype={runner:function(F){var E=this;if(this.opts.slideshow_type=="svg"){var C=this.create_svg_images(F);A(this.R.canvas,this.$module).css({left:"0px"});this.paginate_svg_photos();this.focus_svg_image(C[0])}else{if(this.opts.slideshow_type=="filmstrip"){var D=this.extract_selected_view();var H=true;var G=A.hash("image")||this.convert_querystring_imageid_to_hash();this.initial_hash=A.hash();this.change_view(D,G,H);this.filmstrip_attach_hover_overlay_to_widget_images();this.watch_hash_for_changes()}}this.handle_actions();A(document).trigger("DAYLIFE:ImageSlideShow:slideshow_ready",[this.$module])},convert_querystring_imageid_to_hash:function(){var C=A.querystring_to_hash(location.search,"image_id");return C},extract_selected_view:function(){var E=A.hash("view")||this.opts.default_view;var D;for(v in this.views){var C=this.views[v];if(C.name==E){D=C;break}}return D},get_image_index_from_image_id:function(D){var C=0;$photos=A(".DL-photo-filmstrip-photos .DL-photo",this.$module);$photos.each(function(E){var F=A("img",this).attr("src")||A("img",this).attr("rel");if(F&&F.indexOf(D)!=-1){C=E;return }});return C},get_image_id_from_image_index:function(C){$photo=A(".DL-photo-filmstrip-photos .DL-photo",this.$module).eq(C);var D=this.extract_image_id($photo);return D},extract_image_id:function(E){var C=A("img",E).attr("src")||A("img",E).attr("rel");if(C){var D=C.match(/imageserve\/(.*?)\//);if(D&&D.length>0){return D[1]}}},read_cache:function(C){if(!this.cache[C]){this.cache[C]={}}return this.cache[C]},set_imageid_in_hash:function(E,C){if(this.opts.page_type=="gallery_page"){var D={image:E};if(!C){C=this.active_view}D.view=C.name;A.hash(D);this.selected_hash=A.hash()}},remove_imageid_in_hash:function(){var D=A.hash("view");for(v in this.views){var C=this.views[v];if(C.name==D){break}}if(C==this.views.FILMSTRIP||C==this.views.THUMBNAILS){DAYLIFE.log(["Ignoring hash image_id removal"])}else{A.removeHash("image")}},watch_hash_for_changes:function(){var C=this;if(this.opts.page_type!="embed"){this.selected_hash=A.hash();if(!DAYLIFE.Browser.IE6){setInterval(function(){if(!C.locks.prevent_hash_changes){var E=A.hash();if(C.selected_hash!=E){if(C.locks.hash_has_changed&&E==C.initial_hash){return }var G=true;var F=A.hash("image");var D=C.extract_selected_view();C.selected_hash=E;C.change_view(D,F,G)}}},500)}}},lazyload_load_images_by_view:function(C){var D=A(C.selector,this.$module);this.lazyload_load_images_by_container(D)},lazyload_load_images_by_container:function(E,D){var C=A(".DL-photo",E);if(D){C=C.slice(D-1,D+2)}this.lazyload_load_images(C)},lazyload_load_images_widget:function(E){var D=A(this.views.WIDGET.selector,this.$module);var C=A(".DL-photo",D).slice(E,2);this.lazyload_load_images(C)},lazyload_load_images:function(C){C.each(function(){if(A(this).find("img").length>0){return }var E=A(this);var D=A("<img />");A("span",this).each(function(){D.attr(A(this).attr("class"),A(this).text())});if(E.children("a").length>0){E.children("a").html(D)}else{E.children().parent().html(D)}})},change_view:function(C,F,G){var D=this;this.locks.prevent_hash_changes=true;if(G){this.locks.hash_has_changed=true}if(this.active_view!=C||G){if(C==this.views.FILMSTRIP){var E=A(".DL-photo-filmstrip-thumbnails",this.$module);E.css({left:"0px"});this.filmstrip_connect_page_controls_to_image()}if(G&&this.active_view==C){DAYLIFE.log(["Changing view, special case",G,this.active_view,C,F]);this.show_view(C,F)}else{DAYLIFE.log(["Changing view, regular case",G,this.active_view,C,F]);this.active_view=C;this.hide_all_views(function(){D.show_view(C,F)})}}},hide_all_views:function(E){var D=A(".DL-gallery-view",this.$module).length;var C=0;A(".DL-gallery-header-views li",this.$module).removeClass("DL-active DL-active-filmstrip DL-active-mosaic DL-active-thumbnails_cover");if(!D){E()}else{A(".DL-gallery-view",this.$module).fadeOut(250,function(){if(C==D-1){E()}C++})}},show_view:function(C,F){var E,D;if(C==this.views.MOSAIC){A.hash("view",C.name,{clear:true});A(".DL-gallery-mosaic-page",this.$module).css({display:"none"});this.mosaic_page_to_mosaic(0)}if(C==this.views.THUMBNAILS_COVER){A.hash("view",C.name,{clear:true});A(".DL-gallery-thumbnails-cover-page",this.$module).css({display:"none"});this.thumbnails_cover_page(0)}if(C==this.views.THUMBNAILS){A(".DL-gallery-thumbnails-page",this.$module).css({display:"none"});A(".DL-gallery-thumbnails-photos .DL-photo",this.$module).css({display:"none"});this.page_to_gallery_thumbnails_photo(F,C)}if(C==this.views.FILMSTRIP){E=A(".DL-slideshow-thumbnails-images",this.$module);this.lazyload_load_images_by_container(E);$main_imgs=A(".DL-photo-filmstrip-photos",this.$module);this.lazyload_load_images_by_container($main_imgs)}if(C==this.views.WIDGET){this.lazyload_load_images_widget(0)}A(C.selector,this.$module).fadeIn(250);A(C.heading,this.$module).addClass("DL-active DL-active-"+C.name);if(C==this.views.FILMSTRIP){D=this.get_image_index_from_image_id(F)||0;E=A(".DL-slideshow-thumbnails-images",this.$module);this.filmstrip_page_to_photo(D,true,C);this.filmstrip_center_photo_view()}this.selected_hash=A.hash();this.locks.prevent_hash_changes=false},filmstrip_center_photo_view:function(){var D=A(".DL-photo-filmstrip-photos .DL-photo",this.$module).eq(0).outerWidth({margin:true});var E=A(".DL-gallery-filmstrip-container",this.$module).width();var C=(E-D)/2;A(".DL-photo-filmstrip-photos-container",this.$module).css({marginLeft:C})},filmstrip_connect_page_controls_to_image:function(){var C=A(".DL-slideshow-page-control",this.$module);C.each(function(D){A(this).data("page",D)})},filmstrip_page_to_photo:function(F,G,D){var E=this;var C=(new Date()).getTime();var H=this.get_image_id_from_image_index(F);this.filmstrip_animate_to_photo(F,G);this.filmstrip_set_photo_as_active(F);clearTimeout(this.timers.rotate_ad_module);this.timers.rotate_ad_module=setTimeout(function(){E.filmstrip_rotate_ad_module()},1000);clearTimeout(this.timers.set_imageid_in_hash);this.timers.set_imageid_in_hash=setTimeout(function(){E.set_imageid_in_hash(H,D)},650)},filmstrip_set_photo_as_active:function(C){this.filmstrip_highlight_active_photo(C);this.filmstrip_highlight_thumbnail(C);this.filmstrip_show_photo_caption(C);this.filmstrip_show_correct_thumbnail_page(C);this.filmstrip_update_hover_image_link()},filmstrip_animate_to_photo:function(I,E){var M=this;var C=this.read_cache("filmstrip_animate_to_photo");var G=C.$arrows=C.$arrows||A(".DL-photo-filmstrip-photos-container .DL-previous-photo, .DL-photo-filmstrip-photos-container .DL-next-photo",this.$module);var L=C.$canvas=C.$canvas||(this.opts.slideshow_type=="svg"?A(this.R.canvas,this.$module):A(".DL-photo-filmstrip-photos",this.$module));var J=C.$action_button=C.$action_button||A("a.DL-next-photo, a.DL-previous-photo",this.$module);var K=C.$page_control=C.$page_control||A(".DL-slideshow-page-control",this.$module);var D=C.image_size=C.image_size||(this.opts.slideshow_type=="svg"?this.opts.image_width:A(".DL-photo-filmstrip-photos .DL-photo",this.$module).eq(0).outerWidth({margin:true}));var F=parseInt(L.css("left"),10)||0;var H=(D*this.opts.scale*I*-1);J.addClass("working");if(this.opts.slideshow_type=="svg"){this.unfocus_svg_image(this.R_images[this.counters.filmstrip_image_index])}this.counters.filmstrip_image_index=I;K.removeClass("DL-active");K.eq(I).addClass("DL-active");if(!E){L.css({position:"absolute",left:F}).stop().animate({left:H},{duration:this.opts.page_transition_time,easing:this.opts.page_transition_type,complete:function(){if(M.opts.slideshow_type=="filmstrip"){J.removeClass("working")}},queue:false})}else{if(E){L.css({position:"absolute",left:H})}}if(this.opts.slideshow_type=="svg"){setTimeout(function(){M.focus_svg_image(M.R_images[I],function(){J.removeClass("working")})},400)}},filmstrip_toggle_captions:function(){var C=A(".DL-caption-wrapper",this.$module);this.filmstrip_hide_more_overlay();C.toggleClass("hidden")},filmstrip_show_share_overlay:function(){var C=this;var D=A(".DL-slideshow-share-container",this.$module);D.bind("click.share_overlay",function(E){if(E.target!=A(".DL-slideshow-overlay-close",D)[0]){E.stopPropagation()}});setTimeout(function(){A(document).one("click.share_overlay",function(E){C.filmstrip_hide_share_overlay()})},20);this.filmstrip_hide_more_overlay();A(".DL-share-more",D).addClass("DL-active");D.fadeIn(350)},filmstrip_hide_share_overlay:function(){A(".DL-slideshow-share-container",this.$module).fadeOut(350)},filmstrip_show_more_overlay:function(){this.filmstrip_hide_share_overlay();var C=this.filmstrip_highlight_thumbnail();A(".DL-slideshow-thumbnails-images",this.$module).css({display:"none"});this.filmstrip_page_to_thumbnails();this.filmstrip_show_correct_thumbnail_page(C);A(".DL-slideshow-more-container",this.$module).fadeIn(250)},filmstrip_hide_more_overlay:function(C){A(".DL-slideshow-more-container",this.$module).fadeOut(250,C)},filmstrip_highlight_active_photo:function(E){var D=this.read_cache("filmstrip_highlight_active_photo");var C=D.$photos=D.$photos||A(".DL-photo",this.$module);var F=D.$page_index=D.$page_index||A(".DL-slideshow-page-index-current",this.$module);C.siblings(".DL-active").removeClass("DL-active").end().eq(E).addClass("DL-active");F.text(E+1)},filmstrip_highlight_thumbnail:function(F){var E=this.read_cache("filmstrip_highlight_thumbnail");var D=E.$photos=E.$photos||A(".DL-slideshow-thumbnails-images .DL-photo",this.$module);var C=F||A(".DL-photo-filmstrip-photos .DL-active",this.$module).prevAll(".DL-photo").length;DAYLIFE.log(["Photo index",C]);D.siblings(".DL-active").andSelf().removeClass("DL-active");D.eq(C).addClass("DL-active").end();return F},filmstrip_show_photo_caption:function(I){var C=this.read_cache("filmstrip_show_photo_caption");var H=C.$photos=C.$photos||A(".DL-slideshow-thumbnails-images .DL-photo",this.$module);var G=I||H.siblings(".DL-active").prevAll().length;var J=C.$captions=C.$captions||A(".DL-photo-filmstrip-captions .DL-photo-caption",this.$module);var F=J.eq(G);var E=C.$captions_container=C.$captions_container||A(".DL-photo-filmstrip-captions-container",this.$module);J.siblings(".DL-active").removeClass("DL-active").css({display:"none"});F.css({display:"block",visibility:"hidden"}).addClass("DL-active");var D=A(".DL-caption-wrapper",F).outerHeight();var K=273;if(D+20>K){E.css({height:D+20})}else{E.css({height:K})}F.css({visibility:"visible"}).addClass("DL-active")},filmstrip_page_to_thumbnails:function(H){var D=this.read_cache("filmstrip_page_to_thumbnails");var F=D.$pages=D.$pages||A(".DL-slideshow-thumbnails-images",this.$module);var I=D.$current=D.$current||A(".DL-slideshow-more-page-index-current",this.$module);var J=D.$total=D.$total||A(".DL-slideshow-more-page-index-total",this.$module);this.counters.filmstrip_thumbnail_page=H;F.fadeOut(250).eq(H).fadeIn(250);var K=F.eq(H);var C=A(".DL-photo",K).length;var E=F.length;var G=H*this.opts.filmstrip_gallery_thumbnails_per_page+1;var L=G+Math.min(this.opts.filmstrip_gallery_thumbnails_per_page,C)-1;I.text(H+1);J.text(F.length)},filmstrip_show_correct_thumbnail_page:function(E){var D=this.read_cache("filmstrip_show_correct_thumbnail_page");var G=D.$thumbnail_pages=D.$thumbnail_pages||A(".DL-slideshow-thumbnails-images",this.$module);var F=A(".DL-active",G).parents(".DL-slideshow-thumbnails-images");var C=F.prevAll(".DL-slideshow-thumbnails-images").length;if(this.counters.filmstrip_thumbnail_page!=C){this.filmstrip_page_to_thumbnails(C)}this.filmstrip_filter_images_shown_in_page(E,C)},filmstrip_filter_images_shown_in_page:function(G,C){var F=this;var E=this.read_cache("filmstrip_filter_images_shown_in_page");photos_per_page=E.photos_per_page;if(!photos_per_page){var H=A(".DL-slideshow-thumbnails-images",this.$module).eq(0);photos_per_page=A(".DL-photo",H).length;E.photos_per_page=photos_per_page}if(!this.filmstrip_loaded_pages[C]){this.filmstrip_loaded_pages[C]=true;var D=A(".DL-photo-filmstrip-photos .DL-photo img",this.$module).slice(C*photos_per_page,(C+1)*photos_per_page);this.lazyload_load_images(D)}},filmstrip_rotate_ad_module:function(){var C=this.read_cache("filmstrip_rotate_ad_module");var D=C.$ad=C.$ad||A(".DL-ad-module-iframe",this.$module);this.counters.images_viewed++;if(this.counters.images_viewed%this.opts.images_per_ad_rotation==0){D.attr("src",D.attr("src"))}},filmstrip_attach_hover_overlay_to_widget_images:function(){var C=A(".DL-gallery-widget .DL-photo-filmstrip-photos-container",this.$module);var D=A(".DL-gallery-widget .DL-photo-filmstrip-photos-hover-overlay",this.$module);C.hover(function(){D.animate({opacity:1},{queue:false,duration:250})},function(){D.animate({opacity:0},{queue:false,duration:250})});this.filmstrip_update_hover_image_link()},filmstrip_update_hover_image_link:function(){var C=this.read_cache("filmstrip_update_hover_image_link");var D=C.$widget_image_pane=C.$widget_image_pane||A(".DL-gallery-widget .DL-photo-filmstrip-photos-container",this.$module);var E=C.$widget_hover_overlay=C.$widget_hover_overlay||A(".DL-gallery-widget .DL-photo-filmstrip-photos-hover-overlay",this.$module);var F=A(".DL-active a",D);if(!F.length){F=A(".DL-photo a",D).eq(0)}var G=F.attr("href");A("a",E).attr("href",G)},mosaic_page_to_mosaic:function(E){var D=this;var G=A(".DL-gallery-mosaic-page",this.$module).eq(E).css("display")=="block";if(!G){this.mosaic_hide_all_mosaics(function(){D.mosaic_show_mosaic(E)})}A(".DL-gallery-mosaic-page-index-current",this.$module).text(E+1);this.counters.mosaic_page=E;var F=1;A(".DL-gallery-mosaic-page",this.$module).eq(E).prevAll(".DL-gallery-mosaic-page").each(function(){F+=A(this).find(".DL-photo").length});var C=A(".DL-gallery-mosaic-page",this.$module).eq(E).find(".DL-photo").length;var H=A(".DL-gallery-mosaic-page",this.$module).length;var I=F+C-1;A(".DL-gallery-mosaic-page-index-current",this.$module).text(F+"-"+I)},mosaic_hide_all_mosaics:function(F){var D=A(".DL-gallery-mosaic-page",this.$module);var C=D.length;var E=0;D.fadeOut(250,function(){if(E==C-1){F()}E++})},mosaic_show_mosaic:function(C){var D=A(".DL-gallery-mosaic-page",this.$module).eq(C);this.lazyload_load_images_by_container(D);D.fadeIn(250)},thumbnails_cover_page:function(E){var D=this;if(!E){E=0}var G=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(E).css("display")=="block";if(!G){this.thumbnails_cover_hide_all_thumbnails(function(){D.thumbnails_cover_show_thumbnails(E)})}A(".DL-gallery-thumbnails-cover-page-index-current",this.$module).text(E+1);this.counters.thumbnails_cover_page=E;var F=1;A(".DL-gallery-thumbnails-cover-page",this.$module).eq(E).prevAll(".DL-gallery-thumbnails-cover-page").each(function(){F+=A(this).find(".DL-photo").length});var C=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(E).find(".DL-photo").length;var H=A(".DL-gallery-thumbnails-cover-page",this.$module).length;var I=F+C-1;A(".DL-gallery-thumbnails-cover-page-index-current",this.$module).text(F+"-"+I)},thumbnails_cover_hide_all_thumbnails:function(F){var E=A(".DL-gallery-thumbnails-cover-page",this.$module);var D=E.length;var C=0;E.fadeOut(250,function(){if(C==D-1){F()}C++})},thumbnails_cover_show_thumbnails:function(D){var C=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(D);this.lazyload_load_images_by_container(C);C.fadeIn(250)},thumbnails_cover_gallery_page_to_photo:function(C){this.change_view(this.views.THUMBNAILS,C)},thumbnails_page_to_gallery_thumbnails_page:function(E){var D=this;var G=A(".DL-gallery-thumbnails-page",this.$module).eq(E).css("display")=="block";if(!G){this.thumbnails_hide_all_thumbnails(function(){D.thumbnails_show_thumbnails(E)})}this.counters.thumbnails_gallery_page=E;var F=1;A(".DL-gallery-thumbnails-page",this.$module).eq(E).prevAll(".DL-gallery-thumbnails-page").each(function(){F+=A(this).find(".DL-photo").length});var C=A(".DL-gallery-thumbnails-page",this.$module).eq(E).find(".DL-photo").length;var H=A(".DL-gallery-thumbnails-page",this.$module).length;var I=F+C-1;A(".DL-gallery-thumbnails-page-index-current",this.$module).text(F+"-"+I)},thumbnails_hide_all_thumbnails:function(F){var E=A(".DL-gallery-thumbnails-page",this.$module);var D=E.length;var C=0;E.fadeOut(250,function(){if(C==D-1){F()}C++})},thumbnails_show_thumbnails:function(D){var C=A(".DL-gallery-thumbnails-page",this.$module).eq(D);this.lazyload_load_images_by_container(C);C.fadeIn(250)},page_to_gallery_thumbnails_photo:function(E,C){var D=this;if(!E){E=0}if(typeof E!="number"){var F=E;E=this.get_image_index_from_image_id(F)}this.counters.thumbnails_gallery=E;this.thumbnails_hide_all_photos();this.set_thumbnails_gallery_thumbnail_as_active(E);this.set_thumbnails_gallery_photo_as_active(E);var F=this.get_image_id_from_image_index(E);this.set_imageid_in_hash(F,C)},thumbnails_hide_all_photos:function(){var C=A(".DL-gallery-thumbnails-photos .DL-photo",this.$module);C.css({display:"none"})},set_thumbnails_gallery_photo_as_active:function(E){var D=A(".DL-gallery-thumbnails-photos .DL-photo",this.$module);var C=D.eq(E);D=D.not(C);var G=D.length;var F=0;this.lazyload_load_images_by_container(D.parent(),E);D.fadeOut(250,function(){if(F==G-1){C.fadeIn(250).addClass("DL-active")}F++}).removeClass("DL-active");A(".DL-gallery-thumbnails .DL-gallery-thumbnails-photos-index-current",this.$module).text(E+1)},set_thumbnails_gallery_thumbnail_as_active:function(C){A(".DL-gallery-thumbnails .DL-gallery-thumbnails-page .DL-photo",this.$module).removeClass("DL-active").eq(C).addClass("DL-active");this.highlight_gallery_thumbnail(C);this.show_correct_gallery_thumbnail_page(C)},highlight_gallery_thumbnail:function(D){var C;if(typeof D!="undefined"){C=D}else{C=A(".DL-gallery-thumbnails .DL-gallery-thumbnails-photos .DL-photo.DL-active",this.$module).prevAll().length}A(".DL-gallery-thumbnails-page .DL-photo",this.$module).removeClass("DL-active").eq(C).addClass("DL-active").end()},show_correct_gallery_thumbnail_page:function(C){var E=A(".DL-gallery-thumbnails-page",this.$module);var F=A(".DL-photo",E).eq(C).parents(".DL-gallery-thumbnails-page");var D=F.prevAll(".DL-gallery-thumbnails-page").length;if(E.eq(D).css("display")!="block"){this.thumbnails_page_to_gallery_thumbnails_page(D)}},create_svg_images:function(H){var C=[];for(var F=0;F<this.num_images;F++){var I=H[F];var E=(this.opts.canvas_width-this.opts.image_width)/2+F*this.opts.image_width*this.opts.scale;var G=(this.opts.canvas_height-this.opts.image_height)/2;var D=this.R.image(I.src,E,G,this.opts.image_width,this.opts.image_height).toBack().scale(this.opts.scale).attr({opacity:0.5});C.push(D)}this.R_images=C;return C},focus_svg_image:function(C,D){C.toFront().animate({scale:[1,1],opacity:1},this.opts.image_transition_time,this.opts.image_transition_type,D)},unfocus_svg_image:function(C,D){C.animate({scale:[this.opts.scale,this.opts.scale],opacity:0.5},this.opts.image_transition_time,this.opts.image_transition_type,D)},paginate_svg_photos:function(){var E=this.images;var D=A.make("ul",{className:"DL-slideshow-page-controls"});for(i in E){var C=A.make("li",{className:"DL-slideshow-page-control"},i).data("page",i);D.append(C)}this.$module.append(D)},handle_actions:function(){this.$module.bind("click",A.rescope(this.click,this))},click:function(D,E){var C=this;A.targetIs(E,{tagSelector:".DL-caption-toggle"},function(F){E.preventDefault();C.filmstrip_toggle_captions()});A.targetIs(E,{tagSelector:".DL-slideshow-overlay-close"},function(F){E.preventDefault();C.filmstrip_hide_share_overlay();C.filmstrip_hide_more_overlay()});A.targetIs(E,{tagSelector:".DL-slideshow-page-control"},function(G){E.preventDefault();var F=G.data("page");C.filmstrip_page_to_photo(F)});A.targetIs(E,{tagSelector:".DL-share.DL-slideshow-taskbar"},function(F){E.preventDefault();if(A(".DL-slideshow-share-container",C.$module).css("display")=="block"){C.filmstrip_hide_share_overlay()}else{C.filmstrip_show_share_overlay()}});A.targetIs(E,{tagSelector:".DL-more.DL-slideshow-taskbar"},function(F){E.preventDefault();if(A(".DL-slideshow-more-container",C.$module).css("display")=="block"){C.filmstrip_hide_more_overlay()}else{C.filmstrip_show_more_overlay()}});A.targetIs(E,{tagSelector:".DL-thumbnails-next-photo",childOf:".DL-slideshow-more-page-controls"},function(G){E.preventDefault();var F=A(".DL-slideshow-thumbnails-images",this.$module).length;if(G.hasClass("disabled")){return false}if(C.counters.filmstrip_thumbnail_page<F-1){C.filmstrip_page_to_thumbnails(C.counters.filmstrip_thumbnail_page+1)}else{C.filmstrip_page_to_thumbnails(0)}});A.targetIs(E,{tagSelector:".DL-thumbnails-previous-photo",childOf:".DL-slideshow-more-page-controls"},function(G){E.preventDefault();var F=A(".DL-slideshow-thumbnails-images",this.$module).length;if(G.hasClass("disabled")){return false}if(C.counters.filmstrip_thumbnail_page>0){C.filmstrip_page_to_thumbnails(C.counters.filmstrip_thumbnail_page-1)}else{C.filmstrip_page_to_thumbnails(F-1)}});A.targetIs(E,{tagSelector:".DL-gallery-mosaic-next-page"},function(G){E.preventDefault();var F=A(".DL-gallery-mosaic-page",this.$module).length;if(C.counters.mosaic_page<F-1){C.mosaic_page_to_mosaic(C.counters.mosaic_page+1)}else{C.mosaic_page_to_mosaic(0)}});A.targetIs(E,{tagSelector:".DL-gallery-mosaic-previous-page"},function(G){E.preventDefault();var F=A(".DL-gallery-mosaic-page",this.$module).length;if(C.counters.mosaic_page>0){C.mosaic_page_to_mosaic(C.counters.mosaic_page-1)}else{C.mosaic_page_to_mosaic(F-1)}});A.targetIs(E,{tagSelector:".DL-gallery-thumbnails-cover-next-page"},function(G){E.preventDefault();var F=A(".DL-gallery-thumbnails-cover-page",this.$module).length;if(C.counters.thumbnails_cover_page<F-1){C.thumbnails_cover_page(C.counters.thumbnails_cover_page+1)}else{C.thumbnails_cover_page(0)}});A.targetIs(E,{tagSelector:".DL-gallery-thumbnails-cover-previous-page"},function(G){E.preventDefault();var F=A(".DL-gallery-thumbnails-cover-page",this.$module).length;if(C.counters.thumbnails_cover_page>0){C.thumbnails_cover_page(C.counters.thumbnails_cover_page-1)}else{C.thumbnails_cover_page(F-1)}});A.targetIs(E,{tagSelector:".DL-gallery-thumbnails-next-page"},function(G){E.preventDefault();var F=A(".DL-gallery-thumbnails-page",this.$module).length;if(C.counters.thumbnails_gallery_page<F-1){C.thumbnails_page_to_gallery_thumbnails_page(C.counters.thumbnails_gallery_page+1)}else{C.thumbnails_page_to_gallery_thumbnails_page(0)}});A.targetIs(E,{tagSelector:".DL-gallery-thumbnails-previous-page"},function(G){E.preventDefault();var F=A(".DL-gallery-thumbnails-page",this.$module).length;if(C.counters.thumbnails_gallery_page>0){C.thumbnails_page_to_gallery_thumbnails_page(C.counters.thumbnails_gallery_page-1)}else{C.thumbnails_page_to_gallery_thumbnails_page(F-1)}});A.targetIs(E,{tagSelector:".DL-photo",childOf:".DL-gallery-thumbnails-cover-container"},function(G){E.preventDefault();var F=G.prevAll().length+(C.counters.thumbnails_cover_page*C.opts.thumbnails_cover_gallery_thumbnails_per_page);var H=C.get_image_id_from_image_index(F);DAYLIFE.log(["index",F,H]);C.change_view(C.views.FILMSTRIP,H)});A.targetIs(E,{tagSelector:".DL-photo",childOf:".DL-gallery-thumbnails-side-container"},function(G){E.preventDefault();var F=G.prevAll().length+(C.counters.thumbnails_gallery_page*C.opts.thumbnails_gallery_thumbnails_per_page);C.page_to_gallery_thumbnails_photo(F)});A.targetIs(E,{tagSelector:".DL-photo",childOf:".DL-slideshow-thumbnails-images"},function(G){if(G.parents(".DL-gallery-filmstrip").length){E.preventDefault();var F=G.prevAll().length+(C.counters.filmstrip_thumbnail_page*C.opts.filmstrip_gallery_thumbnails_per_page);C.filmstrip_page_to_photo(F)}});A.targetIs(E,{tagSelector:".DL-photo",childOf:".DL-slideshow-thumbnails-images"},function(G){if(G.parents(".DL-gallery-widget").length){E.preventDefault();var F=G.prevAll().length+(C.counters.filmstrip_thumbnail_page*C.opts.filmstrip_gallery_thumbnails_per_page);C.filmstrip_hide_more_overlay(function(){C.filmstrip_page_to_photo(F)})}});A.targetIs(E,{tagSelector:".DL-photo",childOf:".DL-gallery-mosaic-page"},function(F){E.preventDefault();var G=C.extract_image_id(F);C.change_view(C.views.FILMSTRIP,G)});A.targetIs(E,{tagSelector:"a.DL-next-photo, a.DL-previous-photo",childOf:".DL-slideshow,.DL-gallery-thumbnails"},function(I){E.preventDefault();if(!I.hasClass("disabled")){if((C.opts.slideshow_type=="svg"&&!I.hasClass("working"))||(C.opts.slideshow_type!="svg")){var H=I.hasClass("DL-next-photo")?true:false;var G;if(C.counters.filmstrip_image_index==(C.num_images-1)&&H){G=0}else{if(C.counters.filmstrip_image_index==0&&!H){G=C.num_images-1}else{G=H?C.counters.filmstrip_image_index+1:C.counters.filmstrip_image_index-1}}var F=A(".DL-slideshow-page-control",C.$module).eq(G);C.filmstrip_page_to_photo(G)}}});A.targetIs(E,{tagSelector:"a.DL-next-photo, a.DL-previous-photo",childOf:".DL-gallery-thumbnails"},function(I){E.preventDefault();var G=I.hasClass("DL-next-photo")?true:false;var F=C.counters.thumbnails_gallery;var H=C.num_images;if(G&&F<H-1){C.page_to_gallery_thumbnails_photo(F+1)}else{if(G&&F==H-1){C.page_to_gallery_thumbnails_photo(0)}else{if(!G&&F==0){C.page_to_gallery_thumbnails_photo(H-1)}else{if(!G&&F>0){C.page_to_gallery_thumbnails_photo(F-1)}}}}});A.targetIs(E,{tagSelector:".DL-gallery-header-view-mosaic"},function(F){E.preventDefault();C.change_view(C.views.MOSAIC)});A.targetIs(E,{tagSelector:".DL-gallery-header-view-thumbnails"},function(F){E.preventDefault();C.change_view(C.views.THUMBNAILS_COVER)});A.targetIs(E,{tagSelector:".DL-gallery-header-view-filmstrip"},function(F){E.preventDefault();C.change_view(C.views.FILMSTRIP)});A.targetIs(E,{tagSelector:".DL-gallery-header-view-fullscreen"},function(F){E.preventDefault();C.change_view(C.views.FULLSCREEN)})}}})($DL);DAYLIFE.Packages.QuotesCarousels=function(){var A=".DL-related-quotes .DL-view-carousel,.DL-quotes .DL-view-carousel,.DL-embedded-ron .DL-view-carousel";var B=[];var C=function(D){this.$node=$DL(D);this.$counter=$DL(".DL-counter",this.$node);$DL(document).bind("DAYLIFE:Wizard:Content_Filter:remove:end_animation",$DL.rescope(this.init,this))};C.prototype={init:function(){this.find_quotes();this.$node.unbind("click").click($DL.rescope(this.route_click,this));$DL(this.$quotes.get(0)).css("display","block")},find_quotes:function(){this.$quotes=$DL("li.DL-quote",this.$node);if(this.$node.get(0)){this.quote_count=this.$quotes.length;this.$counter.text("1/"+this.quote_count);this.selected_index=0;this.interval}},route_click:function(F,G){var H=G.target;var E=$DL(H);var D=H.tagName.toLowerCase();switch(D){case"li":if(E.hasClass("DL-prev")){G.preventDefault();this.scroll(-1)}else{if(E.hasClass("DL-next")){G.preventDefault();this.scroll(1)}}break}},scroll:function(H){var E=this;H=H||1;var G=this.$quotes;var D=$DL(G.get(this.selected_index));var F=this.selected_index+H;if(F>=this.quote_count){F=F-this.quote_count}else{if(F<0){F=this.quote_count+F}}this.selected_index=F;this.$counter.text((F+1)+"/"+this.quote_count);D.fadeOut(500,function(){E.$quotes.hide();$DL(G.get(F)).fadeIn(500);$DL(document).trigger("DAYLIFE:Carousel:scroll",[E])})}};return{init:function(){var D=$DL(A);$DL.each(D,function(){var G=false;for(var E=B.length-1;E>=0;E--){if(B[E].$node[0]==this){G=true;break}}if(!G){var F=new C(this);F.init();B.push(F)}})}}};$DL(function(){if(location.hash){var G=location.hash.slice(1).split("&");var E=new Array();for(_h in G){E.push(G[_h].split("="));if(E[_h][0]=="css_id"){var C=E[_h][1]}if(E[_h][0]=="slot"){var H=E[_h][1]}if(E[_h][0]=="position"){var A=E[_h][1]}if(E[_h][0]=="title"){var B=E[_h][1]}if(E[_h][0]=="module_classname"){var D=E[_h][1]}}if(C){var F=$DL("#"+C)}else{if(B){var F=$DL('.DL-module-title:contains("'+B.replace(/\+/g," ")+'")')}else{if(D){var F=$DL("a.DL-embed[href*="+D+"]").parents(".DL-module")}else{var F=$DL("a[href*=slot="+H+"&position="+A+"]").parents(".DL-module")}}}if(F.length){setTimeout(function(){$DL.scrollTo(F,{duration:2000})},150);setTimeout(function(){var I=F.css("border-left-color");if(!I){F.css("border-color","rgb(255, 255, 255)");I="rgb(255, 255, 255)"}F.css("borderColor",I);F.animate({borderColor:"rgb(255, 195, 0)"},1000).animate({borderColor:I},4500)},3000)}}});$DL(function(){var C=$DL(".DL-topic-results, .DL-photo-results, .DL-quote-results, .DL-article-results").length;var B=$DL(".DL-topic-results.DL-no-results, .DL-photo-results.DL-no-results, .DL-quote-results.DL-no-results, .DL-article-results.DL-no-results").length;if($DL("#query").val()){var D=$DL.htmlencode($DL("#query").val())}else{var D=false}var A="search";if(B==1&&C==1){if(!D){$DL(".DL-no-results:last").after("<div class='DL-no-results-message DL-styled-module DL-section'>No query term entered.</span></div>")}else{if($DL(".DL-topic-results.DL-no-results").length==1){A="topic"}if($DL(".DL-photo-results.DL-no-results").length==1){A="photo"}if($DL(".DL-article-results.DL-no-results").length==1){A="article"}if($DL(".DL-quote-results.DL-no-results").length==1){A="quote"}$DL(".DL-no-results:last").after("<div class='DL-no-results-message DL-styled-module DL-section'>No "+A+" results for <span>'"+D+"'</span></div>")}}else{if(B==C&&C>1){if(!D){$DL(".DL-no-results:last").after("<div class='DL-no-results-message DL-styled-module DL-section'>No query term entered.</span></div>")}else{$DL(".DL-no-results:last").after("<div class='DL-no-results-message DL-styled-module DL-section'>No search results for <span>'"+D+"'</span></div>")}}}});$DL(function(){$DL(".DL-topicdir-wiki-browse a").click(function(B){var A=$DL("h2:contains("+B.target.href.slice(B.target.href.indexOf("=")+1).replace(/\+/g," ").replace(/%26/g,"&").replace(/%2C/g,",")+")");if(B.target.href.indexOf("#")>0&&A.length){B.stopPropagation();$DL.scrollTo(A,{offset:-50,duration:2000});setTimeout(function(){var C=A.parent();C.frame();setTimeout(function(){C.unframe()},3000)},2000);return false}})});(function(A){A.fn.zz_top=function(B){B=B||"DL-on-top";A(this).addClass(B);A(this).parents(".DL-module").addClass(B);A(this).parents(".DL-content-slot, .DL-breadcrumb-slot, .DL-breadcrumb-2-slot, .DL-header-slot, .DL-footer-slot").addClass(B);A(this).parents(".DL-non-content-region, #DL-content-region").addClass(B)};A.fn.zz_untop=function(B){B=B||"DL-on-top";A(this).removeClass(B);A(this).parents(".DL-module").removeClass(B);A(this).parents(".DL-content-slot, .DL-breadcrumb-slot, .DL-breadcrumb-2-slot, .DL-header-slot, .DL-footer-slot").removeClass(B);A(this).parents(".DL-non-content-region, #DL-content-region").removeClass(B)};A(document).ready(function(){A(".DL-styled-module").hover(function(){A(this).zz_top()},function(){A(this).zz_untop()})})})($DL);$DL(document).ready(function(){var C=$DL;var A=C(".DL-site-tools");if(A.length==0){return }var G=C(".DL-greeting");var F=C("li.DL-sites");var E=C(".DL-user-sites");var H=E.find("li").eq(0).clone();var B=C(".DL-login-navigation");var D=function(L){var K=C("#activate_wizard_nonedit");if(K.length==1){var M=C.parseSubdomain(K.attr("href"));if(M==L){var J=function(){K.click(function(){alert("We are sorry, but you deleted the site you edit by default.  Please use the menu in the upper left corner to select another site to edit.");return false})};C.ajax({url:"/ajax/last_modified_site",type:"GET",dataType:"json",success:function(N){if(N.response.code>=7000){K.attr("href",K.attr("href").replace(M,N.response.payload.site.domain_name))}else{J()}},error:J})}}};var I=function(K){var L=K.target;var J=$DL(L);if(!J.is("div.DL-login")&&!J.is(".DL-user-sites")&&J.parents("div.DL-login").length==0&&J.parents(".DL-user-sites").length==0){E.css("display","none");G.removeClass("highlight");F.removeClass("highlight");B.removeClass("highlight");C("body").unbind("mouseover",I)}};C("li.DL-sites").mouseover(function(J){E.css("display","block");G.addClass("highlight");F.addClass("highlight");B.addClass("highlight");C("body").bind("mouseover",I)});C(".DL-login-navigation").click(function(J){if(C.targetIs(J,{tagSelector:"#activate_login"},function(K){DAYLIFE.Modals.create(null,"/module;classname=daylife.html?template=daylife%3Acommon/get_invited.xhtml",function(L){L.open()})})){return false}})});(function($){var _shares=[];var _share_macros=[];var _Share=function($node,opts){opts=opts||{};var default_opts={reclick_tab_to_close:true};opts=$.extend(default_opts,opts);this.$node=$node;this.reclick_tab_to_close=opts.reclick_tab_to_close};_Share.prototype={init:function(){$.avoid_z_collisions(this,this.close_all_popups);this.$email_wrapper=$(".DL-share-email",this.$node);this.$email_button=$(".DL-button",this.$email_wrapper);this.$email_popup=$(".DL-popup-wrapper",this.$email_wrapper);this.$email_form=$("form",this.$email_popup);this.$more_links_wrapper=$(".DL-share-more",this.$node);this.$more_links_button=$(".DL-button",this.$more_links_wrapper);this.$more_links_popup=$(".DL-popup-wrapper",this.$more_links_wrapper);this.POPUPS={email:{button:this.$email_button,popup:this.$email_popup,form:this.$email_form,wrapper:this.$email_wrapper},more_links:{button:this.$more_links_button,popup:this.$more_links_popup,form:null,wrapper:this.$more_links_wrapper}};this.setup_popup(this.POPUPS.email);this.setup_popup(this.POPUPS.more_links);this.setup_done_button()},setup_popup:function(group){var self=this;group.button.bind("click",function(e){if(group.wrapper.hasClass("DL-active")&&self.reclick_tab_to_close){self.close_popup(e,group)}else{self.open_popup(e,group)}});if(group.form){group.form.submit(function(){self.send_email();return false})}},open_popup:function(e,group){$.avoid_z_collisions(this);var self=this;var module=this.$node.parents(".DL-styled-module");for(p in this.POPUPS){var popup=this.POPUPS[p];if(popup!=group){popup.wrapper.removeClass("DL-active")}}group.popup.click(function(e){e.stopPropagation()});$(".DL-submit-button",self.$node).attr("disabled",false).removeClass("disabled");$(".DL-done-button",this.$node).removeClass("DL-done-exit-button");setTimeout(function(){module.zz_top("DL-click-on-top");if(!DAYLIFE.Browser.IE){group.popup.css({opacity:0}).animate({opacity:1},150)}if(group.form){var $recaptcha=$(".DL-captcha",self.$node);Recaptcha.create("6Lc9LQYAAAAAAC-rL9E3ey6QSRamskcjSfVErDYp",$recaptcha[0],{theme:"white",tabindex:0,callback:function(){setTimeout(function(){$(".DL-popup-wrapper",group.wrapper).scrollTop(0);group.wrapper.addClass("DL-active");Recaptcha.reload();setTimeout(function(){$("input",self.$node).eq(0).focus()},50)},50)}})}else{group.wrapper.addClass("DL-active")}},50);setTimeout(function(){$(document).one("click.share",function(e){self.close_popup(e,group)})},20)},close_popup:function(e,group){var self=this;var module=this.$node.parents(".DL-styled-module");module.zz_untop("DL-click-on-top");group.wrapper.removeClass("DL-active")},close_all_popups:function(){$(document).trigger("click.share")},send_email:function(){$.post("/ajax/share_email",this.$email_form.serialize(),$.rescope(this.complete_send_email,this))},complete_send_email:function(e,data){var message,code_class,$message;data=eval("("+data+")");code_class="DL-share-form-error";if(data.code>0){code_class="DL-share-form-success";$(".DL-submit-button",this.$node).attr("disabled",true).addClass("disabled");$(".DL-done-button",this.$node).addClass("DL-done-exit-button")}if(data.message.length>1){message="There are missing or incorrect fields. Try again."}else{message=data.message[0]}Recaptcha.reload();$message=$.make("div",{className:"DL-share-form-message "+code_class},message);$(".DL-share-form-message",this.$node).remove();$(".DL-submit-button",this.$node).before($message)},setup_done_button:function(){var self=this;this.$email_form.bind("reset",function(){$(".DL-share-form-message",self.$node).remove();$(document).trigger("click.share")})}};$.extend({make_share_modules:function(opts){$(".DL-share-insert").each(function(){var $this=$(this);if($.inArray($this[0],_share_macros)==-1){var share=new _Share($this,opts);share.init();_share_macros.push($this[0]);_shares.push(share)}})}})})($DL);if(!window.FB){FB={}}if(!FB.dynData){FB.dynData={site_vars:{canvas_client_compute_content_size_method:1,use_postMessage:1,use_xdProxy:0,enable_custom_href:0},resources:{base_url_format:"http://{0}.connect.facebook.com/",base_cdn_url:"http://static.ak.fbcdn.net/",api_channel:163033,api_server:163033,www_channel:171762,xd_proxy:196096,xd_comm_swf_url:"http://static.ak.fbcdn.net/swf/XdComm.swf",share_button:"http://b.static.ak.fbcdn.net/rsrc.php/zAB5S/hash/4273uaqa.gif",login_img_dark_small_short:"http://b.static.ak.fbcdn.net/rsrc.php/zF1W2/hash/a969rwcd.gif",login_img_dark_medium_short:"http://b.static.ak.fbcdn.net/rsrc.php/zEF9L/hash/156b4b3s.gif",login_img_dark_medium_long:"http://b.static.ak.fbcdn.net/rsrc.php/zBIU2/hash/85b5jlja.gif",login_img_dark_large_short:"http://b.static.ak.fbcdn.net/rsrc.php/z1UX3/hash/a22m3ibb.gif",login_img_dark_large_long:"http://static.ak.fbcdn.net/rsrc.php/z7SXD/hash/8mzymam2.gif",login_img_light_small_short:"http://b.static.ak.fbcdn.net/rsrc.php/zDGBW/hash/8t35mjql.gif",login_img_light_medium_short:"http://static.ak.fbcdn.net/rsrc.php/z38X1/hash/6ad3z8m6.gif",login_img_light_medium_long:"http://b.static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif",login_img_light_large_short:"http://static.ak.fbcdn.net/rsrc.php/zA114/hash/7e3mp7ee.gif",login_img_light_large_long:"http://b.static.ak.fbcdn.net/rsrc.php/z4Z4Q/hash/8rc0izvz.gif",login_img_white_small_short:"http://static.ak.fbcdn.net/rsrc.php/z900E/hash/di0gkqrt.gif",login_img_white_medium_short:"http://static.ak.fbcdn.net/rsrc.php/z10GM/hash/cdozw38w.gif",login_img_white_medium_long:"http://static.ak.fbcdn.net/rsrc.php/zBT3E/hash/338d3m67.gif",login_img_white_large_short:"http://static.ak.fbcdn.net/rsrc.php/zCOUP/hash/8yzn0wu3.gif",login_img_white_large_long:"http://static.ak.fbcdn.net/rsrc.php/zC6AR/hash/5pwowlag.gif",logout_img_small:"http://static.ak.fbcdn.net/rsrc.php/z2Y31/hash/cxrz4k7j.gif",logout_img_medium:"http://static.ak.fbcdn.net/rsrc.php/zAD8D/hash/4lsqsd7l.gif",logout_img_large:"http://b.static.ak.fbcdn.net/rsrc.php/zB36N/hash/4515xk7j.gif"}}}if(!FB.locale){FB.locale="en_US"}if(!FB.localeIsRTL){FB.localeIsRTL=false}if(!window.FB){FB={}}FB.forEach=function(F,D,E){if(Object.prototype.toString.apply(F)==="[object Array]"){if(F.forEach){F.forEach(D)}else{for(var C=0,A=F.length;C<A;C++){D(F[C],C,F)}}}else{for(var B in F){if(E||F.hasOwnProperty(B)){D(F[B],B,F)}}}};FB.copy=function(C,B,A){FB.forEach(B,function(E,D){if(A||typeof C[D]==="undefined"){C[D]=E}})};FB.copy(FB,{$:function(A){return document.getElementById(A)},TypeLoader:{NOTIFY:{},LOADED_MODULES:{},LOADED_CLASSES:{},resolve:function(F,E,D){for(var C=0,A=E.length;C<A;C++){var B=E[C];if(B===""){continue}if(typeof F[B]==="undefined"){if(D){F[B]={}}else{return false}}F=F[B]}return F},provide:function(D,C,B){var A=this.resolve(window,D.split("."),true);if(B||!this.LOADED_MODULES[D]){FB.copy(A,C,true)}else{return }if(A._onLoad){A._onLoad()}this.LOADED_MODULES[D]=true},subclass:function(C,B,A){if(this.LOADED_CLASSES[C]){return }if(B!=="FB.Class"&&!this.LOADED_CLASSES[B]){FB.Log.debug('"'+C+'" needs to wait for "'+B+'"');var J=FB.redo(arguments,this);this.NOTIFY[B]?this.NOTIFY[B].push(J):this.NOTIFY[B]=[J];return }var I=this.resolve(window,B.split(".")),H=I.extend(A),G=this.NOTIFY[C],F=C.split("."),E=this.resolve(window,F,true),D=F.pop();FB.copy(H,E);this.resolve(window,F)[D]=H;this.LOADED_CLASSES[C]=true;if(G){FB.forEach(G,function(K){K()});delete this.NOTIFY[C]}}},bind:function(){var D=Array.prototype.slice.call(arguments),A=D.shift(),C=D.shift();var B=function(){return A.apply(C,D.concat(Array.prototype.slice.call(arguments)))};B._targets=[C,A];return B},redo:function(C,B){var A=Array.prototype.slice.call(C);A.unshift(B);A.unshift(C.callee);return FB.bind.apply(FB,A)}});FB.provide=FB.bind(FB.TypeLoader.provide,FB.TypeLoader);FB.subclass=FB.bind(FB.TypeLoader.subclass,FB.TypeLoader);FB.provide("FB.Log",{level:3,Level:{DEBUG:3,INFO:2,WARNING:1,ERROR:0},_helper:function(){var C=Array.prototype.slice.call(arguments),B=C.shift(),A=C.shift();if(this.level>=A&&window.console){(console[B]||console.log).apply(console,C)}}});FB.provide("FB.Log",{debug:FB.bind(FB.Log._helper,FB.Log,"debug",FB.Log.Level.DEBUG),info:FB.bind(FB.Log._helper,FB.Log,"info",FB.Log.Level.INFO),warn:FB.bind(FB.Log._helper,FB.Log,"warn",FB.Log.Level.WARNING),error:FB.bind(FB.Log._helper,FB.Log,"error",FB.Log.Level.ERROR)},true);(function(){var B=false,A=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;FB.Class=function(){};FB.Class.extend=function(F){var E=this.prototype;B=true;var D=new this();B=false;FB.forEach(F,function(H,G){D[G]=typeof H==="function"&&typeof E[G]==="function"&&A.test(H)?(function(I,J){return function(){var L=this._super;this._super=E[I];var K=J.apply(this,arguments);this._super=L;return K}})(G,H):H});var C=function(){if(!B){var G;if(this instanceof C){G=this}else{B=true;G=new C();B=false}if(G.init){G.init.apply(G,arguments)}return G}};C.prototype=D;C.constructor=C;C.extend=FB.Class.extend;return C}})();if(!window.FB){FB={}}if(!FB.Type){FB.Type={createNamespace:function(F){var C=window;var D=F.split(".");for(var A=0;A<D.length;A++){var B=D[A];var E=C[B];if(!E){C[B]=E={}}C=E}return C},createEnum:function(E,D,C){if(this.getObj(E)){return }var A=function(){};A.prototype=D;for(var B in D){A[B]=D[B]}if(C){A.__flags=true}this.setObj(E,A)},createClass2:function(cls,baseType){if(baseType&&typeof (baseType)=="string"){baseType=eval(baseType)}cls.prototype.constructor=cls;this.extend(cls,FB.Type.Methods);cls.__baseType=baseType||Object;if(baseType){cls.__basePrototypePending=true}},setObj:function(fullName,value){var i=fullName.lastIndexOf(".");var objName;var scope=window;if(i>0){var ns=fullName.substring(0,i);this.createNamespace(ns);objName=fullName.substring(i+1);scope=eval(ns)}else{objName=fullName}scope[objName]=value},getObj:function(E){var C=window;var D=E.split(".");for(var A=0;A<D.length;A++){var B=D[A];C=C[B];if(!C){break}}return C},createClass:function(B,A){if(this.getObj(B)){return }if(arguments.length==1&&typeof (B)!="string"){return this._createClass(B)}else{this.setObj(B,this._createClass(A))}},_createClass:function(B){var A=B.ctor||function(){};if(B.static_ctor){this.addStaticInit(B.static_ctor)}if(B.instance){A.prototype=B.instance}if(B["static"]){this.extend(A,B["static"])}this.createClass2(A,B.base);return A},addStaticInit:function(A){if(!FB.Type._pendingInits){FB.Type._pendingInits=[]}FB.Type._pendingInits[FB.Type._pendingInits.length]=A;window.setTimeout(FB.Type.runPendingInits,0)},runPendingInits:function(){if(FB.Type._pendingInits){var B=FB.Type._pendingInits;FB.Type._pendingInits=null;var C=B.length;for(var A=0;A<C;A++){B[A]()}}},extend:function(C,B){for(var A in B){C[A]=B[A]}return C},getInstanceType:function(A){return A.constructor}};FB.Type.Methods={setupBase:function(){if(this.__basePrototypePending){var C=this.__baseType;if(C.__basePrototypePending){C.setupBase()}for(var B in C.prototype){var A=C.prototype[B];if(!this.prototype[B]){this.prototype[B]=A}}delete this.__basePrototypePending}},constructBase:function(B,A){if(this.__basePrototypePending){this.setupBase()}if(!A){this.__baseType.apply(B)}else{this.__baseType.apply(B,A)}},callBase:function(D,C,B){var A=this.__baseType.prototype[C];if(!B){return A.apply(D)}else{return A.apply(D,B)}},get_baseType:function(){return this.__baseType||null}}}FB.provide("FB.HiddenContainer",{_onLoad:function(){if(document.getElementById("FB_HiddenContainer")==null){var B;try{if((!document.readyState||document.readyState=="complete")&&document.body){B=document.createElement("div");B.id="FB_HiddenContainer";B.style.position="absolute";B.style.top="-10000px";B.style.width="0px";B.style.height="0px";document.body.appendChild(B)}}catch(A){B=null}if(!B){document.write('<div id="FB_HiddenContainer" style="position:absolute; top:-10000px; left:-10000px; width:0px; height:0px;" ></div>')}}},get:function(){return FB.$("FB_HiddenContainer")}});FB.provide("FB.HiddenContainerLoader",{_onLoad:function(){FB.HiddenContainer.get()}});FB.subclass("FB.Delegate","FB.Class",{});FB.provide("FB.Delegate",{Null:function(){},_create:function(B){var A=function(){if(B.length==2){return B[1].apply(B[0],arguments)}else{var D=B.slice();for(var C=0;C<D.length;C+=2){D[C+1].apply(D[C],arguments)}return null}};A._targets=B;return A},create:function(B,A){if(!B){return A}return FB.Delegate._create([B,A])},combine:function(D,C){if(!D){if(!C._targets){return FB.Delegate.create(null,C)}return C}if(!C){if(!D._targets){return FB.Delegate.create(null,D)}return D}var B=D._targets?D._targets:[null,D];var A=C._targets?C._targets:[null,C];return FB.Delegate._create(B.concat(A))},remove:function(F,E){if(!F||(F===E)){return null}if(!E){return F}var D=F._targets;var C=null;var B;if(E._targets){C=E._targets[0];B=E._targets[1]}else{B=E}for(var A=0;A<D.length;A+=2){if((D[A]===C)&&(D[A+1]===B)){if(D.length==2){return null}D.splice(A,2);return FB.Delegate._create(D)}}return F}});if(!window.Delegate){window.Delegate=FB.Delegate}if(!window.FB){FB={}}if(!FB.Loader){FB.Loader={loaded:{},loading:{},loadedCss:{},loadedCallback:null,onScriptLoaded:function(C){var D=C.length;for(var A=0;A<D;A++){var B=C[A];FB.Loader.loaded[B]=true}if(FB.Loader.loadedCallback){window.setTimeout(function(){FB.Loader.loadedCallback(C)},0)}},loadCssComps:function(C){var B=FB.Loader.getStaticResourceUrl("connect.php/"+FB.locale+"/css/"+C.join("/"));if(!this.loadedCss[B]){var A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("type","text/css");A.setAttribute("href",B);document.getElementsByTagName("head")[0].appendChild(A);this.loadedCss[B]=true}},getStaticResourceUrl:function(C){var B=FB.dynData.resources.base_url_format;var A=(B.indexOf("https")===0)?"ssl":"static.ak";return B.replace("{0}",A)+C}}}if(!FB.Bootstrap){FB.Bootstrap={requireFeatures:function(E,D){if(FB.Bootstrap.isXdChannel){return }var A={features:E,callback:D,completed:false};if(FB.Bootstrap._checkRequest(A)){return }FB.Bootstrap._featureReqQueue.push(A);FB.Loader.loadedCallback=FB.Delegate.combine(FB.Loader.loadedCallback,FB.Bootstrap._onCompLoaded);FB.Bootstrap._transformFeatureList(E);var C={};var G=[];var F;var H=E.length;var J=0;for(F=0;F<H;F++){var I=E[F];if(FB.Loader.loaded[I]){}else{if(!(FB.Loader.loaded[I]||FB.Loader.loading[I])){C[I]=true;G[G.length]=I}}}G.sort();var B=FB.Loader.getStaticResourceUrl("connect.php/"+FB.locale+"/js/"+G.join("/"));FB.Bootstrap.addScript(B)},ensureInit:function(A){if(!A){throw ("FB.ensureInit called without a valid callback")}if(FB.Facebook&&FB.Facebook.get_initialized&&FB.Facebook.get_initialized().get_isReady()&&FB.Facebook.get_initialized().result){return A()}FB.Bootstrap.requireFeatures(FB.Bootstrap.features,function(){FB.Facebook.get_initialized().waitForValue(true,A)})},init:function(C,B,A){FB.Bootstrap.requireFeatures(FB.Bootstrap.features,function(){if(FB.Facebook){FB.Facebook.init(C,B,A)}})},addScript:function(E){var D;var C=document.getElementsByTagName("script");if(C){var F=C.length;for(var B=0;B<F;B++){D=C[B];if(D.src==E){return }}}D=document.createElement("script");D.type="text/javascript";D.src=E;var A=document.getElementsByTagName("HEAD")[0]||document.body;A.appendChild(D)},setLocale:function(B,A){window.FB.locale=B;window.FB.localeIsRTL=A},initializeXdChannel:function(){FB.Bootstrap.isXdChannel=window.location.search.indexOf(FB.Bootstrap.fbc_channel_token)>=0},detectDocumentNamespaces:function(){if(document.namespaces&&!document.namespaces.item.fb){document.namespaces.add("fb")}},createDefaultXdChannelUrl:function(){var A=location.protocol+"//"+location.hostname+location.pathname+location.search;if(location.search||location.search.length>0){A+="&"}else{A+="?"}A+="fbc_channel=1";return A},_onCompLoaded:function(){var A=0;var B=FB.Bootstrap._featureReqQueue.length;for(A=0;A<B;A++){FB.Bootstrap._checkRequest(FB.Bootstrap._featureReqQueue[A])}},_checkRequest:function(D){if(!D.completed){var A=0;var E=D.features.length;var C=0;for(A=0;A<E;A++){var B=D.features[A];if(FB.Loader.loaded[B]){C++}}if(C==E){D.completed=true;if(D.callback){D.callback()}}}return D.completed},_transformFeatureList:function(F){var E={Api:true,CanvasUtil:true,Connect:true,XFBML:true};var G=F.length;var C=false;var D={};for(var B=0;B<G;B++){D[F[B]]=true;if(E[F[B]]){C=true}}if(C){for(var A in E){if(!D[A]){F[F.length]=A}}}},features:["XFBML","CanvasUtil"],fbc_channel_token:"fbc_channel=1",_featureReqQueue:[]};window.FB_RequireFeatures=FB.Bootstrap.requireFeatures;window.FB.init=FB.Bootstrap.init;window.FB.ensureInit=FB.Bootstrap.ensureInit}FB.Bootstrap.initializeXdChannel();FB.Bootstrap.detectDocumentNamespaces();if(!window.FBIntern){FBIntern={}}if(!FBIntern.XdReceiver){FBIntern.XdReceiver={delay:100,timerId:-1,dispatchMessage:function(){var C=document.URL;var B=C.indexOf("#");var A;if(B>0){A=C.substring(B+1)}else{B=C.indexOf("fb_login&");if(B>0){A=C.substring(B+9)}else{return }}var J="debug=1&";if(A.indexOf(J)==0){A=A.substring(J.length)}var I;var H=null;try{var G=window.parent;if(A.indexOf("fname=")==0){var F=A.indexOf("&");var E=A.substr(6,F-6);if(E=="_opener"){G=G.opener}else{if(E=="_oparen"){G=G.opener.parent}else{if(E!="_parent"){G=G.frames[E]}}}I=A.substr(F+1)}else{G=G.parent;I=A}H=G.FB.XdComm.Server.singleton.onReceiverLoaded}catch(D){if(D.number==-2146828218){return }}if(H){G.FB.XdComm.Server.singleton.onReceiverLoaded(I);if(FBIntern.XdReceiver.timerId!=-1){window.clearInterval(FBIntern.XdReceiver.timerId);FBIntern.XdReceiver.timerId=-1}}else{if(FBIntern.XdReceiver.timerId==-1){try{FBIntern.XdReceiver.timerId=window.setInterval(FBIntern.XdReceiver.dispatchMessage,FBIntern.XdReceiver.delay)}catch(D){}}}}};if(!(window.FB&&FB.Bootstrap&&!FB.Bootstrap.isXdChannel)){try{FBIntern.XdReceiver.dispatchMessage()}catch(e){}}}(function(){var D=document.getElementsByTagName("script");var C=D[D.length-1];if(C!=undefined){var B=C.getAttribute("fb-api-key");var A=C.getAttribute("fb-xd-receiver");if(B!=null){window.setTimeout(function(){FB.init(B,A)},0)}}})();FB.Loader.onScriptLoaded(["FB.Prelude","FB.Log","FB.Class","FB.Type","FB.HiddenContainer","FB.HiddenContainerLoader","FB.Delegate","FB.Loader","FB.Bootstrap","XdCommReceiver"]);(function(A){var B={module:".DL-facebook-module"};DAYLIFE.FacebookConnect=function(C){var D={module_id:B.module};this.options=A.extend({},D,C);this.$module=A(this.options.module_id);this.facebook={apikey:"63f7a509c78c8249b7635ef5f1bf9c60",channel_path:"/_static/v2/js/daylife/facebook_cross_domain.html"}};DAYLIFE.FacebookConnect.prototype={runner:function(){FB.Facebook.init(this.facebook.api_key,this.facebook.channel_path);var C=FB.Facebook.apiClient;C.requireLogin(function(D){DAYLIFE.log(["FB Session Info",C.get_session()])})}}})($DL);