(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(G,I,F){function E(L){var J="";for(var K=0;K<L.length;K++){var M=L.charAt(K);if(M<" "||M>"~"){M="&#"+M.charCodeAt()+";"}J+=M}return J}function H(J){F=(F>=0)?Math.floor(F):4;var R=J.split(/\r\n|\r|\n/);for(var L=0;L<R.length;L++){var S=R[L];var M="";for(var K=0;K<S.length;K++){var O=S.charAt(K);if(O==="\t"){var N=F-(M.length%F);for(var Q=0;Q<N;Q++){M+=" "}}else{M+=O}}M=M.replace(/(^ )|( $)/g,"&nbsp;");R[L]=M}var P=R.join("<br />");P=P.replace(/  /g," &nbsp;");return P}var D=G;D=D.replace(/\&/g,"&amp;");D=D.replace(/\</g,"&lt;");D=D.replace(/\>/g,"&gt;");if(I){D=H(D)}else{D=D.replace(new RegExp('"',"g"),"&quot;")}D=E(D);return D},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,E,G,D){for(var F=0;F<I.length;F++){var H={tagSelector:I[F][0],preventDefault:E,cancelBubbling:G,stopPropagation:D};if(I[F][1]){H.childOf=I[F][1]}if(B.targetIs(J,H,I[F][2])){return H}}},targetIs:function(I,G,K){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 H=I.target;var J=B(H);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(K&&typeof K=="function"){K(J,E)}if(G.preventDefault){I.preventDefault()}if(G.stopPropagation){I.stopPropagation()}return true}},make:function(){var F,M,G,J,D,K;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){G=I[1]}else{K=I[1]}}}if(I[2]){if(typeof I[2]=="string"){M=I[2]}else{if(typeof I[1]=="object"&&I[2].push){G=I[2]}}}if(L=="text"&&M){return document.createTextNode(M)}else{F=B(document.createElement(L));if(K){for(var E in K){if(K.hasOwnProperty(E)){if(F.is(":input")&&E=="value"){F.val(K[E])}else{F.attr(E,K[E])}if(window.attachEvent&&!window.opera){if(F.is(":input")){F.addClass("IE-input-"+F.attr("type"))}}}}}if(G){for(var H=0;H<G.length;H++){if(G[H]){F.append(G[H])}}}if(M){F.text(M)}return F}},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,F){if(K.charAt(0)=="?"||K.charAt(0)=="#"){K=K.substr(1)}var G={};var E=K.split("&");for(var H=0,J=E.length;H<J;H++){var D=E[H].split("=");if(D&&D[1]){var I=decodeURIComponent(D[1].replace(/\+/g,"%20"));var L=D[0].replace("[]","");if(G[L]&&D[0].indexOf("[]")!=-1){G[L].push(I)}else{if(D[0].indexOf("[]")!=-1){G[L]=[I]}else{G[L]=I}}}}if(F){return G[F]}return G},hash_to_querystring:function(J,H,E){var D=0;var I;if(E){I=["#"]}else{I=["?"]}for(var G in J){if(D>0){I.push("&")}if(typeof J[G]=="string"||typeof J[G]=="number"){I.push(encodeURIComponent(G)+"="+encodeURIComponent(J[G]))}else{if(B.typeOf(J[G])=="array"){for(var F=0;F<J[G].length;F++){if(F>0){I.push("&")}if(H){I.push(encodeURIComponent(G)+"[]="+encodeURIComponent(J[G][F]))}else{I.push(encodeURIComponent(G)+"="+encodeURIComponent(J[G][F]))}}}}D++}return I.join("")},update_querystring:function(D,G,K,F){G=G||{};var J=D;var E=D.indexOf("?");if(E==-1){J=D+B.hash_to_querystring(G,F)}else{var L=D.substr(E);var M=B.querystring_to_hash(L);for(var H in G){if(G[H]){M[H]=G[H]}}if(K&&B.typeOf(K)=="array"){for(var I=K.length-1;I>=0;I--){delete M[K[I]]}}J=D.replace(L,B.hash_to_querystring(M,F))}return J},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(D,C){D=D||1000;C=C||"#ffff27";var E=this.offset();var F=B.make("div").css({position:"absolute",top:E.top,left:E.left,zIndex:"10",width:this.width(),height:this.height(),backgroundColor:C,opacity:0.7,display:"none"});this.parent().append(F);F.fadeIn(D,function(){F.fadeOut(D,function(){F.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,E){var D={};if(this.is("form")){C=C||":input";B.each(B(C,this),function(){var G=B(this);var F=G.attr("name");if(F){if(G.is(":checkbox")&&F.indexOf("[]")!=-1){F=F.replace("[]","");if(!D[F]){D[F]=[]}if(G.attr("checked")){D[F].push(G.val())}}else{if(G.is(":checkbox")&&!G.attr("checked")){D[F]=(G.attr("value")==1)?0:false}else{if(G.is(":radio")&&G.attr("checked")||(!G.is(":radio")||G.attr("checked"))){D[F]=G.val()}}}if(B.isFunction(E)){D[F]=E.apply(this,[D[F]])}}})}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 F=this.find(":checkbox");F.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 C=H[D];if(E.is(":text")){if(C===null||C===false||C===true||B.typeOf(C)=="array"){C=""}}E.val(C)}}}}}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 H;for(var G=A.length-1;G>=0;G--){if(A[G].path==K){H=A[G];break}}if(!H){var D=B.dlid();H={path:K,id:D};var F=A.push(H);var I=F-1;var J=(typeof (DAYLIFE_Globals)!="undefined"&&DAYLIFE_Globals.included_js)?true:false;var E=function(){H.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)){H.complete=false;B.ajax({type:"GET",url:K,success:E,dataType:"script",cache:true})}else{E()}}else{var E=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(H.complete){E()}else{H.load_interval=window.setInterval(function(){if(H.complete){window.clearInterval(H.load_interval);E()}},1000)}}}return H}})})($DL);(function(C){var A={};var B={};C.extend({anybind:function(H,G,J){if(!A[G]){A[G]={}}var I;for(var D in B){if(B[D]==H){I=D;break}}if(!I){I=C.dlid();B[I]=H}if(!A[G][I]){A[G][I]=[]}var F=false;for(var E=A[G][I].length;E>=0;E--){if(J==A[G][I][E]){F=true;break}}if(!F){A[G][I].push(J)}},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(G,F,I){if(A[F]){var H;for(var D in B){if(B[D]==G){H=D;break}}if(H&&A[F][H]){for(var E=0;E<A[F][H].length;E++){if(A[F][H][E]==I){A[F][H].splice(E,1);break}}if(A[F][H].length==0){delete A[F][H]}}E=0;for(var D in A[F]){E++}if(E==0){delete A[F]}}}})})($DL);(function(E){var C=[E.make("div"),E.make("div"),E.make("div"),E.make("div")];var D;var A;for(var B=C.length-1;B>=0;B--){C[B].css({backgroundColor:"#ffc300",opacity:0.3,position:"absolute",zIndex:800})}E(document).ready(function(){for(var G=0;G<C.length;G++){E("body").append(C[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(Q,R,V,P){var G=this.offset();if(G&&this.length&&this.css("display").toLowerCase()!="none"){var H=null;if(P){var N=this.data("frame");if(!N){N=new F();N.make_nodes();this.data("frame",N)}else{window.clearTimeout(N.frame_out_timer)}H=N.nodes}else{H=C;window.clearTimeout(A);D=this}var M=this.outerHeight();var T=this.outerWidth();var J=E(document).height();var O=E(document).width();if(Q&&typeof Q=="string"){var K=Q.split(" ");var U=K.length-1;Q=[];var I,S;for(var L=0;L<4;L++){I=(K[L])?K[L]:((!K[1])?K[0]:((L==2)?K[0]:K[1]));S=parseInt(I);Q[L]=S}}else{Q=[0,0,0,0]}R=R||20;V=V||800;H[0].css({height:R,width:T+(2*R)+Q[1]+Q[3],top:G.top-R-Q[0],left:G.left-R-Q[3]});H[1].css({height:M+Q[0]+Q[2],width:R,top:G.top-Q[0],left:G.left+T+Q[3]});H[2].css({height:R,width:T+(2*R)+Q[1]+Q[3],top:G.top+M+Q[2],left:G.left-R-Q[3]});H[3].css({height:M+Q[0]+Q[2],width:R,top:G.top-Q[0],left:G.left-R-Q[3]});for(var L=H.length-1;L>=0;L--){H[L].css({display:"block",zIndex:V})}}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{A=window.setTimeout(function(){D=null;for(var I=C.length-1;I>=0;I--){C[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=C.length-1;H>=0;H--){C[H].animate({top:parseInt(C[H].css("top"))+G},I)}}}})($DL);(function(C){var B=[];function A(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)}}A.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(G,E,F){this.success=(G&&typeof G=="function")?G:function(){return true};this.failure=(E&&typeof E=="function")?E:function(){return false};this.either=(F&&typeof F=="function")?F: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 H=J.attr("name");var F=C.inArray(H,this.changed);if(H&&H.indexOf("[]")!=-1){H=H.replace("[]","");F=C.inArray(H,this.changed);var E=((!K&&C.inArray(J.val(),this.original_state[H])!=-1)||(K&&C.inArray(J.val(),this.original_state[H])==-1))?true:false;if(!E){var G=this.$form.serializeForm();for(var I=G[H].length-1;I>=0;I--){if(C.inArray(G[H][I],this.original_state[H])==-1){E=true;break}}if(!E){for(var I=this.original_state[H].length-1;I>=0;I--){if(C.inArray(this.original_state[H][I],G[H])==-1){E=true;break}}}}if(E){J.trigger("DAYLIFE:Change_Monitor:has_changed",[])}if(F==-1&&E){this.changed.push(H)}else{if(F!=-1&&!E){this.changed.splice(F,1)}}}else{if(K!=this.original_state[H]){J.trigger("DAYLIFE:Change_Monitor:has_changed",[]);if(F==-1){this.changed.push(H)}}else{if(K==this.original_state[H]&&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,E)}else{if(this.changed.length==0&&this.failure){this.failure(this.changed,E)}}},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=B.length-1;F>=0;F--){if(B[F]["form"].get(0)==this.get(0)){E=B[F]["monitor"];break}}if(!E){E=new A(this);B.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=B.length-1;H>=0;H--){if(B[H]["form"].get(0)==F.get(0)){E=B[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 E=[];var G;var A=function(){for(var H=E.length-1;H>=0;H--){var I=E[H].$node.offset();if(I.left!=E[H].offset.left||I.top!=E[H].offset.top){E[H].$form.trigger("reset")}}};var C=function(){if(E.length==0){window.clearInterval(G);G=null}else{if(!G){G=window.setInterval(function(){A()},500)}}};var D=function(I,H){for(var J=E.length-1;J>=0;J--){if(E[J].$form==H){break}}if(J<0){E.push({"$form":H,"$node":I,offset:I.offset()})}C()};var B=function(I,H){for(var J=E.length-1;J>=0;J--){if(E[J].$form==H){E.splice(J,1);break}}C()};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 N=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");B(L,I);L.trigger("DAYLIFE:edit_in_place:reset",[I]);if(K.reset&&typeof K.reset=="function"){K.reset()}return false};var M=function(){L.text(F(":text",I).val());var V=window.location.toString().match("http://(.*?)/")[1];var U=(typeof L.attr("href")!="undefined")?L.attr("href").toString().match("http://(.*?)/"):null;var W=(U&&U[1])?U[1]:"";if(F("#returning_user_management").length&&V==W){F(".DL-header .DL-header-title").text(F(":text",I).val())}F("input",I).attr("disable",false);I.css("display","none");B(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:M,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:M});W[K.editapi.method].apply(W,K.editapi.args)}if(!K.url&&!K.editapi){M()}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)}N();D(L,I);L.trigger("DAYLIFE:edit_in_place:edit",[I]);var O=(F.isFunction(K.formatEditText))?K.formatEditText(L.text()):L.text();F(":text",I).focus().val(O).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(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};(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(E){var D;if(E&&E.constructor==Array&&E.length==3){return E}if(D=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(E)){return[parseInt(D[1]),parseInt(D[2]),parseInt(D[3])]}if(D=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(E)){return[parseFloat(D[1])*2.55,parseFloat(D[2])*2.55,parseFloat(D[3])*2.55]}if(D=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(E)){return[parseInt(D[1],16),parseInt(D[2],16),parseInt(D[3],16)]}if(D=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(E)){return[parseInt(D[1]+D[1],16),parseInt(D[2]+D[2],16),parseInt(D[3]+D[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 A=C.scrollTo=function(F,E,D){A.window().scrollTo(F,E,D)};A.defaults={axis:"y",duration:1};A.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({},A.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=B(D.offset);D.over=B(D.over);return this.each(function(){var M=this,K=C(M),L=F,J,H={},N=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){J=(L=C(L)).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(J){H[Q]=J[V]+(N?0:O-K.offset()[V]);if(D.margin){H[Q]-=parseInt(L.css("margin"+T))||0;H[Q]-=parseInt(L.css("border"+T+"Width"))||0}H[Q]+=D.offset[V]||0;if(D.over[V]){H[Q]+=L[U]()*D.over[V]}}else{H[Q]=L[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]){I(D.onAfterFirst)}delete H[Q]}});I(D.onAfter);function I(O){K.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 B(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(P){P=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},P);var I=this;function R(){O(this,I);return false}function O(V,U){DAYLIFE.debug("objClicked is:",V);A("embed, object, select").css({visibility:"hidden"});C();P.imageArray.length=0;P.activeImage=0;if(U.length==1){P.imageArray.push(new Array(V.getAttribute("href"),V.getAttribute("title")))}else{for(var T=0;T<U.length;T++){P.imageArray.push(new Array(U[T].getAttribute("href"),U[T].getAttribute("title")))}}while(P.imageArray[P.activeImage][0]!=V.getAttribute("href")){P.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="'+P.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="'+P.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 T=F();A("#jquery-overlay").css({backgroundColor:P.overlayBgColor,opacity:P.overlayOpacity,width:T[0],height:T[1]}).fadeIn();var U=H();A("#jquery-lightbox").css({top:U[1]+(T[3]/10),left:U[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 V=F();A("#jquery-overlay").css({width:V[0],height:V[1]});var W=H();A("#jquery-lightbox").css({top:W[1]+(V[3]/10),left:W[0]})})}function L(){A("#lightbox-loading").show();if(P.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"],P.imageArray[P.activeImage][0]);T.onload=function(){A("#lightbox-image").attr("src",P.imageArray[P.activeImage][0]);J(T.width,T.height);T.onload=function(){}};T.src=P.imageArray[P.activeImage][0]}function J(W,Z){var T=A("#lightbox-container-image-box").width();var Y=A("#lightbox-container-image-box").height();var X=(W+(P.containerBorderSize*2));var V=(Z+(P.containerBorderSize*2));var U=T-X;var b=Y-V;A("#lightbox-container-image-box").animate({width:X,height:V},P.containerResizeSpeed,function(){G()});if((U==0)&&(b==0)){if(A.browser.msie){N(250)}else{N(100)}}A("#lightbox-container-image-data-box").css({width:W});A("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:Z+(P.containerBorderSize*2)})}function G(){A("#lightbox-loading").hide();A("#lightbox-image").fadeIn(function(){K();S()});Q()}function K(){A("#lightbox-container-image-data-box").slideDown("fast");A("#lightbox-image-details-caption").hide();if(P.imageArray[P.activeImage][1]){A("#lightbox-image-details-caption").html(P.imageArray[P.activeImage][1]).show()}if(P.imageArray.length>1){A("#lightbox-image-details-currentNumber").html(P.txtImage+" "+(P.activeImage+1)+" "+P.txtOf+" "+P.imageArray.length).show()}}function S(){A("#lightbox-nav").show();A("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+P.imageBlank+") no-repeat"});if(P.activeImage!=0){if(P.fixedNavigation){A("#lightbox-nav-btnPrev").css({background:"url("+P.imageBtnPrev+") left 48% no-repeat"}).unbind().bind("click",function(){P.activeImage=P.activeImage-1;L();return false})}else{A("#lightbox-nav-btnPrev").unbind().hover(function(){A(this).css({background:"url("+P.imageBtnPrev+") left 48% no-repeat"})},function(){A(this).css({background:"transparent url("+P.imageBlank+") no-repeat"})}).show().bind("click",function(){P.activeImage=P.activeImage-1;L();return false})}}if(P.activeImage!=(P.imageArray.length-1)){if(P.fixedNavigation){A("#lightbox-nav-btnNext").css({background:"url("+P.imageBtnNext+") right 48% no-repeat"}).unbind().bind("click",function(){P.activeImage=P.activeImage+1;L();return false})}else{A("#lightbox-nav-btnNext").unbind().hover(function(){A(this).css({background:"url("+P.imageBtnNext+") right 48% no-repeat"})},function(){A(this).css({background:"transparent url("+P.imageBlank+") no-repeat"})}).show().bind("click",function(){P.activeImage=P.activeImage+1;L();return false})}}M()}function M(){A(document).keydown(function(T){D(T)})}function E(){A(document).unbind()}function D(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==P.keyToClose)||(key=="x")||(keycode==escapeKey)){B()}if((key==P.keyToPrev)||(keycode==37)){if(P.activeImage!=0){P.activeImage=P.activeImage-1;L();E()}}if((key==P.keyToNext)||(keycode==39)){if(P.activeImage!=(P.imageArray.length-1)){P.activeImage=P.activeImage+1;L();E()}}}function Q(){if((P.imageArray.length-1)>P.activeImage){objNext=new Image();objNext.src=P.imageArray[P.activeImage+1][0]}if(P.activeImage>0){objPrev=new Image();objPrev.src=P.imageArray[P.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 F(){var V,T;if(window.innerHeight&&window.scrollMaxY){V=window.innerWidth+window.scrollMaxX;T=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){V=document.body.scrollWidth;T=document.body.scrollHeight}else{V=document.body.offsetWidth;T=document.body.offsetHeight}}var U,W;if(self.innerHeight){if(document.documentElement.clientWidth){U=document.documentElement.clientWidth}else{U=self.innerWidth}W=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){U=document.documentElement.clientWidth;W=document.documentElement.clientHeight}else{if(document.body){U=document.body.clientWidth;W=document.body.clientHeight}}}if(T<W){pageHeight=W}else{pageHeight=T}if(V<U){pageWidth=V}else{pageWidth=U}arrayPageSize=new Array(pageWidth,pageHeight,U,W);return arrayPageSize}function H(){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 N(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(B,C){var D=typeof B=="string";C=A.extend({},A.Autocompleter.defaults,{url:D?B:null,data:D?null:B,delay:D?A.Autocompleter.defaults.delay:10,max:C&&!C.scroll?10:150},C);C.highlight=C.highlight||function(E){return E};C.formatMatch=C.formatMatch||C.formatItem;return this.each(function(){new A.Autocompleter(this,C)})},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,G){var C={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var B=A(L).attr("autocomplete","off").addClass(G.inputClass);var J;var P="";var M=A.Autocompleter.Cache(G);var E=0;var U;var X={mouseDownOnSelect:false};var R=A.Autocompleter.Select(G,L,D,X);var W;A.browser.opera&&A(L.form).bind("submit.autocomplete",function(){if(W){W=false;return false}});B.bind((A.browser.opera?"keypress":"keydown")+".autocomplete",function(Y){U=Y.keyCode;switch(Y.keyCode){case C.UP:Y.preventDefault();if(R.visible()){R.prev()}else{T(0,true)}break;case C.DOWN:Y.preventDefault();if(R.visible()){R.next()}else{T(0,true)}break;case C.PAGEUP:Y.preventDefault();if(R.visible()){R.pageUp()}else{T(0,true)}break;case C.PAGEDOWN:Y.preventDefault();if(R.visible()){R.pageDown()}else{T(0,true)}break;case G.multiple&&A.trim(G.multipleSeparator)==","&&C.COMMA:case C.TAB:case C.RETURN:if(D()){Y.preventDefault();W=true;return false}break;case C.ESC:R.hide();break;default:clearTimeout(J);J=setTimeout(T,G.delay);break}}).focus(function(){E++}).blur(function(){E=0;if(!X.mouseDownOnSelect){S()}}).click(function(){if(E++>1&&!R.visible()){T(0,true)}}).bind("search",function(){var Y=(arguments.length>1)?arguments[1]:null;function Z(f,d){var b;if(d&&d.length){for(var c=0;c<d.length;c++){if(d[c].result.toLowerCase()==f.toLowerCase()){b=d[c];break}}}if(typeof Y=="function"){Y(b)}else{B.trigger("result",b&&[b.data,b.value])}}A.each(H(B.val()),function(b,c){F(c,Z,Z)})}).bind("flushCache",function(){M.flush()}).bind("setOptions",function(){A.extend(G,arguments[1]);if("data" in arguments[1]){M.populate()}}).bind("unautocomplete",function(){R.unbind();B.unbind();A(L.form).unbind(".autocomplete")});function D(){var Z=R.selected();if(!Z){return false}var Y=Z.result;P=Y;if(G.multiple){var b=H(B.val());if(b.length>1){Y=b.slice(0,b.length-1).join(G.multipleSeparator)+G.multipleSeparator+Y}Y+=G.multipleSeparator}B.val(Y);V();B.trigger("result",[Z.data,Z.value]);return true}function T(b,Z){if(U==C.DEL){R.hide();return }var Y=B.val();if(!Z&&Y==P){return }P=Y;Y=I(Y);if(Y.length>=G.minChars){B.addClass(G.loadingClass);if(!G.matchCase){Y=Y.toLowerCase()}F(Y,K,V)}else{N();R.hide()}}function H(Z){if(!Z){return[""]}var b=Z.split(G.multipleSeparator);var Y=[];A.each(b,function(c,d){if(A.trim(d)){Y[c]=A.trim(d)}});return Y}function I(Y){if(!G.multiple){return Y}var Z=H(Y);return Z[Z.length-1]}function Q(Y,Z){if(G.autoFill&&(I(B.val()).toLowerCase()==Y.toLowerCase())&&U!=C.BACKSPACE){B.val(B.val()+Z.substring(I(P).length));A.Autocompleter.Selection(L,P.length,P.length+Z.length)}}function S(){clearTimeout(J);J=setTimeout(V,200)}function V(){var Y=R.visible();R.hide();clearTimeout(J);N();if(G.mustMatch){B.search(function(Z){if(!Z){if(G.multiple){var b=H(B.val()).slice(0,-1);B.val(b.join(G.multipleSeparator)+(b.length?G.multipleSeparator:""))}else{B.val("")}}})}if(Y){A.Autocompleter.Selection(L,L.value.length,L.value.length)}}function K(Z,Y){if(Y&&Y.length&&E){N();R.display(Y,Z);Q(Z,Y[0].value);R.show()}else{V()}}function F(Z,c,Y){if(!G.matchCase){Z=Z.toLowerCase()}var b=M.load(Z);if(b&&b.length){c(Z,b)}else{if((typeof G.url=="string")&&(G.url.length>0)){var d={timestamp:+new Date()};A.each(G.extraParams,function(f,g){d[f]=typeof g=="function"?g():g});A.ajax({mode:"abort",port:"autocomplete"+L.name,dataType:G.dataType,url:G.url,data:A.extend({q:I(Z),limit:G.max},d),success:function(g){var f=G.parse&&G.parse(g)||O(g);M.add(Z,f);c(Z,f)}})}else{R.emptyList();Y(Z)}}}function O(c){var Y=[];var b=c.split("\n");for(var Z=0;Z<b.length;Z++){var d=A.trim(b[Z]);if(d){d=d.split("|");Y[Y.length]={data:d,value:d[0],result:G.formatResult&&G.formatResult(d,d[0])||d[0]}}}return Y}function N(){B.removeClass(G.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(C){var F={};var D=0;function H(K,J){if(!C.matchCase){K=K.toLowerCase()}var I=K.indexOf(J);if(I==-1){return false}return I==0||C.matchContains}function G(J,I){if(D>C.cacheLength){B()}if(!F[J]){D++}F[J]=I}function E(){if(!C.data){return false}var J={},I=0;if(!C.url){C.cacheLength=1}J[""]=[];for(var L=0,K=C.data.length;L<K;L++){var O=C.data[L];O=(typeof O=="string")?[O]:O;var N=C.formatMatch(O,L+1,C.data.length);if(N===false){continue}var M=N.charAt(0).toLowerCase();if(!J[M]){J[M]=[]}var P={value:N,data:O,result:C.formatResult&&C.formatResult(O)||N};J[M].push(P);if(I++<C.max){J[""].push(P)}}A.each(J,function(Q,R){C.cacheLength++;G(Q,R)})}setTimeout(E,25);function B(){F={};D=0}return{flush:B,add:G,populate:E,load:function(L){if(!C.cacheLength||!D){return null}if(!C.url&&C.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(C.matchSubset){for(var J=L.length-1;J>=C.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(E,J,L,P){var I={ACTIVE:"ac_over"};var K,F=-1,R,M="",S=true,C,O;function N(){if(!S){return }C=A("<div/>").hide().addClass(E.resultsClass).css("position","absolute").appendTo(E.positionSelector);O=A("<ul/>").appendTo(C).mouseover(function(T){if(Q(T).nodeName&&Q(T).nodeName.toUpperCase()=="LI"){F=A("li",O).removeClass(I.ACTIVE).index(Q(T));A(Q(T)).addClass(I.ACTIVE)}}).click(function(T){A(Q(T)).addClass(I.ACTIVE);L();J.focus();return false}).mousedown(function(){P.mouseDownOnSelect=true}).mouseup(function(){P.mouseDownOnSelect=false});if(E.width>0){C.css("width",E.width)}S=false}function Q(U){var T=U.target;while(T&&T.tagName!="LI"){T=T.parentNode}if(!T){return[]}return T}function H(T){K.slice(F,F+1).removeClass(I.ACTIVE);G(T);var V=K.slice(F,F+1).addClass(I.ACTIVE);if(E.scroll){var U=0;K.slice(0,F).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 G(T){F+=T;if(F<0){F=K.size()-1}else{if(F>=K.size()){F=0}}}function B(T){return E.max&&E.max<T?E.max:T}function D(){O.empty();var U=B(R.length);for(var V=0;V<U;V++){if(!R[V]){continue}var W=E.formatItem(R[V].data,V+1,U,R[V].value,M);if(W===false){continue}var T=A("<li/>").html(E.highlight(W,M)).addClass(V%2==0?"ac_even":"ac_odd").appendTo(O)[0];A.data(T,"ac_data",R[V])}K=O.find("li");if(E.selectFirst){K.slice(0,1).addClass(I.ACTIVE);F=0}if(A.fn.bgiframe){O.bgiframe()}}return{display:function(U,T){N();R=U;M=T;D()},next:function(){H(1)},prev:function(){H(-1)},pageUp:function(){if(F!=0&&F-8<0){H(-F)}else{H(-8)}},pageDown:function(){if(F!=K.size()-1&&F+8>K.size()){H(K.size()-1-F)}else{H(8)}},hide:function(){C&&C.hide();K&&K.removeClass(I.ACTIVE);F=-1},visible:function(){return C&&C.is(":visible")},current:function(){return this.visible()&&(K.filter("."+I.ACTIVE)[0]||E.selectFirst&&K[0])},show:function(){var V=A(J).offset();C.css({width:typeof E.width=="string"||E.width>0?E.width:A(J).width(),top:V.top+J.offsetHeight,left:V.left}).show();if(E.scroll){O.scrollTop(0);O.css({maxHeight:E.scrollHeight,overflow:"auto"});if(A.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var T=0;K.each(function(){T+=this.offsetHeight});var U=T>E.scrollHeight;O.css("height",U?E.scrollHeight:T);if(!U){K.width(O.width()-parseInt(K.css("padding-left"))-parseInt(K.css("padding-right")))}}}},selected:function(){var T=K&&K.filter("."+I.ACTIVE).removeClass(I.ACTIVE);return T&&T.length&&A.data(T[0],"ac_data")},emptyList:function(){O&&O.empty()},unbind:function(){C&&C.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,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]}}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B)}if(E){E.VERSION=H;E.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(H,I,G){if(!I||!H){throw new Error("extend failed, please check that all dependencies are included.")}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D]}}A._IEEnumFix(H.prototype,G)}},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,K=[],L="{...}",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)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L)}else{K.push(D[F])}K.push(J)}if(K.length>1){K.pop()}K.push("]")}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L)}else{K.push(D[F])}K.push(J)}}if(K.length>1){K.pop()}K.push("}")}return K.join("")},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break}H=S.indexOf(Q,I);if(I+1>=H){break}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G)}P=E[O];if(L){P=L(O,P,R)}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10))}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4)}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10))}else{P=P.toString()}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F}}S=S.substring(0,I)+P+S.substring(H+1)}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","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(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L]}if(!F){throw new TypeError("method undefined")}if(!A.isArray(J)){J=[G]}I=function(){F.apply(E,J)};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,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 M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=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 I=function(T,U,W){var V=W||"utf-8";return J("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 J("script",{id:"yui__dyn_"+(R++),type:"text/javascript",charset:V,src:T},U)};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId)}}};var B=function(T,W){var U=M[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=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V))}};var C=function(W){var T=M[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,A(T))}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.context||T;T.onTimeout.call(U,A(T))}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel()}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);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],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.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{C(V)}return }var T=U.url[0];if(!T){U.url.shift();return G(V)}if(U.timeout){U.timer=S.later(U.timeout,U,O,V)}if(U.type==="script"){W=P(T,f,U.charset)}else{W=I(T,f,U.charset)}F(U.type,W,V,T,f,U.url.length);U.nodes.push(W);if(U.insertBefore){var g=B(U.insertBefore,V);if(g){g.parentNode.insertBefore(W,g)}}else{b.appendChild(W)}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T)}};var K=function(){if(E){return }E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T]}}E=false};var D=function(b){var X=M[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 H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.util.Get.PURGE_THRESH===0){K()}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes:[]});var W=M[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,G,X);return{tId:X}};var F=function(d,X,W,U,Y,Z,c){var b=c||G;if(N.ie){X.onreadystatechange=function(){var f=this.readyState;if("loaded"===f||"complete"===f){X.onreadystatechange=null;b(W,U)}}}else{if(N.webkit){if(d==="script"){if(N.webkit>=420){X.addEventListener("load",function(){b(W,U)})}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,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(W,n)}else{}return }}T.timer.cancel();b(W,U)},null,true)}else{S.later(YAHOO.util.Get.POLL_FREQ,null,b,[W,U])}}}}else{X.onload=function(){b(W,U)}}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T)},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true}},script:function(T,U){return H("script",T,U)},css:function(T,U){return H("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(D,C){if(!this.handleIds[D]){this.handleIds[D]={}}this.handleIds[D][C]=C},isDragDrop:function(C){return(this.getDDById(C))?true:false},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue}if(!D||C.isTarget){G[G.length]=C}}}return G},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true}}return false},isTypeOfDD:function(C){return(C&&C.__ygDragDrop)},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C])},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(V,L){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return }var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=c.getTargetCoord(P.x,P.y),F=c.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var f=this.dragOvers[S];if(!this.isTypeOfDD(f)){continue}if(!this.isOverTarget(P,f,this.mode,U)){d.outEvts.push(f)}I[S]=true;delete this.dragOvers[S]}for(var R in c.groups){if("string"!=typeof R){continue}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue}if(G.isTarget&&!G.isLocked()&&G!=c){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){d.dropEvts.push(G)}else{if(!I[G.id]){d.enterEvts.push(G)}else{d.overEvts.push(G)}this.dragOvers[G.id]=G}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[c.id],validDrop:L};for(var C in D){Q.push(C)}if(L&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(V);c.fireEvent("invalidDropEvent",{e:V})}}for(S=0;S<E.length;S++){var Y=null;if(d[E[S]+"Evts"]){Y=d[E[S]+"Evts"]}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(c.events[J]){c[J](V,Y,Q);c.fireEvent(J+"Event",{event:V,info:Y,group:Q})}if(c.events[W]){c[X](V,Y,Q);c.fireEvent(O,{event:V,info:Y,group:Q})}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(c.events[J]){c[J](V,Y[Z].id,Q[0]);c.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]})}if(c.events[W]){c[X](V,Y[Z].id,Q[0]);c.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]})}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0]}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C}}}}return G},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue}for(var E in this.ids[C]){var G=this.ids[C][E];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(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F)}catch(I){}if(!K){return null}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G)},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G}if(!G){return false}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x)}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.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,C,D){if(E){this.init(E,C,D)}};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,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event")}},initTarget:function(E,C,D){this.config=D||{};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((C)?C:"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(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return }if(this.isLocked()){return }var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J)}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J)}if((C===false)||(E===false)||(F===false)||(H===false)){return }this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J)}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)))},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-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(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E]}}},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,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C)}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,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y]}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px")}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth)},0)},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A)}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A)}if(M>B&&F<C){window.scrollTo(D+A,N)}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,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,A,B){if(C){this.init(C,A,B);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(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0}if(isNaN(I)){I=0}if(isNaN(F)){F=0}if(isNaN(D)){D=0}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"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,A,B){if(C){this.initTarget(C,A,B)}};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(B,C,E,D,A){return new YAHOO.widget.Slider(B,B,new YAHOO.widget.SliderThumb(C,B,E,D,0,0,A),"horiz")};YAHOO.widget.Slider.getVertSlider=function(C,D,A,E,B){return new YAHOO.widget.Slider(C,C,new YAHOO.widget.SliderThumb(D,C,0,0,A,E,B),"vert")};YAHOO.widget.Slider.getSliderRegion=function(C,D,F,E,A,G,B){return new YAHOO.widget.Slider(C,C,new YAHOO.widget.SliderThumb(D,C,F,E,A,G,B),"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 G=YAHOO.util.Event;var C=G.getCharCode(E),I=this.thumb;var B=this.getXValue(),F=this.getYValue();var H=false;var D=true;switch(C){case 37:B-=this.keyIncrement;break;case 38:F-=this.keyIncrement;break;case 39:B+=this.keyIncrement;break;case 40:F+=this.keyIncrement;break;case 36:B=I.leftConstraint;F=I.topConstraint;break;case 35:B=I.rightConstraint;F=I.bottomConstraint;break;default:D=false}if(D){if(I._isRegion){this.setRegionValue(B,F,true)}else{var A=(I._isHoriz)?B:F;this.setValue(A,true)}G.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(A,B){},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(G,C,D,A){this._silent=A;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetValue=arguments;return false}if(this.isLocked()&&!D){return false}if(isNaN(G)){return false}var B=this.thumb;B.lastOffset=[G,G];var F,E;this.verifyOffset(true);if(B._isRegion){return false}else{if(B._isHoriz){this._slideStart();F=B.initPageX+G+this.thumbCenterPoint.x;this.moveThumb(F,B.initPageY,C)}else{this._slideStart();E=B.initPageY+G+this.thumbCenterPoint.y;this.moveThumb(B.initPageX,E,C)}}return true},setRegionValue:function(H,A,D,E,B){this._silent=B;this.valueChangeSource=this.SOURCE_SET_VALUE;if(!this.thumb.available){this.deferredSetRegionValue=arguments;return false}if(this.isLocked()&&!E){return false}if(isNaN(H)){return false}var C=this.thumb;C.lastOffset=[H,A];this.verifyOffset(true);if(C._isRegion){this._slideStart();var G=C.initPageX+H+this.thumbCenterPoint.x;var F=C.initPageY+A+this.thumbCenterPoint.y;this.moveThumb(G,F,D);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 H=this.thumb;var I=this;if(!H.available){return }H.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);var B=H.getTargetCoord(G,F);var C=[Math.round(B.x),Math.round(B.y)];this._slideStart();if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&H._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(){I.moveOneTick(C)},this.tickPause)}else{if(this.animate&&YAHOO.widget.Slider.ANIM_AVAIL&&!E){this.lock();var A=new YAHOO.util.Motion(H.id,{points:{to:C}},this.animationDuration,YAHOO.util.Easing.easeOut);A.onComplete.subscribe(function(){I.endMove()});A.animate()}else{H.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(B){var E=this.thumb,D;var F=null,A,G;if(E._isRegion){F=this._getNextX(this.curCoord,B);A=(F!==null)?F[0]:this.curCoord[0];F=this._getNextY(this.curCoord,B);G=(F!==null)?F[1]:this.curCoord[1];F=A!==this.curCoord[0]||G!==this.curCoord[1]?[A,G]:null}else{if(E._isHoriz){F=this._getNextX(this.curCoord,B)}else{F=this._getNextY(this.curCoord,B)}}if(F){this.curCoord=F;this.thumb.alignElWithMouse(E.getEl(),F[0]+this.thumbCenterPoint.x,F[1]+this.thumbCenterPoint.y);if(!(F[0]==B[0]&&F[1]==B[1])){var C=this;setTimeout(function(){C.moveOneTick(B)},this.tickPause)}else{this.endMove()}}else{this.endMove()}},_getNextX:function(A,B){var D=this.thumb;var F;var C=[];var E=null;if(A[0]>B[0]){F=D.tickSize-this.thumbCenterPoint.x;C=D.getTargetCoord(A[0]-F,A[1]);E=[C.x,C.y]}else{if(A[0]<B[0]){F=D.tickSize+this.thumbCenterPoint.x;C=D.getTargetCoord(A[0]+F,A[1]);E=[C.x,C.y]}else{}}return E},_getNextY:function(A,B){var D=this.thumb;var F;var C=[];var E=null;if(A[1]>B[1]){F=D.tickSize-this.thumbCenterPoint.y;C=D.getTargetCoord(A[0],A[1]-F);E=[C.x,C.y]}else{if(A[1]<B[1]){F=D.tickSize+this.thumbCenterPoint.y;C=D.getTargetCoord(A[0],A[1]+F);E=[C.x,C.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(C){var B=this.thumb;if(!C){B.cachePosition()}if(!this.isLocked()){if(B._isRegion){var E=B.getXValue();var D=B.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 A=B.getValue();if(A!=this.previousVal){if(!this._silent){this.onChange(A);this.fireEvent("change",A)}}this.previousVal=A}this._slideEnd()}},toString:function(){return("Slider ("+this.type+") "+this.id)}});YAHOO.augment(YAHOO.widget.Slider,YAHOO.util.EventProvider);YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,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 A=this.getEl(),E;if(!this.deltaOffset){var I=YAHOO.util.Dom.getXY(A);var F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];var B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);var K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);var D=B-E[0];var C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C]}}else{var J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);var G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]]}return E},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true}this._isHoriz=(D||C);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(E,B,D,A){var C=this,G=YAHOO.lang;this.minSlider=E;this.maxSlider=B;this.activeSlider=E;this.isHoriz=E.thumb._isHoriz;A=YAHOO.lang.isArray(A)?A:[0,D];A[0]=Math.min(Math.max(parseInt(A[0],10)|0,0),D);A[1]=Math.max(Math.min(parseInt(A[1],10)|0,D),0);if(A[0]>A[1]){A.splice(0,2,A[1],A[0])}var F={min:false,max:false};this.minSlider.thumb.onAvailable=function(){E.setStartSliderState();F.min=true;if(F.max){E.setValue(A[0],true,true,true);B.setValue(A[1],true,true,true);C.updateValue(true);C.fireEvent("ready",C)}};this.maxSlider.thumb.onAvailable=function(){B.setStartSliderState();F.max=true;if(F.min){E.setValue(A[0],true,true,true);B.setValue(A[1],true,true,true);C.updateValue(true);C.fireEvent("ready",C)}};E.onMouseDown=function(H){return C._handleMouseDown(H)};B.onMouseDown=function(H){if(C.minSlider.isLocked()&&!C.minSlider._sliding){return C._handleMouseDown(H)}else{YAHOO.util.Event.stopEvent(H);return false}};E.onDrag=B.onDrag=function(H){C._handleDrag(H)};E.subscribe("change",this._handleMinChange,E,this);E.subscribe("slideStart",this._handleSlideStart,E,this);E.subscribe("slideEnd",this._handleSlideEnd,E,this);B.subscribe("change",this._handleMaxChange,B,this);B.subscribe("slideStart",this._handleSlideStart,B,this);B.subscribe("slideEnd",this._handleSlideEnd,B,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(E,H,F,B,G){var C=this.minSlider,J=this.maxSlider,A=C.thumb,I=J.thumb,K=this,D={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(){D.min=true;if(D.max){K.updateValue(G);setTimeout(function(){K._cleanEvent(C,"slideEnd");K._cleanEvent(J,"slideEnd")},0)}});this._oneTimeCallback(J,"slideEnd",function(){D.max=true;if(D.min){K.updateValue(G);setTimeout(function(){K._cleanEvent(C,"slideEnd");K._cleanEvent(J,"slideEnd")},0)}});C.setValue(E,F,B,false);J.setValue(H,F,B,false)},setMinValue:function(C,E,F,B){var D=this.minSlider;this.activeSlider=D;var A=this;this._oneTimeCallback(D,"slideEnd",function(){A.updateValue(B);setTimeout(function(){A._cleanEvent(D,"slideEnd")},0)});D.setValue(C,E,F,B)},setMaxValue:function(A,E,F,C){var D=this.maxSlider;this.activeSlider=D;var B=this;this._oneTimeCallback(D,"slideEnd",function(){B.updateValue(C);setTimeout(function(){B._cleanEvent(D,"slideEnd")},0)});D.setValue(A,E,F,C)},updateValue:function(G){var B=this.minSlider.getValue(),H=this.maxSlider.getValue(),C=false;if(B!=this.minVal||H!=this.maxVal){C=true;var A=this.minSlider.thumb,J=this.maxSlider.thumb,D=this.isHoriz?"x":"y";var E=this.minSlider.thumbCenterPoint[D]+this.maxSlider.thumbCenterPoint[D];var F=Math.max(H-E-this.minRange,0);var I=Math.min(-B-E-this.minRange,0);if(this.isHoriz){F=Math.min(F,J.rightConstraint);A.setXConstraint(A.leftConstraint,F,A.tickSize);J.setXConstraint(I,J.rightConstraint,J.tickSize)}else{F=Math.min(F,J.bottomConstraint);A.setYConstraint(A.leftConstraint,F,A.tickSize);J.setYConstraint(I,J.bottomConstraint,J.tickSize)}}this.minVal=B;this.maxVal=H;if(C&&!G){this.fireEvent("change",this)}},selectActiveSlider:function(E){var B=this.minSlider,A=this.maxSlider,G=B.isLocked(),D=A.isLocked(),C=YAHOO.util.Event,F;if(G||D){this.activeSlider=G?A:B}else{if(this.isHoriz){F=C.getPageX(E)-B.thumb.initPageX-B.thumbCenterPoint.x}else{F=C.getPageY(E)-B.thumb.initPageY-B.thumbCenterPoint.y}this.activeSlider=F*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(F,C,K,G,H,B){var A,J;var D=YAHOO.widget,E=D.Slider,I=D.SliderThumb;A=new I(C,F,0,G,0,0,H);J=new I(K,F,0,G,0,0,H);return new D.DualSlider(new E(F,F,A,"horiz"),new E(F,F,J,"horiz"),G,B)};YAHOO.widget.Slider.getVertDualSlider=function(F,C,K,G,H,B){var A,J;var D=YAHOO.widget,E=D.Slider,I=D.SliderThumb;A=new I(C,F,0,0,0,G,H);J=new I(K,F,0,0,0,G,H);return new D.DualSlider(new E(F,F,A,"vert"),new E(F,F,J,"vert"),G,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 E=[];for(var D=0;D<A.length;D++){var F=A[D]();if(F){E.push(F)}}if(E.length>0){return E.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=/[, ]+/,F=document,q=window,u={was:"Raphael" in window,is:window.Raphael},E=function(){return K.apply(E,arguments)},B={},T={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},V={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"},W=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"];E.version="0.8.6";E.type=(window.SVGAngle||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");E.svg=!(E.vml=E.type=="VML");E.idGenerator=0;E.fn={};E.isArray=function(R){return Object.prototype.toString.call(R)=="[object Array]"};E.setWindow=function(R){q=R;F=q.document};E.hsb2rgb=function(AK,AI,AO){if(typeof AK=="object"&&"h" in AK&&"s" in AK&&"b" in AK){AO=AK.b;AI=AK.s;AK=AK.h}var AF,AG,AP;if(AO==0){return{r:0,g:0,b:0,hex:"#000"}}if(AK>1||AI>1||AO>1){AK/=255;AI/=255;AO/=255}var AH=Math.floor(AK*6),AL=(AK*6)-AH,AE=AO*(1-AI),AD=AO*(1-(AI*AL)),AQ=AO*(1-(AI*(1-AL)));AF=[AO,AD,AE,AE,AQ,AO,AO][AH];AG=[AQ,AO,AO,AD,AE,AE,AQ][AH];AP=[AE,AE,AQ,AO,AO,AD,AE][AH];AF*=255;AG*=255;AP*=255;var AM={r:AF,g:AG,b:AP},R=Math.round(AF).toString(16),AJ=Math.round(AG).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};E.rgb2hsb=function(R,AD,AJ){if(typeof R=="object"&&"r" in R&&"g" in R&&"b" in R){AJ=R.b;AD=R.g;R=R.r}if(typeof R=="string"){var AL=E.getRGB(R);R=AL.r;AD=AL.g;AJ=AL.b}if(R>1||AD>1||AJ>1){R/=255;AD/=255;AJ/=255}var AI=Math.max(R,AD,AJ),AE=Math.min(R,AD,AJ),AG,AF,AH=AI;if(AE==AI){return{h:0,s:0,b:AI}}else{var AK=(AI-AE);AF=AK/AI;if(R==AI){AG=(AD-AJ)/AK}else{if(AD==AI){AG=2+((AJ-R)/AK)}else{AG=4+((R-AD)/AK)}}AG/=6;if(AG<0){AG+=1}if(AG>1){AG-=1}}return{h:AG,s:AF,b:AH}};var O={},r=[];E.getRGB=function(R){if(R in O){return O[R]}var AL={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"},AH;if((R+"").toLowerCase() in AL){R=AL[R.toString().toLowerCase()]}if(!R){return{r:0,g:0,b:0,hex:"#000"}}if(R=="none"){return{r:-1,g:-1,b:-1,hex:"none"}}var AE,AF,AK,AI=(R+"").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(AI){if(AI[2]){AK=parseInt(AI[2].substring(5),16);AF=parseInt(AI[2].substring(3,5),16);AE=parseInt(AI[2].substring(1,3),16)}if(AI[3]){AK=parseInt(AI[3].substring(3)+AI[3].substring(3),16);AF=parseInt(AI[3].substring(2,3)+AI[3].substring(2,3),16);AE=parseInt(AI[3].substring(1,2)+AI[3].substring(1,2),16)}if(AI[4]){AI=AI[4].split(/\s*,\s*/);AE=parseFloat(AI[0]);AF=parseFloat(AI[1]);AK=parseFloat(AI[2])}if(AI[5]){AI=AI[5].split(/\s*,\s*/);AE=parseFloat(AI[0])*2.55;AF=parseFloat(AI[1])*2.55;AK=parseFloat(AI[2])*2.55}if(AI[6]){AI=AI[6].split(/\s*,\s*/);AE=parseFloat(AI[0]);AF=parseFloat(AI[1]);AK=parseFloat(AI[2]);return E.hsb2rgb(AE,AF,AK)}if(AI[7]){AI=AI[7].split(/\s*,\s*/);AE=parseFloat(AI[0])*2.55;AF=parseFloat(AI[1])*2.55;AK=parseFloat(AI[2])*2.55;return E.hsb2rgb(AE,AF,AK)}var AI={r:AE,g:AF,b:AK},AD=Math.round(AE).toString(16),AG=Math.round(AF).toString(16),AJ=Math.round(AK).toString(16);(AD.length==1)&&(AD="0"+AD);(AG.length==1)&&(AG="0"+AG);(AJ.length==1)&&(AJ="0"+AJ);AI.hex="#"+AD+AG+AJ;AH=AI}else{AH={r:-1,g:-1,b:-1,hex:"none"}}if(r.length>20){delete O[r.unshift()]}r.push(R);O[R]=AH;return AH};E.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};E.getColor.reset=function(){delete this.start};E.easing_formulas={linear:function(AF,R,AE,AD){return R+AE*AF}};E.easing=function(AG,AF,R,AE,AD){return E.easing_formulas[AG](AF,R,AE,AD)};var Y={},D=[];E.parsePathString=function(R){if(R in Y){return Y[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(D.length>20){delete Y[D.unshift()]}D.push(R);Y[R]=AD;return AD};var b=function(AN){var R=AN;if(typeof AN=="string"){R=E.parsePathString(AN)}R=X(R);var AI=[],AH=[],AD=0;for(var AF=0,AM=R.length;AF<AM;AF++){var AJ=R[AF];switch(AJ[0]){case"Z":break;case"A":AI.push(AJ[AJ.length-2]);AH.push(AJ[AJ.length-1]);break;default:for(var AE=1,AG=AJ.length;AE<AG;AE++){(AE%2?AI:AH).push(AJ[AE])}}}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}}},S=function(AG,AE){var AF=0.5522*AG,AD=this.isAbsolute,AI=this;if(AD){this.relatively();AD=function(){AI.absolutely()}}else{AD=function(){}}var AH={l:function(){return{u:function(){AI.curveTo(-AF,0,-AG,-(AG-AF),-AG,-AG)},d:function(){AI.curveTo(-AF,0,-AG,AG-AF,-AG,AG)}}},r:function(){return{u:function(){AI.curveTo(AF,0,AG,-(AG-AF),AG,-AG)},d:function(){AI.curveTo(AF,0,AG,AG-AF,AG,AG)}}},u:function(){return{r:function(){AI.curveTo(0,-AF,-(AF-AG),-AG,AG,-AG)},l:function(){AI.curveTo(0,-AF,AF-AG,-AG,-AG,-AG)}}},d:function(){return{r:function(){AI.curveTo(0,AF,-(AF-AG),AG,AG,AG)},l:function(){AI.curveTo(0,AF,AF-AG,AG,-AG,AG)}}}};AH[AE.charAt(0)]()[AE.charAt(1)]();AD();return AI},C=function(AF){var AL=[],AN=0,AM=0,AE=0;if(typeof AF=="string"){AF=E.parsePathString(AF)}if(AF[0][0]=="M"){AN=AF[0][1];AM=AF[0][2];AE++;AL.push(["M",AN,AM])}for(var AI=AE,AP=AF.length;AI<AP;AI++){var R=AL[AI]=[],AO=AF[AI];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 AH=1,AJ=AO.length;AH<AJ;AH++){R[AH]=+(AO[AH]-((AH%2)?AN:AM)).toFixed(3)}}}else{R=AL[AI]=[];for(var AG=0,AD=AO.length;AG<AD;AG++){AL[AI][AG]=AO[AG]}}var AK=AL[AI].length;switch(AL[AI][0]){case"z":break;case"h":AN+=+AL[AI][AK-1];break;case"v":AM+=+AL[AI][AK-1];break;default:AN+=+AL[AI][AK-2];AM+=+AL[AI][AK-1]}}AL.toString=AF.toString;return AL},X=function(AF){var AK=[];if(typeof AF=="string"){AF=E.parsePathString(AF)}var AM=0,AL=0,AE=0;if(AF[0][0]=="M"){AM=+AF[0][1];AL=+AF[0][2];AE++;AK[0]=["M",AM,AL]}for(var AI=AE,AO=AF.length;AI<AO;AI++){var R=AK[AI]=[],AN=AF[AI];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 AH=1,AJ=AN.length;AH<AJ;AH++){R[AH]=+AN[AH]+((AH%2)?AM:AL)}}}else{R=AK[AI]=[];for(var AG=0,AD=AN.length;AG<AD;AG++){AK[AI][AG]=AN[AG]}}switch(R[0]){case"Z":break;case"H":AM=R[1];break;case"V":AL=R[1];break;default:AM=AK[AI][AK[AI].length-2];AL=AK[AI][AK[AI].length-1]}}AK.toString=AF.toString;return AK},Z={},L=[],f=function(AH,AG){if((AH+AG) in Z){return Z[AH+AG]}var AF=[X(E.parsePathString(AH)),X(E.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(L.length>20){delete Z[L.unshift()]}L.push(AH+AG);Z[AH+AG]=AF;return AF},N=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 AK={angle:AE,type:"linear",dots:[],vector:[0,0,Math.cos(AE*Math.PI/180).toFixed(3),Math.sin(AE*Math.PI/180).toFixed(3)]},AL=1/(Math.max(Math.abs(AK.vector[2]),Math.abs(AK.vector[3]))||1);AK.vector[2]*=AL;AK.vector[3]*=AL;if(AK.vector[2]<0){AK.vector[0]=-AK.vector[2];AK.vector[2]=0}if(AK.vector[3]<0){AK.vector[1]=-AK.vector[3];AK.vector[3]=0}AK.vector[0]=AK.vector[0].toFixed(3);AK.vector[1]=AK.vector[1].toFixed(3);AK.vector[2]=AK.vector[2].toFixed(3);AK.vector[3]=AK.vector[3].toFixed(3);for(var AH=0,AN=AM.length;AH<AN;AH++){var R={},AJ=AM[AH].match(/^([^:]*):?([\d\.]*)/);R.color=E.getRGB(AJ[1]).hex;AJ[2]&&(R.offset=AJ[2]+"%");AK.dots.push(R)}for(var AH=1,AN=AK.dots.length-1;AH<AN;AH++){if(!AK.dots[AH].offset){var AD=parseFloat(AK.dots[AH-1].offset||0),AF=false;for(var AG=AH+1;AG<AN;AG++){if(AK.dots[AG].offset){AF=AK.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;AK.dots[AH].offset=AD+"%"}}}return AK}else{return AM}},j=function(){var AE,AD,AG,AF,R;if(typeof arguments[0]=="string"||typeof arguments[0]=="object"){if(typeof arguments[0]=="string"){AE=F.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]}}}},A=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]||{};A.call(this,R[AF],AE[AF]);break;default:R[AF]=AE[AF];break}}}};if(E.svg){E.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var H={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,AD,AF,R,AJ){var AI=this.isAbsolute?"A":"a";AI+=[parseFloat(AH).toFixed(3),parseFloat(AG).toFixed(3),0,AD,AF,parseFloat(R).toFixed(3),parseFloat(AJ).toFixed(3)].join(" ");var AE=this[0].getAttribute("d")||"";this.node.setAttribute("d",AE+AI);this.last.x=parseFloat(R);this.last.y=parseFloat(AJ);this.attrs.path=AE+AI;return this},cplineTo:function(AD,AK,AF){if(!AF){return this.lineTo(AD,AK)}else{var R={},AL=parseFloat(AD),AI=parseFloat(AK),AM=parseFloat(AF),AH=this.isAbsolute?"C":"c",AG=[+this.last.x+AM,+this.last.y,AL-AM,AI,AL,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:S,andClose:function(){var R=this[0].getAttribute("d")||"";this[0].setAttribute("d",R+"Z ");this.attrs.path=R+"Z ";return this}};var AB=function(AF,R,AH){AF=AF||{};var AD=F.createElementNS(AH.svgns,"path");if(AH.canvas){AH.canvas.appendChild(AD)}var AE=new M(AD,AH);AE.isAbsolute=true;for(var AG in H){AE[AG]=H[AG]}AE.type="path";AE.last={x:0,y:0,bx:0,by:0};if(R){AE.attrs.path=""+R;AE.absolutely();B.pathfinder(AE,AE.attrs.path)}if(AF){!AF.gradient&&(AF.fill=AF.fill||"none");AF.stroke=AF.stroke||"#000"}else{AF={fill:"none",stroke:"#000"}}g(AE,AF);return AE};var s=function(AI,AG,AJ){AG=N(AG);var AF=F.createElementNS(AJ.svgns,(AG.type||"linear")+"Gradient");AF.id="raphael-gradient-"+E.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=F.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",E.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 U=function(AD){if(AD.pattern){var R=AD.getBBox();AD.pattern.setAttribute("patternTransform","translate(".concat(R.x,",",R.y,")"))}};var g=function(AM,AT){var AP={"":[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]},AR=AM.node,AN=AM.attrs,AJ=AN.rotation,AG=function(Ab,Aa){Aa=AP[Aa.toString().toLowerCase()];if(Aa){var AY=Ab.attrs["stroke-width"]||"1",AV={round:AY,square:AY,butt:0}[Ab.attrs["stroke-linecap"]||AT["stroke-linecap"]]||0,AZ=[];for(var AW=0,AX=Aa.length;AW<AX;AW++){AZ.push(Aa[AW]*AY+((AW%2)?1:-1)*AV)}Aa=AZ.join(",");AR.setAttribute("stroke-dasharray",Aa)}};AM.rotate(0,true);for(var AQ in AT){if(!(AQ in T)){continue}var AO=AT[AQ];AN[AQ]=AO;switch(AQ){case"href":case"title":case"target":var AS=AR.parentNode;if(AS.tagName.toLowerCase()!="a"){var AE=F.createElementNS(AM.paper.svgns,"a");AS.insertBefore(AE,AR);AE.appendChild(AR);AS=AE}AS.setAttributeNS(AM.paper.xlink,AQ,AO);break;case"path":if(AM.type=="path"){AR.setAttribute("d","M0,0");B.pathfinder(AM,AO)}case"width":AR.setAttribute(AQ,AO);if(AN.fx){AQ="x";AO=AN.x}else{break}case"x":if(AN.fx){AO=-AN.x-(AN.width||0)}case"rx":case"cx":AR.setAttribute(AQ,AO);U(AM);break;case"height":AR.setAttribute(AQ,AO);if(AN.fy){AQ="y";AO=AN.y}else{break}case"y":if(AN.fy){AO=-AN.y-(AN.height||0)}case"ry":case"cy":AR.setAttribute(AQ,AO);U(AM);break;case"r":if(AM.type=="rect"){AR.setAttribute("rx",AO);AR.setAttribute("ry",AO)}else{AR.setAttribute(AQ,AO)}break;case"src":if(AM.type=="image"){AR.setAttributeNS(AM.paper.xlink,"href",AO)}break;case"stroke-width":AR.style.strokeWidth=AO;AR.setAttribute(AQ,AO);if(AN["stroke-dasharray"]){AG(AM,AN["stroke-dasharray"])}break;case"stroke-dasharray":AG(AM,AO);break;case"rotation":AM.rotate(AO,true);break;case"skewX":AM.skewY(AO);break;case"skewY":AM.skewY(AO);break;case"translation":var AH=(AO+"").split(AC);AM.translate((+AH[0]+1||2)-1,(+AH[1]+1||2)-1);break;case"scale":var AH=(AO+"").split(AC);AM.scale(+AH[0]||1,+AH[1]||+AH[0]||1,+AH[2]||null,+AH[3]||null);break;case"matrix":var AH=(AO+"").split(AC);AM.matrix(+AH[0]||1,+AH[1]||0,+AH[2]||0,+AH[3]||1,+AH[4]||0,+AH[5]||0);break;case"fill":var AF=(AO+"").match(/^url\(([^\)]+)\)$/i);if(AF){var AD=F.createElementNS(AM.paper.svgns,"pattern"),AL=F.createElementNS(AM.paper.svgns,"image");AD.id="raphael-pattern-"+E.idGenerator++;AD.setAttribute("x",0);AD.setAttribute("y",0);AD.setAttribute("patternUnits","userSpaceOnUse");AL.setAttribute("x",0);AL.setAttribute("y",0);AL.setAttributeNS(AM.paper.xlink,"href",AF[1]);AD.appendChild(AL);var AU=F.createElement("img");AU.style.position="absolute";AU.style.top="-9999em";AU.style.left="-9999em";AU.onload=function(){AD.setAttribute("width",this.offsetWidth);AD.setAttribute("height",this.offsetHeight);AL.setAttribute("width",this.offsetWidth);AL.setAttribute("height",this.offsetHeight);F.body.removeChild(this);B.safari()};F.body.appendChild(AU);AU.src=AF[1];AM.paper.defs.appendChild(AD);AR.style.fill="url(#"+AD.id+")";AR.setAttribute("fill","url(#"+AD.id+")");AM.pattern=AD;U(AM);break}delete AT.gradient;delete AN.gradient;if(typeof AN.opacity!="undefined"&&typeof AT.opacity=="undefined"){AR.style.opacity=AN.opacity;AR.setAttribute("opacity",AN.opacity)}if(typeof AN["fill-opacity"]!="undefined"&&typeof AT["fill-opacity"]=="undefined"){AR.style.fillOpacity=AM.attrs["fill-opacity"];AR.setAttribute("fill-opacity",AN["fill-opacity"])}case"stroke":AR.style[AQ]=E.getRGB(AO).hex;AR.setAttribute(AQ,E.getRGB(AO).hex);break;case"gradient":s(AR,AO,AM.paper);break;case"opacity":case"fill-opacity":if(AN.gradient){var R=F.getElementById(AR.getAttribute("fill").replace(/^url\(#|\)$/g,""));if(R){var AI=R.getElementsByTagName("stop");AI[AI.length-1].setAttribute("stop-opacity",AO)}break}default:var AK=AQ.replace(/(\-.)/g,function(AV){return AV.substring(1).toUpperCase()});AR.style[AK]=AO;AR.setAttribute(AQ,AO);break}}y(AM,AT);AM.rotate(AN.rotation,true)};var n=1.2;var y=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(F.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=F.createElementNS(R.paper.svgns,"tspan");AG&&AI.setAttribute("dy",AM*n);AG&&AI.setAttribute("x",AK.x);AI.appendChild(F.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*n);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 M=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}};M.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};M.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};M.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};M.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};M.prototype.hide=function(){this.node.style.display="none";return this};M.prototype.show=function(){this.node.style.display="block";return this};M.prototype.remove=function(){this.node.parentNode.removeChild(this.node)};M.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};M.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&&E.isArray(arguments[0])){var R={};for(var AD in arguments[0]){R[arguments[0][AD]]=this.attrs[arguments[0][AD]]}return R}if(arguments.length==2){var AE={};AE[arguments[0]]=arguments[1];g(this,AE)}else{if(arguments.length==1&&typeof arguments[0]=="object"){g(this,arguments[0])}}return this};M.prototype.toFront=function(){this.node.parentNode.appendChild(this.node);return this};M.prototype.toBack=function(){if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild)}return this};M.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};M.prototype.insertBefore=function(R){var AD=R.node;AD.parentNode.insertBefore(this.node,AD);return this};var c=function(AD,R,AH,AG){var AF=F.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 M(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 l=function(AE,R,AJ,AD,AH,AI){var AG=F.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 M(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 G=function(AD,R,AI,AH,AG){var AF=F.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 M(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 Q=function(AE,AI,R,AJ,AD,AH){var AG=F.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 M(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 k=function(AD,R,AH,AG){var AF=F.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 M(AF,AD);AE.attrs=AE.attrs||{};AE.attrs.x=R;AE.attrs.y=AH;AE.type="text";g(AE,{font:T.font,stroke:"none",fill:"#000",text:AG});return AE};var d=function(AD,R){this.width=AD||this.width;this.height=R||this.height;this.canvas.setAttribute("width",this.width);this.canvas.setAttribute("height",this.height);return this};var K=function(){var AF=j.apply(null,arguments),AE=AF.container,AD=AF.x,AI=AF.y,AG=AF.width,R=AF.height;if(!AE){throw new Error("SVG container not found.")}B.canvas=F.createElementNS(B.svgns,"svg");B.canvas.setAttribute("width",AG||512);B.width=AG||512;B.canvas.setAttribute("height",R||342);B.height=R||342;if(AE==1){F.body.appendChild(B.canvas);B.canvas.style.position="absolute";B.canvas.style.left=AD+"px";B.canvas.style.top=AI+"px"}else{if(AE.firstChild){AE.insertBefore(B.canvas,AE.firstChild)}else{AE.appendChild(B.canvas)}}AE={canvas:B.canvas,clear:function(){while(this.canvas.firstChild){this.canvas.removeChild(this.canvas.firstChild)}this.defs=F.createElementNS(B.svgns,"defs");this.canvas.appendChild(this.defs)}};for(var AH in B){if(AH!="create"){AE[AH]=B[AH]}}A.call(AE,AE,E.fn);AE.clear();AE.raphael=E;return AE};B.remove=function(){this.canvas.parentNode.removeChild(this.canvas)};B.svgns="http://www.w3.org/2000/svg";B.xlink="http://www.w3.org/1999/xlink";B.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(E.vml){E.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 H={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(AI,AH,AK,AR,AP,R){var AJ=(this.isAbsolute?0:this.last.x)+parseFloat(AP)-1,AT=(this.isAbsolute?0:this.last.y)+parseFloat(R)-1,AQ=this.last.x-1,AE=this.last.y-1,AM=(AQ-AJ)/2,AL=(AE-AT)/2,AO=(AK==AR?-1:1)*Math.sqrt(Math.abs(AI*AI*AH*AH-AI*AI*AL*AL-AH*AH*AM*AM)/(AI*AI*AL*AL+AH*AH*AM*AM)),AF=AO*AI*AL/AH+(AQ+AJ)/2,AD=AO*-AH*AM/AI+(AE+AT)/2,AS=AR?(this.isAbsolute?"wa":"wr"):(this.isAbsolute?"at":"ar"),AG=Math.round(AF-AI),AN=Math.round(AD-AH);AS+=[AG,AN,Math.round(AG+AI*2),Math.round(AN+AH*2),Math.round(AQ),Math.round(AE),Math.round(AJ),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)+R;this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"A":"a")+[AI,AH,0,AK,AR,AP,R];return this},cplineTo:function(R,AI,AE){if(!AE){return this.lineTo(R,AI)}else{var AJ=Math.round(parseFloat(R))-1,AH=Math.round(parseFloat(AI))-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,AJ-AK,AH,AJ,AH],AD=[this.last.x+AE,this.last.y,R-AE,AI,R,AI];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:S,andClose:function(){this.node.path=(this.Path+="x");this.attrs.path+="z";return this}};var AB=function(AG,AF,AJ){AG=AG||{};var AI=AA("group"),AH=AI.style;AH.position="absolute";AH.left=0;AH.top=0;AH.width=AJ.width+"px";AH.height=AJ.height+"px";AI.coordsize=AJ.coordsize;AI.coordorigin=AJ.coordorigin;var AE=AA("shape"),AK=AE.style;AK.width=AJ.width+"px";AK.height=AJ.height+"px";AE.path="";if(AG["class"]){AE.className="rvml "+AG["class"]}AE.coordsize=this.coordsize;AE.coordorigin=this.coordorigin;AI.appendChild(AE);var AD=new M(AE,AI,AJ);AD.isAbsolute=true;AD.type="path";AD.path=[];AD.last={x:0,y:0,bx:0,by:0,isAbsolute:true};AD.Path="";for(var R in H){AD[R]=H[R]}if(AF){AD.absolutely();AD.attrs.path="";B.pathfinder(AD,""+AF)}if(AG){AG.fill=AG.fill||"none";AG.stroke=AG.stroke||"#000"}else{AG={fill:"none",stroke:"#000"}}g(AD,AG);if(AG.gradient){s(AD,AG.gradient)}AD.setBox();AJ.canvas.appendChild(AI);return AD};var g=function(R,AE){var AD=R.node,AO=AD.style,AN,AI=R;R.attrs=R.attrs||{};for(var AH in AE){R.attrs[AH]=AE[AH]}AE.href&&(AD.href=AE.href);AE.title&&(AD.title=AE.title);AE.target&&(AD.target=AE.target);if(AE.path&&R.type=="path"){R.Path="";R.path=[];R.attrs.path="";B.pathfinder(R,AE.path)}if(AE.rotation!=null){R.rotate(AE.rotation,true)}if(AE.translation){AN=(AE.translation+"").split(AC);R.translate(AN[0],AN[1])}if(AE.scale){AN=(AE.scale+"").split(AC);R.scale(+AN[0]||1,+AN[1]||+AN[0]||1,+AN[2]||null,+AN[3]||null)}if(R.type=="image"&&AE.src){AD.src=AE.src}if(R.type=="image"&&AE.opacity){AD.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(AE.opacity*100)+")";AD.style.filter=(AD.filterMatrix||"")+(AD.filterOpacity||"")}AE.font&&(AO.font=AE.font);AE["font-family"]&&(AO.fontFamily='"'+AE["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,"")+'"');AE["font-size"]&&(AO.fontSize=AE["font-size"]);AE["font-weight"]&&(AO.fontWeight=AE["font-weight"]);AE["font-style"]&&(AO.fontStyle=AE["font-style"]);if(typeof AE.opacity!="undefined"||typeof AE["stroke-width"]!="undefined"||typeof AE.fill!="undefined"||typeof AE.stroke!="undefined"||AE["stroke-width"]||AE["stroke-opacity"]||AE["fill-opacity"]||AE["stroke-dasharray"]||AE["stroke-miterlimit"]||AE["stroke-linejoin"]||AE["stroke-linecap"]){R=R.shape||AD;var AM=(R.getElementsByTagName("fill")&&R.getElementsByTagName("fill")[0])||AA("fill");if("fill-opacity" in AE||"opacity" in AE){var AG=((+AE["fill-opacity"]+1||2)-1)*((+AE.opacity+1||2)-1);AG<0&&(AG=0);AG>1&&(AG=1);AM.opacity=AG}AE.fill&&(AM.on=true);if(typeof AM.on=="undefined"||AE.fill=="none"){AM.on=false}if(AM.on&&AE.fill){var AF=AE.fill.match(/^url\(([^\)]+)\)$/i);if(AF){AM.src=AF[1];AM.type="tile"}else{AM.color=E.getRGB(AE.fill).hex;AM.src="";AM.type="solid"}}R.appendChild(AM);var AL=(R.getElementsByTagName("stroke")&&R.getElementsByTagName("stroke")[0])||AA("stroke");if((AE.stroke&&AE.stroke!="none")||AE["stroke-width"]||typeof AE["stroke-opacity"]!="undefined"||AE["stroke-dasharray"]||AE["stroke-miterlimit"]||AE["stroke-linejoin"]||AE["stroke-linecap"]){AL.on=true}if(AE.stroke=="none"||typeof AL.on=="undefined"||AE.stroke==0){AL.on=false}if(AL.on&&AE.stroke){AL.color=E.getRGB(AE.stroke).hex}var AG=((+AE["stroke-opacity"]+1||2)-1)*((+AE.opacity+1||2)-1);AG<0&&(AG=0);AG>1&&(AG=1);AL.opacity=AG;AE["stroke-linejoin"]&&(AL.joinstyle=AE["stroke-linejoin"]||"miter");AL.miterlimit=AE["stroke-miterlimit"]||8;AE["stroke-linecap"]&&(AL.endcap={butt:"flat",square:"square",round:"round"}[AE["stroke-linecap"]]||"miter");AE["stroke-width"]&&(AL.weight=(parseFloat(AE["stroke-width"])||1)*12/16);if(AE["stroke-dasharray"]){var AJ={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};AL.dashstyle=AJ[AE["stroke-dasharray"]]||""}R.appendChild(AL)}if(AI.type=="text"){var AO=B.span.style,AK=AI.attrs;AK.font&&(AO.font=AK.font);AK["font-family"]&&(AO.fontFamily=AK["font-family"]);AK["font-size"]&&(AO.fontSize=AK["font-size"]);AK["font-weight"]&&(AO.fontWeight=AK["font-weight"]);AK["font-style"]&&(AO.fontStyle=AK["font-style"]);B.span.innerText=AI.node.string;AI.W=AK.w=B.span.offsetWidth;AI.H=AK.h=B.span.offsetHeight;AI.X=AK.x;AI.Y=AK.y+Math.round(AI.H/2);switch(AK["text-anchor"]){case"start":AI.node.style["v-text-align"]="left";AI.bbx=Math.round(AI.W/2);break;case"end":AI.node.style["v-text-align"]="right";AI.bbx=-Math.round(AI.W/2);break;default:AI.node.style["v-text-align"]="center";break}}};var P=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 s=function(AI,AH){AH=N(AH);AI.attrs=AI.attrs||{};var AD=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=E.getRGB(AH.dots[0].color).hex}if(typeof AH.dots[AH.dots.length-1].color!="undefined"){AG.color2=E.getRGB(AH.dots[AH.dots.length-1].color).hex}var AJ=[];for(var AE=0,AF=AH.dots.length;AE<AF;AE++){if(AH.dots[AE].offset){AJ.push(AH.dots[AE].offset+" "+E.getRGB(AH.dots[AE].color).hex)}}var R=typeof AH.dots[AH.dots.length-1].opacity=="undefined"?(typeof AD.opacity=="undefined"?1:AD.opacity):AH.dots[AH.dots.length-1].opacity;if(AJ.length){AG.colors.value=AJ.join(",");R=typeof AD.opacity=="undefined"?1:AD.opacity}else{AG.colors&&(AG.colors.value="0% "+AG.color)}AG.opacity=R;if(typeof AH.angle!="undefined"){AG.angle=(-AH.angle+270)%360}else{if(AH.vector){AG.angle=P.apply(null,AH.vector)}}if((AH.type+"").toLowerCase()=="radial"){AG.focus="100%";AG.focusposition="0.5 0.5"}}};var M=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}};M.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};M.prototype.setBox=function(AG,AH,AF){var AD=this.Group.style,AI=(this.shape&&this.shape.style)||this.node.style;AG=AG||{};for(var AJ in AG){this.attrs[AJ]=AG[AJ]}AH=AH||this._.rt.cx;AF=AF||this._.rt.cy;var AM=this.attrs,AP,AO,AQ,AL;switch(this.type){case"circle":AP=AM.cx-AM.r;AO=AM.cy-AM.r;AQ=AL=AM.r*2;break;case"ellipse":AP=AM.cx-AM.rx;AO=AM.cy-AM.ry;AQ=AM.rx*2;AL=AM.ry*2;break;case"rect":case"image":AP=AM.x;AO=AM.y;AQ=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("");AP=AM.x-Math.round(this.W/2);AO=AM.y-this.H/2;AQ=this.W;AL=this.H;break;case"path":if(!this.attrs.path){AP=0;AO=0;AQ=this.paper.width;AL=this.paper.height}else{var AK=b(this.attrs.path),AP=AK.x;AO=AK.y;AQ=AK.width;AL=AK.height}break;default:AP=0;AO=0;AQ=this.paper.width;AL=this.paper.height;break}AH=(AH==null)?AP+AQ/2:AH;AF=(AF==null)?AO+AL/2:AF;var AE=AH-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"?AP:-AE;this.Y=this.type=="text"?AO:-AN;this.W=AQ;this.H=AL;(AI.left!=-AE+"px")&&(AI.left=-AE+"px");(AI.top!=-AN+"px")&&(AI.top=-AN+"px")}else{(AD.left!=AE+"px")&&(AD.left=AE+"px");(AD.top!=AN+"px")&&(AD.top=AN+"px");this.X=AP;this.Y=AO;this.W=AQ;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");(AI.left!=AP-AE+"px")&&(AI.left=AP-AE+"px");(AI.top!=AO-AN+"px")&&(AI.top=AO-AN+"px");(AI.width!=AQ+"px")&&(AI.width=AQ+"px");(AI.height!=AL+"px")&&(AI.height=AL+"px");var AR=(+AG.r||0)/(Math.min(AQ,AL));if(this.type=="rect"&&this.arcsize!=AR&&(AR||this.arcsize)){var R=AA(AR?"roundrect":"rect");R.arcsize=AR;this.Group.appendChild(R);this.node.parentNode.removeChild(this.node);this.node=R;this.arcsize=AR;g(this,this.attrs);this.setBox(this.attrs)}}};M.prototype.hide=function(){this.Group.style.display="none";return this};M.prototype.show=function(){this.Group.style.display="block";return this};M.prototype.getBBox=function(){if(this.type=="path"){return b(this.attr("path"))}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};M.prototype.remove=function(){this[0].parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape)};M.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&&E.isArray(arguments[0])){var R={};for(var AD=0,AE=arguments[0].length;AD<AE;AD++){R[arguments[0][AD]]=this.attrs[arguments[0][AD]]}return R}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){s(this,AF.gradient)}if(AF.text&&this.type=="text"){this.node.string=AF.text}g(this,AF);this.setBox(this.attrs)}return this};M.prototype.toFront=function(){this.Group.parentNode.appendChild(this.Group);return this};M.prototype.toBack=function(){if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild)}return this};M.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};M.prototype.insertBefore=function(R){R.Group.parentNode.insertBefore(this.Group,R.Group);return this};var c=function(AD,AK,AJ,R){var AG=AA("group"),AF=AG.style,AE=AA("oval"),AI=AE.style;AF.position="absolute";AF.left=0;AF.top=0;AF.width=AD.width+"px";AF.height=AD.height+"px";AG.coordsize=AD.coordsize;AG.coordorigin=AD.coordorigin;AG.appendChild(AE);var AH=new M(AE,AG,AD);AH.type="circle";g(AH,{stroke:"#000",fill:"none"});AH.attrs.cx=AK;AH.attrs.cy=AJ;AH.attrs.r=R;AH.setBox({x:AK-R,y:AJ-R,width:R*2,height:R*2});AD.canvas.appendChild(AG);return AH};var l=function(AD,AK,AJ,AL,AG,R){var AH=AA("group"),AF=AH.style,AE=AA(R?"roundrect":"rect"),AM=(+R||0)/(Math.min(AL,AG));AE.arcsize=AM;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;AH.appendChild(AE);var AI=new M(AE,AH,AD);AI.type="rect";g(AI,{stroke:"#000"});AI.arcsize=AM;AI.setBox({x:AK,y:AJ,width:AL,height:AG,r:+R});AD.canvas.appendChild(AH);return AI};var G=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 M(AF,AH,R);AI.type="ellipse";g(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 Q=function(AD,R,AL,AK,AM,AG){var AH=AA("group"),AF=AH.style,AE=AA("image"),AJ=AE.style;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;AE.src=R;AH.appendChild(AE);var AI=new M(AE,AH,AD);AI.type="image";AI.attrs.x=AL;AI.attrs.y=AK;AI.attrs.w=AM;AI.attrs.h=AG;AI.setBox({x:AL,y:AK,width:AM,height:AG});AD.canvas.appendChild(AH);return AI};var k=function(AD,AL,AK,AM){var AH=AA("group"),AG=AH.style,AF=AA("shape"),AJ=AF.style,AN=AA("path"),R=AN.style,AE=AA("textpath");AG.position="absolute";AG.left=0;AG.top=0;AG.width=AD.width+"px";AG.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;AG.position="absolute";AG.left=0;AG.top=0;AG.width=AD.width;AG.height=AD.height;AE.string=AM;AE.on=true;AF.appendChild(AE);AF.appendChild(AN);AH.appendChild(AF);var AI=new M(AE,AH,AD);AI.shape=AF;AI.textpath=AN;AI.type="text";AI.attrs.x=AL;AI.attrs.y=AK;AI.attrs.w=1;AI.attrs.h=1;g(AI,{font:T.font,stroke:"none",fill:"#000"});AI.setBox();AD.canvas.appendChild(AH);return AI};var d=function(AE,R){var AD=this.canvas.style;this.width=AE||this.width;this.height=R||this.height;AD.width=this.width+"px";AD.height=this.height+"px";AD.clip="rect(0 "+this.width+"px "+this.height+"px 0)";this.canvas.coordsize=this.width+" "+this.height;return this};F.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{if(!F.namespaces.rvml){F.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}var AA=function(R){return F.createElement("<rvml:"+R+' class="rvml">')}}catch(z){var AA=function(R){return F.createElement("<"+R+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}var K=function(){var AF=j.apply(null,arguments),AD=AF.container,AJ=AF.x,AI=AF.y,AE=AF.width,AL,AK=AF.height;if(!AD){throw new Error("VML container not found.")}var AH=B.canvas=F.createElement("div"),AG=AH.style;AE=parseFloat(AE)||"512px";AK=parseFloat(AK)||"342px";B.width=AE;B.height=AK;B.coordsize=AE+" "+AK;B.coordorigin="0 0";B.span=F.createElement("span");AL=B.span.style;AH.appendChild(B.span);AL.position="absolute";AL.left="-99999px";AL.top="-99999px";AL.padding=0;AL.margin=0;AL.lineHeight=1;AL.display="inline";AG.width=AE+"px";AG.height=AK+"px";AG.position="absolute";AG.clip="rect(0 "+AE+"px "+AK+"px 0)";if(AD==1){F.body.appendChild(AH);AG.left=AJ+"px";AG.top=AI+"px";AD={style:{width:AE,height:AK}}}else{AD.style.width=AE;AD.style.height=AK;if(AD.firstChild){AD.insertBefore(AH,AD.firstChild)}else{AD.appendChild(AH)}}for(var R in B){AD[R]=B[R]}A.call(AD,AD,E.fn);AD.clear=function(){while(AH.firstChild){AH.removeChild(AH.firstChild)}};AD.raphael=E;return AD};B.remove=function(){this.canvas.parentNode.removeChild(this.canvas)};B.safari=function(){}}var I=(function(){if(F.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(F.attachEvent){return function(AH,AF,AE,AD){var AG=function(AI){return AE.call(AD,AI||q.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 w=W.length;w--;){(function(R){M.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(I(this.shape||this.node,R,AD,this))}return this};M.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]}})(W[w])}B.circle=function(R,AE,AD){return c(this,R,AE,AD)};B.rect=function(R,AG,AD,AE,AF){return l(this,R,AG,AD,AE,AF)};B.ellipse=function(R,AF,AE,AD){return G(this,R,AF,AE,AD)};B.path=function(AD,R){return AB(AD,R,this)};B.image=function(AF,R,AG,AD,AE){return Q(this,AF,R,AG,AD,AE)};B.text=function(R,AE,AD){return k(this,R,AE,AD)};B.drawGrid=function(AK,AJ,AL,AH,AG,AI,AE){AE=AE||"#000";var AM=["M",AK,AJ,"L",AK+AL,AJ,AK+AL,AJ+AH,AK,AJ+AH,AK,AJ],R=AH/AI,AD=AL/AG;for(var AF=1;AF<AI;AF++){AM=AM.concat(["M",AK,AJ+AF*R,"L",AK+AL,AJ+AF*R])}for(var AF=1;AF<AG;AF++){AM=AM.concat(["M",AK+AF*AD,AJ,"L",AK+AF*AD,AJ+AH])}return this.path({stroke:AE,"stroke-width":1},AM.join(","))};B.pathfinder=function(AH,AG){var AD={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=X(AG);for(var AE=0,AF=AG.length;AE<AF;AE++){var R=AG[AE].shift();AD[R].apply(AH,AG[AE]);AG[AE].unshift(R)}};B.set=function(R){return new J(R)};B.setSize=d;M.prototype.stop=function(){clearTimeout(this.animation_in_progress)};M.prototype.scale=function(AO,AN,AE,AD){if(AO==null&&AN==null){return{x:this._.sx,y:this._.sy,toString:function(){return this.x.toFixed(3)+" "+this.y.toFixed(3)}}}AN=AN||AO;!+AN&&(AN=AO);var AS,AQ,AR,AP,Ae=this.attrs;if(AO!=0){var AM=this.type=="path"?b(Ae.path):this.getBBox(),AJ=AM.x+AM.width/2,AG=AM.y+AM.height/2,Ad=AO/this._.sx,Ac=AN/this._.sy;AE=(+AE||AE==0)?AE:AJ;AD=(+AD||AD==0)?AD:AG;var AL=Math.round(AO/Math.abs(AO)),AI=Math.round(AN/Math.abs(AN)),AV=this.node.style,Ag=AE+(AJ-AE)*AL*Ad,Af=AD+(AG-AD)*AI*Ac;switch(this.type){case"rect":case"image":var AK=Ae.width*AL*Ad,AU=Ae.height*AI*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(E.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+AI?!!+AW[5]:!+AW[5])}else{for(var AZ=1,Ab=AW.length;AZ<Ab;AZ++){AW[AZ]*=(AZ%2)?Ad:Ac}}}var R=b(AX),AS=Ag-R.x-R.width/2,AQ=Af-R.y-R.height/2;AX=C(AX);AX[0][1]+=AS;AX[0][2]+=AQ;this.attr({path:AX.join(" ")});break}if(this.type in {text:1,image:1}&&(AL!=1||AI!=1)){if(this.transformations){this.transformations[2]="scale(".concat(AL,",",AI,")");this.node.setAttribute("transform",this.transformations.join(" "));AS=(AL==-1)?-Ae.x-(AK||0):Ae.x;AQ=(AI==-1)?-Ae.y-(AU||0):Ae.y;this.attr({x:AS,y:AQ});Ae.fx=AL-1;Ae.fy=AI-1}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11=".concat(AL,", M12=0, M21=0, M22=",AI,", 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=[AO,AN,AE,AD].join(" ");this._.sx=AO;this._.sy=AN}return this};E.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}};E.easing=function(AD,R){return E.easing_formulas[AD]?E.easing_formulas[AD](R):R};M.prototype.animate=function(AW,AO,AN,AF){clearTimeout(this.animation_in_progress);if(typeof AN=="function"||!AN){AF=AN||null;AN="linear"}var AR={},AD={},AL={},AK={x:0,y:0};if(typeof AN=="function"||!AN){AF=AN||null;AN="linear"}for(var AP in AW){if(AP in V){AR[AP]=this.attr(AP);(typeof AR[AP]=="undefined")&&(AR[AP]=T[AP]);AD[AP]=AW[AP];switch(V[AP]){case"number":AL[AP]=(AD[AP]-AR[AP])/AO;break;case"colour":AR[AP]=E.getRGB(AR[AP]);var AQ=E.getRGB(AD[AP]);AL[AP]={r:(AQ.r-AR[AP].r)/AO,g:(AQ.g-AR[AP].g)/AO,b:(AQ.b-AR[AP].b)/AO};break;case"path":var AG=f(AR[AP],AD[AP]);AR[AP]=AG[0];AD[AP]=AG[1];AL[AP]=[];for(var AT=0,AJ=AR[AP].length;AT<AJ;AT++){AL[AP][AT]=[0];for(var AS=1,AV=AR[AP][AT].length;AS<AV;AS++){AL[AP][AT][AS]=(AD[AP][AT][AS]-AR[AP][AT][AS])/AO}}break;case"csv":var R=(AW[AP]+"").split(AC),AI=(AR[AP]+"").split(AC);switch(AP){case"translation":AR[AP]=[0,0];AL[AP]=[R[0]/AO,R[1]/AO];break;case"rotation":AR[AP]=(AI[1]==R[1]&&AI[2]==R[2])?AI:[0,R[1],R[2]];AL[AP]=[(R[0]-AR[AP][0])/AO,0,0];break;case"scale":AW[AP]=R;AR[AP]=(AR[AP]+"").split(AC);AL[AP]=[(R[0]-AR[AP][0])/AO,(R[1]-AR[AP][1])/AO,0,0];break;case"matrix":AW[AP]=R;AR[AP]=(AR[AP]+"").split(AC);AL[AP]=[];for(var AT=0;AT<6;AT++){AL[AP][AT]=(R[AT]-AR[AP][AT])/AO}}AD[AP]=R}}}var AE=+new Date,AM=0,AH=this;(function AU(){var AY=new Date-AE,Ag={},Ae,AX;if(AY<AO){Ae=E.easing(AN,AY/AO);for(var Ac in AR){switch(V[Ac]){case"number":AX=+AR[Ac]+Ae*AO*AL[Ac];break;case"colour":AX="rgb("+[Math.round(AR[Ac].r+Ae*AO*AL[Ac].r),Math.round(AR[Ac].g+Ae*AO*AL[Ac].g),Math.round(AR[Ac].b+Ae*AO*AL[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*AO*AL[Ac][Aa][AZ]}AX[Aa]=AX[Aa].join(" ")}AX=AX.join(" ");break;case"csv":switch(Ac){case"translation":var Af=AL[Ac][0]*(AY-AM),Ad=AL[Ac][1]*(AY-AM);AK.x+=Af;AK.y+=Ad;AX=[Af,Ad].join(" ");break;case"rotation":AX=+AR[Ac][0]+Ae*AO*AL[Ac][0];AR[Ac][1]&&(AX+=","+AR[Ac][1]+","+AR[Ac][2]);break;case"scale":AX=[+AR[Ac][0]+Ae*AO*AL[Ac][0],+AR[Ac][1]+Ae*AO*AL[Ac][1],(2 in AW[Ac]?AW[Ac][2]:""),(3 in AW[Ac]?AW[Ac][3]:"")].join(" ")}break}if(Ac=="font-size"){Ag[Ac]=AX+"px"}else{Ag[Ac]=AX}}AH.attr(Ag);AH.animation_in_progress=setTimeout(AU);E.svg&&B.safari()}else{(AK.x||AK.y)&&AH.translate(-AK.x,-AK.y);AH.attr(AW);clearTimeout(AH.animation_in_progress);B.safari();(typeof AF=="function")&&AF.call(AH)}AM=AY})();return this};M.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==M||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==M||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 x in M.prototype){J.prototype[x]=(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}})(x)}J.prototype.attr=function(AD,AH){if(AD&&E.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}};E.registerFont=function(AD){if(!AD.face){return AD}this.fonts=this.fonts||{};var AF={w:AD.w,face:{},glyphs:{}},AE=AD.face["font-family"];for(var AI in AD.face){AF.face[AI]=AD.face[AI]}if(this.fonts[AE]){this.fonts[AE].push(AF)}else{this.fonts[AE]=[AF]}if(!AD.svg){AF.face["units-per-em"]=parseInt(AD.face["units-per-em"],10);for(var AG in AD.glyphs){var AH=AD.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 AD};B.getFont=function(AJ,AK,AD,AF){AF=AF||"normal";AD=AD||"normal";AK=+AK||{normal:400,bold:700,lighter:300,bolder:800}[AK]||400;var AG=E.fonts[AJ];if(!AG){var AE=new RegExp("(^|\\s)"+AJ.replace(/[^\w\d\s+!~.:_-]/g,"")+"(\\s|$)","i");for(var R in E.fonts){if(AE.test(R)){AG=E.fonts[R];break}}}var AH;if(AG){for(var AI=0,AL=AG.length;AI<AL;AI++){AH=AG[AI];if(AH.face["font-weight"]==AK&&(AH.face["font-style"]==AD||!AH.face["font-style"])&&AH.face["font-stretch"]==AF){break}}}return AH};B.print=function(AL,AK,AI,AD,AP){var AG=this.set(),AJ=(AI+"").split(""),R=0,AO="",AF;if(AD){AF=(AP||16)/AD.face["units-per-em"];for(var AH=0,AM=AJ.length;AH<AM;AH++){var AE=AH&&AD.glyphs[AJ[AH-1]]||{},AN=AD.glyphs[AJ[AH]];R+=AH?(AE.w||AD.w)+(AE.k&&AE.k[AJ[AH]]||0):0;AN&&AN.d&&AG.push(this.path({fill:"#000",stroke:"none"},AN.d).translate(R,0))}AG.scale(AF,AF,0,AK).translate(AL,(AP||16)/2)}return AG};E.ninja=function(){var R=window.Raphael;if(u.was){window.Raphael=u.is}else{try{delete window.Raphael}catch(AD){window.Raphael=void (0)}}return R};E.el=M.prototype;return E})();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 C=function(){D(".DL-site-wrapper").addClass("DL-js-enhanced")};var F=function(){DAYLIFE.Packages.load(["Modules","QuotesCarousels","PhotoZoom"])};var B=function(){D("a.DL-external").open_externally()};var E=function(){D(".DL-topic a").hover(function(){D(this).siblings().addClass("DL-active")},function(){D(this).siblings().removeClass("DL-active")})};var A=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(){C();F();B();E();A()})})($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(A,B){return this.get("/asset/constraint/"+A,{},B)},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,D,A,C,B){query={method:E,action:D,name:A,new_name:C};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(B),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(A,B,C){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateTheme",data:{theme_id:A,theme_name:B},success:this.makeCallback(C),dataType:"json"})},updateTheme:function(A,C,B){C.theme_id=A;$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateTheme",data:C,success:this.makeCallback(B),dataType:"json"})},createDraft:function(A,B,D){var C=(!A)?"":"/"+A;var E=(B)?{copy_name:B}:null;$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/ajax/create_draft"+C,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(A,B){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.deleteTheme",data:{theme_id:A},success:this.makeCallbackCode(B),dataType:"json"})},undeleteTheme:function(A,B,C){$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.undeleteTheme",data:{theme_id:A,site_id:B},success:this.makeCallbackCode(C),dataType:"json"})},choosePageTemplate:function(C,D,A){var B={template_group_name:C};if(D){B.ref_blueprint=D}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(A,B){data=this.encode_data(type,data);$DL.ajax({type:"POST",contentType:"application/x-www-form-urlencoded",url:"/edit/api/publisherapi.updateSite",data:{theme_id:A},success:this.makeCallback(B),dataType:"json"})},get_page_templates:function(A,B){var C={ref_blueprint:A};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(B),dataType:"json"})}};DAYLIFE.AssetModels=function(){var G=null;var A={};var C=null;var E=null;var F=null;var D=null;var B=null;return{destroy_models:function(){A={};C=null;E=null;F=null;D=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(!C){C=new DAYLIFE.AssetModels.CSS();C.getCSS()}return C},get_batch_data_sets:function(I,K,H,J){if(!E){E=new DAYLIFE.AssetModels.DataSets()}E.get_batch_data_sets(I,K,H,J);return E},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(!E){E=new DAYLIFE.AssetModels.DataSets()}E.get_page_layouts(H);return E},get_theme_manager:function(H){if(!F){F=new DAYLIFE.AssetModels.ThemeManager();F.load(H)}else{F.load(H)}return F},get_basics:function(){if(!D){D=new DAYLIFE.AssetModels.Basics()}return D},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(F,H){var D=this.getModule(F);var B=this;if(D.classname.indexOf(".css.")!=-1){var G=function(I){$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:save_module",[B,D]);if($DL.isFunction(H)){H(I)}};var A=this.serializeModule(F);var C=D.classname;var E="module_blueprint";if(A){if(this.simple_css_module_asset_exists){this.api.setAsset(C,E,A,null,{onSuccess:G})}else{this.api.addAsset(C,E,A,{onSuccess:G})}}return D}return false},saveRegion:function(E,H){var F=this.getRegion(E);var A,C,D;var B=this;var G=function(I){$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:save_region",[B,F]);if($DL.isFunction(H)){H(I)}if(F.is_new){F.is_new=false;if(!B.available_regions){B.available_regions=[]}B.available_regions.push(F)}B.remove_from_unsaved_regions(E)};if(F.asset_name){A=this.serializeRegion(E);C=F.asset_name;D="region_blueprint"}else{A=this.serializePageBlueprint();C=this.blueprint_id;D="page_blueprint"}if(A){if(F.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,E){var C=this.getRegion(B);if(C&&C.asset_name){var A=this;var D=function(F){if(A.available_regions){for(var G=A.available_regions.length-1;G>=0;G--){if(A.available_regions[G]==C){A.available_regions.splice(G,1);break}}}A.remove_from_unsaved_regions(B);for(var G=A.layout.regions.length-1;G>=0;G--){if(A.layout.regions[G]==C){A.layout.regions.splice(G,1);A.saveRegion(A.getContentRegionID());break}}delete A.regions[B];if($DL.isFunction(E)){E(F)}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:delete_region",[this,C])};this.api.deleteAsset(C.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 C=this.getLayout();var E=C.regions;for(var B=0;B<E.length;B++){var D=E[B];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[B].asset_data=this.serializeRegion(D.id)}}return A},serializeSlot:function(D,C){var E=this.getRegion(D);var F=E.slots[C];var A={name:F.name,modules:[]};for(var B=0;B<F.modules.length;B++){A.modules.push(this.serializeModule(F.modules[B].id))}return A},serializeModule:function(D){var C=this.getModule(D);var A={classname:C.classname,alias:C.alias,bindings:{}};for(var B in C.attribute_idx){var E=C.attribute_idx[B];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(F){var B=this,A=false,C=null,E=false;function D(){if(A&&C&&!E){E=true;B.loadBlueprint_new(C);if(F&&typeof F=="function"){F(B)}}}this.api.getConstraints(this.blueprint_id,{onSuccess:function(G){B.setConstraints(G);A=true;D()}});this.api.getConstraints("daylife.header",{onSuccess:function(G){B.setHeaderConstraints(G)}});this.api.getAsset(this.blueprint_id,"page_blueprint",{onSuccess:function(G){C=G.asset.data;D()}})},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,I,H){if(this.has_blueprint){var K=(A)?this.getRegionByAssetName(A):null;if(K){return K}}var J=(!this.has_blueprint&&!A&&H);I=I||((H&&H.alias)?H.alias:"New Region");A=(A||J)?A:$DL.dlid("region_");var C=(J)?false:true;var B=(H&&$DL.typeOf(H.bindings)=="object")?H.bindings:{};var E=(H&&$DL.typeOf(H.css_id)=="string")?H.css_id:"DL-"+A+"-region";K={slots:[],id:$DL.dlid(),asset_name:A,editable:true,region:I,removable:C,classname:A,bindings:B,alias:I,css_id:E};this.regions[K.id]=K;if(!H){var L=this.createSlot();K.slots.push(L);K.is_new=true}else{if(H.slots){var L,D;for(var G=0;G<H.slots.length;G++){L=this.createSlot(H.slots[G].name);K.slots.push(L);for(var F=0;F<H.slots[G].modules.length;F++){D=this.createModule(H.slots[G].modules[F].classname,H.slots[G].modules[F].alias,H.slots[G].modules[F].bindings);if(!D){continue}else{L.modules.push(D)}}}}}return K},createSlot:function(A){A=A||"New Section";var B={name:A,id:$DL.dlid(),modules:[]};this.slots[B.id]=B;return B},createModule:function(G,E,H){if(!G){return false}E=E||"Untitled";if(this.constraints.module_classes[G]==undefined){return false}var A=$DL.deepCopy(this.constraints.module_classes[G].attributes);var F=this.constraints.module_classes[G].description||"No description has been provided for this module.";var B=this.constraints.module_classes[G].name;var D={id:$DL.dlid(),classname:G,name:B,description:F,alias:E,attributes:A,attribute_idx:{}};for(var C=0;C<D.attributes.simple.length;C++){D.attribute_idx[D.attributes.simple[C].id]=D.attributes.simple[C]}for(var C=0;C<D.attributes.advanced.length;C++){D.attribute_idx[D.attributes.advanced[C].id]=D.attributes.advanced[C]}if(H){for(id in H){if(H[id]){if(D.attribute_idx[id]){D.attribute_idx[id].value=(typeof (H[id])=="object"?H[id].value:H[id])}}}}this.modules[D.id]=D;return D},loadBlueprint_new:function(C,F){this.classname=C.classname;this.bindings=C.bindings;this.css_files=C.css_files;this.page_group=C.page_group;this.template_classname=C.template_classname;this.name=C.name;this.query=C.query;this.meta=C.meta||{};this.custom_hero_image=C.custom_hero_image;var D={regions:[]};var E,B;for(var A=0;A<C.regions.length;A++){B=C.regions[A].asset_data.alias||C.regions[A].region;E=this.createRegion(C.regions[A].asset_name,B,C.regions[A].asset_data);D.regions.push(E)}this.layout=D;$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:load_blueprint",[this]);this.has_blueprint=true;if($DL.isFunction(F)){F(this)}return D},getLayoutClasses:function(){return this.constraints.layouts},getLayout:function(){return this.layout},hasBlueprint:function(){return this.has_blueprint},getBlueprintQuery:function(){return this.query},getModuleRegion:function(C){for(id in this.regions){var D=this.regions[id];for(var B=D.slots.length-1;B>=0;B--){var E=D.slots[B];for(var A=E.modules.length-1;A>=0;A--){if(E.modules[A].id==C){return D}}}}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,C){var B=this.getRegion(A);if(B){B.css_id=C}return B},getRegionLayout:function(D){var C=[],E=this.getRegion(D),G,F;for(var B=0;B<E.slots.length;B++){G=E.slots[B];F=G.modules;slot_schema={slot_id:G.id,slot_name:G.name,modules:[]};for(var A=0;A<F.length;A++){slot_schema.modules.push(F[A].id)}C.push(slot_schema)}return C},updateRegionLayout:function(E,D){if(this.regions[E]&&D&&$DL.typeOf(D)=="array"){var A=[];for(var C=0;C<D.length;C++){var G=this.getSlot(D[C].slot_id);A.push(G);var F=[];for(var B=0;B<D[C].modules.length;B++){F.push(this.getModule(D[C].modules[B]))}G.modules=F;G.name=D[C].slot_name}this.regions[E].slots=A;this.add_to_unsaved_regions(E);$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_region_layout",[this,this.layout.regions[C]])}return this.getRegion(E)},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(D){var B=[];for(var C=0;C<D.length;C++){B.push(this.getRegion(D[C]))}this.layout.regions=B;var A=this.getContentRegionID();this.add_to_unsaved_regions(A);$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_page_layout",[this,this.layout.regions]);return A},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(B){var A=null;if(!B){return this.getRegion()}for(var C in this.regions){if(this.regions[C].asset_name==B){return this.regions[C]}}return A},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,D){var E=F.slots;for(var C=0;C<E.length;C++){var B=E[C].modules;for(var A=0;A<B.length;A++){if(D.id==B[A].id){return{slot_index:C,position:A}}}}return null},restoreModuleDefaults:function(C){var A=this.modules[C];var B=this.createModule(A.classname,A.alias);A.attributes=B.attributes;A.attribute_idx=B.attribute_idx;delete this.modules[B.id];$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:restore_module_defaults",[this,A])},getModuleAttributeValue:function(C,A){var B=this.modules[C];if(B.attribute_idx[A]){return B.attribute_idx[A].value}else{return null}},updateModuleAttributes:function(C,G,H,F){var A=this.modules[C];var D;var E=[];for(var B in G){D=A.attribute_idx[B];if(D===undefined){continue}D.value=G[B];E.push(D.name)}var I=this.getModuleRegion(C);if(I){this.add_to_unsaved_regions(I.id)}$DL(document).trigger("DAYLIFE:AssetModels:Blueprint:update_module_attributes",[this,A,G,H,F]);return A},getGlue:function(){return this.constraints.glue},getTrait:function(A){var G=this.constraints.trait_pattern.split("/").slice(1);var A=A.split("/").slice(1);var D={};var F=Math.min(A.length,G.length);for(var C=0;C<F;C++){if(G[C].charAt(0)==":"){var B=G[C].slice(1);D[B]=A[C]}else{if(G[C].charAt(0)=="*"){var B=G[C].slice(1);var E=A.slice(C).join("/");D[B]=E;return D}else{if(G[C]!=A[C]){break}}}}return D}};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 D=0;D<this.css_to_commit.length;D++){var C=this.css_to_commit[D];var B=this.css[C];if(B&&B.states.length>0){var A=(C=="page")?DAYLIFE_Globals.page_id+".css":C+".css";var E=B.states[B.states.length-1];if(B.asset_exists){this.api.setAsset(A,"css",E)}else{this.api.addAsset(A,"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(C,B){var A=this.css[C].states;if(A){A.push(B);if($DL.inArray(C,this.css_to_commit)==-1){this.css_to_commit.push(C)}}}};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","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},gallery:{name:"SmartGalleries Gallery",sets:{},site_asset:true}};this.update_custom_pages_queue=[]};$DL(document).ready(function(){var B=$DL;var A=function(H,E,D,G){var F="daylife.page.custom.";if(E=="custom_page_blueprint"&&D.indexOf(F)==0){var C=DAYLIFE.AssetModels.get_custom_pages(function(J,I){B(document).trigger("DAYLIFE:AssetModels:DataSets:updated_custom_pages",[I,J,H.type,D,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,I,G,A){var K=this;var H=[];var C=E.length;var B=0;for(var J=0;J<E.length;J++){var F=E[J];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((J==C-1)&&B==C){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:load_data_sets",[this]);if(I&&typeof I=="function"){I(this.data_sets,this)}}}if(H.length){this.api.getBatchAssets(H,{onSuccess:function(M,L){K.complete_get_batch_data_sets(M,L,I)}})}},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(D,A,B,G){var F="custom";var E={};var C={classname:D,name:A,query:B,page_group:F,bindings:E};this.datasets_model.save_asset("page_blueprint",D,data,G)},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(B,C){var G=this.data_sets.css.blueprints;var E=new Array();for(var D=0;D<G.assets.length;D++){var F=G.assets[D];if($DL.inArray(F.asset_name,B)!=-1&&$DL.inArray(C,F.data.css_files||[])==-1){if(!F.data.css_files){F.data.css_files=new Array()}F.data.css_files.push(C);E.push(F)}if($DL.inArray(F.asset_name,B)==-1&&$DL.inArray(C,F.data.css_files||[])!=-1){var A=F.data.css_files.indexOf(C);F.data.css_files.splice(A,1);E.push(F)}}return E},modify_blueprints:function(E,C,A,B,D){this.api.modifyBlueprints(E,C,A,B,{onSuccess:function(F){if(D&&typeof D=="function"){D(F)}}})},add_item_to_data_set:function(D,C,B,F){var A=this;var E=this.data_sets[D].sets[C];if(this.validate_add_item(D,C,B)){E.items.push(B);this.api.setAsset(C,D,E,"",{onSuccess:function(G){A.data_sets[D].sets[C]=E;$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_item_to_data_set",[D,C]);if(F&&typeof F=="function"){F(G)}}})}},add_filter:function(D,C,B,F){DAYLIFE.log(["add_source_filter",D,C,B,F]);var A=this;var E={items:B};this.api.addAsset(C,D,E,{onSuccess:function(G){DAYLIFE.log(["add_filter success",D,C,B,F]);A.data_sets[D].sets[C]=E;if(F&&typeof F=="function"){F(G)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_filter",[D,C])}})},update_filter:function(D,C,B,F){var A=this;var E={items:B};this.api.setAsset(C,D,E,"",{onSuccess:function(G){DAYLIFE.log(["update_filter success",D,C,B,F]);A.data_sets[D].sets[C]=E;if(F&&typeof F=="function"){F(G)}$DL(document).trigger("DAYLIFE:AssetModels:DataSets:update_filter",[D,C])}})},update_item_in_data_set:function(E,C,G,B){var F=this.data_sets[E].sets[C];var A=F.items;for(var D=0;D<A.length;D++){if(A[D].id==G){break}}},validate_add_item:function(D,B,A){DAYLIFE.log(["validate_add_item",D,B,A,this.data_sets[D]]);var F=this.data_sets[D].sets[B];if(D=="source_filter"){for(var C=F.items.length-1;C>=0;C--){var E=F.items[C];if(E.id==A.id){$DL(document).trigger("DAYLIFE:AssetModels:DataSets:add_item_to_data_set",[D,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(B,D,C){var A=this;this.api.choosePageTemplate(B,D,{onSuccess:function(E){if(C&&typeof C=="function"){C(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(C,D,I,F,J,H,B,G,K,E){var L=this;var A="add_custom_page";data={name:C,url:D,query:I,template_type:J,shared_template_asset_name:H,use_layout_from:B,template_name:G,custom_hero_image:F};this.make_custom_page_call(A,data,K,E)},update_custom_page:function(B,D,E,J,H,K,I,C,G,L,F){var M=this;var A="update_custom_page";data={asset_name:B,name:D,url:E,query:J,template_type:K,shared_template_asset_name:I,use_layout_from:C,template_name:G,custom_hero_image:H};this.make_custom_page_call(A,data,L,F)},delete_custom_page:function(C,D,B){var A=this;var E="delete_custom_page";data={asset_name:C};this.make_custom_page_call(E,data,D,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(G,H){var C=this.active_theme_id;var B=function(I){if(I.theme_id==C){return false}if(G){return I.published_on}else{return !I.published_on}};var F=function(J,I){return I.published_on-J.published_on};var E=function(J,I){return I.modified_on-J.modified_on};var D=function(I){if($DL.isFunction(H)){var J=$DL.grep(I,B);if(G){J.sort(F)}else{J.sort(E)}H(J)}};if(!this.ready){var A=this;this.get_themes(function(){C=A.active_theme_id;D(A.themes)})}else{D(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(D,G){var F=[];for(var E=0;E<D.length;E++){if(D[E].theme_id!=G){F.push(D[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(E,G){for(var F=0;F<E.length;F++){if(E[F].theme_id==G){return E[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 D;for(var C=this.themes.length-1;C>=0;C--){if(this.themes[C].theme_id==A){D=this.themes[C];this.themes.splice(C,1);this.deleted_themes.push(D);break}}this.api.deleteTheme(A,{onSuccess:function(F){if(F=="7001"){if(E&&typeof E=="function"){E(D)}}}})},undelete_my_theme:function(A,E){var B=this;var D;for(var C=this.deleted_themes.length-1;C>=0;C--){if(this.deleted_themes[C].theme_id==A){D=this.deleted_themes[C];this.deleted_themes.splice(C,1);this.themes.push(D);break}}this.api.undeleteTheme(A,this.site_id,{onSuccess:function(F){if(F=="7001"){if(E&&typeof E=="function"){E(D)}}}})},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(B,C){var A=this;if(this.site_info){if(C&&typeof C=="function"){C(this.site_info)}return this.site_info}else{this.api.getSiteByDomain(B,{onSuccess:function(D){if(D.site){A.site_info=D.site;if(C&&typeof C=="function"){C(D.site)}}}});return false}},update_site_info:function(C,D){var A=this;var B=this.site_info.site_name;A.api.updateSite(C,{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(D&&typeof D=="function"){D(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(A,D,C){var B=this;if(this.page_templates[A]&&!C){if(D&&typeof D=="function"){D(this.page_templates[A])}return this.page_templates[A]}else{this.api.get_page_templates(A,{onSuccess:function(E){B.page_templates[A]=E;B.update_related_pages_data(A,E);if(D&&typeof D=="function"){D(B.page_templates[A])}}});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(A,D){var B;var F=["daylife.page.custom","daylife.page.topic"];for(var C=F.length-1;C>=0;C--){if(A.indexOf(F[C])==0){B=F[C]}}for(var E in this.page_templates){if(E.indexOf(B)==0&&E!=A){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(A,F,D,E,C){var B=this;$DL.ajax({url:"/ajax/page_template/"+F,data:D,type:"POST",dataType:"json",success:function(G,H){if(G.response.code.toString()=="7001"){B.page_templates[A]=G.response.payload;B.update_related_pages_data(A,G.response.payload);$DL(document).trigger("DAYLIFE:AssetModels:PageTemplates:update_page_templates",[B,A,B.page_templates[A]]);if(E&&typeof E=="function"){E(B.page_templates[A])}}else{if(G.response.code.toString()=="-7001"){if(C&&typeof C=="function"){C(G.response.message)}}}},error:function(){if(C&&typeof C=="function"){C(D.response.message)}}})},update_shared_template:function(M,E,F,D,K,H,B,I,J,C){var L=this;var G=$DL.serializeSearch()["__themeid"];var A="update_shared_template";H=(H)?this.api.jsonEncode(H):null;B=(B)?this.api.jsonEncode(B):null;data={theme_id:G,template_asset_name:E,alias:F,css_id:D,css_class:K,topic_filter_data:H,custom_pages_data:B};if(I){data.force_update=true}this.make_call(M,A,data,J,C)},update_standalone_template:function(E,H,D,F,C){var B=this;var A=$DL.serializeSearch()["__themeid"];var G="update_standalone_template";data={theme_id:A,template_asset_name:E,css_id:H,css_class:D};this.make_call(E,G,data,F,C)},add_custom_page_to_shared_template:function(E,D,F,C){var B=this;var A=$DL.serializeSearch()["__themeid"];var G="add_custom_page_to_shared_template";data={theme_id:A,template_asset_name:E,custom_page_asset_name:D};this.make_call(E,G,data,F,C)},add_shared_template:function(M,F,E,K,B,H,C,I,J,D){var L=this;var G=$DL.serializeSearch()["__themeid"];var A="add_shared_template";data={theme_id:G,ref_blueprint:M,alias:F,css_id:E,css_class:K};if(I){data.force_update=true}if(H){data.topic_filter_data=this.api.jsonEncode(H)}if(C){data.custom_pages_data=this.api.jsonEncode(C)}if(B){data.use_layout_from=B}this.make_call(M,A,data,J,D)},delete_template:function(B,E,F,D){var C=this;var A=$DL.serializeSearch()["__themeid"];var G="delete_template";data={theme_id:A,template_asset_name:E};this.make_call(B,G,data,F,D)}};DAYLIFE.Packages.Modals=function(){var F=$DL;var G={};var A,C,I,B,E,D;$DL(document).ready(function(){A=$DL(".DL-modal-base");C=$DL(".DL-modal-shield");I=$DL(".DL-modal-container");B=$DL(".DL-site-wrapper");E=B.offset();D=B.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,F.make("div",{className:"DL-mask"}),F.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 M=($DL(window).height())-100;var J=($DL(window).width())-100;this.$node.css({width:"auto",height:"auto"});var O=this.$node.width();var L=this.$node.height();var N,K;if(O>J){N=50;this.$node.width(J)}else{N=Math.floor((J+100-O)/2)}if(L>M){K=50;this.$node.height(M)}else{if(this.opts.fixed_top){K=this.opts.fixed_top}else{K=Math.floor((M-L)/2)}this.$node.height(L)}this.$node.css({left:N+"px",top:K+"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(L){var K=function(N){return L.indexOf(N)!=-1};var M=this;var J=this.$content;if(K("get_invited")){$DL("input[name=rurl]",J).val(window.location);$DL(".DL-get-invited-join form",J).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",J);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,M){var L=M.target;var J=$DL(L);switch(L.tagName.toLowerCase()){case"a":if(J.hasClass("DL-close-modal")){this.close();M.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(C){DAYLIFE.Packages.load(["Modals"]);var H=function(J){if(!B){C.include(DAYLIFE_Globals.js_path+"/daylife/blueprint.js",{complete:function(){C.blueprint_ready(function(){C.include(DAYLIFE_Globals.wizard_path+"/js/jquery-validate/jquery.validate.js",{complete:function(){C.include(DAYLIFE_Globals.wizard_path+"/js/editors_manager.js",{complete:function(){C.include(DAYLIFE_Globals.wizard_path+"/js/editors.edit_content.js",{complete:function(){B=true;if(C.isFunction(J)){J()}}})}})}})})}})}else{if(C.isFunction(J)){J()}}};var B=false;var D=function(J){var K=DAYLIFE.AssetModels.get_blueprint_model();var L=J.get_embeddable_version_classname();if(L!=J.classname){return K.createModuleFromClass(L)}else{return K.createModuleFromInstance(J.id)}};var A=function(N){N.preventDefault();var L=C(this);var J=L.module();var K=D(J);var M={preview_dimensions:{height:J.$node.height(),width:J.$node.width()}};C.open_embed_interface(K.id,M)};var E="DL-embed-modal";var F=function(K,L){var J=DAYLIFE.AssetModels.get_blueprint_model();this.module=J.createModuleFromInstance(K);this.original_module=J.getModule(K);this.rendered_original_module=C.module(this.original_module.id,true).module(this.original_module.id);this.opts=C.extend({editor:"Module"},L);this.rendered_module=C.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);C(".DL-module-container",this.$div_module_preview).append(L);var K=this.set_rendered_module_width();this.display_module_loading_message(K);C.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",C.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",C.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",C.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",C.rescope(J.refresh_module_with_collection,J));C(document).unbind("DAYLIFE:Modal:close").bind("DAYLIFE:Modal:close",C.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",C.rescope(J.connect_with_manage_pinned_content_editor,J))},make_node:function(){var K=C.make("div",{className:"DL-embed-content-wrapper"},[this.make_div_embed_code()]);if(this.include_preview){K.append(this.make_div_module_preview())}var J=C.make("div",{className:E},[this.make_header(),K]);return J},make_header:function(){this.$header=C.make("h1","");return this.$header},make_div_embed_code:function(){this.$div_embed_code=C.make("div",{className:"DL-customize-module-grab"},[C.make("form",{className:"DL-pasteblob"},[C.make("h2","Here's Your Embed Code"),C.make("div",{className:"DL-embed-text"},["To embed this widget, simply copy and paste the code below into your website's ",C.make("strong","<HEAD>"),":"]),C.make("textarea",{className:"DL-input-text DL-pasteblob DL-head-code"},"Loading..."),C.make("div",{className:"DL-embed-text"},["And insert this small placeholder where you want the widget to appear:"]),C.make("textarea",{className:"DL-input-text DL-pasteblob DL-placeholder"},"Loading..."),C.make("div",{className:"DL-customize-module-text"},[C.make("a",{href:"#"},"« Back to Customization Options ")])])]);C("a",this.$div_embed_code).click(C.rescope(this.customize_module,this));return this.$div_embed_code},make_div_module_preview:function(){this.$div_module_preview=C.make("div",{className:"DL-customize-module-preview"},[C.make("h2",{className:"DL-module-preview-header"},"Live Preview"),C.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 C.inArray(this.module.attribute_idx.display_size.value,J)==-1}return false},modify_rendered_module:function(L){var M="DL-active";var J=this.is_topic_content_widget();DAYLIFE.log(["is_topic_content_widget",J]);if(!J){M=""}if(this.module.classname.indexOf("daylife.embed.")!=-1&&this.module.classname.indexOf("_integration_module")!=-1){var N=$DL.make("div",{className:"DL-embed-title"},[this.module.attribute_idx.module_title.value]);var P=$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 K=$DL.make("div",{className:"DL-embed-content"},L.$node);var O=$DL.make("div",{className:"DL-embed-module DL-embed-size-"+this.opts.attributes.display_size},[N,P,K]);return O}return L.$node},adjust_number_of_topics:function(){var J=C(".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=C(".DL-module-container",this.$div_module_preview);var K=C("a",J);K.each(function(){C(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 S=this;var K=this.$collection_chooser;var O=C(".DL-collection-chooser",K);var Q=C(".DL-collection-choice",O);var L=C.make("span",{className:"left_arrow DL-disabled"},"<<");var J=C.make("span",{className:"right_arrow"},">>");var P=0;var R=4;var N=0;Q.each(function(){N+=C(this).outerWidth(true)});if(N>0){O.width(N)}var M=function(V){var U=parseInt(O.css("left"));var T=K.outerWidth(true);DAYLIFE.log(["Toggle",U,T,N,V]);if(N+(U-V)<T){J.addClass("DL-disabled")}else{J.removeClass("DL-disabled")}if(U-V>-10){L.addClass("DL-disabled")}else{L.removeClass("DL-disabled")}};if(N>K.width()){O.before(L);O.after(J);O.addClass("DL-scroll");J.click(function(){if(!J.hasClass("DL-disabled")){var T=0;for(var U=0;U<R;U++){if(P+U<Q.length-1){T+=Q.eq(P+U).outerWidth(true)}}O.animate({left:"-="+T+"px"},500);P+=R;M(T)}});L.click(function(){if(!L.hasClass("DL-disabled")){var T=0;for(var U=R;U>0;U--){if(P-U>=0){T+=Q.eq(P-U).outerWidth(true)}}O.animate({left:"+="+T+"px"},500);P-=R;M(0-T)}});M(0)}},move_collection_chooser:function(){var J=C(".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,Q,M){var V={};var R=this.rendered_module;var S=C(".DL-active",this.$collection_chooser).data("collection_id");var P=C(".DL-active",this.$collection_chooser).data("collection_meta");var N=C(".DL-active",this.$collection_chooser).data("collection_metatype");var K=P.name;var L=DAYLIFE_Globals.page_traits;var J;if(N=="custom_page"){K='"'+K+'" Custom Page';var O="daylife.page.custom.";var U=S.replace(O,"");J=this.add_themeid_to_url(C.navigator().url_for("custom",{page_name:U}))}else{if(N=="topic"){var W=encodeURIComponent(K.replace(" ","_"));K='"'+K+'" Topic Page';J=this.add_themeid_to_url(C.navigator().url_for("topic",{id:W}))}else{if(N=="home_page"){J=this.add_themeid_to_url(C.navigator().url_for("home"))}}}var T=C.make("span",["Live Preview ",C.make("span",{className:"DL-preview-link"},["(",C.make("a",{href:J},"or view this module on the "+K).open_externally(),")"]),]);if(N=="template"){C(".DL-preview-link",T).remove()}C(".DL-module-preview-header",this.$div_module_preview).html(T);this.opts.attributes.id=S;this.opts.attributes.blueprint=S;this.update_embedded_module_attributes();if(M){V.content_order=this.editapi.jsonEncode(M)}R.refresh_module(R.make_module_url(null,V,true,{use_glue:false}),10002)},refresh_module_on_page:function(S,O){var Q=DAYLIFE.AssetModels.get_blueprint_model();var R=[C.modules("daylife.topic.topic_collection_module"),C.modules("daylife.topic.template_collection_module"),C.modules("daylife.home.home_page_collection_module"),C.modules("daylife.custom.custom_page_collection_module")];var L=DAYLIFE_Globals.page_traits;var N=L.controller;var T=DAYLIFE_Globals.page_id;var P=this.check_collection_on_page(T);if(!P){P=this.check_collection_on_page(DAYLIFE_Globals.meta_substitutions.topic_id)}if(!P){P=this.check_collection_on_page("daylife.page.custom."+DAYLIFE_Globals.page_traits.page_name)}if(!P){for(am in R){var K=R[am];for(m in K){var J=K[m];DAYLIFE.log(["Module to check",J])}}}if(P){for(am in R){var K=R[am];for(m in K){var J=K[m];var M=J.id;if(!(J.$node.parents(".DL-modal-base").length)&&!(J.$node.parents(".bin").length)){J.refresh_module(J.make_module_url(L,null,true))}}}}},check_collection_on_page:function(K){var M=C(".DL-collection-chooser",this.$collection_chooser);var J=DAYLIFE_Globals.page_traits.controller;var L=false;C(".DL-collection-choice",this.$collection_chooser).each(function(){var N=C(this).data("collection_id");if(N==K){L=true}});return L},add_themeid_to_url:function(J){var K=C.querystring_to_hash(window.location.search);if(J.indexOf("?")!=-1){J+="&"}else{J+="?"}if(K.__themeid){J+="__themeid="+K.__themeid}return J},set_rendered_module_width:function(){var J=this.rendered_module.$node.height()||200;var K=this.rendered_module.$node.width()||300;if(this.opts.preview_dimensions){J=this.opts.preview_dimensions.height||J;K=this.opts.preview_dimensions.width||K}this.rendered_module.$node.css({height:J,width:K,position:"relative"});return{width:K,height:J}},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 L=C("textarea.DL-head-code",this.$div_embed_code);var K=C("textarea.DL-placeholder",this.$div_embed_code);var J=this;this.rendered_module.get_embed_code(function(M){L.val(M)});this.rendered_module.get_embed_code_placeholder(function(M){K.val(M)});return L},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 K=this.$div_customize_module.outerHeight({margin:true});var P=C(".DL-embed-content-wrapper",this.$node);var V=parseInt(P.css("padding-left"))+parseInt(P.css("padding-right"))+32;var L=parseInt(P.css("padding-top"))+parseInt(P.css("padding-bottom"));var J=C(".DL-module-preview-header",this.$node).outerHeight({margin:true});if(this.include_preview){var U=this.rendered_module.$node;this.$node.width(this.$div_embed_code.outerWidth({margin:true})+this.$div_module_preview.outerWidth({margin:true})+V);var N=U.outerHeight({margin:true})+J;var S=(K>N)?K:N;var T=this.$header.outerHeight({margin:true});var M=C(".DL-collection-chooser-wrapper",this.$node).outerHeight({margin:true});this.$node.height(S+T+M+L)}else{this.$node.width(this.$div_embed_code.outerWidth()+V)}this.modal.recenter();var R=this.modal.$node.height();var O=R-T;try{P.css("height",O)}catch(Q){}},size_module_container:function(J){var K=C(".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=C.make("div",{className:"DL-customize-module-prefs"});this.module_editor=C.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=C(":submit",J);var K=C(":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=C(":submit",J);var K=C(":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(){C("fieldset.simple_attributes",this.module_editor.$node).before(C.make("h2",{className:"DL-customize-data"},"Customize Widget"))},add_subtitle_to_module_editor_form:function(){C("fieldset.simple_attributes",this.module_editor.$node).before(C.make("h5",["What Content Do You Want to Target",C.make("br"),"with Smart Context?"]));C("fieldset.simple_attributes",this.module_editor.$node).before(C.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");C("fieldset.buttons",J).css("display","block")},change_module_editor_form_events:function(){var K=this.module_editor.$node.find("form");C("fieldset.buttons",K).css("display","block");C(":submit",K).attr("value","Update Preview");C(":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;C(":input",K).each(function(){var L=C(this);if(J.module_editor.is_contextual_field(L.attr("name"))){L.parents("div.single_attribute").css("display","none")}})}};var G={};var I=function(J){for(var K in G){if(K==J){G[K].show();C(document).trigger("DAYLIFE:Embed:open",[])}else{delete G[K]}}};C.fn.embedder=function(){var M;var K="."+E;var L=(this.is(K))?this:this.parents(K);for(var J in G){if(G[J].$node.get(0)==L.get(0)){M=G[J];break}}DAYLIFE.debug("$embed",L);DAYLIFE.debug("inst",M);return M};C.extend({open_embed_interface:function(K,L){L=L||{};L.preview_dimensions=L.preview_dimensions||null;var J=G[K];if(!J){J=new F(K,L);J.init();G[K]=J}DAYLIFE.log(["Embed",K]);I(K);return J},get_embedder:function(J){return G[J]},destroy_all_embedders:function(){G={}}})})($DL);DAYLIFE.TopicConnectionGraph=function(E,C,A,D,B,H,F){var G=Raphael(E,C,A);this.r=G;this.center_x=D||125;this.center_y=B||125;this.offset=H||35;this.sizes=F||{small:30,medium:50,large:70,xlarge:100};this.rotation=3.14/2;this.$graph=$DL("#"+E);this.$module=this.$graph.parents(".DL-module")};DAYLIFE.TopicConnectionGraph.prototype={runner:function(F,J){this.arc_step_size=2*3.14/F.length;J.img_svg=this.create_image(J.img,this.center_x+this.offset,this.center_y+this.offset,this.sizes[J.s]);for(var D=0,L=F.length;D<L;D++){var E=F[D];var H=(Math.cos(this.arc_step_size*D-this.rotation)*(this.center_x))+(this.center_x)+(this.offset);var G=(Math.sin(this.arc_step_size*D-this.rotation)*(this.center_y))+(this.center_y)+(this.offset);E.img_svg=this.create_image(E.img,H,G,this.sizes[E.s]);E.img_svg["topic_index"]=D;var K=Math.cos(this.arc_step_size*D-this.rotation)*(this.sizes[J.s]/2)+this.center_x+this.offset;var I=Math.sin(this.arc_step_size*D-this.rotation)*(this.sizes[J.s]/2)+this.center_y+this.offset;var N=H-(Math.cos(this.arc_step_size*D-this.rotation)*(this.sizes[E.s]/2));var M=G-(Math.sin(this.arc_step_size*D-this.rotation)*(this.sizes[E.s]/2));var C=Math.random()*N;var B=Math.random()*M;var A=this.r.path({stroke:"#C0C0C0","stroke-width":3}).moveTo(K,I).curveTo(N,M,N,M,N,M);this.hover_image(E.img_svg,A,J.img_svg,E);this.link_image(E,A)}this.position_topic_names(F);J.img_svg["c_2"].toFront()},create_image:function(I,M,L,P){var F=parseInt(P)/2;var R=M;var K=L;var N=(Math.sqrt(2)-1)*F;var H=3;var E=3;var J=F+(0.5*N);var S=F;var G=F-2;var Q="#C0C0C0";var B=this.r.image(I,M-F,L-F,P,P);var A=this.r.circle(R,K,J).attr({stroke:"#fff","stroke-width":N});var C=this.r.circle(R,K,S).attr({stroke:Q,"stroke-width":H});var D=this.r.circle(R,K,G).attr({stroke:"#fff","stroke-width":E});C.insertAfter(D);var O=this.r.set();O.push(B);O.push(C);O.push(D);return{img:B,c_2:C,c_1:D,set:O}},hover_image:function(D,L,I,J){var K=this;var C="#C0C0C0";var G="#ffcc00";var F=D.c_2.attr("r");var B=I.c_2.attr("r");var E=$DL(".DL-topic a.DL-name:eq("+D.topic_index+")",this.$module).parents(".DL-topic");var H=function(){I.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:F+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");E.addClass("DL-active");K.show_connection_info(D,F+1)};var A=function(){D.c_2.attr({stroke:C,"stroke-width":3,r:F});L.attr({stroke:C,"stroke-width":3});I.c_2.attr({stroke:C,"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");E.removeClass("DL-active");K.hide_connection_info(D)};D.set.mouseover(H);D.set.mouseout(A);E.mouseover(H);E.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(K){var I=$DL;var G=this.$graph.height();var F=this.$graph.width();for(var J=K.length-1;J>=0;J--){var E=K[J]["img_svg"]["c_2"];var H=Math.floor(E.attr("cx"));var D=Math.floor(E.attr("cy"));var B=Math.ceil(E.attr("r"));var A=(D<(G/2))?"top":"bottom";var M=0;var C=I("li.DL-topic:eq("+J+") a.DL-name",this.$module);if(C.length>0){var L=(A=="top")?D-B-M-C.outerHeight(true):D+B+M;C.css({left:H-Math.floor(C.outerWidth()/2),top:L,visibility:"visible"})}}},position_connection_info:function(C,B,I,J){var G=$DL;var E=C.c_2;var F=E.attr("cx");var D=E.attr("cy");var A=J;var H=2;B.css({left:F-Math.floor(B.width()/2),top:D-A-B.outerHeight()-I.outerHeight()-H+2});I.css({left:F-Math.floor(I.width()/2),top:D-A-I.outerHeight()-H});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(C,E){var D=$DL;var B=this.get_$info(C.topic_index);var A=this.get_$arrow(C.topic_index);if(!B.data("has_been_positioned")){this.position_connection_info(C,B,A,E)}A.css("display","block");B.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(F){var E=F.siblings(".DL-active");var D=A(B.prev,B.module);var C=A(B.next,B.module);var H=A(B.cover,B.module).length;E.removeClass("DL-active");F.addClass("DL-active");var G=(F.prevAll().length)+1;var I=A(B.thumbnail,this.$module).eq(G-1);if(G==1){D.addClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}else{if(G==H){D.removeClass("DL-prev-cover-disabled");C.addClass("DL-next-cover-disabled")}else{D.removeClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}}I.siblings(".DL-active").removeClass("DL-active");I.addClass("DL-active");E.css({opacity:1}).animate({opacity:0},{duration:800,easing:"easeOutQuad",queue:false});F.css({opacity:0}).animate({opacity:1},{duration:800,easing:"easeOutQuint",queue:false})},active_cover:function(){var C=A(B.covers,this.$module);var D=A(".DL-active",C);return D},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 D=this.active_cover();var C=D.prev(B.cover);var E=D.prevAll().length+1;if(C.length&&!this.flags.scrolling_thumbnails){if((E%4)==1&&this.options.thumbnails_mode){this.scroll_thumbnails(1)}this.activate_cover(C)}},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 J=A(B.covers,this.$module),M=960,C=540,G=M/C,L=A(window).width(),E=A(window).height(),K=A("img",J),I=K.height(),D=A("#DL-body");D.removeClass();var F="100%";if(L<960){var I=540;D.addClass("Under960");F="960px";if(E<540){H="0"}}else{if(L>1600){var I=900;D.addClass("Over1600");F="1600px";H=parseInt((E-900)/2)}else{var I=L/G;D.addClass("Between960and1600")}}var H=parseInt((E-I)/2);K.css({"margin-top":H,width:F});A(document).ready(function(){var N=0;if(E<540){N=E-540}else{if(I<E){N=parseInt((E-I)/2)}}A("#DL-content-slot-2").css({bottom:N,visibility:"visible"})})},activate_cover:function(D){var G=D.siblings(".DL-active");var F=A(B.prev,B.module);var C=A(B.next,B.module);var I=A(B.cover,B.module).length;var E=A("h5",D).html();G.removeClass("DL-active");D.addClass("DL-active");var H=(D.prevAll().length)+1;F.addClass("DL-prev-cover-disabled");C.addClass("DL-next-cover-disabled");A(B.caption,B.module).html(E);A("img",G).fadeOut(750,function(){A("img",D).fadeIn(250,function(){if(H==1){F.addClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}else{if(H>=I){F.removeClass("DL-prev-cover-disabled");C.addClass("DL-next-cover-disabled")}else{F.removeClass("DL-prev-cover-disabled");C.removeClass("DL-next-cover-disabled")}}})})},active_cover:function(){var C=A(B.covers,this.$module);var D=A(".DL-active",C);return D},next_cover:function(){var D=this.active_cover();var F=D.next(B.cover);var C=F.next();if(C.length){var E=A("img",C).attr("rel");A("img",C).attr("src",E)}if(F.length&&!A(B.next,B.module).hasClass("DL-next-cover-disabled")){this.activate_cover(F)}},prev_cover:function(){var D=this.active_cover();var C=D.prev(B.cover);if(C.length&&!A(B.prev,B.module).hasClass("DL-prev-cover-disabled")){this.activate_cover(C)}},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(D,C){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,D);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=C;this.num_images=C.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(C){var E=this;if(this.opts.slideshow_type=="svg"){var F=this.create_svg_images(C);A(this.R.canvas,this.$module).css({left:"0px"});this.paginate_svg_photos();this.focus_svg_image(F[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 G=A.hash();if(C.selected_hash!=G){if(C.locks.hash_has_changed&&G==C.initial_hash){return }var F=true;var E=A.hash("image");var D=C.extract_selected_view();C.selected_hash=G;C.change_view(D,E,F)}}},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,G,F){var D=this;this.locks.prevent_hash_changes=true;if(F){this.locks.hash_has_changed=true}if(this.active_view!=C||F){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(F&&this.active_view==C){DAYLIFE.log(["Changing view, special case",F,this.active_view,C,G]);this.show_view(C,G)}else{DAYLIFE.log(["Changing view, regular case",F,this.active_view,C,G]);this.active_view=C;this.hide_all_views(function(){D.show_view(C,G)})}}},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(D,F){var E,C;if(D==this.views.MOSAIC){A.hash("view",D.name,{clear:true});A(".DL-gallery-mosaic-page",this.$module).css({display:"none"});this.mosaic_page_to_mosaic(0)}if(D==this.views.THUMBNAILS_COVER){A.hash("view",D.name,{clear:true});A(".DL-gallery-thumbnails-cover-page",this.$module).css({display:"none"});this.thumbnails_cover_page(0)}if(D==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,D)}if(D==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(D==this.views.WIDGET){this.lazyload_load_images_widget(0)}A(D.selector,this.$module).fadeIn(250);A(D.heading,this.$module).addClass("DL-active DL-active-"+D.name);if(D==this.views.FILMSTRIP){C=this.get_image_index_from_image_id(F)||0;E=A(".DL-slideshow-thumbnails-images",this.$module);this.filmstrip_page_to_photo(C,true,D);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(E,F,C){var D=this;var G=(new Date()).getTime();var H=this.get_image_id_from_image_index(E);this.filmstrip_animate_to_photo(E,F);this.filmstrip_set_photo_as_active(E);clearTimeout(this.timers.rotate_ad_module);this.timers.rotate_ad_module=setTimeout(function(){D.filmstrip_rotate_ad_module()},1000);clearTimeout(this.timers.set_imageid_in_hash);this.timers.set_imageid_in_hash=setTimeout(function(){D.set_imageid_in_hash(H,C)},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,D){var L=this;var C=this.read_cache("filmstrip_animate_to_photo");var F=C.$arrows=C.$arrows||A(".DL-photo-filmstrip-photos-container .DL-previous-photo, .DL-photo-filmstrip-photos-container .DL-next-photo",this.$module);var K=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 M=C.$page_control=C.$page_control||A(".DL-slideshow-page-control",this.$module);var H=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 E=parseInt(K.css("left"),10)||0;var G=(H*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;M.removeClass("DL-active");M.eq(I).addClass("DL-active");if(!D){K.css({position:"absolute",left:E}).stop().animate({left:G},{duration:this.opts.page_transition_time,easing:this.opts.page_transition_type,complete:function(){if(L.opts.slideshow_type=="filmstrip"){J.removeClass("working")}},queue:false})}else{if(D){K.css({position:"absolute",left:G})}}if(this.opts.slideshow_type=="svg"){setTimeout(function(){L.focus_svg_image(L.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(J){var C=this.read_cache("filmstrip_show_photo_caption");var I=C.$photos=C.$photos||A(".DL-slideshow-thumbnails-images .DL-photo",this.$module);var G=J||I.siblings(".DL-active").prevAll().length;var E=C.$captions=C.$captions||A(".DL-photo-filmstrip-captions .DL-photo-caption",this.$module);var F=E.eq(G);var H=C.$captions_container=C.$captions_container||A(".DL-photo-filmstrip-captions-container",this.$module);E.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){H.css({height:D+20})}else{H.css({height:K})}F.css({visibility:"visible"}).addClass("DL-active")},filmstrip_page_to_thumbnails:function(I){var C=this.read_cache("filmstrip_page_to_thumbnails");var G=C.$pages=C.$pages||A(".DL-slideshow-thumbnails-images",this.$module);var E=C.$current=C.$current||A(".DL-slideshow-more-page-index-current",this.$module);var J=C.$total=C.$total||A(".DL-slideshow-more-page-index-total",this.$module);this.counters.filmstrip_thumbnail_page=I;G.fadeOut(250).eq(I).fadeIn(250);var L=G.eq(I);var D=A(".DL-photo",L).length;var F=G.length;var H=I*this.opts.filmstrip_gallery_thumbnails_per_page+1;var K=H+Math.min(this.opts.filmstrip_gallery_thumbnails_per_page,D)-1;E.text(I+1);J.text(G.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 C=A(".DL-active",G).parents(".DL-slideshow-thumbnails-images");var F=C.prevAll(".DL-slideshow-thumbnails-images").length;if(this.counters.filmstrip_thumbnail_page!=F){this.filmstrip_page_to_thumbnails(F)}this.filmstrip_filter_images_shown_in_page(E,F)},filmstrip_filter_images_shown_in_page:function(F,G){var E=this;var D=this.read_cache("filmstrip_filter_images_shown_in_page");photos_per_page=D.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;D.photos_per_page=photos_per_page}if(!this.filmstrip_loaded_pages[G]){this.filmstrip_loaded_pages[G]=true;var C=A(".DL-photo-filmstrip-photos .DL-photo img",this.$module).slice(G*photos_per_page,(G+1)*photos_per_page);this.lazyload_load_images(C)}},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 D=this.read_cache("filmstrip_update_hover_image_link");var E=D.$widget_image_pane=D.$widget_image_pane||A(".DL-gallery-widget .DL-photo-filmstrip-photos-container",this.$module);var F=D.$widget_hover_overlay=D.$widget_hover_overlay||A(".DL-gallery-widget .DL-photo-filmstrip-photos-hover-overlay",this.$module);var C=A(".DL-active a",E);if(!C.length){C=A(".DL-photo a",E).eq(0)}var G=C.attr("href");A("a",F).attr("href",G)},mosaic_page_to_mosaic:function(G){var F=this;var C=A(".DL-gallery-mosaic-page",this.$module).eq(G).css("display")=="block";if(!C){this.mosaic_hide_all_mosaics(function(){F.mosaic_show_mosaic(G)})}A(".DL-gallery-mosaic-page-index-current",this.$module).text(G+1);this.counters.mosaic_page=G;var E=1;A(".DL-gallery-mosaic-page",this.$module).eq(G).prevAll(".DL-gallery-mosaic-page").each(function(){E+=A(this).find(".DL-photo").length});var D=A(".DL-gallery-mosaic-page",this.$module).eq(G).find(".DL-photo").length;var I=A(".DL-gallery-mosaic-page",this.$module).length;var H=E+D-1;A(".DL-gallery-mosaic-page-index-current",this.$module).text(E+"-"+H)},mosaic_hide_all_mosaics:function(F){var D=A(".DL-gallery-mosaic-page",this.$module);var E=D.length;var C=0;D.fadeOut(250,function(){if(C==E-1){F()}C++})},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(G){var F=this;if(!G){G=0}var C=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(G).css("display")=="block";if(!C){this.thumbnails_cover_hide_all_thumbnails(function(){F.thumbnails_cover_show_thumbnails(G)})}A(".DL-gallery-thumbnails-cover-page-index-current",this.$module).text(G+1);this.counters.thumbnails_cover_page=G;var E=1;A(".DL-gallery-thumbnails-cover-page",this.$module).eq(G).prevAll(".DL-gallery-thumbnails-cover-page").each(function(){E+=A(this).find(".DL-photo").length});var D=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(G).find(".DL-photo").length;var I=A(".DL-gallery-thumbnails-cover-page",this.$module).length;var H=E+D-1;A(".DL-gallery-thumbnails-cover-page-index-current",this.$module).text(E+"-"+H)},thumbnails_cover_hide_all_thumbnails:function(F){var E=A(".DL-gallery-thumbnails-cover-page",this.$module);var C=E.length;var D=0;E.fadeOut(250,function(){if(D==C-1){F()}D++})},thumbnails_cover_show_thumbnails:function(C){var D=A(".DL-gallery-thumbnails-cover-page",this.$module).eq(C);this.lazyload_load_images_by_container(D);D.fadeIn(250)},thumbnails_cover_gallery_page_to_photo:function(C){this.change_view(this.views.THUMBNAILS,C)},thumbnails_page_to_gallery_thumbnails_page:function(G){var F=this;var C=A(".DL-gallery-thumbnails-page",this.$module).eq(G).css("display")=="block";if(!C){this.thumbnails_hide_all_thumbnails(function(){F.thumbnails_show_thumbnails(G)})}this.counters.thumbnails_gallery_page=G;var E=1;A(".DL-gallery-thumbnails-page",this.$module).eq(G).prevAll(".DL-gallery-thumbnails-page").each(function(){E+=A(this).find(".DL-photo").length});var D=A(".DL-gallery-thumbnails-page",this.$module).eq(G).find(".DL-photo").length;var I=A(".DL-gallery-thumbnails-page",this.$module).length;var H=E+D-1;A(".DL-gallery-thumbnails-page-index-current",this.$module).text(E+"-"+H)},thumbnails_hide_all_thumbnails:function(F){var E=A(".DL-gallery-thumbnails-page",this.$module);var C=E.length;var D=0;E.fadeOut(250,function(){if(D==C-1){F()}D++})},thumbnails_show_thumbnails:function(C){var D=A(".DL-gallery-thumbnails-page",this.$module).eq(C);this.lazyload_load_images_by_container(D);D.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(E){var F=A(".DL-gallery-thumbnails-page",this.$module);var C=A(".DL-photo",F).eq(E).parents(".DL-gallery-thumbnails-page");var D=C.prevAll(".DL-gallery-thumbnails-page").length;if(F.eq(D).css("display")!="block"){this.thumbnails_page_to_gallery_thumbnails_page(D)}},create_svg_images:function(C){var H=[];for(var G=0;G<this.num_images;G++){var I=C[G];var E=(this.opts.canvas_width-this.opts.image_width)/2+G*this.opts.image_width*this.opts.scale;var D=(this.opts.canvas_height-this.opts.image_height)/2;var F=this.R.image(I.src,E,D,this.opts.image_width,this.opts.image_height).toBack().scale(this.opts.scale).attr({opacity:0.5});H.push(F)}this.R_images=H;return H},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 C=this.images;var E=A.make("ul",{className:"DL-slideshow-page-controls"});for(i in C){var D=A.make("li",{className:"DL-slideshow-page-control"},i).data("page",i);E.append(D)}this.$module.append(E)},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(H){E.preventDefault();var F=H.prevAll().length+(C.counters.thumbnails_cover_page*C.opts.thumbnails_cover_gallery_thumbnails_per_page);var G=C.get_image_id_from_image_index(F);DAYLIFE.log(["index",F,G]);C.change_view(C.views.FILMSTRIP,G)});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(G){E.preventDefault();var F=C.extract_image_id(G);C.change_view(C.views.FILMSTRIP,F)});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(E,H){var G=H.target;var D=$DL(G);var F=G.tagName.toLowerCase();switch(F){case"li":if(D.hasClass("DL-prev")){H.preventDefault();this.scroll(-1)}else{if(D.hasClass("DL-next")){H.preventDefault();this.scroll(1)}}break}},scroll:function(D){var E=this;D=D||1;var G=this.$quotes;var H=$DL(G.get(this.selected_index));var F=this.selected_index+D;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);H.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 D=E[_h][1]}if(E[_h][0]=="module_classname"){var B=E[_h][1]}}if(C){var F=$DL("#"+C)}else{if(D){var F=$DL('.DL-module-title:contains("'+D.replace(/\+/g," ")+'")')}else{if(B){var F=$DL("a.DL-embed[href*="+B+"]").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 A=$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 B="search";if(A==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){B="topic"}if($DL(".DL-photo-results.DL-no-results").length==1){B="photo"}if($DL(".DL-article-results.DL-no-results").length==1){B="article"}if($DL(".DL-quote-results.DL-no-results").length==1){B="quote"}$DL(".DL-no-results:last").after("<div class='DL-no-results-message DL-styled-module DL-section'>No "+B+" results for <span>'"+D+"'</span></div>")}}else{if(A==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 D=$DL;var B=D(".DL-site-tools");if(B.length==0){return }var H=D(".DL-greeting");var G=D("li.DL-sites");var E=D(".DL-user-sites");var F=E.find("li").eq(0).clone();var C=D(".DL-login-navigation");var A=function(L){var K=D("#activate_wizard_nonedit");if(K.length==1){var M=D.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})};D.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(L){var K=L.target;var J=$DL(K);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");H.removeClass("highlight");G.removeClass("highlight");C.removeClass("highlight");D("body").unbind("mouseover",I)}};D("li.DL-sites").mouseover(function(J){E.css("display","block");H.addClass("highlight");G.addClass("highlight");C.addClass("highlight");D("body").bind("mouseover",I)});D(".DL-login-navigation").click(function(J){if(D.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(){group.wrapper.addClass("DL-active");Recaptcha.reload();setTimeout(function(){$("input",self.$node).eq(0).focus();$(".DL-popup-wrapper",group.wrapper).scrollTop(0)},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,C){if(FB.Bootstrap.isXdChannel){return }var A={features:E,callback:C,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 D={};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])){D[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);