(function(){var Dry=window.Dry={Common:{FindInArray:function(arr,val,caseInsensitive){if(caseInsensitive&&typeof(val)==="string"){val=val.toLowerCase()}for(var i=0;i<arr.length;i++){if(caseInsensitive&&typeof(arr[i])==="string"){if(arr[i].toLowerCase()===val){return(i)}}else{if(arr[i]===val){return(i)}}}return(-1)},ExistsInArray:function(arr,val,caseInsensitive){return(Dry.Common.FindInArray(arr,val,caseInsensitive)>-1)},Iterate:function(obj,ignore,callback,finishedCallback){if(typeof(ignore)==="function"){finishedCallback=callback;callback=ignore;ignore=[]}else{if(typeof(ignore)==="string"){ignore=[ignore]}}var properties=[];for(var p in obj){if(obj.hasOwnProperty(p)){if(!Dry.Common.ExistsInArray(ignore,p,true)){properties.push(p)}}}function doWork(i){if(i>=properties.length){if(finishedCallback){finishedCallback()}}else{callback(properties[i],obj[properties[i]]);doWork(i+1)}}doWork(0)},IterateAsync:function(obj,ignore,callback,finishedCallback){if(typeof(ignore)==="function"){finishedCallback=callback;callback=ignore;ignore=[]}else{if(typeof(ignore)==="string"){ignore=[ignore]}}var properties=[];for(var p in obj){if(obj.hasOwnProperty(p)){if(!Dry.Common.ExistsInArray(ignore,p,true)){properties.push(p)}}}function doWork(i){if(i>=properties.length){if(finishedCallback){finishedCallback()}}else{function next(){doWork(i+1)}if(((i+1)%30)===0){nextTick(function(){callback(properties[i],obj[properties[i]],next)})}else{callback(properties[i],obj[properties[i]],next)}}}doWork(0)},RemoveFromArray:function(array,from,to){var rest=array.slice((to||from)+1||array.length);array.length=from<0?array.length+from:from;return array.push.apply(array,rest)},HasType:function hasType(val,types,nullOk){var messages=[];if(Array.isArray(val)){messages.push("Expected object, found array");return(messages)}if(typeof(val)!=="object"&&!Array.isArray(types)){if(typeof(val)!==types){messages.push("Expected type "+types)}return(messages)}if(!Array.isArray(types)){types=[types]}if(!(nullOk&&val===null)){if(!(val&&typeof(val)==="object"&&val.Type&&Dry.Common.ExistsInArray(types,val.Type,true))){messages.push("Expected any of the following types ["+types+"]")}}return(messages)},HasTypes:function hasTypes(val,types,nullOk){var messages=[];if(!Array.isArray(val)){messages.push("Expected array, found object");return(messages)}for(var i=0;i<val.length;i++){if(Dry.Common.HasType(val[i],types,nullOk).length>0){messages.push("Expected any of the following types ["+types+"] in array position: "+i)}}return(messages)}},BaseClasses:{Models:{RenderEngines:{RenderEngineBase:function RenderEngineBase(){var that={};that.Render=function(str,hash,callback){throw (new Error("Not Implemented."))};that.HandleRenderOptions=function(str,hash,callback){if(typeof(str)==="function"){callback=str;str="";hash={}}else{if(typeof(hash)==="function"){callback=hash;hash={}}}return({str:str,hash:hash,callback:callback})};return(that)},Mu:function MuEngineClient(){var that=new Dry.BaseClasses.Models.RenderEngines.RenderEngineBase();that.Render=function(str,hash,callback){var options=that.HandleRenderOptions(str,hash,callback);if(options.str!==""){var partials={};var result=$.mustache(options.str,options.hash,partials);if(options.callback){options.callback(result)}}else{if(options.callback){options.callback("")}}};return(that)}},BaseModel:function BaseModel(){var that=this;that.Fields={};that.Views={};that.ParentViews={};that.Api={};that.ModelRefs={};that.Type="BaseModel";that.ApiClient=Dry.Instances.JsonRpcClient();that.HashOutIgnore=["InstanceId"];that.ViewHashFunctions={};that.ViewStack=[];that._events={};that._lastIdHash=null;that.AddField(Dry.BaseClasses.Models.ModelFields.Basic(that,"InstanceId","","InstanceId",[],false));that.AddField(Dry.BaseClasses.Models.ModelFields.Basic(that,"View","","View",[],false));that.View.Value.On("change",(function(){var justSet=false;return(function(val){if(!justSet){justSet=true;that.View.Value(val.toLowerCase())}justSet=false})})());that.AddField(Dry.BaseClasses.Models.ModelFields.Basic(that,"ParentView","","ParentView",[],false));that.ParentView.Value.On("change",(function(){var justSet=false;return(function(val){if(!justSet){justSet=true;that.ParentView.Value(val.toLowerCase())}justSet=false})})())},BaseModelInit:function addPrototypes(){var BaseModel=Dry.BaseClasses.Models.BaseModel;if(!BaseModel.prototype.AddField){BaseModel.prototype.AddField=function(field){this.Fields[field.Name]=field;this[field.Name]=this.Fields[field.Name];this[field.Name].Value(this[field.Name].DefaultValue)};BaseModel.prototype.AddView=function(name,view){this.Views[name.toLowerCase()]=view};BaseModel.prototype.toJSON=function(){return(this.Hash())};BaseModel.prototype.WireSafeHash=function(){return(JSON.parse(JSON.stringify(this.GetFieldValues(),function(key,value){if(typeof(value)==="string"){return(escape(value))}else{return(value)}})))};BaseModel.prototype.Hash=function(val){var that=this;if(val===undefined){return(JSON.parse(JSON.stringify(this.GetFieldValues())))}else{if(typeof(val)==="string"){var parsed=JSON.parse(val);this.SetFieldValues(parsed);if(that.PostHashIn){that.PostHashIn(parsed)}}else{if(typeof(val)==="object"){this.SetFieldValues(val);if(that.PostHashIn){that.PostHashIn(val)}}else{throw (new Error("Deserialize expected string or object"))}}}};BaseModel.prototype.GetFieldValues=function(){var hash={Type:this.Type};var that=this;Dry.Common.Iterate(this.Fields,function(fieldName,field){if(!Dry.Common.ExistsInArray(that.HashOutIgnore,fieldName,true)){hash[fieldName]=field.Value()}});return(hash)};BaseModel.prototype.SetFieldValues=function(hash){var that=this;Dry.Common.Iterate(that.Fields,function(fieldName,field){if(hash[fieldName]!==undefined){if(hash.Type===that.Type||(fieldName!=="Id"&&fieldName!=="View"&&fieldName!=="ParentView"&&fieldName!=="InstanceId")){if(hash[fieldName]&&typeof(hash[fieldName])==="object"&&hash[fieldName].Type&&typeof(hash[fieldName].Id)!=="function"){field.Value(Dry.Instances.TypeBinder().Bind(hash[fieldName]))}else{if(typeof(hash[fieldName])==="string"){try{field.Value(unescape(hash[fieldName]))}catch(e){console.error(hash[fieldName]);throw (e)}}else{field.Value(hash[fieldName])}}field.Value.Emit("change",field.Value())}}})};BaseModel.prototype.Render=function(element,replace,callback){if(typeof(element)==="function"){this.ViewHash(function(viewHash){element(viewHash.InstanceId,viewHash.Rendered)})}else{this.RenderOn(element,replace,callback)}};BaseModel.prototype.Refresh=function(callback){var that=this;if(that.InstanceId()){that.ViewHash(function(viewHash){$("#"+that.InstanceId()).replaceWith(viewHash.Rendered);that.Bind(that._viewHashToInstanceIdHash(viewHash));that.Emit("refresh",that);if(callback){callback()}})}};BaseModel.prototype.RenderOn=function(element,replace,callback){var that=this;if(typeof(replace)==="function"){callback=replace;replace=false}if(typeof(element)==="string"||Array.isArray(element)){var elements=[];if(typeof(element)==="string"){elements=$(element)}else{if(Array.isArray(element)){elements=element}}that.ViewHash(function(viewHash){for(var i=0;i<elements.length;i++){if(replace){$(elements[i]).html(viewHash.Rendered)}else{$(elements[i]).append(viewHash.Rendered)}}that.Bind(that._viewHashToInstanceIdHash(viewHash));if(callback){callback(that)}})}else{if(typeof(element)==="object"){that.ViewHash(function(viewHash){if(replace){$(element).html(viewHash.Rendered)}else{$(element).append(viewHash.Rendered)}that.Bind(that._viewHashToInstanceIdHash(viewHash));if(callback){callback(that)}})}}};BaseModel.prototype.ProcessArrayForViewHash=function(a,callback){var newa=[];var that=this;Dry.Common.IterateAsync(a,function(index,value,next){if(Array.isArray(value)){that.ProcessArrayForViewHash(value,function(newVal){newa[index]=newVal;next()})}else{if(Dry.IsModel(value)){value.ViewHash(function(newHash){newa[index]=newHash;next()})}else{newa[index]={Rendered:value};next()}}},function(){callback(newa)})};BaseModel.prototype.ViewHash=function(callback){var that=this;var hash=that.GetFieldValues();var viewHash={InstanceId:Dry.Uuid()};if(that.CustomViewHashProperties){Dry.Common.Iterate(that.CustomViewHashProperties,function(key,val){if(hash[key]===undefined){hash[key]=val}})}Dry.Common.IterateAsync(hash,function(prop,value,next){if(Array.isArray(value)&&that._shouldRenderField(prop)){that.ProcessArrayForViewHash(value,function(a){viewHash[prop]=a;next()})}else{if(Dry.IsModel(value)&&that._shouldRenderField(prop)){value.ViewHash(function(newHash){viewHash[prop]=newHash;next()})}else{if(value===null){viewHash[prop]={Rendered:""}}else{viewHash[prop]={Rendered:value}}next()}}},function(){if(that.Parent){Dry.Common.Iterate(that.Parent.ViewHashFunctions,function(functionName,f){viewHash[functionName]=f})}Dry.Common.Iterate(that.ViewHashFunctions,function(functionName,f){viewHash[functionName]=f});var bindCode="";if(Dry.IsServer){if(that.NoWaitBind){bindCode+="<script>(function(){";bindCode+="var model = Dry.Models."+that.Type+"("+JSON.stringify(that.WireSafeHash())+");";bindCode+="model.Bind("+JSON.stringify(that._viewHashToInstanceIdHash(viewHash))+");";bindCode+="})();<\/script>"}else{bindCode+="<script>nextTick(function(){";bindCode+="var model = Dry.Models."+that.Type+"("+JSON.stringify(that.WireSafeHash())+");";bindCode+="model.Bind("+JSON.stringify(that._viewHashToInstanceIdHash(viewHash))+");";bindCode+="});<\/script>"}}viewHash.BindModelToDom=bindCode;that.RenderWithHash(viewHash,function(viewStr){viewHash.Rendered=viewStr;callback(viewHash)})})};BaseModel.prototype._shouldRenderField=function(fieldName){var that=this;return(that.Fields[fieldName].Render===undefined||that.Fields[fieldName].Render===true)};BaseModel.prototype._viewHashToInstanceIdHash=function(viewHash){var that=this;var idHash={InstanceId:viewHash.InstanceId};var newa=[];Dry.Common.Iterate(viewHash,function(fieldName,fieldHash){if(Array.isArray(fieldHash)){newa=[];for(var i=0;i<fieldHash.length;i++){if(fieldHash[i].InstanceId){newa[i]=that._viewHashToInstanceIdHash(fieldHash[i])}else{newa[i]={}}}idHash[fieldName]=newa}else{if(fieldHash.InstanceId){idHash[fieldName]=that._viewHashToInstanceIdHash(fieldHash)}}});return(idHash)};BaseModel.prototype.RenderWithHash=function(hash,callback){var that=this;var view=that.Views[that.View().toLowerCase()];if(view===undefined){throw (new Error("Couldn't find view: '"+that.View()+"' for model: '"+that.Type+"'. Did you try to call render on a model with no views?"))}hash.ModelStaticRoot="/Models/"+that.Type+"/Static";hash.ViewStaticRoot="/Models/"+that.Type+"/Views/"+that.View()+"/Static";view.Render(hash,function(viewStr){if(that.ParentViewField){hash[that.ParentViewField]={Rendered:viewStr};that.Parent.RenderWithHash(hash,function(parentViewStr){callback(parentViewStr)})}else{callback(viewStr)}})};BaseModel.prototype.IsParentViewField=function(thatIsParentField){var that=this;that.ParentViewField=thatIsParentField;if(that.Fields[thatIsParentField]){delete that.Fields[thatIsParentField]}if(that[thatIsParentField]&&that[thatIsParentField].Value){delete that[thatIsParentField]}};BaseModel.prototype.On=function(event,tag,callback){var that=this;if(typeof(tag)==="function"){callback=tag;tag=""}event=event.toLowerCase();if(that._events[event]===undefined){that._events[event]=[]}that._events[event].push({Handler:callback,Tag:tag})};BaseModel.prototype.RemoveListener=function(event,callback){var that=this;event=event.toLowerCase();var handlers=that._events[event];var newHandlers=[];if(handlers!==undefined){if(typeof(callback)==="function"){for(var i=0;i<handlers.length;i++){if(handlers[i].Handler!==callback){newHandlers.push(handlers[i])}}}else{if(typeof(callback)==="string"){for(var i=0;i<handlers.length;i++){if(handlers[i].Tag.toLowerCase()!==callback.toLowerCase()){newHandlers.push(handlers[i])}}}}that._events[event]=newHandlers}};BaseModel.prototype.Emit=function(event){var that=this;var args=Array.prototype.slice.call(arguments);args.shift();event=event.toLowerCase();if(that._events[event]!==undefined){for(var i=0;i<that._events[event].length;i++){that._events[event][i].Handler.apply(null,args)}}};BaseModel.prototype.PushView=function(){var that=this;that.ViewStack.push({IdHash:that._lastIdHash,View:that.View()})};BaseModel.prototype.PopView=function(){var that=this;var view=that.ViewStack.pop();if(view){that.View(view.View);that.Bind(view.IdHash)}};BaseModel.prototype.GetValidations=function(fieldName,modelRef){var that=this;var validations=[];if(that.Validations&&that.Validations[fieldName]){validations=that.Validations[fieldName]}if(modelRef){var ref=that.MakeModelRef(modelRef,null);var model=Dry.Models[ref.Model]();validations=validations.concat(model[ref.FieldName].Validations)}return(validations)};BaseModel.prototype.AddRpcFunctions=function(functionHash){var that=this;Dry.Common.Iterate(functionHash,function(key,val){var f=that._makeRpcFunction(that.Type+"."+key);that.Api[key]=f})};BaseModel.prototype._makeRpcFunction=function(functionName){var that=this;return(function(){var args=Array.prototype.slice.call(arguments);args.unshift(functionName);that.ApiClient.Call.apply(that,args)})};BaseModel.prototype.AddModelRef=function(modelRefString,field){var that=this;var modelRef=that.MakeModelRef(modelRefString,field);if(!that.ModelRefs[modelRef.Model]){that.ModelRefs[modelRef.Model]={}}that.ModelRefs[modelRef.Model][modelRef.FieldName]=modelRef;if(that.ModelRefs[modelRef.Model]["Id"]===undefined){that.ModelRefs[modelRef.Model]["Id"]=""}};BaseModel.prototype.MakeModelRef=function(modelRefString,field){var that=this;var nameSpace=modelRefString.split(".");if(nameSpace.length>=2){return({Model:nameSpace.shift(),FieldName:nameSpace.join("."),LocalField:field})}else{throw (new Error("Model ref needs a model name and a field.  ie. ModelName.FieldName"))}};BaseModel.prototype.Validate=function(callback,forgetTheViewGiveMeTheMessages){var that=this;if(callback){if(forgetTheViewGiveMeTheMessages){var validationMessages=null;var n=0;Dry.Common.IterateAsync(that.Fields,function(fieldName,field,next){field.Validate(function(messages){if(messages&&messages.length>0){if(!validationMessages){validationMessages={}}validationMessages[field.Name]=messages}next()},true)},function(){if(callback){callback(validationMessages)}})}else{var isValid=true;Dry.Common.IterateAsync(that.Fields,function(fieldName,field,next){field.Validate(function(valid){if(!valid){isValid=false}next()})},function(){if(callback){callback(isValid)}})}}else{Dry.Common.Iterate(that.Fields,function(fieldName,field){field.Validate()})}};BaseModel.prototype.Bind=function(idHash){var that=this;if(idHash.InstanceId){that._lastIdHash=idHash;that.InstanceId(idHash.InstanceId);$("#"+idHash.InstanceId).each(function(){this.Model=that});that._attachHandlers(idHash.InstanceId,that.Views[that.View()].Handlers(),"");Dry.Common.Iterate(that.Fields,function(fieldName,field){if(fieldName!=="InstanceId"&&idHash[fieldName]){var subHash=idHash[fieldName];if(Array.isArray(subHash)){for(var i=0;i<subHash.length;i++){if(subHash[i].InstanceId){if(Dry.Model(subHash[i].InstanceId)){field()[i]=Dry.Model(subHash[i].InstanceId)}else{if(field()[i].Bind){field()[i].Bind(subHash[i])}else{field()[i]=Dry.Models[field()[i].Type](field()[i])}}}}}else{if(Dry.Model(subHash.InstanceId)){field.Value(Dry.Model(subHash.InstanceId))}else{if(field.Value().Bind){field.Value().Bind(subHash)}else{field.Value(Dry.Models[field.Value().Type](field.Value()))}}}}else{field.Bind(idHash.InstanceId)}});that.Emit("bound",that)}};BaseModel.prototype._attachHandlers=function(instanceId,handlers,namespace){var that=this;if(namespace.length>0&&namespace[0]!=="."&&(namespace[0]!==" "&&namespace[1]!==".")){namespace="."+namespace}if(handlers.Model){Dry.Common.Iterate(handlers.Model,function(propertyName,handler){if(typeof(handler)==="function"){var eventName=that._fixEventName(propertyName);if(eventName!==""){that.RemoveListener(eventName,handler);that.On(eventName,handler)}}})}Dry.Common.Iterate(handlers,function(propertyName,handler){if(propertyName!=="Model"){if(typeof(handler)==="object"){that._attachHandlers(instanceId,handler,namespace+" ."+propertyName)}else{if(typeof(handler)==="function"){var eventName=that._getJqueryEventFunctionName(propertyName);if(eventName!==""){$("#"+instanceId).find(namespace).filter(that._filterToModelMembers(instanceId)).each(function(index){$(this).unbind(eventName);$(this)[eventName](function(event){event.Model=that;handler(event)})})}}}}})};BaseModel.prototype._fixEventName=function(dryEventName){dryEventName=dryEventName.toLowerCase();if(dryEventName.length>1){if(dryEventName.substr(0,2)==="on"){dryEventName=dryEventName.substr(2,dryEventName.length-2)}}return(dryEventName)};BaseModel.prototype._getJqueryEventFunctionName=function(dryEventName){var that=this;var potentialEvents=["blur","focus","focusin","focusout","load","resize","scroll","unload","click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","change","select","submit","keydown","keypress","keyup","error"];dryEventName=that._fixEventName(dryEventName);for(var i=0;i<potentialEvents.length;i++){if(potentialEvents[i]===dryEventName){return(potentialEvents[i])}}return("")};BaseModel.prototype._filterToModelMembers=function(instanceId){return(function(index){var result=false;$(this).parents("[id]").each(function(index){if(this.Model){if($(this).attr("id")===instanceId){result=true}else{result=false}return(false)}});return(result)})}}},ModelFields:{Basic:function BaseField(parentModel,name,defaultValue,label,validations,hidden){var that=function(val,fireChange){if(val===undefined){return(that.Value())}else{that.Value(val,fireChange);return(that)}};if(!parentModel){throw (new Error("You must pass the parent models object"))}if(!name){throw (new Error("Field must have a name"))}that.IsField=true;that.InstanceId="";that.Name=name;that.DefaultValue=(defaultValue!==undefined?defaultValue:"");that.Label=Dry.BaseClasses.Models.DomFields.TextField(label||"");that.Value=Dry.BaseClasses.Models.DomFields.TextField(that.DefaultValue);that.Value.On("change",function(value){that.Validate()});var Validations=Dry.Utility.FlattenArray(validations||[]);that.Validations=Validations;(function(){for(var i=0;i<Validations.length;i++){if(Validations[i]["Name"]===undefined){Validations[i]["Name"]="UnnamedValidations"}}})();var ValidationGroups={};that.Hidden=hidden||false;that.Clone=function(){return(Dry.BaseClasses.Models.ModelFields.Basic(parentModel,name,defaultValue,label,validations,hidden))};that.RenderField=function(element,callback){var newId=Dry.Uuid();var fieldHtml="";fieldHtml+='<div id = "'+newId+'">';fieldHtml+='<div class = "'+parentModel.Type+'">';fieldHtml+='<form class = "Fields">';fieldHtml+='<fieldset class = "'+that.Name+'">';fieldHtml+="<label>";fieldHtml+='<span class = "Label"></span>';fieldHtml+='<input class = "Value" type = "text" />';fieldHtml+="</label>";fieldHtml+='<div class = "Validations">';fieldHtml+='<p class = "UnnamedValidations">';fieldHtml+='<span class = "Message"></span>';fieldHtml+="</p>";fieldHtml+="</div>";fieldHtml+="</fieldset>";fieldHtml+="</form>";fieldHtml+="</div>";fieldHtml+="</div>";$(element).html(fieldHtml);$("#"+newId)[0].Model=true;that.Bind(newId);if(callback){callback()}};that.Validate=function(callback,forgetTheViewGiveMeTheMessages){if(forgetTheViewGiveMeTheMessages){validateForCaller(callback)}else{validateForView(callback)}};function validateForView(callback){var isValid=true;Dry.Common.IterateAsync(ValidationGroups,function(key,group,nextGroup){var validations=group.Validations;var validationField=group.ValidationField;var validationMessageField=group.MessageField;Dry.Common.IterateAsync(validations,function(index,validation,next){runValidation(validation,function(validationMessage){if(validationMessage){if(isValid){isValid=false}if(validationMessageField){validationMessageField(validationMessage)}if(validationField){validationField.Show()}nextGroup()}else{next()}})},function(){if(validationField){validationField.Hide()}if(validationMessageField){validationMessageField("")}nextGroup()})},function(){if(callback){callback(isValid)}})}function validateForCaller(callback){var validationMessages=[];Dry.Common.IterateAsync(Validations,function(index,validation,next){runValidation(validation,function(validationMessage){if(validationMessage){validationMessages.push(validationMessage)}next()})},function(){callback(validationMessages)})}function runValidation(validation,callback){if(typeof(validation.Validation)==="string"){runRegexValidation(validation,callback)}else{if(typeof(validation.Validation)==="function"){runFunctionValidation(validation,callback)}else{throw (new Error("Unknown Validation Type: "+JSON.stringify(validation)))}}}function runRegexValidation(validation,callback){if(!(that.Value().toString().match(validation.Validation))){handleValidationMessage(validation.ValidationMessage,callback)}else{callback(null)}}function runFunctionValidation(validation,callback){validation.Validation(parentModel,that,function(valid){if(valid){callback(null)}else{handleValidationMessage(validation.ValidationMessage,callback)}})}function handleValidationMessage(validationMessage,callback){if(typeof(validationMessage)==="string"){callback(validationMessage)}else{if(typeof(validationMessage)==="function"){validationMessage(parentModel,that,callback)}}}that.Bind=function(instanceId){that.InstanceId=instanceId;var fieldClass="."+parentModel.Type+" ."+that.Name;var valueClass=fieldClass+" .Value";var labelClass=fieldClass+" .Label";that.Value.Bind(instanceId,valueClass);that.Label.Bind(instanceId,labelClass);bindValidationFields(instanceId,fieldClass);if(that.Value()!==""&&!(typeof(that.Value())==="object"&&that.Value()!==null&&that.Value().Type)&&that.Value()!==null&&that.Value()!==false){that.Validate()}};function bindValidationFields(instanceId,fieldClass){ValidationGroups={};var validationClass=fieldClass+" .Validations";var unBound=[];for(var i=0;i<Validations.length;i++){var workingClassName=validationClass;if(Validations[i].Name){workingClassName+=" ."+Validations[i].Name}if(!ValidationGroups[workingClassName]){var potentialValidationField=Dry.BaseClasses.Models.DomFields.TextField("");if(potentialValidationField.Bind(instanceId,workingClassName)){ValidationGroups[workingClassName]={ValidationField:potentialValidationField,Validations:[]};potentialValidationField.Hide();var potentialMessageField=Dry.BaseClasses.Models.DomFields.TextField("");if(potentialMessageField.Bind(instanceId,workingClassName+" .Message")){ValidationGroups[workingClassName].MessageField=potentialMessageField}}}if(ValidationGroups[workingClassName]){ValidationGroups[workingClassName].Validations.push(Validations[i])}else{unBound.push(Validations[i])}}if(ValidationGroups[validationClass]){for(var i=0;i<unBound.length;i++){ValidationGroups[validationClass].Validations.push(unBound[i])}}}return(that)}},DomFields:{TextField:function TextField(defaultValue){var domElements=[];var currentValue="";function isInput(element){return(($(element).is("input")&&$(element).attr("type")!=="checkbox")||$(element).is("select")||$(element).is("textarea"))}function isTextInput(element){return(($(element).is("input")&&($(element).attr("type")==="text"))||$(element).is("textarea"))}function isCheckBox(element){return($(element).is("input")&&$(element).attr("type")==="checkbox")}function updateDom(value,escapeFlag){for(var i=0;i<domElements.length;i++){if(isTextInput(domElements[i])){$(domElements[i]).val(Dry.Utility.UnescapeHtml(value))}else{if(isCheckBox(domElements[i])){$(domElements[i]).attr("checked",value)}else{$(domElements[i]).html((escapeFlag?Dry.Utility.EscapeHtml(value):value))}}}}function field(value,escapeFlag,blur){if(value===undefined){return(currentValue)}else{if(value!==currentValue){if(escapeFlag){currentValue=Dry.Utility.EscapeHtml(value)}else{currentValue=value}updateDom(value,escapeFlag);field.Emit("change",currentValue)}else{if(blur){field.Emit("change",currentValue)}}}}field.InstanceId="";field.CssSelector="";var events={};field.On=function(event,callback){event=event.toLowerCase();if(events[event]===undefined){events[event]=[]}events[event].push(callback)};field.Emit=function(event,data){event=event.toLowerCase();if(events[event]!==undefined){for(var i=0;i<events[event].length;i++){events[event][i](data)}}};field.Focus=function(){for(var i=0;i<domElements.length;i++){$(domElements[i]).focus()}};field.Show=function(){for(var i=0;i<domElements.length;i++){$(domElements[i]).show();$(domElements[i]).removeClass("hide")}};field.Hide=function(){for(var i=0;i<domElements.length;i++){$(domElements[i]).hide();$(domElements[i]).addClass("hide")}};field.RefreshValue=function(){if(domElements.length>0){field($(domElements[0]).val(),true,true)}};function valueChangeHandler(event){field($(event.target).val(),true,true)}function checkboxChangeHandler(event){console.log("CHANGE HANDLER");field($(event.target).is(":checked"),true,true)}function filterToModelMembers(index){var result=false;$(this).parents("[id]").each(function(index){if(this.Model){if($(this).attr("id")===field.InstanceId){result=true}else{result=false}return(false)}});return(result)}field.Bind=function(instanceId,cssSelector){field.InstanceId=instanceId;if(cssSelector!==undefined){field.CssSelector=cssSelector}domElements=[];$("#"+field.InstanceId).find(field.CssSelector).filter(filterToModelMembers).each(function(index){domElements.push(this);if(isInput(this)){$(this).bind("blur",valueChangeHandler)}else{if(isCheckBox(this)){$(this).bind("click",checkboxChangeHandler)}}});if(currentValue!==""){updateDom(currentValue)}return(domElements.length>0)};(function(){if(defaultValue!==undefined){field(defaultValue)}})();return(field)}},View:function View(templateString,templateEngine,handlers){var that={};templateString=templateString||"";templateEngine=templateEngine||"";handlers=handlers||{};that.Model=function(){return(templateString)};that.Engine=function(){return(templateEngine)};that.Handlers=function(){return(handlers)};that.GetRenderEngine=function(engine){engine=engine.toLowerCase();if(engine==="mu"){return(Dry.BaseClasses.Models.RenderEngines.Mu())}else{return(null)}};that.Render=function(hash,callback){if(typeof(hash)==="function"){callback=hash;hash={}}var engine=that.GetRenderEngine(that.Engine());if(engine){engine.Render(that.Model(),hash,callback)}else{if(callback){callback("")}}};return(that)}},TypeBinder:function TypeBinder(types){var that={};var _types=types;that.Bind=function(json,rpcClient,boundModels){if(typeof(json)==="object"){json=JSON.stringify(json)}if(_types===null){return(JSON.parse(json))}var incoming=JSON.parse(json);var result=deserializeAndBind(json,rpcClient,boundModels);return(result)};that.CopyType=function(t){return(that.Bind(t.Hash()))};function bindTypes(rpcClient,boundModels){return(function(key,value){if(value!==null&&typeof(value)==="object"&&value.Type){if(_types[value.Type]){var newType=_types[value.Type](value);if(rpcClient){newType.ApiClient=rpcClient}if(boundModels){boundModels.push(newType)}return(newType)}else{throw (new Error("Type not found trying to deserialize: "+value.Type))}}return(value)})}function deserializeAndBind(json,rpcClient,boundModels){var result=JSON.parse(json,bindTypes(rpcClient,boundModels));return(result)}return(that)},JsonRpcClient:function(urlEndPoint,dataBinder){var Common={Http:{}};Common.Http.CallUrl=function(req,rpcData,callback){function makeAjaxRequest(){return((window.XMLHttpRequest?new XMLHttpRequest():(window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null)))}function callUrl(url,data,callback,callbackData){var http=makeAjaxRequest();if(http){http.onreadystatechange=function(){if(http.readyState==4){if(callback){if(callbackData){callback(http,callbackData)}else{callback(http)}}http.onreadystatechange=null}};if(!data){http.open("GET",url,true);http.send(null)}else{http.open("POST",url,true);http.send(data)}}}callUrl(req.url,rpcData,callback)};var that={};that.MakeClientRequest=function(id,method,params){return({id:id,method:method,params:params?params:[]})};that.HandleRpcError=function(rpc,callback){if(rpc.error){throw (new Error("RPC Error: "+JSON.stringify(rpc.error)))}};that.Call=function(methodName){var args=Array.prototype.slice.call(arguments);args.shift();var callback=null;var passError=false;if(typeof(args[args.length-1])==="function"){callback=args.pop()}if(typeof(args[args.length-2])==="function"){passError=args.pop();callback=args.pop()}var url=urlEndPoint;var rpcData=JSON.stringify(that.MakeClientRequest(1,methodName,args));var req={url:url,headers:{}};Common.Http.CallUrl(req,rpcData,function(res){if(res.status===200){var rpc=JSON.parse(res.responseText);if(dataBinder){rpc=dataBinder.Bind(rpc)}if(!rpc.error){if(!Array.isArray(rpc.result)){rpc.result=[rpc.result]}if(passError){rpc.result.unshift(null);if(callback){callback.apply(null,rpc.result)}}else{if(callback){callback.apply(null,rpc.result)}}}else{if(passError){if(callback){callback(rpc.error)}}else{that.HandleRpcError(rpc,callback)}}}else{throw (new Error("Server Error: "+res.status))}})};return(that)}},Classes:{ExpertApplicationLead:function ExpertApplicationLead(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ExpertApplicationLead";that.Validations=(function(){var that={};that.DisplayName=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.Title=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.EmailAddress=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired(),Dry.Validations.IsEmail()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",DisplayName:"",Title:"",EmailAddress:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayName","","Full Name",that.GetValidations("DisplayName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Professional Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ClientToken:function ClientToken(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ClientToken";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Token:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Token","","Token",that.GetValidations("Token"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},RailedPage:function RailedPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.BasicPage();var parent=Dry.Models.BasicPage();that.Parent=parent;that.IsParentViewField("Content");that.Type="RailedPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",LeftRail:"",Main:"",RightRail:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LeftRail","","LeftRail",that.GetValidations("LeftRail"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Main","","Main",that.GetValidations("Main"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"RightRail","","RightRail",that.GetValidations("RightRail"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},SignupPage:function SignupPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.BasicPage();var parent=Dry.Models.BasicPage();that.Parent=parent;that.IsParentViewField("Content");that.Type="SignupPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",SignupControl:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SignupControl","","SignupControl",that.GetValidations("SignupControl"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},CropperServer:function CropperServer(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="CropperServer";that.Validations={};that.AddRpcFunctions({Crop:""});var defaultHash={Id:"",UniqueName:"",ScaleImage:"",KeepOriginal:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UniqueName","","UniqueName",that.GetValidations("UniqueName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ScaleImage","","ScaleImage",that.GetValidations("ScaleImage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"KeepOriginal","","KeepOriginal",that.GetValidations("KeepOriginal"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Notification:function Notification(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Notification";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Title:"",Href:"",ObjectId:"",ObjectType:"",LastActivity:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Href","","Href",that.GetValidations("Href"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ObjectId","","ObjectId",that.GetValidations("ObjectId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ObjectType","","ObjectType",that.GetValidations("ObjectType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LastActivity",null,"LastActivity",that.GetValidations("LastActivity"),false);that.AddField(field);var handlers=null;that.Views={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Contact:function Contact(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Contact";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Contact Show">                <header>            <h1>CONTACT CHICKRx</h1>        </header>                <p>Please feel free to email us, and we will get back to you as soon as we can.</p>        <dl>            <dt>General feedback or inquiries:</dt>            <dd><a href="mailto:info@chickrx.com">info@chickrx.com</a></dd>                        <dt>Problems or issues using the site that require support:</dt>            <dd><a href="mailto:help@chickrx.com">help@chickrx.com</a></dd>            <dt>Copyright issues:</dt>            <dd><a href="/legal/copyright">copyright infringement form</a></dd>            <dt>Career inquiries:</dt>            <dd><a href="mailto:careers@chickrx.com">careers@chickrx.com</a></dd>            <dt>Advertising inquiries:</dt>            <dd><a href="mailto:advertising@chickrx.com">advertising@chickrx.com</a></dd>        </dl>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Select:function Select(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Select";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Options:null,SelectedIndex:null,Selected:null,TextFunction:null,AllowOther:false,Other:"",UseAddButton:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Options",null,"Options",that.GetValidations("Options"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SelectedIndex",null,"SelectedIndex",that.GetValidations("SelectedIndex"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Selected",null,"Selected",that.GetValidations("Selected"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TextFunction",null,"TextFunction",that.GetValidations("TextFunction"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AllowOther",false,"AllowOther",that.GetValidations("AllowOther"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Other","","Other",that.GetValidations("Other"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UseAddButton",false,"AddButton",that.GetValidations("UseAddButton"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){model.Other.Value.On("change",function(){model.Selected({IsOther:true,Value:model.Other()});model.Emit("select",model.Selected())})}};that.AddButton={OnClick:function(event){event.Model.Emit("add")}};that.Other={};that.Other.Value={OnClick:function(event){$("#"+event.Model.InstanceId()+" .Other .Value").focus()},OnFocus:function(event){$("#"+event.Model.InstanceId()+" .Other .OtherLabel").hide()}};that.Other.OtherLabel={OnClick:function(event){$("#"+event.Model.InstanceId()+" .Other .Value").focus()}};that.RenderedOptions={};that.RenderedOptions.Value={OnChange:function(event){event.Model.SelectedIndex(event.target.selectedIndex);if(event.Model.AllowOther()&&event.target.selectedIndex===event.Model.Options().length){event.Model.Other.Value.Show();$("#"+event.Model.InstanceId()+" .OtherLabel").removeClass("hide");if(event.Model.UseAddButton()){$("#"+event.Model.InstanceId()+" .AddButton").toggleClass("hide")}event.Model.Selected(null);event.Model.Other("")}else{event.Model.Other.Value.Hide();$("#"+event.Model.InstanceId()+" .OtherLabel").addClass("hide");if(event.Model.UseAddButton()){$("#"+event.Model.InstanceId()+" .AddButton").toggleClass("hide")}event.Model.Other("");event.Model.Selected(event.Model.Options()[event.target.selectedIndex])}event.Model.Emit("select",event.Model.Selected())}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "Select Show">        <span class = "RenderedOptions">            <select class = "Value">{{{RenderedOptions}}}</select>        </span>        <div class = "Other">            <input type="text" class = "Value" style="display:none;" />            <div class = "OtherLabel hide">Please specify "Other"</div>        </div>        <input type="button" class = "AddButton hide" value="Add"/>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.Options.Render=false;that.ViewHashFunctions.RenderedOptions=function(){var options=that.Options();var optionStr="";for(var i=0;i<options.length;i++){if(that.SelectedIndex()!==null&&that.SelectedIndex()===i){optionStr+='<option value="'+i+'" selected="yes">'+options[i].OptionString()+"</option>"}else{optionStr+='<option value="'+i+'">'+options[i].OptionString()+"</option>"}}if(that.AllowOther()){if(that.SelectedIndex()!==null&&that.SelectedIndex()===i){optionStr+='<option value="'+i+'" selected="yes">Other</option>'}else{optionStr+='<option value="'+i+'">Other</option>'}}return(optionStr)};return(that)},CropperClient:function CropperClient(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="CropperClient";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",CropperName:"",BaseUrl:"",AspectRatio:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CropperName","","CropperName",that.GetValidations("CropperName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BaseUrl","","BaseUrl",that.GetValidations("BaseUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AspectRatio","","AspectRatio",that.GetValidations("AspectRatio"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};var cropperId="";var cropper={};var imageId="";var coordinates=null;var jcrop={destroy:function(){}};function updateCoordinates(c){coordinates=c}function getData(){if(coordinates){return({uniqueName:cropper.CropperName(),id:imageId,widthConstraint:$(cropperId).find(".image-container").width(),heightConstraint:$(cropperId).find(".image-container").height(),x1:coordinates.x,y1:coordinates.y,w:coordinates.w,h:coordinates.h,x2:coordinates.x2,y2:coordinates.y2})}else{return(null)}}function hideImage(){jcrop.destroy();$(cropperId).find(".cropbox").unbind();$(cropperId).find(".cropbox").addClass("hide")}function attachJcrop(){var jcropOptions={aspectRatio:cropper.AspectRatio(),onChange:updateCoordinates,onSelect:updateCoordinates,setSelect:[]};var jcropSelector=cropperId+" .cropbox";$(cropperId).find(".cropbox").removeClass("hide");jcrop=$.Jcrop(jcropSelector,jcropOptions);jcrop.enable();jcrop.setSelect([50,50,200,200])}function insertImage(response,status,xhr,jqForm){var images=response.Images;var image=images[0];var absoluteUrl=image.Url;imageId=image.Id;$(cropperId).find(".cropbox").attr("src",absoluteUrl).load(attachJcrop)}function quickUpload(event){hideImage();$(cropperId).find('.Uploader input[type="file"]').submit()}that.File={OnChange:function(event){cropper=event.Model;cropperId="#"+event.Model.InstanceId();$(cropperId).find(".Uploader").ajaxForm({dataType:"json",success:insertImage});quickUpload(event)}};that.Crop={OnClick:function(event){if(event.Model.RunningCrop){return}event.Model.RunningCrop=true;var newData=getData();if(newData){if(newData.uniqueName){Dry.CropperServer().Api.Crop(newData,function(result){cropper.Emit("cropped",result);cropper.Emit("close")})}}else{Dry.PopupMessage({MessageTitle:"PLEASE ADD A PHOTO",Message:"Please upload and crop a photo before attempting to submit."}).Show();event.Model.RunningCrop=false}}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="CropperClient Edit">        <form class="Uploader" action="/cropper-upload-handler" enctype="multipart/form-data" method="post">            <input class="File" type="file" name="datafile" size="30" />            <input type="reset" class="hide" value="reset" />            <input type="submit" class="hide" value="upload" />            <span class="status"></span>        </form>        <form class="CropForm" action="/crop" method="post">            <fieldset>                <div class="image-container">                    <img class="cropbox hide" src="" alt="image to be cropped" />                </div>            </fieldset>            <fieldset class="controls">                <input class="Crop SubmitButton" type="button" name="submit" value="crop" />            </fieldset>        </form>        <div class="result">            <img class="cropped hide" src="" alt="result/cropped image" />        </div>    </div></div>{{{BindModelToDom}}}<script src="{{{ModelStaticRoot}}}/scripts/jquery.form.js" type="text/javascript"><\/script><script src="{{{ModelStaticRoot}}}/scripts/Jcrop/js/jquery.Jcrop.min.js" type="text/javascript"><\/script>',"Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},MasterPage:function MasterPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="MasterPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Title:"",Body:"",BuildNumber:"",EnableFeedback:true,AnalyticsClient:Dry.Models.AnalyticsClient({Type:"AnalyticsClient"}),InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Body","","Body",that.GetValidations("Body"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BuildNumber","","BuildNumber",that.GetValidations("BuildNumber"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EnableFeedback",true,"EnableFeedback",that.GetValidations("EnableFeedback"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AnalyticsClient",Dry.Models.AnalyticsClient({Type:"AnalyticsClient"}),"AnalyticsClient",that.GetValidations("AnalyticsClient"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Output",Dry.BaseClasses.Models.View('<!doctype html> <html lang="en">        <head>        <meta charset="utf-8" />        <meta name="description" content="The healthy living community for chicks. Get expert and peer answers to your health and wellness questions, follow topics that interest you, and join the conversation sharing insights and tips." />        <title>{{#Title}}{{Rendered}}{{/Title}}</title>                        <!-- BEGIN - YEAH, YOU NEED THESE, DON\'T MESS WITH THE ORDER -->        <link rel="stylesheet" type="text/css" href="/css/reset.css" />        <link rel="stylesheet" type="text/css" href="/css/fonts/bauer-bodoni/stylesheet.css" />        <link href="http://cloud.webtype.com/css/109c8d86-205f-463e-8040-8342994f3100.css" rel="stylesheet" type="text/css" />        <link rel="stylesheet" type="text/css" href="/css/popup-theme/jquery-ui-1.8.16.custom.css" />                        <link rel="stylesheet" type="text/css" href="/css/Dry.gen.css?{{#BuildNumber}}{{{Rendered}}}{{/BuildNumber}}" />                <!--[if !IE 7]><link rel="stylesheet" type="text/css" href="/css/ie-stickyfooter.css" /><![endif]-->        <!--[if IE 9]><link rel="stylesheet" type="text/css" href="/css/ie9-gradients.css"><![endif]-->                <link rel="stylesheet" type="text/css" href="/scripts/jquery.tzCheckbox/jquery.tzCheckbox.css" />                <script src="/scripts/modernizr.custom.57142.js"><\/script>        <script src="/scripts/json2.js"><\/script>        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"><\/script>         <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"><\/script>         <!-- <script src="/scripts/jquery-1.5.2.min.js"><\/script> -->        <script src="/scripts/jquery.tzCheckbox/jquery.tzCheckbox.js"><\/script>        <script src="/scripts/jquery.mustache.js"><\/script>        <script src="/scripts/Dry.environment.js"> <\/script>        <script src="/scripts/Dry.client.gen.js?{{#BuildNumber}}{{{Rendered}}}{{/BuildNumber}}"><\/script>        <!-- Skin CSS file -->        <!-- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/skin.css">-->        <!-- Utility Dependencies -->        <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"><\/script>        <script src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"><\/script>        <!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->        <script src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"><\/script>        <script src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"><\/script>        <script src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"><\/script>        <!-- Source file for Rich Text Editor-->        <script src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"><\/script>        <!-- Source file for Recaptcha needs to be here, breaks in models-->        <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"><\/script>        <!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"><\/script> -->        <!-- END - YEAH, YOU NEED THESE, DON\'T MESS WITH THE ORDER -->        {{#AnalyticsClient}}{{{Rendered}}}{{/AnalyticsClient}}        <script type="text/javascript">            $(document).ready(function(){                $(\'input[type=checkbox].Toggle\').tzCheckbox({                \t/* labels: [ \'Enable\', \'Disable\' ] */                });            });        <\/script>                <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">    </head>        <body>        {{#Body}}{{{Rendered}}}{{/Body}}        {{#EnableFeedback}}        {{#Rendered}}        <a href="/feedback" class="FeedbackContainer">            <div class="ReportABug">                REPORT<br />A<br />BUG            </div>                        <div class="Feedback">                FEEDBACK            </div>        </a>        {{/Rendered}}        {{/EnableFeedback}}    </body></html>',"Mu",handlers));that.View("Output");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},TeamChickRx:function TeamChickRx(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="TeamChickRx";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",TeamMembers:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TeamMembers",[],"Team ChickRx",that.GetValidations("TeamMembers"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TeamChickRx Show">        <h1>TEAM CHICKRx</h1>        <img src="/images/stacey-and-meghan.png" alt="photo of ChickRx founders: Stacey Borden and Meghan Muntean" />        <p>We\'re the co-founders of ChickRx, and have been close friends since meeting in 2005. Like most girlfriends, we\'d often seek each other\'s advice regarding our relationships, diets, beauty, workout routines, etc. One day we realized that, despite being well-educated, we and our friends were constantly confused, misinformed or worried about something health-related (you know, things like, "What the hell is going on with my skin - and is this normal?," "How do I get out of this unhealthy relationship?" or “Why am I suddenly getting unbearable cramps, and could this be serious?”...the list goes on and on).</p>        <p>So why wasn’t there a quick, easy and anonymous way to get expert answers to these questions? Importantly, why was there no health site for us, where we could have frank conversations with other young women going through the same things?</p>        <p>So we and our incredible team built ChickRx to solve these problems: to give young women a fun, cool and convenient place online to connect with health experts and peers who\'ve been there. We designed the site to be exactly what we and our friends wished we had during all those frantic text messages, deep heart to hearts and lighthearted brunch convos. We and our team hope that ChickRx enables you to live healthier and happier, and to help some other chicks out too!</p>        <p class="salutation">Stacey and Meghan</p>        {{#TeamMembers}}        <section class="team-member-container">        {{{Rendered}}}        </section>        {{/TeamMembers}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},MyActivityFeed:function MyActivityFeed(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.TabContainer();var parent=Dry.Models.TabContainer();that.Parent=parent;that.Type="MyActivityFeed";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:null,QuestionFeed:null,BlogFeed:null,AnswerFeed:null,CommentFeed:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",null,"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QuestionFeed",null,"QuestionsFeed",that.GetValidations("QuestionFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BlogFeed",null,"BlogFeed",that.GetValidations("BlogFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AnswerFeed",null,"ArticlesFeed",that.GetValidations("AnswerFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CommentFeed",null,"NeedsAnswersFeed",that.GetValidations("CommentFeed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var tabsContainer=model.Tabs();tabsContainer.AddSelectHandler(function(content){if(content.LoadAsync()){content.LoadAsync(false);content.Query().Skip=-5;content.GetMore()}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "MyActivityFeed Show">        <div class = "Fields">            <div class = "TabContainer-Container">{{#Tabs}}{{{Rendered}}}{{/Tabs}}</div>       </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}var viewHash=that.ViewHash;that.ViewHash=function(){that.QuestionFeed().Header(false);var tabs=[Dry.Tab({Heading:"MY QUESTIONS",Hidden:false,Content:that.QuestionFeed()}),Dry.Tab({Heading:"MY ANSWERS",Hidden:true,Content:that.AnswerFeed()}),Dry.Tab({Heading:"MY THOUGHTS",Hidden:true,Content:that.BlogFeed()}),Dry.Tab({Heading:"MY COMMENTS",Hidden:true,Content:that.CommentFeed()})];that.Tabs(Dry.TabContainer({Tabs:tabs}));viewHash.apply(that,arguments)};return(that)},RecentBlogPosts:function RecentBlogPosts(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="RecentBlogPosts";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",BlogPosts:"",Title:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BlogPosts","","BlogPosts",that.GetValidations("BlogPosts"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Aside",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "RecentBlogPosts Aside">        <div class = "Fields">            <!-- <header>                <h4>{{#Title}}{{{Rendered}}}{{/Title}}</h4>            </header> -->            <ul>                {{#BlogPosts}}                <li>{{{Rendered}}}</li>                {{/BlogPosts}}            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Featured:function Featured(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Featured";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Models:"",Title:"",LinkTitle:"",LinkUrl:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Models","","Models",that.GetValidations("Models"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LinkTitle","","LinkTitle",that.GetValidations("LinkTitle"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LinkUrl",null,"LinkUrl",that.GetValidations("LinkUrl"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="Featured Show">        <div class="Fields">            <header>                <h4 class="Title">{{#Title}}{{{Rendered}}}{{/Title}}</h4>                {{#HasLink}}                <a class="hide LinkTitle" {{{Href}}}>{{#LinkTitle}}{{{Rendered}}}{{/LinkTitle}}</a>                {{/HasLink}}            </header>            <section class="Models">                {{#Models}}{{{Rendered}}}{{/Models}}            </section>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.HasLink=function(){return(that.LinkUrl()!==null&&that.LinkUrl()!==undefined&&that.LinkUrl()!==false)};that.ViewHashFunctions.HasLink=that.HasLink;that.ViewHashFunctions.Href=function(){if(that.LinkUrl()){return"href="+that.LinkUrl()}else{return""}};return(that)},SplashHeader:function SplashHeader(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="SplashHeader";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Login:"",Newsletter:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Login","","Login",that.GetValidations("Login"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Newsletter","","Newsletter",that.GetValidations("Newsletter"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Test={OnClick:function(event){console.log("test button was clicked")}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<header id="{{{InstanceId}}}">    <div class="SplashHeader Show header">        <div class="login-container">{{#Login}}{{{Rendered}}}{{/Login}}</div>    </div></header>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ErrorPage:function ErrorPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.BasicPage();var parent=Dry.Models.BasicPage();that.Parent=parent;that.IsParentViewField("Content");that.Type="ErrorPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("NotFound",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ErrorPage NotFound">    <h1>Sorry. 404 action.</h1>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},QuestionSubmissionFeedback:function QuestionSubmissionFeedback(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="QuestionSubmissionFeedback";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Key:"",UnansweredQuestions:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Key","","Key",that.GetValidations("Key"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UnansweredQuestions","","Key",that.GetValidations("UnansweredQuestions"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "QuestionSubmissionFeedback Show">        <div class = "Fields">            <header>                <h1>Thanks for asking a question!</h1>                <p>We\'ll notify you when someone answers it. <a {{{LinkToYourQuestion}}}>See your question posted.</a></p>            </header>            <p>Help some other chicks out by answering their questions. Can you answer any of these?:</p>            <ul class="unanswered-questions">                {{#UnansweredQuestions}}                <li><a {{Href}}>{{#Title}}{{{Rendered}}}{{/Title}}</a></li>                {{/UnansweredQuestions}}            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.LinkToYourQuestion=function(){return'href="/questions/'+that.Key()+'"'};that.ViewHashFunctions.LinkToYourQuestion=that.LinkToYourQuestion;return(that)},Tab:function Tab(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Tab";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Heading:"",Content:"",Hidden:false,StartSelected:false,First:false,Last:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Heading","","Heading",that.GetValidations("Heading"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Content","","Content",that.GetValidations("Content"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Hidden",false,"Hidden",that.GetValidations("Hidden"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"StartSelected",false,"StartSelected",that.GetValidations("StartSelected"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"First",false,"First",that.GetValidations("First"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Last",false,"Last",that.GetValidations("Last"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}" class="{{#IsFirst}}First-Tab{{/IsFirst}} {{#ShouldStartSelected}}Selected{{/ShouldStartSelected}} {{#IsInner}}Inner-Tab{{/IsInner}} {{#IsLast}}Last-Tab{{/IsLast}}" {{#ShouldntStartSelected}}style="display:none;"{{/ShouldntStartSelected}}>   <div class = "Tab Show">    {{#Content}}{{{Rendered}}}{{/Content}}   </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.IsHidden=function(){return(that.Hidden())};that.ViewHashFunctions.IsFirst=function(){return(that.First())};that.ViewHashFunctions.IsLast=function(){return(that.Last())};that.ViewHashFunctions.IsInner=function(){return(!that.First()&&!that.Last())};that.ViewHashFunctions.ShouldStartSelected=function(){return(that.StartSelected())};that.ViewHashFunctions.ShouldntStartSelected=function(){return(!that.StartSelected())};return(that)},NotificationsList:function NotificationsList(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="NotificationsList";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Notifications:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Notifications",[],"Notifications",that.GetValidations("Notifications"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Clear={OnClick:function(event){if(event.Model.Notifications().length>0){Dry.User().Api.ClearNotifications(function(){event.Model.Notifications([]);event.Model.Refresh();event.Model.Emit("change")})}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "NotificationsList Show">       <div class = "Fields">            <div class="header ListHeader">                <div class="Label">                    <h2>NEW ACTIVITY</h2>                    <h1>NOTIFICATIONS</h1>                </div>                <a class="Clear">Clear Displayed</a>            </div>            <div class = "Notifications">                {{^NoNotifications}}<div>{{#Notifications}}{{{Rendered}}}{{/Notifications}}</div>{{/NoNotifications}}                {{#NoNotifications}}<div class="NoNotifications"><h2>No Notifications</h2></div>{{/NoNotifications}}            </div>            <div class="footer ListFooter">                &nbsp;            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Notifications.Value.On("change",function(){var model=that;var notifications=model.Notifications();for(var i=0;i<notifications.length;i++){notifications[i].On("Clear",function(notification){model.RemoveNotification(notification);if(model.Notifications().length===0){model.Refresh()}})}});that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.NoNotifications=function(){return(that.Notifications().length<=0)};that.RemoveNotification=function(notification){var notifications=that.Notifications();for(var i=0;i<notifications.length;i++){if(notifications[i].ObjectType()===notification.ObjectType()&&notifications[i].ObjectId()===notification.ObjectId()){Dry.Common.RemoveFromArray(that.Notifications(),i);that.Notifications.Value.Emit("change");that.Emit("change");return(true)}}return(false)};return(that)},AboutUs:function AboutUs(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AboutUs";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "AboutUs Show">        <header>            <h1>ABOUT CHICKRx</h1>        </header>        <p class="intro">ChickRx is a high quality health and wellness community for chicks - young women and women with a young state of mind. ChickRx is a place where you can anonymously ask health and wellness questions and get answers from experts and other members - young women like yourself, with relevant experiences and interesting insights. This is a community designed for you to frequent when you’re looking to be informed and entertained by juicy conversations, or when you have questions you want answered.</p>        <ul>            <li>                <strong>Our goal is to give you easier access to experts, to aggregate the collective wisdom of experts and peers around the health and wellness issues we worry or wonder about, and to create a fun and engaging community where you can access and contribute to this information.</strong> Aggregating multiple perspectives is particularly important when it comes to health questions/issues, since answers are rarely black or white, and getting multiple viewpoints provides significantly better information.                <ul>                    <li>We capture our community’s collective wisdom via the Q&A and Thoughts posted by experts and members and supplement this with entertaining, informative articles. Thought posts are a free form way for users to share helpful tips, personal experiences, links, photos, videos, etc.</li>                </ul>            <li>            <li>Since this is a health community and people are often discussing personal information, <strong>we let people be as anonymous as they want, </strong>so that they can engage with the community freely. This does not, however, give people the freedomto post irresponsibly: with the help of our community, we will remove posts that do not meet our standards for quality or respectfulness. If a member is repeatedly disrespectful or spamming, we reserve the right to remove her account at any time.</li>            <li><strong>Users can customize their site experience. </strong>Users can anonymously follow topics, questions, experts, and members that interest them, and be notified when there are new posts in things they follow.</li>            <li><strong>The community is run by our members and experts, </strong>who, in addition to asking and answering questions and posting Thoughts, curate the community by voting up great posts, organizing posts by tagging them with topics and flagging posts that should be removed.</li>            <li><strong>Content is well organized by topics. </strong>Users tag content with topics, and to augment this system of organization, we also utilize a smart tagging system, wherein parent topics are automatically added to a post, where relevant (for example, a user tags a question with the topic “Blackheads,” and the system automatically adds the topic “Acne” to that question, the parent topic for “Blackheads”). This helps make topic pages more comprehensive, capturing relevant content that might otherwise not have been tagged with that topic.</li>        </ul>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},TabContainer:function TabContainer(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="TabContainer";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",[],"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var tabs=model.Tabs();function showTab(id){for(var i=0;i<tabs.length;i++){if(id===tabs[i].InstanceId()){$("#"+tabs[i].InstanceId()).show();$("#"+tabs[i].InstanceId()+"-TabLink").addClass("Selected")}else{$("#"+tabs[i].InstanceId()).hide();$("#"+tabs[i].InstanceId()+"-TabLink").removeClass("Selected")}}}for(var i=0;i<tabs.length;i++){(function(tab){function tabSelectHandler(){showTab(tab.InstanceId());if(tab.SelectHandler){tab.SelectHandler(tab.Content())}}$("#"+tab.InstanceId()+"-TabLink").click(tabSelectHandler)})(tabs[i])}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TabContainer Show">        <div class="TabsHeader" id="{{{InstanceId}}}-TabsHeader">            {{#Tabs}}            <a class="{{#IsFirst}}First-Tab{{/IsFirst}} {{#ShouldStartSelected}}Selected{{/ShouldStartSelected}} {{#IsInner}}Inner-Tab{{/IsInner}} {{#IsLast}}Last-Tab{{/IsLast}}" id="{{{InstanceId}}}-TabLink">{{#Heading}}{{{Rendered}}}{{/Heading}}</a>            {{/Tabs}}        </div>        <div class="Tabs" id="{{{InstanceId}}}-Tabs">            {{#Tabs}}{{{Rendered}}}{{/Tabs}}        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Fields.Tabs.Value.On("change",function(){var tabs=that.Tabs();var hasSelected=false;for(var i=0;i<tabs.length;i++){if(typeof(tabs[i].StartSelected)==="function"){hasSelected=tabs[i].StartSelected()||hasSelected}else{hasSelected=tabs[i].StartSelected||hasSelected}if(i===0){if(typeof(tabs[i].First)==="function"){tabs[i].First(true)}else{tabs[i].First=true}}else{if(i===tabs.length-1){if(typeof(tabs[i].Last)==="function"){tabs[i].Last(true)}else{tabs[i].Last=true}}}}if(!hasSelected&&tabs.length>0){if(typeof(tabs[0].StartSelected)==="function"){tabs[0].StartSelected(true)}else{tabs[0].StartSelected=true}}});that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.AddSelectHandler=function(f){var tabs=that.Tabs();for(var i=0;i<tabs.length;i++){tabs[i].SelectHandler=f}};return(that)},UserProfile:function UserProfile(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="UserProfile";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",User:"",ActivityFeed:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"User","","User",that.GetValidations("User"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ActivityFeed","","Activity Feed",that.GetValidations("ActivityFeed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){$("#"+model.InstanceId()+" .About").removeClass("hide");if($("#"+model.InstanceId()+" .About.Expert").length>0){if($("#"+model.InstanceId()+" .About").height()>50){$("#"+model.InstanceId()+" .SeeMore").removeClass("hide")}}else{if($("#"+model.InstanceId()+" .About").height()>99){$("#"+model.InstanceId()+" .SeeMore").removeClass("hide")}}$("#"+model.InstanceId()+" .About").removeClass("Extended")}};that.SeeMore={OnClick:function(event){if(event.Model.Extended){$("#"+event.Model.InstanceId()+" .About").removeClass("Extended");$("#"+event.Model.InstanceId()+" .SeeMore").html("See More");event.Model.Extended=false}else{$("#"+event.Model.InstanceId()+" .About").addClass("Extended");$("#"+event.Model.InstanceId()+" .SeeMore").html("See Less");event.Model.Extended=true}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "UserProfile Show">        <div class = "Fields">            <header id="user-profile-header">                <section class="thumbnail">                    {{#User}}{{#ThumbnailImageLarge}}{{{Rendered}}}{{/ThumbnailImageLarge}}{{/User}}                </section>                <section class="header-content">                    <h1>{{#User}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/User}}</h1>                    {{#User}}                    {{#IsExpert}}                    <p class="Title">{{#Title}}{{{Rendered}}}{{/Title}}</p>                    <p id="CityState">{{#BusinessAddress}}{{{CityState}}}{{/BusinessAddress}}</p>                    {{/IsExpert}}                    <div class="About {{#IsExpert}}Expert{{/IsExpert}} Extended hide">{{#About}}{{{Rendered}}}{{/About}}</div>                    <a class="SeeMore hide">See More</a>                    {{/User}}                </section>            </header>            <section class="ActivityFeed">                {{#User}}{{#ActivityFeed}}{{{Rendered}}}{{/ActivityFeed}}{{/User}}            </section>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ThreeInputDate:function ThreeInputDate(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ThreeInputDate";that.Validations=(function(){var that={};var UpdatingDate=false;that.Date=[{Validation:function(model,field,callback){if(model.IsRequired()){callback(model.Day()!==""&&model.Month()!==""&&model.Year()!=="")}else{callback(true)}},ValidationMessage:"Date is required."},{Validation:function(model,field,callback){if(model.Month()!==""&&model.Day()!==""&&model.Year()!==""){callback(model.Date()!==null)}else{callback(true)}},ValidationMessage:"Please enter a valid date."}];that.Day=[{Validation:function(model,field,callback){model.Date.Validate();callback(true)},ValidationMessage:""}];that.Month=[{Validation:function(model,field,callback){model.Date.Validate();callback(true)},ValidationMessage:""}];that.Year=[{Validation:function(model,field,callback){model.Date.Validate();callback(true)},ValidationMessage:""}];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",Day:"",Month:"",Year:"",Date:"",IsRequired:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Day","","Day",that.GetValidations("Day"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Month","","Month",that.GetValidations("Month"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Year","","Year",that.GetValidations("Year"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Date","","Date",that.GetValidations("Date"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"IsRequired",false,"IsRequired",that.GetValidations("IsRequired"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Day={OnKeyUp:function(event){if(event.which>32&&event.which<126){var model=event.Model;if($("#"+model.InstanceId()+" .Day .Value").val().length===2){$("#"+model.InstanceId()+" .Year .Value").focus()}}}};that.Month={OnKeyUp:function(event){if(event.which>32&&event.which<126){var model=event.Model;if($("#"+model.InstanceId()+" .Month .Value").val().length===2){$("#"+model.InstanceId()+" .Day .Value").focus()}}}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "ThreeInputDate Input">        <form class = "Fields">            <fieldset class = "Month">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Day">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Year">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <small>MM-DD-YYYY</small>            <div class = "Date">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </div>        </form>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");function setDateHandler(){if(that.Month()!==""&&that.Day()!==""&&that.Year()!==""){var dateStr=that.Month()+"/"+that.Day()+"/"+that.Year();var date=Dry.Date();if(date.FromString(dateStr)){that.Date(date);that.Emit("changed")}else{that.Date(null);that.Emit("changed")}}}that.Day.Value.On("change",setDateHandler);that.Month.Value.On("change",setDateHandler);that.Year.Value.On("change",setDateHandler);that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.RequiredValidation=function(message){return({Validation:function(model,field,callback){callback(typeof(field.Value())==="object"&&field.Value().Date&&field.Value().Date()!=="")},ValidationMessage:function(model,field,callback){if(message){callback(message)}else{callback(field.Label()+" is a required field.")}}})};return(that)},PageFooter:function PageFooter(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="PageFooter";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Newsletter:[Dry.Models.Newsletter({Type:"Newsletter",View:"Show"})],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Newsletter",[Dry.Models.Newsletter({Type:"Newsletter",View:"Show"})],"Newsletter",that.GetValidations("Newsletter"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="PageFooter Show">        <section class="press">            <header>                <h2>ChickRx in the Press</h2>            </header>            <img src="/images/press.png" alt="list of organizations that have written about ChickRx" /><!--            <ul class="primary-press">                <li><a id="daily-candy">DailyCandy</a></li>                <li><a id="tech-crunch">TechCrunch</a></li>            </ul>            <ul class="secondary-press">                <li><a id="the-huffington-post">The Huffington Post</a></li>                <li><a id="san-francisco-chronicle">San Francisco Chronicle</a></li>            </ul>-->        </section>        <section class="follow">            <header>                <h2>Gimme More</h2>            </header>            <ul>                <li><a class="facebook" href="http://www.facebook.com/ChickRx">ChickRx Facebook Feed</a></li>                <li><a class="twitter" href="http://www.twitter.com/#!/chickrx">ChickRx Twitter Feed</a></li>            </ul>            <section class="newsletter-container">{{#Newsletter}}{{{Rendered}}}{{/Newsletter}}</section>        </section>        <section class="legal">            <small class="copyright">&copy; 2011 CHICKRX, INC. ALL RIGHTS RESERVED</small>            <ul>                <li><a href="/about/us">About Us</a></li>                <li><a href="/about/team">Team</a></li>                <li><a href="/about/help">Help</a></li>                <li><a href="/about/contact">Contact Us</a></li>                <li><a href="/legal/terms-of-use">Terms of Use</a></li>                <li><a href="/legal/privacy-policy">Privacy Policy</a></li>            </ul>            <section class="disclaimer">                <small>ChickRx is for information and entertainment purposes only, and does not provide medical advice, diagnosis or treatment. Use of this site is subject to our <a href="/legal/terms-of-use">Terms of Use</a> and <a href="/legal/privacy-policy">Privacy Policy</a>.</small>            </section>       </section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Popup:function Popup(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Popup";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Width:"auto",Height:"auto",PopupTitle:"",Content:"",Modal:false,Resizeable:false,IsOpen:false,DisplayOnRender:false,Position:"center",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Width","auto","Width",that.GetValidations("Width"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Height","auto","Width",that.GetValidations("Height"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PopupTitle","","Title",that.GetValidations("PopupTitle"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Content","","Content",that.GetValidations("Content"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Modal",false,"Modal",that.GetValidations("Modal"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Resizeable",false,"Resizeable",that.GetValidations("Resizeable"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"IsOpen",false,"IsOpen",that.GetValidations("IsOpen"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayOnRender",false,"DisplayOnRender",that.GetValidations("DisplayOnRender"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Position","center","Position",that.GetValidations("Position"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Output",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}" class="hide">    <div class = "Popup Output">       <div id = "{{{InstanceId}}}-Content">{{#Content}}{{{Rendered}}}{{/Content}}</div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Output");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Show=function(flag){flag=(flag===undefined?true:flag);if(flag){var dialogOptions={width:that.Width(),height:that.Height(),position:that.Position(),title:that.PopupTitle(),modal:that.Modal(),resizable:that.Resizeable(),close:function(){that.Destroy();that.Emit("close")}};if(that.IsOpen()){that.Hide()}function modelCloseHandler(){that.Hide()}that.Render(document.body,function(){if(Dry.IsModel(that.Content())){that.Content().RemoveListener("close","Popup");that.Content().On("close","Popup",modelCloseHandler)}$("#"+that.InstanceId()).removeClass("hide");$("#"+that.InstanceId()).dialog(dialogOptions);var pos=$(".ui-dialog.ui-widget").offset();if(pos.top<30){pos.top=30;$(".ui-dialog.ui-widget").offset(pos)}if(that.Modal()){$(".ui-widget-overlay").height($(document).height())}});that.IsOpen(true)}else{if(that.InstanceId()){$("#"+that.InstanceId()).dialog("close");that.Destroy()}that.IsOpen(false)}};that.Destroy=function(){if(that.InstanceId()){$("#"+that.InstanceId()).dialog("destroy");$("#"+that.InstanceId()).remove()}};that.Hide=function(){that.Show(false)};that.On("bound",function(instanceId){if(that.DisplayOnRender()&&!Dry.Models.Popup[that.InstanceId()]){Dry.Models.Popup[that.InstanceId()]=true;that.DisplayOnRender(false);setTimeout(function(){that.Show()},10)}});return(that)},ExpertSettings:function ExpertSettings(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ExpertSettings";that.Validations=(function(){var that={};that.UserName=[Dry.Validations.IsRequired(),Dry.Validations.IsValidExpertUserName(),Dry.Validations.UserNameAvailableOrCurrentUser()];that.DisplayName=[Dry.Validations.IsRequired(),Dry.Validations.IsValidExpertDisplayName(),];that.About=[Dry.Validations.Expects("string")];that.EmailSettings=[Dry.Validations.Expects("EmailSettings")];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",UserName:"",DisplayName:"",Thumbnail:"",About:"",DisplayAbout:"",EmailAddress:"",EmailSettings:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserName","","Username",that.GetValidations("UserName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayName","","Display Name",that.GetValidations("DisplayName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Thumbnail","","Thumbnail",that.GetValidations("Thumbnail"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"About","","About",that.GetValidations("About"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayAbout","","DisplayAbout",that.GetValidations("DisplayAbout"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailSettings","","EmailSettings",that.GetValidations("EmailSettings"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ExpertSettings Input">        <form class = "Fields">            <fieldset class = "UserName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "DisplayName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Thumbnail">                <label>                    <span class = "Label"></span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>                <div>{{#Thumbnail}}{{{Rendered}}}{{/Thumbnail}}</div>            </fieldset>            <fieldset class = "About">                <label>                    <span class = "Label"></span>                    <textarea class = "Value" rows="8" cols="40"></textarea>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "EmailAddress">                <label>                    <span class = "Label"></span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>                <div>{{#EmailAddress}}{{{Rendered}}}{{/EmailAddress}}</div>            </fieldset>            <fieldset class = "Password">                <span class = "Label">Password</span>                <input class="ResetPassword" type="button" value="reset password" />            </fieldset>            <fieldset class = "EmailSettings">                <label>                    <span class = "Label"></span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>                <div>{{#EmailSettings}}{{{Rendered}}}{{/EmailSettings}}</div>            </fieldset>            <input class="SaveSettings" type="submit" value="save" />        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.SaveSettings=function(){that.Validate(function(isValid){if(isValid){Dry.User().Api.SaveSettings(that,function(result){Dry.Logger.debug("SaveSettings: "+result.message)})}})};return(that)},Follow:function Follow(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Follow";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",ObjectType:"",ObjectId:"",Following:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ObjectType","","ObjectType",that.GetValidations("ObjectType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ObjectId","","ObjectId",that.GetValidations("ObjectId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Following",false,"FOLLOW",that.GetValidations("Following"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){if(!Dry.Page){Dry.Page={}}if(!Dry.Page.FollowModels){Dry.Page.FollowModels=[]}Dry.Page.FollowModels.push(model)}};that.Following={};that.Following.Button={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;event.Model.ToggleFollow(function(){event.Model.Running=false})}};return(that)})();that.AddView("EditAside",Dry.BaseClasses.Models.View('<div class="Follow Container" id="{{{InstanceId}}}">    <div class="Follow EditAside">        <div class="Fields">            <section class="Following">                <header>                    <h3><span>{{{FollowingLabel}}}</span>&nbsp;{{{ObjectLabel}}}</h3>                    <small class="Caption">{{{Caption}}}</small>                </header>                <button class="Button {{#Following}}{{{Rendered}}}{{/Following}}"></button>            </section>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.ObjectLabel=function(){var type=that.ObjectType();if(type==="Question"){return("Question")}else{if(type==="BlogPost"){return("Thought")}else{if(type==="Tag"){return("Topic")}else{if(type==="User"){return("Member")}else{if(type==="Expert"){return("Expert")}}}}}};that.ViewHashFunctions.FollowingLabel=function(){if(that.Following()){return("UNFOLLOW")}else{return("FOLLOW")}};that.ViewHashFunctions.Caption=function(){var type=that.ObjectType();if(type==="Question"){return("(you will be notified of new answers)")}else{if(type==="BlogPost"){return("(you will be notified of new comments)")}else{if(type==="Tag"){return("")}else{if(type==="User"||type==="Expert"){return("(only their public posts)")}}}}};that.FollowPagePost=function(){var followModels=[];if(Dry.Page&&Dry.Page.FollowModels){followModels=Dry.Page.FollowModels}for(var i=0;i<followModels.length;i++){var type=followModels[i].ObjectType();if(type==="BlogPost"||type==="Article"||type==="Question"){followModels[i].FollowIfNotFollowing();return}}};that.ToggleFollow=function(callback){Dry.User().Api.ToggleFollow(that.ObjectType(),that.ObjectId(),function(){that.Following(!that.Following());that.Refresh();if(callback){callback()}})};that.FollowIfNotFollowing=function(){if(!that.Following()){that.ToggleFollow()}};return(that)},AboutPage:function AboutPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AboutPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",null,"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "AboutPage Show">        <div class = "Fields">            <div class = "TabContainer PaddingFix">{{#Tabs}}{{{Rendered}}}{{/Tabs}}</div>        </div>   </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},AnalyticsClient:function AnalyticsClient(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AnalyticsClient";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Code",Dry.BaseClasses.Models.View("<script type=\"text/javascript\">    {{#IsDevelopment}} /* Development */        var googleAccount = 'UA-29271717-1';        /* End Development */ {{/IsDevelopment}}         {{#IsProduction}} /* Production */        var googleAccount = 'UA-29272609-1';        /* End Production */ {{/IsProduction}}         /* Google Analytics */    var _gaq = _gaq || [];    _gaq.push(['_setAccount', googleAccount]);    _gaq.push(['_trackPageview']);    _gaq.push(['_trackPageLoadTime']);      (function() {      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);    })();        _gaq.push(['_setCustomVar', 1, 'Logged In', \"{{IsUser}}\", 2 ]);    _gaq.push(['_setCustomVar', 2, 'User Type', \"{{UserType}}\", 2 ]);        Dry.AnalyticsClient = Dry.AnalyticsClient();        /* End Google Analytics */<\/script>","Mu",handlers));that.View("Code");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Track=function(){};that.RecordEvent=function(event){};var user=null;that.User=function(u){if(u){user=u;return(that)}else{return(user)}};that.ViewHashFunctions.User=function(){return(that.User())};that.ViewHashFunctions.HasUser=function(){if(that.User()){return(true)}else{return(false)}};that.ViewHashFunctions.IsUser=function(){if(that.User()){return("True")}else{return("False")}};that.ViewHashFunctions.UserType=function(){if(!that.User()){return("Visitor")}else{if(that.User().HasRole("Admin")){return("Admin")}else{return(that.User().Type)}}};that.ViewHashFunctions.IsProduction=function(){return(Dry.Project.IsProduction())};that.ViewHashFunctions.IsDevelopment=function(){return(!Dry.Project.IsProduction())};return(that)},AnsweringGuidelines:function AnsweringGuidelines(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AnsweringGuidelines";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "AnsweringGuidelines Show">        <div class = "Fields">            <header>                <h1>When Answering</h1>            </header>            <ul>                <li>Be helpful, not spammy.</li>                <li>Speak generally and don\'t attempt to diagnose.</li>                <li>Don\'t recommend any procedures, medications, or actions (though you can speak to things you have done and how that turned out for you).</li>                <li>User proper grammar and spelling, and be respectful of others.</li>            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},EmailSettings:function EmailSettings(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="EmailSettings";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",AnswerQuestionFollow:"",CommentQuestonFollow:"",ModeratorQuestionEdit:"",AnswerQuestionAsked:"",CommentQuestionAsked:"",CommentsOnMyAnswer:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AnswerQuestionFollow","","Someone answers a question I follow",that.GetValidations("AnswerQuestionFollow"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CommentQuestonFollow","","Someone comments on a question I follow",that.GetValidations("CommentQuestonFollow"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ModeratorQuestionEdit","","A Moderator edits a question I ask",that.GetValidations("ModeratorQuestionEdit"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AnswerQuestionAsked","","Someone answers a question I asked",that.GetValidations("AnswerQuestionAsked"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CommentQuestionAsked","","Someone comments on a question I asked",that.GetValidations("CommentQuestionAsked"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CommentsOnMyAnswer","","Someone comments on my answer, blog post or comment",that.GetValidations("CommentsOnMyAnswer"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "EmailSettings Input">        <h1>Email me when...</h1>        <div class = "Fields">            <fieldset class="section">                <legend>For Things I Anonymously Follow</legend>                <fieldset class = "AnswerQuestionFollow">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "CommentQuestonFollow">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "ModeratorQuestionEdit">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>            </fieldset>            <fieldset class="section">                <legend>For Questions I Anonymously Asked</legend>                <fieldset class = "AnswerQuestionAsked">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "CommentQuestionAsked">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>            </fieldset>            <fieldset class="section">                <legend>For Things I Posted (Either Anonymously or Publicly)</legend>                <fieldset class = "CommentsOnMyAnswer">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "Label email-settings-label"></span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>            </fieldset>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},HeaderPostControl:function HeaderPostControl(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="HeaderPostControl";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:{},InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",{},"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){$("#"+model.InstanceId()+" a.First-Tab").click(function(){if(model.IsExtended){$("#"+model.InstanceId()+" .HeaderPostControl.Show").addClass("Extended")}});$("#"+model.InstanceId()+" a.Last-Tab").click(function(){if($("#"+model.InstanceId()+" .HeaderPostControl.Show").hasClass("Extended")){model.IsExtended=true;$("#"+model.InstanceId()+" .HeaderPostControl.Show").removeClass("Extended")}else{model.IsExtended=false}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "HeaderPostControl Show">        <div class = "Fields">            <div class="Tabs">                {{#Tabs}}                    {{{Rendered}}}                {{/Tabs}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}var tabs=[Dry.Tab({Heading:"ASK",Content:Dry.Question({Type:"Question",View:"Ask"})}),Dry.Tab({Heading:"SHARE",Content:Dry.BlogPost({Type:"BlogPost",View:"Write"})})];that.Tabs(Dry.TabContainer({Tabs:tabs}));return(that)},ForgotPassword:function ForgotPassword(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ForgotPassword";that.Validations=(function(){var that={};that.EmailAddress=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),Dry.Validations.UserEmailAddressExists()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",EmailAddress:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Submit={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){Dry.User().Api.ResetPassword(event.Model.EmailAddress(),function(){event.Model.Emit("close");Dry.PopupMessage({PopupTitle:"SUCCESS!",Message:"We've sent you a new password. Check your email."}).Show()})}})}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="ForgotPassword Input">        <h2>It\'s cool, we forget stuff too...</h2>         <form class="Fields">            <fieldset class="EmailAddress">                <label>                    <span class="Label"></span>                    <input class="Value" type="text" />                </label>            </fieldset>           <input class="Submit" type="button" value="SUBMIT" />            <div class="EmailAddress">                <div class="Validations">                    <p class="UnnamedValidations">                        <span class="Message"></span>                    </p>                </div>            </div>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ProcessResetRequest=function(){that.Validate(function(isValid){if(isValid){Dry.ResetPassword().Api.ProcessResetRequest(that.EmailAddress(),function(result){that.Emit("close")})}})};return(that)},Category:function Category(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Category";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",TagNode:null,Feed:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TagNode",null,"TagNode",that.GetValidations("TagNode"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Feed",null,"Feed",that.GetValidations("Feed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Category Show">        <section class="TagNode Wrapper">{{#TagNode}}{{{Rendered}}}{{/TagNode}}</section>        <section>{{#Feed}}{{{Rendered}}}{{/Feed}}</section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},NotificationUser:function NotificationUser(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Notification();var parent=Dry.Models.Notification();that.Parent=parent;that.Type="NotificationUser";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",NumberOfAnswers:0,NumberOfBlogPosts:0,NumberOfQuestions:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfAnswers",0,"NumberOfAnswers",that.GetValidations("NumberOfAnswers"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfBlogPosts",0,"NumberOfBlogPosts",that.GetValidations("NumberOfBlogPosts"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfQuestions",0,"NumberOfQuestions",that.GetValidations("NumberOfQuestions"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.NotificationUser={OnMouseOver:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")},OnMouseOut:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")}};that.Title={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){window.location=event.Model.Href()})}};that.ClearThisNotification={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){$("#"+event.Model.InstanceId()).remove();event.Model.Emit("Clear",event.Model)})}};return(that)})();that.AddView("Notification",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <section class="NotificationUser Notification">        <section class="NotificationContainer">            <section class="Fields">                <h1 class="Title"><a>{{#Title}}{{{Rendered}}}{{/Title}}</a></h1>                <h4 class="NumberOfPosts">                    {{{NumberOfPostsDisplay}}}                </h4>            </section>            <a class="ClearThisNotification hide">X</a>        </section>    </section></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Notification");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.AnswerPlural=function(){if(that.NumberOfAnswers()===1){return("ANSWER")}else{return("ANSWERS")}};that.BlogPostPlural=function(){if(that.NumberOfBlogPosts()===1){return("THOUGHT")}else{return("THOUGHTS")}};that.QuestionPlural=function(){if(that.NumberOfQuestions()===1){return("QUESTION")}else{return("QUESTIONS")}};that.ViewHashFunctions.NumberOfPostsDisplay=function(){var display="";var before=false;if(that.NumberOfQuestions()>0){display+=that.NumberOfQuestions()+"&nbsp;NEW "+that.QuestionPlural();before=true}if(that.NumberOfAnswers()>0){if(before){display+='&nbsp;<span class="bullet">&bull;</span>&nbsp;'}display+=that.NumberOfAnswers()+"&nbsp;NEW "+that.AnswerPlural();before=true}if(that.NumberOfBlogPosts()>0){if(before){display+='&nbsp;<span class="bullet">&bull;</span>&nbsp;'}display+=that.NumberOfBlogPosts()+"&nbsp;NEW "+that.BlogPostPlural();before=true}return(display)};return(that)},TagPicker:function TagPicker(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="TagPicker";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tags:[],ModelField:"Tags",Validations:[],Model:null,Max:-1,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tags",[],"Tags",that.GetValidations("Tags"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ModelField","Tags","ModelField",that.GetValidations("ModelField"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Validations",[],"Validations",that.GetValidations("Validations"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Model",null,"Model",that.GetValidations("Model"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Max",-1,"Max",that.GetValidations("Max"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function getTag(tags,tagValue){for(var i=0;i<tags.length;i++){if(tags[i].Tag()===tagValue){return(tags[i])}}return(null)}function enableCheckBoxes(model,flag){$("#"+model.InstanceId()+" .TagPickerTagContainer input").each(function(index){if(!$(this).is(":checked")){if(flag){$(this).removeAttr("disabled")}else{$(this).attr("disabled","disabled")}}})}function clickHandler(model){function handler(event){var tag=getTag(model.Tags(),$(event.target).val());if(tag){if(event.target.checked){model.Selected++;model.Model()[model.ModelField()]().push(tag);model.Model().Emit("TagAdded")}else{model.Selected--;var modelTags=model.Model()[model.ModelField()]();for(var i=0;i<modelTags.length;i++){if(modelTags[i].Tag()===$(event.target).val()){Dry.Common.RemoveFromArray(modelTags,i);model.Model().Emit("TagRemoved");break}}}}if(model.Max()>0&&model.Selected>=model.Max()){enableCheckBoxes(model,false)}else{if(model.Max()>0){enableCheckBoxes(model,true)}}}return(handler)}that.Model={OnBound:function(model){model.Selected=0;$("#"+model.InstanceId()+" .TagPickerTagContainer input").each(function(index){$(this).click(clickHandler(model))})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TagPicker Show">        <div class = "Fields">            <span class = "Tags">                {{#Tags}}                    <div class="TagPickerTagContainer">                        <input type="checkbox" name="{{{#Key}}}{{{Rendered}}}{{{/Key}}}" value="{{#Tag}}{{{Rendered}}}{{/Tag}}" /> {{#Tag}}{{{Rendered}}}{{/Tag}}                    </div>                {{/Tags}}            </span>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.Model.Render=false;return(that)},MyAccount:function MyAccount(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="MyAccount";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",User:null,NumberOfNotifications:0,NotificationsList:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"User",null,"User",that.GetValidations("User"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfNotifications",0,"NumberOfNotifications",that.GetValidations("NumberOfNotifications"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NotificationsList",[],"Notifications",that.GetValidations("NotificationsList"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function updateNumberOfNotifications(model){var notifications=model.NotificationsList().Notifications();if(notifications.length>0){nextTick(function(){model.NumberOfNotifications(notifications.length);$(".MyAccount.Show .NumberOfNotifications").removeClass("hide")})}else{nextTick(function(){model.NumberOfNotifications(notifications.length);$(".MyAccount.Show .NumberOfNotifications").addClass("hide")})}}that.Model={OnBound:function(model){if(!model.User()){Dry.Utility.GetCurrentUser(function(user){if(user.ShowTips()){var tips=Dry.Popup({Content:Dry.GettingStartedTips({Type:"GettingStartedTips",View:user.Type}),PopupTitle:"GETTING STARTED TIPS",Width:600});tips.On("close",function(){user.Api.ShowTips(false)});tips.Show()}model.User(user);model.Refresh();nextTick(function(){Dry.User().Api.GetNotifications(function(notifications){notifications.sort(Dry.DateTime().SortObjects("LastActivity",true));model.NotificationsList(Dry.NotificationsList({Notifications:notifications}));model.Refresh();model.NotificationsList().On("change",function(){nextTick(function(){updateNumberOfNotifications(model)})});nextTick(function(){updateNumberOfNotifications(model)})})})});$(document.body).click(function(event){hideNotifications();hideUserBox()})}}};function hideNotifications(){if(!$("#NotificationList").hasClass("hide")){$("#NotificationList").addClass("hide");$(".NotificationsHotSpot").removeClass("Active")}}function hideUserBox(){if(!$(".MyAccountLinks").hasClass("hide")){$(".MyAccountLinks").addClass("hide");$(".UserName").removeClass("Active")}}that.NotificationsHotSpot={OnClick:function(event){event.stopPropagation();hideUserBox();$("#NotificationList").toggleClass("hide");$(".NotificationsHotSpot").toggleClass("Active")}};that.NotificationsList={OnClick:function(event){event.stopPropagation()}};that.UserName={OnClick:function(event){event.stopPropagation();hideNotifications();$(".MyAccountLinks").toggleClass("hide");$(".UserName").toggleClass("Active")}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="MyAccount Show">        <div class="Thumbnail">{{#User}}{{#ThumbnailImageMyAccount}}{{{Rendered}}}{{/ThumbnailImageMyAccount}}{{/User}}</div>        <div class="Buttons">            <div class="UserNameDisplay"><span>Hi, </span>{{#User}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/User}}</div>            <div class="UserName">My Account<div class="DownArrow"></div></div>            <div class="MyAccountLinks hide">                <ul>                    <li><a {{#User}}{{{Href}}}{{/User}} title="link to my profile">Public Profile</a></li>                    <li><a href="/my-account/settings" title="settings">Settings</a></li>                    <li><a href="/my-account/activity" title="settings">My Activity</a></li>                    <li><a href="/my-account/following" title="settings">Following</a></li>                    <li><a href="/security/logout" title="log out">Log Out</a></li>                </ul>            </div>            <div class="Notifications">                <div class="NotificationsHotSpot">Notifications<div class="DownArrow"></div></div>                <span class="Fields">                    <span class="NumberOfNotifications hide"><span class="Value"></span></span>                </span>            </div>            <div id="NotificationList" class="NotificationList hide">                <div id="NotificationListContainer">                    {{#NotificationsList}}{{{Rendered}}}{{/NotificationsList}}                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},NotEnoughContent:function NotEnoughContent(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="NotEnoughContent";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.AskQuestion={OnClick:function(event){window.location="/ask"}};that.WriteBlogPost={OnClick:function(event){window.location="/blog"}};return(that)})();that.AddView("FeedItem",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "NotEnoughContent FeedItem">        <div class = "Fields">            <header>                <h2>Be one of the first to post on this topic:</h2>                <section class="contribute">                    <button class="AskQuestion" type="button">anonymously ask question</button>                    <button class="WriteBlogPost" type="button">write a blog post</button>                </section>            </header>            <div class="Spacer"></div>            <footer>                <h2>In the meantime, here\'s some totally unrelated new stuff:</h2>            </footer>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},NotificationBlogPost:function NotificationBlogPost(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Notification();var parent=Dry.Models.Notification();that.Parent=parent;that.Type="NotificationBlogPost";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",NumberOfComments:0,DirectResponse:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfComments",0,"NumberOfComments",that.GetValidations("NumberOfComments"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DirectResponse",false,"DirectResponse",that.GetValidations("DirectResponse"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.NotificationBlogPost={OnMouseOver:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")},OnMouseOut:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")}};that.Title={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){window.location=event.Model.Href()})}};that.ClearThisNotification={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){$("#"+event.Model.InstanceId()).remove();event.Model.Emit("Clear",event.Model)})}};return(that)})();that.AddView("Notification",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="NotificationBlogPost Notification">        <div class="NotificationContainer">            <div class="Fields">                <h1 class="Title">{{#DirectResponse}}{{#Rendered}}<span class="DirectResponse">&#9733;</span>&nbsp;{{/Rendered}}{{/DirectResponse}}<a>{{#Title}}{{{Rendered}}}{{/Title}}</a></h1>                <h4 class="NumberOfPosts">                    {{#NumberOfComments}}{{{Rendered}}}{{/NumberOfComments}}&nbsp;NEW {{CommentPlural}}                </h4>            </div>            <a class="ClearThisNotification hide">X</a>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Notification");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.CommentPlural=function(){if(that.NumberOfComments()===1){return("COMMENT")}else{return("COMMENTS")}};return(that)},FindPage:function FindPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="FindPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",null,"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "FindPage Show">        <div class = "Fields">            <div class = "PageTabs">                <div class="BoxHeaderLeft">&nbsp;</div>                {{#Tabs}}{{{Rendered}}}{{/Tabs}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Share:function Share(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Share";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",FacebookLink:"",FacebookText:"",TwitterLink:"",TwitterText:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"FacebookLink","","FacebookLink",that.GetValidations("FacebookLink"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"FacebookText","","FacebookText",that.GetValidations("FacebookText"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TwitterLink","","TwitterLink",that.GetValidations("TwitterLink"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TwitterText","","TwitterText",that.GetValidations("TwitterText"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Share Show">        <div class = "Fields">            <div class="Facebook">                <a name="fb_share" share_url="{{#FacebookLink}}{{{Rendered}}}{{/FacebookLink}}"></a>                <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"><\/script>            </div>            <div class="Twitter">                <a href="https://twitter.com/share" class="twitter-share-button" data-url="{{#TwitterLink}}{{{Rendered}}}{{/TwitterLink}}">Tweet</a>                <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");<\/script>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},PopularQuestions:function PopularQuestions(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="PopularQuestions";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Questions:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Questions","","Questions",that.GetValidations("Questions"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Aside",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "PopularQuestions Show">        <div class = "Fields">            <header>                <h4>Questions</h4>            </header>            <ul>                {{#Questions}}                <li>{{{Rendered}}}</li>                {{/Questions}}            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Captcha:function Captcha(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Captcha";that.Validations=(function(){var that={};that.Solved=[{Validation:function(model,field,callback){model.Validation(model,field,callback)},ValidationMessage:"Captcha invalid, please try again."}];return(that)})();that.AddRpcFunctions({GetSolvedToken:""});var defaultHash={Id:"",PublicKey:"",Challenge:"",Response:"",RemoteIP:"",Theme:"clean",Solved:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PublicKey","","PublicKey",that.GetValidations("PublicKey"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Challenge","","Challenge",that.GetValidations("Challenge"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Response","","Response",that.GetValidations("Response"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"RemoteIP","","RemoteIP",that.GetValidations("RemoteIP"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Theme","clean","Theme",that.GetValidations("Theme"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Solved",false,"Solved",that.GetValidations("Solved"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Captcha Input">        <div class = "Fields">            <fieldset id = "{{{InstanceId}}}-Recaptcha"></fieldset>            <div class = "Solved">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.PublicKey("6LekV8YSAAAAAIYl846jW7uFYxm0VF7jGYTgYGXn");that.PublicKey("6LekV8YSAAAAAIYl846jW7uFYxm0VF7jGYTgYGXn");that.Show=function(){function showRecaptcha(){var element=that.InstanceId()+"-Recaptcha";var options={theme:that.Theme(),lang:"en"};Recaptcha.create(that.PublicKey(),element,options)}showRecaptcha()};that.UseTokenOnServer=function(){return({Validation:function(m,f,callback){callback(true)},ValidationMessage:""})};that.Validation=function(model,field,callback){if(model.Solved()){callback(true)}else{var data={response:Recaptcha.get_response(),challenge:Recaptcha.get_challenge()};Dry.Captcha().Api.GetSolvedToken(data,function(solvedToken){if(!solvedToken){Recaptcha.reload();callback(false)}else{model.Solved(true);that.Emit("solved",solvedToken);callback(true)}})}};that.On("bound",function(){that.Show()});return(that)},SplashPage:function SplashPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.BasicPage();var parent=Dry.Models.BasicPage();that.Parent=parent;that.IsParentViewField("Content");that.Type="SplashPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",RecentArticles:"",ArticlePopup:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"RecentArticles","","Recent Articles",that.GetValidations("RecentArticles"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ArticlePopup",null,"ArticlePopup",that.GetValidations("ArticlePopup"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.JoinAsMember={};that.JoinAsMember.join={OnClick:function(event){var popupOptions={PopupTitle:"REQUEST TO JOIN",Content:Dry.UserInviteRequest(),Modal:true,Width:406};var p=Dry.Popup(popupOptions);p.Show()}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<section id="{{{InstanceId}}}">    <section class="SplashPage Show">        <section class="Logo">            <img src="/images/chickrx-logo.png" alt="ChickRx logo" />            <h1>Private Beta</h1>        </section>        <section class = "RightSection">            <section class="TagLine">                <h1>THE HEALTHY LIVING COMMUNITY FOR CHICKS</h1>                <h2>Ask questions. Get answers from experts & peers. Share insights.</h2>            </section>            <section class="RequestAnInvite">                <h1>Request an invite:</h1>                <section class="JoinAsMember">                    <h2>LADIES</h2>                    <p>Be one of the first to get in</p>                    <a href="#" class="join">REQUEST <strong>MEMBER</strong> INVITE</a>                </section>                <section class="JoinAsExpert">                    <h2>HEALTH & WELLNESS EXPERTS</h2>                    <p>Gain exposure for your practice</p>                    <a href="/expert-application" class="join">REQUEST <strong>EXPERT</strong> INVITE</a>                </section>            </section>        </section>        <aside class="FeaturedArticles">            <header>                <h1>NOW AMUSE YOURSELF WITH OUR RECENT FEATURES</h1>            </header>            <section class="container">{{#RecentArticles}}{{{Rendered}}}{{/RecentArticles}}</section>        </aside>        <div class="Press">            <h1>OUR PRESS:</h1>            <img src="/images/splash-press-footer-logos.png" />        </div>        <section class="container">{{#ArticlePopup}}{{{Rendered}}}{{/ArticlePopup}}</section>    </section></section>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Parent.View("Splash");return(that)},ResetPassword:function ResetPassword(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ResetPassword";that.Validations=(function(){var that={};that.Password=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword()];that.PasswordConfirmation=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword(),Dry.Validations.ConfirmField("Password","PasswordConfirmation","Passwords do not match.")];that.ResetToken=[Dry.Validations.Expects("ClientToken")];return(that)})();that.AddRpcFunctions({ProcessResetRequest:"",ResetPassword:""});var defaultHash={Id:"",EmailAddress:"",Password:"",PasswordConfirmation:"",ResetToken:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","EmailAddress",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Password","","Password",that.GetValidations("Password"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PasswordConfirmation","","PasswordConfirmation",that.GetValidations("PasswordConfirmation"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ResetToken","","ResetToken",that.GetValidations("ResetToken"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ResetPassword Input">        <form class = "Fields">            <fieldset class = "UserName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" disabled="true" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Password">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "PasswordConfirmation">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <input type="button" class="ResetPassword" value = "Reset Password"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ResetPassword=function(){that.Validate(function(isValid){if(isValid){that.Api.ResetPassword(Dry.Sha256(that.Password()),that.ResetToken(),function(result){if(result){that.Emit("end");alert("Done")}})}})};return(that)},DropDown:function DropDown(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="DropDown";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Content:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Content","","Content",that.GetValidations("Content"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}" class="hide">    <div class = "DropDown Show">        <div class = "Fields">            {{#Content}}{{{Rendered}}}{{/Content}}        </div>        </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Show=function(){$("#"+that.InstanceId()).removeClass("hide")};that.Hide=function(){$("#"+that.InstanceId()).addClass("hide")};return(that)},ExpertSignupControl:function ExpertSignupControl(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ExpertSignupControl";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Token:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Token",null,"Token",that.GetValidations("Token"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){Dry.Utility.GetCurrentUser(function(user){var cp=Dry.ChangePassword({UserId:user.Id()});cp.On("changed",function(){Dry.ExpertApplication().Api.FinishExpertSignup(model.Token(),function(){window.location="/my-account/image"})});cp.Render($("#"+model.InstanceId()+" #SetPassword"))})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ExpertSignupControl Show">        <div class = "Fields">            <h1>Please Set a Password For Your Account</h1>            <div id="SetPassword"></div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.Token.Render=false;return(that)},CommunityFeed:function CommunityFeed(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.TabContainer();var parent=Dry.Models.TabContainer();that.Parent=parent;that.Type="CommunityFeed";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",PostControl:Dry.Models.HeaderPostControl({Type:"HeaderPostControl"}),Tabs:null,EverythingFeed:null,QuestionFeed:null,BlogFeed:null,ArticleFeed:null,NeedsAnswersFeed:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PostControl",Dry.Models.HeaderPostControl({Type:"HeaderPostControl"}),"PostControl",that.GetValidations("PostControl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",null,"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EverythingFeed",null,"EverythingFeed",that.GetValidations("EverythingFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QuestionFeed",null,"QuestionsFeed",that.GetValidations("QuestionFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BlogFeed",null,"BlogFeed",that.GetValidations("BlogFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ArticleFeed",null,"ArticlesFeed",that.GetValidations("ArticleFeed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NeedsAnswersFeed",null,"NeedsAnswersFeed",that.GetValidations("NeedsAnswersFeed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var tabsContainer=model.Tabs();tabsContainer.AddSelectHandler(function(content){if(content.LoadAsync()){content.LoadAsync(false);content.Query().Skip=-5;content.GetMore()}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "CommunityFeed Show {{#HasExpertFeed}}ExpertFeed{{/HasExpertFeed}}">        <div class = "Fields">            <div class="Post">                {{#PostControl}}                    {{{Rendered}}}                {{/PostControl}}            </div>            <div class="Feed">                <div class = "TabContainer-Container">{{#Tabs}}{{{Rendered}}}{{/Tabs}}</div>            </div>       </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}var viewHash=that.ViewHash;that.ViewHashFunctions.HasExpertFeed=function(){return(that.NeedsAnswersFeed()!==null)};that.ViewHash=function(){var tabs=[Dry.Tab({Heading:"EVERYTHING",Content:that.EverythingFeed()}),Dry.Tab({Heading:"Q&amp;A",Content:that.QuestionFeed()}),Dry.Tab({Heading:"THOUGHTS",Content:that.BlogFeed()}),Dry.Tab({Heading:"ARTICLES",Content:that.ArticleFeed()})];if(that.NeedsAnswersFeed()){tabs.push(Dry.Tab({Heading:"QUESTIONS FOR ME",StartSelected:true,Content:that.NeedsAnswersFeed()}))}that.Tabs(Dry.TabContainer({Tabs:tabs}));viewHash.apply(that,arguments)};return(that)},NotificationQuestion:function NotificationQuestion(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Notification();var parent=Dry.Models.Notification();that.Parent=parent;that.Type="NotificationQuestion";that.Validations={};that.AddRpcFunctions({});var defaultHash={NumberOfAnswers:0,NumberOfComments:0,DirectResponse:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfAnswers",0,"NumberOfAnswers",that.GetValidations("NumberOfAnswers"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfComments",0,"NumberOfComments",that.GetValidations("NumberOfComments"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DirectResponse",false,"DirectResponse",that.GetValidations("DirectResponse"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.NotificationQuestion={OnMouseOver:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")},OnMouseOut:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")}};that.Title={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){window.location=event.Model.Href()})}};that.ClearThisNotification={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){$("#"+event.Model.InstanceId()).remove();event.Model.Emit("Clear",event.Model)})}};return(that)})();that.AddView("Notification",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <section class="NotificationQuestion Notification">        <section class="NotificationContainer">            <section class="Fields">                <h1 class="Title">{{#DirectResponse}}{{#Rendered}}<span class="DirectResponse">&#9733;</span>&nbsp;{{/Rendered}}{{/DirectResponse}}<a>{{#Title}}{{{Rendered}}}{{/Title}}</a></h1>                <h4 class="NumberOfPosts">                    {{#HasNewAnswers}}{{#NumberOfAnswers}}{{{Rendered}}}{{/NumberOfAnswers}}&nbsp;NEW {{AnswerPlural}}{{/HasNewAnswers}}                    {{#HasNewAnswersAndComments}}&nbsp;<span class="bullet">&bull;</span>&nbsp;{{/HasNewAnswersAndComments}}                    {{#HasNewComments}}{{#NumberOfComments}}{{{Rendered}}}{{/NumberOfComments}}&nbsp;NEW {{CommentPlural}}{{/HasNewComments}}                </h4>            </section>            <a class="ClearThisNotification hide">X</a>        </section>    </section></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Notification");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}Dry.Question().AddViewHashFunctions(that);that.ViewHashFunctions.CommentPlural=function(){if(that.NumberOfComments()===1){return("COMMENT")}else{return("COMMENTS")}};return(that)},Address:function Address(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Address";that.Validations=(function(){var that={};that.Street1=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.Street2=[Dry.Validations.Expects("string")];that.City=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.State=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.ZipCode=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.Country=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",Street1:"",Street2:"",City:"",State:"",ZipCode:"",Country:"United States of America",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Street1","","Street 1",that.GetValidations("Street1"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Street2","","Street 2",that.GetValidations("Street2"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"City","","City",that.GetValidations("City"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"State","","State",that.GetValidations("State"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ZipCode","","Zip Code",that.GetValidations("ZipCode"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Country","United States of America","Country",that.GetValidations("Country"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Address Input">        <div class = "Fields">            <fieldset class = "Street1">                <label>                    <span class = "FieldLabel Required">Street 1</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Street2">                <label>                    <span class = "FieldLabel">Street 2</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "City">                <label>                    <span class = "FieldLabel Required">City</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "State">                <label>                    <span class = "FieldLabel Required">State</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "ZipCode">                <label>                    <span class = "FieldLabel Required">Zip Code</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <!--             <fieldset class = "Country">                <label>                    <span class = "FieldLabel Required">Country</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            -->        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.CityState=function(){if(that.City()&&that.State()){return(that.City()+", "+that.State())}else{if(that.City()){return(that.City())}else{return(that.State())}}};that.AddressHtml=function(){var str="";str+=that.Street1();if(that.Street2()){str+="<br />"+that.Street2()}str+="<br />"+that.City()+", "+that.State()+" "+that.ZipCode();return(str)};that.ViewHashFunctions.CityState=that.CityState;that.ViewHashFunctions.AddressHtml=that.AddressHtml;return(that)},Cropper:function Cropper(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Cropper";that.Validations={};that.AddRpcFunctions({Crop:""});var defaultHash={Id:"",UniqueName:"",UploadRoot:"",OutputRoot:"",BaseUrl:"",ScaleImage:"",AspectRatio:"",ShowResults:"",KeepOriginal:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UniqueName","","UniqueName",that.GetValidations("UniqueName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UploadRoot","","UploadRoot",that.GetValidations("UploadRoot"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"OutputRoot","","OutputRoot",that.GetValidations("OutputRoot"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BaseUrl","","BaseUrl",that.GetValidations("BaseUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ScaleImage","","ScaleImage",that.GetValidations("ScaleImage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AspectRatio","","AspectRatio",that.GetValidations("AspectRatio"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ShowResults","","ShowResults",that.GetValidations("ShowResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"KeepOriginal","","KeepOriginal",that.GetValidations("KeepOriginal"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Input",Dry.BaseClasses.Models.View('<div id="{{InstanceId}}">    <div class="Cropper Input">        <h1>Cropper Widget</h1>        <form class="uploader" action="/upload" enctype="multipart/form-data" method="post">            <input type="file" name="datafile" size="30" />            <input type="reset" class="hide" value="reset" />            <input type="submit" class="hide" value="upload" />            <span class="status"></span>        </form>        <form class="cropform" action="/crop" method="post">            <fieldset>                <div class="image-container">                    <img class="cropbox hide" src="" alt="image to be cropped" />                </div>            </fieldset>            <fieldset class="controls">                <input type="hidden" class="x1" name="x1" size="4" />                <input type="hidden" class="y1" name="y1" size="4" />                <input type="hidden" class="w" name="w" size="4" />                <input type="hidden" class="h" name="h" size="4" />                <input type="hidden" class="x2" name="x2" size="4" />                <input type="hidden" class="y2" name="y2" size="4" />                <input type="submit" name="submit" value="crop" />            </fieldset>        </form>        <div class="result">            <img class="cropped hide" src="" alt="result/cropped image" />        </div>    </div></div><script src="{{{ModelStaticRoot}}}/scripts/jquery.form.js" type="text/javascript"><\/script><script src="{{{ModelStaticRoot}}}/scripts/Jcrop/js/jquery.Jcrop.min.js" type="text/javascript"><\/script><script src="{{{ModelStaticRoot}}}/scripts/Dry.Models.Cropper.LoadCropper.js" type="text/javascript"><\/script><script> Dry.Models.Cropper.LoadCropper(\'{{{InstanceId}}}\'); <\/script>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},FindExperts:function FindExperts(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="FindExperts";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function loadExpertsCreator(model){return(function(category){if(!category||!category.Key()){return}if(category.Key()==="ALL"){console.log("ALL")}else{console.log(category.Key())}Dry.User().Api.GetExpertsByCategory(category.Key(),function(results){$("#"+model.InstanceId()+"-ResultsBox").html("");for(var i=0;i<results.length;i++){console.dir(results[i].Hash());results[i].View("SearchResult");results[i].Render($("#"+model.InstanceId()+"-ResultsBox"))}})})}that.Model={OnBound:function(model){var categorySelect=Dry.Select();var categories=Dry.Tag().GetCategories();var allTag=Dry.Tag({Tag:"All Categories",Key:"ALL"});categories.unshift(allTag);var loadExperts=loadExpertsCreator(model);categorySelect.Options(categories);categorySelect.On("select",loadExperts);categorySelect.Render($("#"+model.InstanceId()+"-CategorySelect"));loadExperts(allTag)}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "FindExperts Show">        <div class = "Fields">            <h2>FIND EXPERTS <small>(Listed By Top Contributors)</small></h2>            <div class="SearchBox">                <fieldset class = "Categories">                    <label>                        <span class = "FieldLabel">Filter By Category</span>                    </label>                    <div class="CategorySelect" id="{{{InstanceId}}}-CategorySelect"></div>                </fieldset>            </div>            <div id="{{{InstanceId}}}-ResultsBox" class="ResultsBox">            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},SimilarQuestions:function SimilarQuestions(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="SimilarQuestions";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",SearchText:"",SimilarQuestions:[],Interval:500,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SearchText","","SearchText",that.GetValidations("SearchText"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SimilarQuestions",[],"Similar Questions",that.GetValidations("SimilarQuestions"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Interval",500,"Interval",that.GetValidations("Interval"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="SimilarQuestions Show">        <div class="Fields">            <div class="section SimilarQuestions">                <div class="header">                    <h1>Similar Questions</h1>                    <small>(Make sure your question hasn\'t already been asked.)</small>                </div>                <div class="Value">                    {{#SimilarQuestions}}                        <h3><a href="/questions/{{#Key}}{{{Rendered}}}{{/Key}}">{{#Title}}{{{Rendered}}}{{/Title}}</a></h3>                    {{/SimilarQuestions}}                    {{^SimilarQuestions}}                        <p>No Similar Questions Found</p>                    {{/SimilarQuestions}}                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");var lastCheck=0;var timeoutId=null;that.Fields.SearchText.Value.On("change",function(){var now=getTime();if(now-lastCheck>that.Interval()){if(timeoutId){clearTimeout(timeoutId)}lastCheck=now;Update()}else{if(timeoutId){clearTimeout(timeoutId)}timeoutId=setTimeout(function(){that.Fields.SearchText.Value.Emit("change")},that.Interval())}});function getTime(){return(Dry.NativeDate().getTime())}function Update(){if(that.SearchText()){Dry.Question().Api.FindSimilar(that.SearchText(),6,function(questions){that.SimilarQuestions(questions);that.Refresh()})}}that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},MyAccountPage:function MyAccountPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="MyAccountPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Tabs:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tabs",null,"Tabs",that.GetValidations("Tabs"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "MyAccountPage Show">        <div class = "Fields">            <h1 class="Header">My Account</h1>            <div class = "MyAccountPageTabs">                {{#Tabs}}{{{Rendered}}}{{/Tabs}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ChangePassword:function ChangePassword(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ChangePassword";that.Validations=(function(){var that={};that.Password=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword(),Dry.Validations.ConfirmField("Password","PasswordConfirmation","Passwords do not match.",true)];that.PasswordConfirmation=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword(),Dry.Validations.ConfirmField("PasswordConfirmation","Password","Passwords do not match.")];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",UserId:"",Password:"",PasswordConfirmation:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserId","","UserId",that.GetValidations("UserId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Password","","Password",that.GetValidations("Password"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PasswordConfirmation","","Confirm Password",that.GetValidations("PasswordConfirmation"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Save={OnClick:function(event){event.Model.Save()}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ChangePassword Edit Form">        <form class = "Fields">            <div class="RequiredDescription"><span class="Required"></span> Required fields.</div>            <fieldset class = "Password">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "PasswordConfirmation">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <input type = "button" class="Save SubmitButton" value = "Save"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Save=function(callback){that.Validate(function(isValid){if(isValid){var hash=Dry.Sha256(that.Password());Dry.User().Api.SetPasswordHash(that.UserId(),hash,function(){that.Emit("changed",hash);that.Emit("close");if(callback){callback()}})}})};return(that)},NotificationTag:function NotificationTag(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Notification();var parent=Dry.Models.Notification();that.Parent=parent;that.Type="NotificationTag";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",NumberOfQuestions:0,NumberOfArticles:0,NumberOfBlogPosts:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfQuestions",0,"NumberOfQuestions",that.GetValidations("NumberOfQuestions"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfArticles",0,"NumberOfArticles",that.GetValidations("NumberOfArticles"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfBlogPosts",0,"NumberOfBlogPosts",that.GetValidations("NumberOfBlogPosts"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.NotificationTag={OnMouseOver:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")},OnMouseOut:function(event){$("#"+event.Model.InstanceId()+" .ClearThisNotification").toggleClass("hide")}};that.Title={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){window.location=event.Model.Href()})}};that.ClearThisNotification={OnClick:function(event){Dry.User().Api.ClearNotification(event.Model.ObjectType(),event.Model.ObjectId(),function(){$("#"+event.Model.InstanceId()).remove();event.Model.Emit("Clear",event.Model)})}};return(that)})();that.AddView("Notification",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <section class="NotificationTag Notification">        <section class="NotificationContainer">            <section class="Fields">                <h1 class="Title"><a>{{#Title}}{{{Rendered}}}{{/Title}}</a></h1>                <h4 class="NumberOfPosts">                    {{{NumberOfPostsDisplay}}}                </h4>            </section>            <a class="ClearThisNotification hide">X</a>        </section>    </section></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Notification");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ArticlePlural=function(){if(that.NumberOfArticles()===1){return("ARTICLE")}else{return("ARTICLES")}};that.QuestionPlural=function(){if(that.NumberOfQuestions()===1){return("QUESTION")}else{return("QUESTIONS")}};that.BlogPostPlural=function(){if(that.NumberOfBlogPosts()===1){return("THOUGHT")}else{return("THOUGHTS")}};that.ViewHashFunctions.NumberOfPostsDisplay=function(){var display="";var before=false;if(that.NumberOfQuestions()>0){display+=that.NumberOfQuestions()+"&nbsp;NEW "+that.QuestionPlural();before=true}if(that.NumberOfBlogPosts()>0){if(before){display+='&nbsp;<span class="bullet">&bull;</span>&nbsp;'}display+=that.NumberOfBlogPosts()+"&nbsp;NEW "+that.BlogPostPlural();before=true}if(that.NumberOfArticles()>0){if(before){display+='&nbsp;<span class="bullet">&bull;</span>&nbsp;'}display+=that.NumberOfArticles()+"&nbsp;NEW "+that.ArticlePlural();before=true}return(display)};return(that)},PopupMessage:function PopupMessage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Popup();var parent=Dry.Models.Popup();that.Parent=parent;that.Type="PopupMessage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",MessageTitle:"",Message:"",Model:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"MessageTitle","","MessageTitle",that.GetValidations("MessageTitle"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Message","","Message",that.GetValidations("Message"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Model",null,"Model",that.GetValidations("Model"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Submit={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){event.Model.Emit("close")}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="PopupMessage Show">        <span class="Fields">            <span class="MessageTitle">                <h2 class="Value">{{#MessageTitle}}{{{Rendered}}}{{/MessageTitle}}</h2>            </span>             {{#Message}}            <span class="Message">                <h4 class="Value">{{{Rendered}}}</h4>            </span>            {{/Message}}            {{#Model}}                {{{Rendered}}}            {{/Model}}        </span>         </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Show=function(flag){flag=(flag===undefined?true:flag);that.Parent.Hash(that.Hash());that.Render(function(i,s){that.Parent.Content(s);that.Parent.Show();that.Bind({InstanceId:i})})};that.Hide=function(){that.Parent.Hide()};that.Parent.On("close",function(){that.Emit("close")});return(that)},Topic:function Topic(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Topic";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",TagNode:null,Feed:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TagNode",null,"TagNode",that.GetValidations("TagNode"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Feed",null,"Feed",that.GetValidations("Feed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Topic Show">        <section class="TagNode Wrapper">{{#TagNode}}{{{Rendered}}}{{/TagNode}}</section>        <section>{{#Feed}}{{{Rendered}}}{{/Feed}}</section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ArrayControl:function ArrayControl(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ArrayControl";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Model:null,Field:"",InputContainerId:"",OutputContainerId:"",ItemAddHash:{},ItemShowHash:{},RenderField:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Model",null,"Model",that.GetValidations("Model"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Field","","Field",that.GetValidations("Field"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"InputContainerId","","InputContainerId",that.GetValidations("InputContainerId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"OutputContainerId","","OutputContainerId",that.GetValidations("OutputContainerId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ItemAddHash",{},"ItemAddHash",that.GetValidations("ItemAddHash"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ItemShowHash",{},"ItemShowHash",that.GetValidations("ItemShowHash"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"RenderField","","RenderField",that.GetValidations("RenderField"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Output",Dry.BaseClasses.Models.View("{{#RenderField}}{{{Rendered}}}{{/RenderField}}{{BindModelToDom}}}","Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.Model.Render=false;that.Refresh=function(){that.Create()};that.Create=function(){if(!that.Model()||!that.Field()||!that.InputContainerId()||!that.OutputContainerId()){return}var items=that.Model().Fields[that.Field()].Value().slice(0);for(var i=0;i<items.length;i++){items[i].Hash(that.ItemShowHash());items[i].RemoveListener("remove","ArrayControl");items[i].On("remove","ArrayControl",(function(item){return(function(){var modelItems=that.Model().Fields[that.Field()].Value();for(var j=0;j<modelItems.length;j++){if(item===modelItems[j]){that.Emit("remove",item,j);Dry.Common.RemoveFromArray(modelItems,j);break}}that.Refresh()})})(items[i]))}that.View("Output");that.RenderField(items);$("#"+that.OutputContainerId()).empty();that.Render($("#"+that.OutputContainerId()));var itemAddHash=that.ItemAddHash();var addItem=Dry.Models[itemAddHash.Type](itemAddHash);addItem.On("add",function(){addItem.Hash(that.ItemShowHash());that.Model().Fields[that.Field()].Value().push(addItem);that.RenderField(null);that.Emit("add",addItem);that.Refresh()});that.View("Output");that.RenderField(addItem);$("#"+that.InputContainerId()).empty();that.Render($("#"+that.InputContainerId()))};return(that)},TeamMember:function TeamMember(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="TeamMember";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Name:"",ImageUrl:"",Title:"",PreviousLife:"",School:"",Fact:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Name","","Name: ",that.GetValidations("Name"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ImageUrl","","Image Url: ",that.GetValidations("ImageUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title: ",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PreviousLife","","Previous Life: ",that.GetValidations("PreviousLife"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"School","","School: ",that.GetValidations("School"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Fact","","Fact: ",that.GetValidations("Fact"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TeamMember Show">        <div class="Fields">            <figure>                <img src="{{#ImageUrl}}{{{Rendered}}}{{/ImageUrl}}" alt="{{#Name}}{{{Rendered}}}{{/Name}}\'s team member photo" />            </figure>            <ul class="Info">                <li class="Name">                    {{#Name}}{{{Rendered}}}{{/Name}}                </li>                <li class="Title">                    {{#Title}}{{{Rendered}}}{{/Title}}                </li>                {{#HasPreviousLife}}                <li class="PreviousLife">                    <span class="Label">Previous Life: </span>                    {{#PreviousLife}}{{{Rendered}}}{{/PreviousLife}}                </li>                {{/HasPreviousLife}}                {{#HasSchool}}                <li class="School">                    <span class="Label">School: </span>                    {{#School}}{{{Rendered}}}{{/School}}                </li>                {{/HasSchool}}                {{#HasFact}}                <li class="Fact">                    <span class="Label">Fact: </span>                    {{#Fact}}{{{Rendered}}}{{/Fact}}                </li>                {{/HasFact}}            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasPreviousLife=function(){return(that.PreviousLife()!=="")};that.ViewHashFunctions.HasSchool=function(){return(that.School()!=="")};that.ViewHashFunctions.HasFact=function(){return(that.Fact()!=="")};that.GetTeamMembers=function(){return[Dry.TeamMember({Name:"Gulus Emre",ImageUrl:"/images/team-photos/gulus.png",Title:"Editorial Intern",PreviousLife:"Student",Fact:"Never leaves home without a book.",School:"Harvard",}),Dry.TeamMember({Name:"Jen McPherson",ImageUrl:"/images/team-photos/jen.png",Title:"Comedian",PreviousLife:"Writer for Swagger LA, Good / Bad NYC, Paper Spaceship & Whoa magazine",School:"UCLA",Fact:"Has not lived one day without red nail polish on her toes and hands since she was fifteen."}),Dry.TeamMember({Name:"Kendrick Taylor",ImageUrl:"/images/team-photos/kendrick.jpg",Title:"Director of Engineering",PreviousLife:"Pool hall cook, Government contractor",School:"James Madison",Fact:"Writes code for fun, considered playing pool for a living."}),Dry.TeamMember({Name:"Megan Cedro",ImageUrl:"/images/team-photos/megan-cedro.jpg",Title:"Illustrator",PreviousLife:"Former makeup artist, now concentrating mainly on painting & illustration.",Fact:"Loves the number 4, anteaters and sunshine."}),Dry.TeamMember({Name:"Meghan Muntean",ImageUrl:"/images/team-photos/meghan.jpg",Title:"Co-Founder",PreviousLife:"Barclays Wealth, Lehman Brothers",School:"Princeton",}),Dry.TeamMember({Name:"Paige Panter",ImageUrl:"/images/team-photos/paige.jpg",School:"Baylor University",PreviousLife:"AmeriCorps VISTA in Waco, Texas",Fact:" Inspired by estate sales, good food and well done mobile apps",Title:"Marketing Intern",}),Dry.TeamMember({Name:"Salvador V\xE9lez",ImageUrl:"/images/team-photos/salvador.png",Title:"Designer",School:"Interamerican University, Puerto Rico",Fact:"Love my socks and sneaks collection."}),Dry.TeamMember({Name:"Stacey Borden",ImageUrl:"/images/team-photos/stacey.jpg",Title:"Co-Founder",PreviousLife:"85 Broads, Apple (intern)",School:"Harvard (BA & MA)",Fact:"Related to the guitarist from The Doors"}),]};return(that)},ManageTokens:function ManageTokens(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ManageTokens";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",TokenType:"",TokenList:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TokenType","","TokenType",that.GetValidations("TokenType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TokenList","","TokenList",that.GetValidations("TokenList"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ManageTokens Input">        <form class = "Fields">            <h1>Token Type: {{#TokenType}}{{{Rendered}}}{{/TokenType}}</h1>            <div>{{#TokenList}}{{{Rendered}}}{{/TokenList}}</div>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Date:function Date(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Date";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Year:0,Month:0,Day:0,WeekDay:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Year",0,"Year",that.GetValidations("Year"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Month",0,"Month",that.GetValidations("Month"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Day",0,"Day",that.GetValidations("Day"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"WeekDay",0,"WeekDay",that.GetValidations("WeekDay"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Output",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "Date Output">        <span class = "Fields">           <span class = "Year">                <span class = "Value">{{#Year}}{{{Rendered}}}{{/Year}}-</span>            </span>            <span class = "Month">                <span class = "Value">{{#Month}}{{{Rendered}}}{{/Month}}-</span>            </span>            <span class = "Day">                <span class = "Value">{{#Day}}{{{Rendered}}}{{/Day}}</span>            </span>            <span class = "WeekDay">                <span class = "Value"> ({{{WeekDayString}}})</span>            </span>        </span>    </span></span>',"Mu",handlers));that.View("Output");that.DateToDryDate=function(d){d=d||Dry.NativeDate();return({Year:d.getUTCFullYear(),Month:d.getUTCMonth()+1,Day:d.getUTCDate(),WeekDay:d.getUTCDay()})};that.DaysOfTheWeek=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];that.WeekDayString=function(){return(that.DaysOfTheWeek[that.WeekDay()])};that.ViewHashFunctions.WeekDayString=that.WeekDayString;that.Date=function(val){if(val===undefined){var d=Dry.NativeDate();d.setUTCFullYear(that.Year());d.setUTCMonth(that.Month()-1);d.setUTCDate(that.Day());return(d)}else{that.Hash(that.DateToDryDate(val))}};that.FromString=function(str){var date=stringToNativeDate(str);if(date){that.Date(date);return(that)}else{return(null)}function stringToNativeDate(txtDate){var objDate,mSeconds,day,month,year;if(txtDate.length!==10){return null}if(txtDate.substring(2,3)!=="/"||txtDate.substring(5,6)!=="/"){return null}month=txtDate.substring(0,2)-1;day=txtDate.substring(3,5)-0;year=txtDate.substring(6,10)-0;if(year<1000||year>3000){return null}var d=Dry.NativeDate();d.setFullYear(year);d.setMonth(month);d.setDate(day);mSeconds=d.getTime();objDate=Dry.NativeDate();objDate.setTime(mSeconds);if(objDate.getFullYear()!==year||objDate.getMonth()!==month||objDate.getDate()!==day){return(null)}else{var d=Dry.NativeDate();d.setUTCFullYear(year);d.setUTCMonth(month);d.setUTCDate(day);return(d)}}};that.Date(Dry.NativeDate());defaultHash={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},RecentArticles:function RecentArticles(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="RecentArticles";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Article1:"",Article2:"",Article3:"",Article4:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Article1","","Article1",that.GetValidations("Article1"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Article2","","Article2",that.GetValidations("Article2"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Article3","","Article3",that.GetValidations("Article3"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Article4","","Article4",that.GetValidations("Article4"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <section class="RecentArticles Edit">        <section class="article-container">{{#Article1}}{{{Rendered}}}{{/Article1}}</section>        <section class="article-container">{{#Article2}}{{{Rendered}}}{{/Article2}}</section>        <section class="article-container">{{#Article3}}{{{Rendered}}}{{/Article3}}</section>        <section class="article-container">{{#Article4}}{{{Rendered}}}{{/Article4}}</section>    </section></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},ImagePicker:function ImagePicker(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ImagePicker";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",ImageUrl:"",Description:"",Gallery:"",Cropper:"",NextUrl:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ImageUrl","","ImageUrl",that.GetValidations("ImageUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Description","","Description",that.GetValidations("Description"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Gallery","","Gallery",that.GetValidations("Gallery"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Cropper","","Cropper",that.GetValidations("Cropper"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NextUrl","","NextUrl",that.GetValidations("NextUrl"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){model.Cropper().On("cropped",function(){if(model.NextUrl()){window.location=model.NextUrl()}});model.Gallery().On("submitted",function(){if(model.NextUrl()){window.location=model.NextUrl()}})}};return(that)})();that.AddView("Page",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ImagePicker Page">        <div class = "Fields">            <div>                <h1>Upload An Image For Your Account</h1>                <small>(If you want to remain anonymous, maybe it\'s not the best idea to upload a picture of your face... just sayin\')</small>                <div class = "Cropper">                    <div class = "Value">{{#Cropper}}{{{Rendered}}}{{/Cropper}}</div>                </div>                {{#HasGallery}}                <h1 class="Or">- OR -</h1>                <h1 class="AvatarTitle">Choose An Image For Your Account</h1>                <div class = "Gallery">                    <div class = "Value">{{#Gallery}}{{{Rendered}}}{{/Gallery}}</div>                </div>                {{/HasGallery}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};var cropper={};var gallery={};function changeThumbnail(event,url){var target=$(event.target);var cropperId=event.Model.InstanceId();var selector="#"+cropperId+" .Thumbnail img";Dry.Logger.debug("url = "+url);if(target.hasClass("UploadImage")){Dry.Logger.debug("changing thumbnail to result of upload and crop");$(selector).attr("src",url)}if(target.hasClass("SelectImageFromGallery")){Dry.Logger.debug("changing thumbnail to result of selection from gallery")}}that.UploadImage={OnClick:function(event){var modalOptions={Title:"Upload and Crop User Thumbnail",Modal:true,DisplayOnRender:false};var modal=Dry.Popup(modalOptions);cropper=event.Model.Cropper();cropper.On("cropped",function(url){changeThumbnail(event,url)});modal.Content(cropper);modal.Show()}};that.SelectImageFromGallery={OnClick:function(event){var modalOptions={Title:"Select an avatar from the gallery",Modal:true,DisplayOnRender:false};var modal=Dry.Popup(modalOptions);gallery=event.Model.Gallery();gallery.On("selected",function(url){changeThumbnail(event,url)});modal.Content(gallery);modal.Show()}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View("<div id = \"{{{InstanceId}}}\">    <div class = \"ImagePicker Input\">        <form class = \"Fields\">            <fieldset class = \"Thumbnail\">                <img src='{{#ImageUrl}}{{{Rendered}}}{{/ImageUrl}}' alt='{{#Description}}{{{Rendered}}}{{/Description}}' />            </fieldset>            <fieldset class='controls'>                <input class='UploadImage' type='button' value='upload image' />                <span class='decision'>-- or --</span>                <input class='SelectImageFromGallery' type='button' value='select image' />            </fieldset>        </form>    </div></div>{{{BindModelToDom}}}","Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasGallery=function(){return(that.Gallery()!==null)};return(that)},SignupControl:function SignupControl(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="SignupControl";that.Validations=(function(){var that={};that.UserName=[Dry.Validations.IsRequired(),Dry.Validations.IsValidUserName(),Dry.Validations.NoBannedWords(),Dry.Validations.UserNameAvailable()];that.EmailAddress=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),Dry.Validations.UserEmailAddressAvailable()];that.EmailAddressConfirmation=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),Dry.Validations.ConfirmField("EmailAddress","EmailAddressConfirmation","Email Addresses do not match.")];that.Password=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword()];that.PasswordConfirmation=[Dry.Validations.IsRequired(),Dry.Validations.IsSecurePassword(),Dry.Validations.ConfirmField("Password","PasswordConfirmation","Passwords do not match.")];that.DateOfBirth=[Dry.Validations.Expects("Date"),{Validation:function(model,field,callback){if(model.DateOfBirth.Control){model.DateOfBirth.Control.Validate()}callback(true)},ValidationMessage:""},Dry.Validations.IsRequiredObject("Date of birth is required.")];that.ZipCode=[Dry.Validations.IsZipCode()];that.AcceptTerms=[Dry.Validations.IsChecked("Please agree to the Terms of Use.")];that.CaptchaToken=[Dry.Captcha().UseTokenOnServer(),Dry.Validations.IsRequiredObject("Captcha is required."),Dry.Validations.ExpectsValid("ClientToken")];that.SignupCode=[Dry.Validations.ExpectsOrNull("ClientToken")];return(that)})();that.AddRpcFunctions({Signup:""});var defaultHash={Id:"",UserName:"",EmailAddress:"",EmailAddressConfirmation:"",Password:"",PasswordConfirmation:"",DateOfBirth:"",ZipCode:"",AcceptTerms:"",SignupCode:null,CaptchaToken:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserName","","Username",that.GetValidations("UserName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddressConfirmation","","Confirm Email",that.GetValidations("EmailAddressConfirmation"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Password","","Password",that.GetValidations("Password"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PasswordConfirmation","","Confirm Password",that.GetValidations("PasswordConfirmation"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DateOfBirth","","Date of Birth",that.GetValidations("DateOfBirth"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ZipCode","","Zip Code",that.GetValidations("ZipCode"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AcceptTerms","","I'm female and agree to <br/> ChickRx's <a href='#'>Terms Of Use</a> and <a href='#'>Privacy Policy</a>",that.GetValidations("AcceptTerms"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SignupCode",null,"SignupCode",that.GetValidations("SignupCode"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CaptchaToken",null,"CaptchaToken",that.GetValidations("CaptchaToken"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var dob=Dry.ThreeInputDate({IsRequired:true});model.DateOfBirth.Control=dob;dob.On("changed",function(){dob.Validate();if(dob.Date()){model.DateOfBirth(dob.Date())}else{model.DateOfBirth(null)}});dob.Render($("#"+model.InstanceId()+"-Dob"));var captcha=Dry.Captcha();model.Captcha=captcha;captcha.Render($("#"+model.InstanceId()+"-CaptchaContainer"));captcha.On("solved",function(token){model.CaptchaToken(token);model.Validate()})}};that.SubmitButton={OnClick:function(event){var model=event.Model;if(model.Running){return}model.Running=true;model.Captcha.Validate(function(captchaValid){model.Validate(function(modelValid){if(captchaValid&&modelValid){model.Api.Signup(event.Model,function(result){Dry.User().Api.Login(model.EmailAddress(),Dry.Sha256(model.Password()),function(err,success){if(err){window.location="/splash"}else{Dry.Cookies.setItem("LoginUserName",model.EmailAddress());window.location="/my-account/image"}},true)})}else{model.Running=false}})})}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "SignupControl Input Form">        <div class = "BoxHeaderLeft">CREATE AN ACCOUNT</div>        <form class = "Fields FormContainer" method = "POST" action = "">            <h1>You\'re In: Take a Quick Sec to Create Your Account & Join</h1>            <div class="RequiredDescription"><span class="Required"></span> Required fields.</div>            <fieldset class = "EmailAddress">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "EmailAddressConfirmation">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Password">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "PasswordConfirmation">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "UserName">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "DateOfBirth DateFieldset">                <label>                    <span class = "FieldLabel Required">Date of Birth</span>                </label>                <div class="DateContainer" id="{{{InstanceId}}}-Dob"></div>                <div class = "Validations hide">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "ZipCode">                <label>                    <span class = "Label Required"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>                <span class = "Label Required">Please enter the text exactly as it appears</span>            <div class="CaptchaContainer" id="{{{InstanceId}}}-CaptchaContainer"></div>                <fieldset class = "CaptchaToken">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>                <fieldset class = "AcceptTerms">                <label>                    <span class = "Required"></span>                    <input class = "Value" type = "checkbox" />                    <span class = "Label"></span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>                <small>As a private beta member you agree to be patient with us if there are glitches in our system and provide feedback for us to improve your user experience.</small>            </fieldset>                        <fieldset>                <input type = "button" class = "SubmitButton" value = "Join ChickRx" />            </fieldset>        </form>    </div></div>{{{BindModelToDom}}}<script>            <\/script>',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.SignupCode.Render=false;return(that)},Help:function Help(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Help";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",IsExpert:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"IsExpert",false,"User is an Expert",that.GetValidations("IsExpert"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Help Show">        <header>            <h1><a name="top">SITE HELP</a></h1>        </header>        <p>Below you’ll find answers to frequently asked questions about ChickRx. If you still        have questions about using the site, or are experiencing any trouble, please feel free        to email us: <a href="mailto:help@chickrx.com">help@chickrx.com</a>.</p>        <ul class="faqs">            <li><a href="#what-is-chickrx">What is ChickRx?</a></li>            <li><a href="#how-anonymous-am-i">Just how anonymous am I on ChickRx?</a></li>            <li><a href="#standards-for-writing">What are ChickRx\'s standards for writing?</a></li>            <li><a href="#am-i-liable">Why am I liable for what I write on ChickRx?</a></li>            <li><a href="#chickrx-experts">Who are ChickRx experts?</a></li>            <li><a href="#how-does-following-work">How does "following" work?</a></li>            <li><a href="#if-someone-is-following-me">If someone\'s following me, what can they see?</a></li>            <li><a href="#why-should-i-vote-up-stuff">Why should I vote up stuff in the community?</a></li>            <li><a href="#how-old-must-i-be">How old must I be to use ChickRx?</a></li>            <li><a href="#delete-my-account">How do I delete my account?</a></li>            <li><a href="#personally-identifiable-information">Does ChickRx sell any of my personally identifiable information?</a></li>            <li><a href="#how-to-advertise">How can my company advertise on ChickRx?</a></li>            <li><a href="#medical-emergency">What should I do if I\'m experiencing a medical emergency?</a></li>            {{#HelpForExperts}}            <li><a href="#expert-questions-for-me">Can I only answer questions listed in the “Questions for Me” tab on the homepage?</a></li>            <li><a href="#expert-update-my-profile">How do I update my profile with new information about me and/or my practice?</a></li>            <li><a href="#expert-can-i-still-ask-a-question">Being an expert, can I still ask a question on the site?</a></li>            {{/HelpForExperts}}        </ul>        <h2><a name="what-is-chickrx">What is ChickRx?</a></h2>        <p>The <a href="/about/us">About Us</a> tab provides an overview of the site. On the <a href="/about/team">Team</a> tab, you can learn about our team and our story behind why we founded ChickRx.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="how-anonymous-am-i">Just how anonymous am I on ChickRx?</a></h2>        <p>Every question you ask, everything you follow and everything you vote up across the site is totally anonymous. When you submit answers, Thought posts and comments, you can do so either with your username (making these “public posts”) or you can submit them anonymously (by checking the anonymous box before submitting). If you submitted an answer or comment using your username, but would like to later go back and make it anonymous (or vice versa), you can do so by accessing the post from the relevant My Activity tab on the My Account page.</p>        <p>Note that if your username, your profile image and what you post do not reveal your identity, even your public posts are effectively anonymous, since your personal identity is not tied to them.</p>                <p>You cannot submit Thought posts anonymously—your username is associated with all of your Thought posts. If you’d like for your identity not to be associated with your Thought posts, ensure that your username, profile image and the content of what you post across the site do not reveal who you are.</p>        <h2><a name="standards-for-writing">What are ChickRx\'s standards for writing?</a></h2>                <p>ChickRx is a high quality community. We reserve the right to either edit or remove any posts that do not meet our writing standards (if that doesn’t sit well with you, just remember that no one wants a janky community, now do they?).</p>        <p>Infuse your own personality and flare into your writing—we’re all about that. But        we do ask that your questions, answers, Thought posts and comments: </p>        <ul>            <li>Strive for correct grammar and spelling.</li>            <li>Use respectful language. No bullying or judging (i.e., no mean girls, please).</li>            <li>Aim to be helpful and accurate. We’ll remove anything that reeks of spam.</li>        </ul>        <p>And since we’re talking about health and wellness issues here, it’s important to remember that you should not attempt to: seek a diagnosis (by asking something too specific to just you), diagnose others or recommend that others undergo any procedures, take any medications, etc. (though of course you can speak about your own experiences). Please be sure to read and understand our <a href="/legal/termsofuse">Terms of Use</a>.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="am-i-liable">Am I liable for what I write on ChickRx?</a></h2>        <p>Everyone is responsible for what they write on ANY website, not just ChickRx (we’re talking legally, not just morally, my friends). That being said, you should read our <a href="/legal/termsofuse">Terms of Use</a> to learn more about the advice you find on our site. If you’d feel more comfortable additionally including your own disclaimers with your posts, please feel free to do so.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="chickrx-experts">Who are ChickRx experts?</a></h2>        <p>Users who post to our service are labeled an “expert” if they provide ChickRx with certain background information, and generally include doctors, therapists, dietitians, fitness instructors, and other health and wellness professionals. ChickRx does not verify or otherwise investigate these Users or any of the information they post.</p>        <p>All information provided by Users is the sole opinion and responsibility of that User, and provided to you for informational purposes only. In no event will ChickRx be responsible for any posts, comments, or other content submitted by its Users, or for your use of any of the foregoing. For more information, please review our <a href="/legal/termsofuse">Terms of Use</a>.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="how-does-following-work">How does "following" work?</a></h2>        <p>By following topics, questions or other people on the site (by clicking this symbol: <img src="/images/follow-icon.png" alt="small white plus sign inside of a pink circle, indicating a call to follow something" /> to the left of the thing you want to follow), you can easily keep tabs on things that interest you. When there’s new activity around topics, questions, experts or members you follow, we alert you to that in the “Notifications” dropdown located in your member account box. When you ask a question or answer someone else’s question, you are automatically following that question, and as with other questions you follow, we alert you to new activity in that question via the “Notifications” dropdown.        <p>You may also receive emails notifying you when new answers are posted to questions that you follow. You can adjust your email notification settings on the Settings tab of your My Account page.</p>        <p>Unlike on many other sites, ChickRx DOES NOT display what you follow to anyone—everything you follow is anonymous. So you can feel free to follow something you may be interested in, but that you don’t want other people knowing about (such as those embarrassing sex or bathroom-related questions that we know you love).<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="if-someone-is-following-me">If someone\'s following me, what can they see?</a></h2>        <p>People may want to follow you because they think you have interesting insights, as you express in your public answers, comments and Thought posts. When someone is following you, they are notified only when you submit new public posts. This includes all of your Thought posts and any answers or comments you submit using your username. They never see what content you view on the site, the questions you ask, what you vote up, what you follow, or answers or comments that you submit anonymously. No one, whether they follow you or not, can see these things.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="why-should-i-vote-up-stuff">Why should I vote up stuff in the community?</a></h2>        <p>You can anonymously vote up questions, answers, Thought posts, and articles by clicking the <img src="/images/check-icon-tiny.png" alt="white check mark inside a pink circle, indicating a call to vote up something" /> button. We encourage you to vote on content that you think is helpful or interesting because it helps surface good content to the community, and it’s a way of expressing support to those who make quality contributions.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="#how-old-must-i-be">How old must I be to use ChickRx?</a></h2>        <p>You must be at least 13 years old to use ChickRx. Some of our site’s content is geared to a more mature audience, so we encourage you to check back in your later years, kiddos.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="#delete-my-account">How do I delete my account?</a></h2>        <p>Please email us: <a href="mailto:help@chickrx.com">help@chickrx.com</a><br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="personally-identifiable-information">Does ChickRx sell any of my personally identifiable information?</a></h2>        <p>We will never sell your Personally Identifiable Information, which includes your email address, your date of birth and - for experts - your name (for members, we do not collect your name).<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="how-to-advertise">How can my company advertise on ChickRx?</a></h2>        <p>Great question. While we do not currently have advertising on ChickRx, if you’re interested in advertising in the future, please email us: <a href="mailto:advertising@chickrx.com">advertising@chickrx.com</a>.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a  name="medical-emergency">What should I do if I\'m experiencing a medical emergency?</a></h2>        <p>If you think you may have a medical emergency, call your doctor or your local        emergency number (911 in the United States) immediately.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        {{#HelpForExperts}}        <h2><a name="expert-questions-for-me">Can I only answer questions listed in the “Questions for Me” tab on the homepage?</a></h2>        <p>No. We created the “Questions for Me” tab to make it easier for you to find questions that fall in your broad category(ies) of expertise, but there may be questions elsewhere on the site that you’d like to answer—and we encourage you to do so.</p>        <p>If answering a question on an issue where you do not have expertise, you can always check the box “I do not have expertise on this” prior to submitting your response. When you check this box, your response displays in the answer section without the orange “EXPERT” label under your photo.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="expert-update-my-profile">How do I update my profile with new information about me and/or my practice?</a></h2>        <p>Your profile is automatically populated with the information you provided us about your background and expertise. You can make changes to this information on the “My Account” page’s “Settings” tab (which you can easily access from the “My Account” dropdown located in your member account box in the site header).</p>        <p>From the “Settings” tab, you may make changes to any field that displays on your public profile, with the exception of your position and licenses and certifications. To make changes to these fields, you must email us: <a href="mailto:help@chickrx.com">help@chickrx.com</a>.</p>        <p>Remember that when submitting information to us, or making changes to your profile, you are also affirming that all information you have provided is truthful and accurate.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        <h2><a name="expert-can-i-still-ask-a-question">Being an expert, can I still ask a question on the site?</a></h2>        <p>Yes—simply click the <a href="/ask">“Anonymously Ask a Question”</a> link in the top right corner of the site, above the category menu bar in the site’s header. All questions are anonymous—no one will know what you have asked nor will they know that an expert posed the question.<br /><a class="back-to-top" href="#top">back to top  ^</a></p>        {{/HelpForExperts}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HelpForExperts=function(){return that.IsExpert()};return(that)},FollowingPanel:function FollowingPanel(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="FollowingPanel";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",QuestionResults:[],ArticleResults:[],BlogPostResults:[],TopicResults:[],ExpertResults:[],MemberResults:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QuestionResults",[],"QuestionResults",that.GetValidations("QuestionResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ArticleResults",[],"ArticleResults",that.GetValidations("ArticleResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BlogPostResults",[],"BlogPostResults",that.GetValidations("BlogPostResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TopicResults",[],"TopicResults",that.GetValidations("TopicResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ExpertResults",[],"ExpertResults",that.GetValidations("ExpertResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"MemberResults",[],"MemberResults",that.GetValidations("MemberResults"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "FollowingPanel Show Container">        <div class = "Fields">            {{#HasTopics}}            <div class = "TopicsResultsContainer">                <h2>TOPICS</h2>                <div class="ResultsContainer">                    {{#TopicResults}}                        <a {{{Href}}}>{{#Tag}}{{{Rendered}}}{{/Tag}}</a>                    {{/TopicResults}}                </div>            </div>            {{/HasTopics}}            {{#HasQuestions}}            <div class = "QuestionResultsContainer">                <h2>QUESTIONS</h2>                <div class="ResultsContainer">                    {{#QuestionResults}}                        <a {{{Href}}}>{{#Title}}{{{Rendered}}}{{/Title}}</a>                    {{/QuestionResults}}                </div>            </div>            {{/HasQuestions}}            {{#HasBlogPosts}}            <div class = "BlogPostResultsContainer">                <h2>THOUGHTS</h2>                <div class="ResultsContainer">                    {{#BlogPostResults}}                        <a {{{Href}}}>{{#Title}}{{{Rendered}}}{{/Title}}</a>                    {{/BlogPostResults}}                </div>            </div>            {{/HasBlogPosts}}            {{#HasArticles}}            <div class = "ArticleResultsContainer">                <h2>ARTICLES</h2>                <div class="ResultsContainer">                    {{#ArticleResults}}                        {{{Rendered}}}                    {{/ArticleResults}}                </div>            </div>            {{/HasArticles}}            {{#HasAnyExperts}}            <div class = "ExpertResultsContainer">                <h2>EXPERTS</h2>                {{#HasExperts}}                <div class="ResultsContainer">                    {{#ExpertResults}}                        {{{Rendered}}}                    {{/ExpertResults}}                </div>                {{/HasExperts}}                {{#HasNameExperts}}                <div class="ResultsContainer">                    {{#ExpertNameResults}}                        {{{Rendered}}}                    {{/ExpertNameResults}}                </div>                {{/HasNameExperts}}            </div>            {{/HasAnyExperts}}            {{#HasAnyMembers}}            <div class = "MemberResultsContainer">                <h2>MEMBERS</h2>                {{#HasMembers}}                <div class="ResultsContainer">                    {{#MemberResults}}                        {{{Rendered}}}                    {{/MemberResults}}                </div>                {{/HasMembers}}                {{#HasNameMembers}}                <div class="ResultsContainer">                    {{#MemberNameResults}}                        {{{Rendered}}}                    {{/MemberNameResults}}                </div>                {{/HasNameMembers}}            </div>            {{/HasAnyMembers}}            {{#HasNone}}                <h2>Sorry, no results to display</h2>            {{/HasNone}}        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasArticles=that.HasArticles=function(){return(that.ArticleResults().length>0)};that.ViewHashFunctions.HasBlogPosts=that.HasBlogPosts=function(){return(that.BlogPostResults().length>0)};that.ViewHashFunctions.HasQuestions=that.HasQuestions=function(){return(that.QuestionResults().length>0)};that.ViewHashFunctions.HasTopics=that.HasTopics=function(){return(that.TopicResults().length>0)};that.ViewHashFunctions.HasNone=function(){return(!that.HasQuestions()&&!that.HasArticles()&&!that.HasBlogPosts()&&!that.HasTopics()&&!that.HasAnyMembers()&&!that.HasAnyExperts())};that.ViewHashFunctions.HasExperts=that.HasExperts=function(){return(that.ExpertResults().length>0)};that.ViewHashFunctions.HasAnyExperts=that.HasAnyExperts=function(){return(that.ExpertResults().length>0)};that.ViewHashFunctions.HasMembers=that.HasMembers=function(){return(that.MemberResults().length>0)};that.ViewHashFunctions.HasAnyMembers=that.HasAnyMembers=function(){return(that.MemberResults().length>0)};return(that)},PageHeader:function PageHeader(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="PageHeader";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",MyAccount:[Dry.Models.MyAccount({Type:"MyAccount"})],Search:[Dry.Models.Search({Type:"Search"})],Selected:"",ExpertHeader:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"MyAccount",[Dry.Models.MyAccount({Type:"MyAccount"})],"",that.GetValidations("MyAccount"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Search",[Dry.Models.Search({Type:"Search"})],"",that.GetValidations("Search"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Selected","","Selected",that.GetValidations("Selected"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ExpertHeader",false,"ExpertHeader",that.GetValidations("ExpertHeader"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){if(model.Selected()){$("."+model.Selected()).addClass("current")}}};that.SubmitQuestion={OnClick:function(event){window.location="/ask"}};that.WriteBlog={OnClick:function(event){window.location="/blog"}};return(that)})();that.AddView("Simple",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="PageHeader Simple">        <div id="page-header-wrapper">            <a href="/home"><img class="logo" src="/images/chickrx-logo.png" alt="ChickRx logo" /></a>        </div>   </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){if(model.Selected()){$("."+model.Selected()).addClass("current")}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="PageHeader Show {{#IsExpertHeader}}ExpertHeader{{/IsExpertHeader}}">        <div class="Top Center">            <a href="/home" class="Home"></a>            <img class="Logo" src="/images/chickrx-logo.png" alt="ChickRx Logo"/>                <div class="Search">{{#Search}}{{{Rendered}}}{{/Search}}</div>                {{#IsNotExpertHeader}}            {{/IsNotExpertHeader}}            {{#IsExpertHeader}}            <div class="QuestionsForMeLink">                <a href="/home">View Questions For Me</a>            </div>            {{/IsExpertHeader}}                <div class="MyAccount">                <section class="MyAccountContainer">{{#MyAccount}}{{{Rendered}}}{{/MyAccount}}</section>            </div>        </div>        <nav class="primary">            <ul>                <li><a class="home" href="/home">HOME</a></li>                <li><a class="sex-gynecology" href="/categories/sex-and-gynecology">SEX &amp; GYNECOLOGY</a></li>                <li><a class="dermatology" href="/categories/dermatology-and-beauty">DERMATOLOGY &amp; BEAUTY</a></li>                <li><a class="fitness" href="/categories/fitness-and-sports-medicine">FITNESS &amp; SPORTS MEDICINE</a></li>                <li><a class="nutrition" href="/categories/nutrition-and-digestion">NUTRITION &amp; DIGESTION</a></li>                <li><a class="mental-health" href="/categories/mental-health">MENTAL HEALTH</a></li>                <li><a class="relationships" href="/categories/relationships-and-communication">RELATIONSHIPS &amp; COMMUNICATION</a></li>                <li><a class="substance-abuse" href="/categories/alcohol-smoking-and-substance-abuse">ALCOHOL, SMOKING &amp; SUBSTANCE ABUSE</a></li>                <li><a class="general" href="/categories/general-health">GENERAL HEALTH</a></li>            </ul>        </nav>        <!--        <nav class="secondary Center">            <ul>                {{#IsExpertHeader}}                <li><a class="SubmitQuestion">Anonymously Ask a Question</a></li>                {{/IsExpertHeader}}                {{#IsNotExpertHeader}}                <li><a href="/about/us">About Us</a></li>                {{/IsNotExpertHeader}}                <li class="hide"><a href="/find/topics">Find Topics</a></li>                <li><a href="/find/experts">Find Experts</a></li>            </ul>        </nav>        -->    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.IsExpertHeader=function(){return(that.ExpertHeader())};that.ViewHashFunctions.IsNotExpertHeader=function(){return(!that.ExpertHeader())};return(that)},Flag:function Flag(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Flag";that.Validations=(function(){var that={};function commonValidation(){return({Validation:function(model,field,callback){if(!model.ValidationRunning){model.ValidationRunning=true;model.Validate(function(){model.ValidationRunning=false})}callback(true)},ValidationMessage:""})}function validateMinimumChecked(message){return({Validation:function(model,field,callback){var state=false;var whiteList=["QuestionIsTooSpecfic","AttemptsToDiagnoseOrRecommend","ViolatesCopyright","OffensiveLanguage","PrivateInformation","IsSpamOrNotEnglish","NotDisclosingAffiliations","Other"];for(var i=0;i<whiteList.length;i++){if(model[whiteList[i]].Value()===true){state=true;break}}callback(state)},ValidationMessage:function(model,field,callback){if(message){callback(message)}else{callback("At least one checkbox needs to be checked.")}}})}function requiredIfOtherIsChecked(message){return({Validation:function(model,field,callback){callback(!(model.Other()&&Dry.Utility.Trim(field.Value())===""))},ValidationMessage:function(model,field,callback){if(message){callback(message)}else{callback('A description is needed if "Other" is checked')}}})}function ifOtherIsNotCheckedValidateDescription(){return({Validation:function(model,field,callback){if(!field.Value()){model.OtherDescription.Validate()}callback(true)},ValidationMessage:""})}that.QuestionIsTooSpecfic=[Dry.Validations.Expects("boolean"),commonValidation()];that.AttemptsToDiagnoseOrRecommend=[Dry.Validations.Expects("boolean"),commonValidation()];that.ViolatesCopyright=[Dry.Validations.Expects("boolean"),commonValidation()];that.OffensiveLanguage=[Dry.Validations.Expects("boolean"),commonValidation()];that.PrivateInformation=[Dry.Validations.Expects("boolean"),commonValidation()];that.IsSpamOrNotEnglish=[Dry.Validations.Expects("boolean"),commonValidation()];that.NotDisclosingAffiliations=[Dry.Validations.Expects("boolean"),commonValidation()];that.Other=[Dry.Validations.Expects("boolean"),ifOtherIsNotCheckedValidateDescription(),validateMinimumChecked()];that.OtherDescription=[Dry.Validations.Expects("string"),requiredIfOtherIsChecked()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",QuestionIsTooSpecfic:"",AttemptsToDiagnoseOrRecommend:"",ViolatesCopyright:"",OffensiveLanguage:"",PrivateInformation:"",IsSpamOrNotEnglish:"",NotDisclosingAffiliations:"",Other:"",OtherDescription:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QuestionIsTooSpecfic","","For questions: is too specific and not applicable to the commmunity",that.GetValidations("QuestionIsTooSpecfic"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AttemptsToDiagnoseOrRecommend","","For answers, comments, or thoughts: Attempts to diagnose or recommend procedures, medications, or actions",that.GetValidations("AttemptsToDiagnoseOrRecommend"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ViolatesCopyright","","Violates someone's copyright",that.GetValidations("ViolatesCopyright"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"OffensiveLanguage","","Contains offensive, hurtful, racist, or sexist language",that.GetValidations("OffensiveLanguage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PrivateInformation","","Contains private information",that.GetValidations("PrivateInformation"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"IsSpamOrNotEnglish","","Is spam or not in English",that.GetValidations("IsSpamOrNotEnglish"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NotDisclosingAffiliations","","Doesn't disclose affiliations",that.GetValidations("NotDisclosingAffiliations"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Other","","Other",that.GetValidations("Other"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"OtherDescription","","Description",that.GetValidations("OtherDescription"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Submit={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){console.log("post has been flagged for review");event.Model.Emit("close")}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Flag Show">        <header>            <h1>Please tell us why you\'re flagging this</h1>        </header>        <form class = "Fields">            <fieldset class = "QuestionIsTooSpecfic">                <label>                    <input class="Value" type="checkbox" />                    <span class = "Label constrained">Question is too specific</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "AttemptsToDiagnoseOrRecommend">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Attempts to diagnose or recommend</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "ViolatesCopyright">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Violates someone\'s copyright</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "OffensiveLanguage">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Contains offensive language</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "PrivateInformation">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Contains private information</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "IsSpamOrNotEnglish">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Is spam or is not in English</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "NotDisclosingAffiliations">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label constrained">Doesn\'t disclose affiliation</span>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Other">                <label>                    <input class = "Value" type="checkbox" />                    <span class = "Label">Other</span>                </label>            </fieldset>            <fieldset class="OtherDescription">                <label>                    <input class="Value" type="text" />                </label>            </fieldset>            <div class="Other">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </div>            <div class="OtherDescription">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </div>            <input class="Submit" type="button" value="submit" />        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},UserStats:function UserStats(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="UserStats";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",User:"",PopularPosts:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"User","","User",that.GetValidations("User"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PopularPosts","","PopularPosts",that.GetValidations("PopularPosts"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "UserStats Show">        <section class = "Fields">            <p>{{#User}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/User}}</p>        </section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Aside",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "UserStats Aside">        <section class = "Fields">            <ul>                <li><span class="key">{{{UserTypePrefix}}}{{{UserTypeLabel}}} Since: </span>                    {{#User}}                    <span class="value">{{#SignupDate}}{{#Month}}{{{Rendered}}}{{/Month}}/{{#Year}}{{{Rendered}}}{{/Year}}{{/SignupDate}}</span>                </li>                                <li class="hide"><span class="key">Great Votes Received: </span><span class="value">3</span></li>                <li class="hide"><span class="key">Pubilc Answers: </span><span class="value">12</span></li>                <li class="hide"><span class="key">Thoughts Posted: </span><span class="value">10</span></li>                    {{/User}}                <li class="hide">                    <span class="key">Most Popular By {{{UserTypeLabel}}}: </span>                    <span class="value">                        <ul class="PopularPosts UserStats">                        {{#PopularPosts}}                            <li>{{{PopularPostLink}}}</li>                        {{/PopularPosts}}                        </ul>                    </span>                </li>            </ul>        </section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.UserTypePrefix=function(){if(that.User().Type==="Expert"){return"ChickRx "}else{return""}};that.UserTypeLabel=function(){if(that.User().Type==="Expert"){return"Expert"}else{return"Member"}};that.ViewHashFunctions.UserTypePrefix=that.UserTypePrefix;that.ViewHashFunctions.UserTypeLabel=that.UserTypeLabel;return(that)},Newsletter:function Newsletter(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Newsletter";that.Validations=(function(){var that={};that.EmailAddress=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired(),Dry.Validations.IsEmail()];return(that)})();that.AddRpcFunctions({RegisterEmailAddress:""});var defaultHash={Id:"",EmailAddress:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email address",that.GetValidations("EmailAddress"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Go={OnClick:function(event){event.Model.Validate(function(messages){if(messages){Dry.PopupMessage({PopupTitle:"Give it another try.",MessageTitle:"Please enter a valid email address",Modal:true,MessageBox:true,Height:100}).Show()}else{event.Model.Api.RegisterEmailAddress(event.Model,function(){event.Model.EmailAddress("");event.Model.EmailAddress.Label.Show();var oldLabel=event.Model.EmailAddress.Label();event.Model.EmailAddress.Label("Thanks, you're signed up.");setTimeout(function(){event.Model.EmailAddress.Label(oldLabel)},2500)})}},true)}};function toggleLabel(event,field,keydown){if($(event.target).val().length>0||keydown){field.Label.Hide()}else{field.Label.Show()}}that.EmailAddress={};that.EmailAddress.Value={OnKeyDown:function(event){toggleLabel(event,event.Model.EmailAddress,true)},OnKeyUp:function(event){toggleLabel(event,event.Model.EmailAddress)},OnBlur:function(event){toggleLabel(event,event.Model.EmailAddress)},OnFocus:function(event){toggleLabel(event,event.Model.EmailAddress)}};that.EmailAddress.Label={OnClick:function(event){event.Model.EmailAddress.Value.Focus()}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="Newsletter Splash">        <form class="Fields">            <fieldset class="EmailAddress">                <legend>GET THE NEWSLETTER</legend>                <div class="newsletter-fieldset-wrapper">                    <label>                        <input class="Value" type="text" />                        <span class="Label"></span>                    </label>                    <input class="Go" type="button" value="GO" />                </div>            </fieldset>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Go={OnClick:function(event){event.Model.Validate(function(messages){if(messages){Dry.PopupMessage({PopupTitle:"Give it another try.",MessageTitle:"Please enter a valid email address",Modal:true,MessageBox:true,Height:100}).Show()}else{event.Model.Api.RegisterEmailAddress(event.Model,function(){event.Model.EmailAddress("");event.Model.EmailAddress.Label.Show();var oldLabel=event.Model.EmailAddress.Label();event.Model.EmailAddress.Label("Thanks, you're signed up.");setTimeout(function(){event.Model.EmailAddress.Label(oldLabel)},2500)})}},true)}};function toggleLabel(event,field,keydown){if($(event.target).val().length>0||keydown){field.Label.Hide()}else{field.Label.Show()}}that.EmailAddress={};that.EmailAddress.Value={OnKeyDown:function(event){toggleLabel(event,event.Model.EmailAddress,true)},OnKeyUp:function(event){toggleLabel(event,event.Model.EmailAddress)},OnBlur:function(event){toggleLabel(event,event.Model.EmailAddress)},OnFocus:function(event){toggleLabel(event,event.Model.EmailAddress)}};that.EmailAddress.Label={OnClick:function(event){event.Model.EmailAddress.Value.Focus()}};return(that)})();that.AddView("Splash",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="Newsletter Splash">        <form class="Fields">            <fieldset class="EmailAddress">                <legend>GET THE NEWSLETTER</legend>                <div class="newsletter-fieldset-wrapper">                    <label>                        <input class="Value" type="text" />                        <span class="Label"></span>                    </label>                    <input class="Go" type="button" value="GO" />                </div>            </fieldset>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Splash");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},UserInviteRequest:function UserInviteRequest(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="UserInviteRequest";that.Validations=(function(){var that={};that.EmailAddress=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),{Validation:function(model,field,callback){Dry.UserInviteRequest().Api.Exists(field.Value(),function(exists){callback(!exists)})},ValidationMessage:"You have already requested an invitation."}];return(that)})();that.AddRpcFunctions({RequestInvite:"",Exists:""});var defaultHash={Id:"",EmailAddress:"",DateOfBirth:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DateOfBirth","","DateOfBirth",that.GetValidations("DateOfBirth"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "UserInviteRequest ListItem">        <span class = "Fields">            <span class = "EmailAddress">                <span class = "Value"></span>            </span>            <!--            <span class = "DateOfBirth">                <span class = "Value"></span>            </span>            -->        </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Submit={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){event.Model.Api.RequestInvite(event.Model,function(result){event.Model.Emit("close");var share=Dry.Share({FacebookLink:"http://www.chickrx.com",TwitterLink:"http://www.chickrx.com"});Dry.PopupMessage({MessageTitle:"Thanks--we'll be in touch!",Message:"Show off that you're in the know about this fabulous new community:",Model:share,Width:300,Height:150}).Show()})}})}};return(that)})();that.AddView("Create",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="UserInviteRequest Create">        <h2>Ladies Only: Request a Private Beta Invite</h2>         <form class="Fields">            <fieldset class="EmailAddress">                <label>                    <span class="Label"></span>                    <input class="Value" type="text" />                </label>            </fieldset>            <!--            <fieldset class="DateOfBirth">                <label>                    <span class="Label"></span>                </label>                <div class="Validations">                    <p class="UnnamedValidations">                        <span class="Message"></span>                    </p>                </div>            </fieldset>            -->            <input class="Submit" type="button" value="SUBMIT" />            <div class="EmailAddress">                <div class="Validations">                    <p class="UnnamedValidations">                        <span class="Message"></span>                    </p>                </div>            </div>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Create");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Feedback:function Feedback(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Feedback";that.Validations=(function(){var that={};that.AuthorId=[Dry.Validations.Expects("string")];that.Text=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.Link=[Dry.Validations.Expects("string")];return(that)})();that.AddRpcFunctions({SendFeedback:""});var defaultHash={Id:"",AuthorId:"",Author:null,Text:"",Link:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AuthorId","","AuthorId",that.GetValidations("AuthorId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Author",null,"Author",that.GetValidations("Author"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Text","","Text",that.GetValidations("Text"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Link","","Link",that.GetValidations("Link"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.SubmitButton={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;event.Model.Validate(function(isValid){if(isValid){event.Model.Api.SendFeedback(event.Model,function(result){var message=Dry.PopupMessage({PopupTitle:"SUCCESS!",Message:"Thanks for giving us feedback."});message.On("close",function(){window.location="/home"});message.Show()})}else{event.Model.Running=false}})}};that.Text={};that.Text.Value={OnFocus:function(event){$(".Text .FieldLabel").hide()}};that.Text.FieldLabel={OnClick:function(event){$(".Text .Value").focus()}};that.Link={};that.Link.Value={OnFocus:function(event){$(".Link .FieldLabel").hide()}};that.Link.FieldLabel={OnClick:function(event){$(".Link .Value").focus()}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Feedback Input">        <h1>Feedback/Report a Bug</h1>        <div class="Explanation">We\'re a new site, and working hard to build a community platform that serves you. We\'d greatly appreciate any feedback you may have for us, and if you\'ve found a bug in our system, we\'d love to know so that we can fix it for you. We\'re grateful for your patience and interest in helping to make ChickRx fabulous.</div>        <form class = "Fields">            <fieldset class = "Text">                <label>                    <div class = "FieldLabel">Please write your text here. If you\'re reporting a bug, please describe the issue and what you were doing before you found the bug.</div>                    <textarea class = "Value"></textarea>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Link">                <label>                    <span class = "FieldLabel">Optional - for bugs. Please paste a link to the page where you found the bug.</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>        </form>        <div class="SubmitButton"></div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Feedback Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "AuthorId">                    <td class = "Label">AuthorId</td>                    <td class = "Value">{{#AuthorId}}{{{Rendered}}}{{/AuthorId}}</td>                </tr>                <tr class = "AuthorEmail">                    <td class = "Label">Author Email</td>                    <td class = "Value">{{#Author}}{{#EmailAddress}}{{{Rendered}}}{{/EmailAddress}}{{/Author}}</td>                </tr>                <tr class = "Text">                    <td class = "Label">Text</td>                    <td class = "Value">{{#Text}}{{{Rendered}}}{{/Text}}</td>                </tr>                <tr class = "Link">                    <td class = "Label">Link</td>                    <td class = "Value">{{#Link}}{{{Rendered}}}{{/Link}}</td>                </tr>            </tbody>        </table>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},UserSettings:function UserSettings(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="UserSettings";that.Validations=(function(){var that={};that.DisplayName=[Dry.Validations.IsRequired(),Dry.Validations.IsValidUserName(),Dry.Validations.UserNameAvailableOrCurrentUser()];that.About=[Dry.Validations.Expects("string")];that.EmailSettings=[Dry.Validations.Expects("EmailSettings")];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",UserName:"",DisplayName:"",ThumbnailImage:"",About:"",DisplayAbout:"",EmailAddress:"",NotifyViaEmail:true,Cropper:"",Avatars:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserName","","UserName:",that.GetValidations("UserName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayName","","Username:",that.GetValidations("DisplayName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ThumbnailImage","","Photo:",that.GetValidations("ThumbnailImage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"About","","About Me:",that.GetValidations("About"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayAbout","","Display About",that.GetValidations("DisplayAbout"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email:",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NotifyViaEmail",true,"Email Notifications:",that.GetValidations("NotifyViaEmail"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Cropper","","Cropper",that.GetValidations("Cropper"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Avatars","","Avatar Gallery",that.GetValidations("Avatars"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function updateNotificationButton(model){if(model.NotifyViaEmail()){$("#"+model.InstanceId()+" #EmailNotificationButtonLabel").text("EMAIL NOTIFICATIONS ON")}else{$("#"+model.InstanceId()+" #EmailNotificationButtonLabel").text("EMAIL NOTIFICATIONS OFF")}}that.Model={OnBound:function(model){$("#"+model.InstanceId()+" .NotifyViaEmail .Value").button();updateNotificationButton(model);model.NotifyViaEmail.Value.On("change",function(){Dry.User().Api.SetNotifyViaEmail(model.NotifyViaEmail(),function(){updateNotificationButton(model)})})}};that.Thumbnail={};that.EditPassword={OnClick:function(event){Dry.Utility.GetCurrentUser(function(user){var p=Dry.Popup({PopupTitle:"CHANGE PASSWORD",Modal:true,Content:Dry.ChangePassword({UserId:user.Id()})});p.Content().On("close",function(){Dry.PopupMessage({PopupTitle:"SUCCESS!",Message:"Your password has been changed."}).Show()});p.Show()})}};that.About={};that.About.Edit={OnClick:function(event){var mod=event.Model;if(mod.About.Running){return}mod.About.Running=true;if(mod.About.Edit){$("#"+mod.InstanceId()+" .About .Edit").text("Edit");var val=$("#"+mod.InstanceId()+" .About .Value").val();val=val.substr(0,1200);Dry.User().Api.SetAbout(val,function(){$("#"+mod.InstanceId()+" .About .Value").replaceWith('<div class="Value">'+Dry.Utility.EscapeHtml(val)+"</div>");$("#"+mod.InstanceId()+" .About small").hide();mod.About.Edit=false;mod.About.Running=false})}else{$("#"+mod.InstanceId()+" .About .Edit").text("Save");var val=$("#"+mod.InstanceId()+" .About .Value").text();$("#"+mod.InstanceId()+" .About .Value").replaceWith('<textarea class="Value">'+Dry.Utility.UnescapeHtml(val)+"</textarea>");updateAboutNumChars();$("#"+mod.InstanceId()+" .About small").show();$("#"+mod.InstanceId()+" .About .Value").keydown(updateAboutNumChars);$("#"+mod.InstanceId()+" .About .Value").keyup(updateAboutNumChars);mod.About.Edit=true;mod.About.Running=false}}};function updateAboutNumChars(){var numLeft=(1200-$(".About .Value").val().length);$(".About small").html("("+numLeft+" characters left)");if(numLeft<0){$(".About small").addClass("AboutHighlight")}else{$(".About small").removeClass("AboutHighlight")}}return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "UserSettings Input">        <form class = "Fields">            <fieldset class="user-settings">                <legend class="heading">Profile Settings</legend>                <fieldset class = "DisplayName user-settings">                    <label>                        <div class="LabelColumn">                            <span class = "Label">Username:</span>                        </div>                        <div class="ValueColumn">                            <span class = "Value" type = "text" />                        </div>                    </label>                </fieldset>                <fieldset class = "EmailUserSettings user-settings">                    <label>                        <div class="LabelColumn EmailAddress">                            <span class = "Label">Email:</span>                        </div>                        <div class="ValueColumn">                            <span class="EmailAddress">                                <span class="Value">{{#EmailAddress}}{{{Rendered}}}{{/EmailAddress}}</span>                            </span>                            <div class = "NotifyViaEmail">                                <label id="EmailNotificationButtonLabel" for="EmailNotificationButton"></label>                                <input id="EmailNotificationButton" type="checkbox" class="Value" />                            </div>                        </div>                    </label>                </fieldset>                                <fieldset class = "Password user-settings">                    <div class="LabelColumn">                        <span class = "Label">Password:</span>                    </div>                    <div class="ValueColumn">                        <a class="Edit EditPassword">Change Your Password</a>                    </div>                </fieldset>                <fieldset class = "ThumbnailImage user-settings">                    <label>                        <div class="LabelColumn">                            <span class = "Label">Photo:</span>                        </div>                    </label>                    <div class="ValueColumn">                        <a {{Href}} class="user-photo Value">{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}</a>                        <div class="inner-column">                            <!-- <input type="button" class="ChooseImage" /> -->                            <div>                                <a class="AddImage" href="/my-account/image?referrer=my-account">Change Your Image</a>                                <p class="warning">(If you want to remain anonymous, maybe its not the best idea to upload an image of your face... Just sayin\')</p>                            </div>                        </div>                    </div>                </fieldset>                <fieldset class="About user-settings">                    <label>                        <div class="LabelColumn">                            <span class="Label"></span>                            <small class="character-limit" style="display:none;">(1200 characters left)</small>                        </div>                        <div class="ValueColumn">                            <div class="Value"></div>                        </div>                        <!-- <textarea class="Value" rows="8" columns="40"></textarea> -->                    </label>                    <div class="Validations">                        <p class="UnnamedValidations">                            <span class="Message"></span>                        </p>                    </div>                    <div class="EditColumn">                        <a class="Edit">Edit</a>                    </div>                </fieldset>            </fieldset>            <!--             <fieldset class = "EmailSettings user-settings">                <legend class="heading">Email Settings</legend>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>                <div>{{#EmailSettings}}{{{Rendered}}}{{/EmailSettings}}</div>            </fieldset>            -->        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");function setUserName(value){that.UserName(value.toLowerCase())}that.DisplayName.Value.On("change",setUserName);that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.SaveSettings=function(){that.Validate(function(isValid){if(isValid){Dry.User().Api.SaveSettings(that,function(result){Dry.Logger.debug("SaveSettings: "+result.message)})}})};return(that)},PrivacyPolicy:function PrivacyPolicy(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="PrivacyPolicy";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "PrivacyPolicy Show">        <h1>CHICKRX, INC.</h1>        <h2>Privacy Policy</h2>        <p>This Privacy Policy was last modified on January 23, 2012, and was first published and made effective on January 23, 2012.</p>        <p>ChickRx, Inc. ("ChickRx," "we," or "us") knows that you care how information about you is used and shared.  This Privacy Policy explains what information of yours will be collected by ChickRx when you use the ChickRx Service, how the information will be used, and how you can control the collection, correction and/or deletion of information.   We will not use or share your information with anyone except as described in this Privacy Policy.  This Privacy Policy does not apply to information we collect by other means (including offline) or from other sources.  Capitalized terms that are not defined in this Privacy Policy have the meaning given them in our <a href="/legal/terms-of-use">Terms of Use</a>.</p>        <h2>Information We Collect</h2>        <p><strong>User-Provided Information:</strong>  You provide us information about yourself, such as your username, e-mail address, zip code and date of birth, if you register for a member account with the Service (including by "following," "liking," adding the ChickRx application, linking your account to the ChickRx service, etc., on a third party website or network).  If you correspond with us by email, we may retain the content of your email messages, your email address and our responses.  We may also retain any messages you send through the Service.  You may provide us information in User Content you post to the Service.</p>        <p><strong>Cookies Information:</strong>  When you visit the Service, we may send one or more cookies - a small text file containing a string of alphanumeric characters - to your computer that uniquely identifies your browser and lets ChickRx help you log in faster and enhance your navigation through the site.  A cookie may also convey information about how you browse the Service to us.  A cookie does not collect personal information about you.  A persistent cookie remains on your hard drive after you close your browser. Persistent cookies may be used by your browser on subsequent visits to the site. Persistent cookies can be removed by following your web browser\'s directions. A session cookie is temporary and disappears after you close your browser. You can reset your web browser to refuse all cookies or to indicate when a cookie is being sent. However, some features of the Service may not function properly if the ability to accept cookies is disabled.</p>        <p><strong>Log File Information:</strong>  Log file information is automatically reported by your browser each time you access a web page.  When you use the Service, our servers automatically record certain log file information. These server logs may include information such as your web request, Internet Protocol ("IP") address, browser type, referring / exit pages and URLs, number of clicks and how you interact with links on the Service, domain names, landing pages, pages viewed, and other such information.</p>        <p><strong>Clear Gifs Information:</strong>  When you use the Service, we may employ clear gifs (also known as web beacons) which are used to track the online usage patterns of our users anonymously.  In addition, we may also use clear gifs in HTML-based emails sent to our users to track which emails are opened by recipients.  The information is used to enable more accurate reporting, improve the effectiveness of our marketing, and make ChickRx better for our users.</p>        <p><strong>Third Party Services:</strong> ChickRx uses third party analytics services, like Google Analytics, to help understand use of the Service. These services collect the information sent by your browser as part of a web page request, including cookies and your IP address, and their use of such information is governed by their respective privacy policy.</p>        <h2>How We Use Your Information</h2>        <p>We use the personal information you submit to operate, maintain, and provide to you the features and functionality of the Service.</p>        <p>By providing ChickRx your email address (including by "following," "liking," adding the ChickRx application, linking your account to the ChickRx service, etc., on a third party website or network), you consent to our using the email address to send you Service-related notices, including any notices required by law, in lieu of communication by postal mail.  You also agree that we may send you notifications of activity on the Service to the email address you give us, in accordance with any applicable privacy settings.  We may use your email address to send you other messages, such as newsletters, changes to features of the Service, or special offers.  If you do not want to receive such email messages, you may opt out or change your preferences by e-mailing us at <a href="mailto:privacy@chickrx.com">privacy@chickrx.com</a>.  Opting out may prevent you from receiving email messages regarding updates, improvements, or offers.  You may not opt out of Service-related e-mails. </p>        <p>Following termination or deactivation of your User account, ChickRx may retain your profile information and User Content for a commercially reasonable time for backup, archival, or audit purposes.  Furthermore, ChickRx may retain and continue to use indefinitely all information (including User Content) contained in your communications to other Users or posted to public or semi-public areas of the Service after termination or deactivation of your User account.</p>        <p>If you choose to use our invitation service to invite a friend to the Service, we will ask you for that person\'s email address and automatically send an email invitation.  ChickRx stores this information to send this email, to register your friend if your invitation is accepted, and to track the success of our invitation service. Your friend may contact us to request that we remove this information from our database at <a href="mailto:privacy@chickrx.com">privacy@chickrx.com</a>.</p>        <p>ChickRx may use certain information about you and/or your User Content internally for purposes such as analyzing how the Service is used, diagnosing service or technical problems, maintaining security, and personalizing content.  </p>        <p>ChickRx reserves the right, but has no obligation, to monitor the User Content you post on the Service. We reserve the right to remove any such information or material for any reason or no reason, including without limitation if in our sole opinion such information or material violates, or may violate, any applicable law or our <a href="/legal/terms-of-use">Terms of Use</a> Agreement, or to protect or defend our rights or property or those of any third party.  ChickRx also reserves the right to remove information upon the request of any third party.</p>        <p>We use cookies, clear gifs, and log file information to: (a) remember information so that you will not have to re-enter it during your visit or the next time you visit the site; (b) provide custom, personalized content and information; (c) monitor the effectiveness of our Service; (d) monitor aggregate metrics such as total number of visitors, traffic, and demographic patterns; (e) diagnose or fix technology problems reported by our Users or engineers that are associated with certain IP addresses; (f) help you efficiently access your information after you sign in; and (h) track User Content and Users to the extent necessary to comply as a service provider with the Digital Millennium Copyright Act.</p>        <h2>How We Share Your Information</h2>        <p><strong>Personally Identifiable Information:</strong>  ChickRx will not rent or sell your personally identifiable information to others.  ChickRx may share your personally identifiable information with third parties for the purpose of providing the Service to you.  If we do this, such third parties\' use of your information will be bound by this Privacy Policy.  We may store personal information in locations outside the direct control of ChickRx (for instance, on servers or databases co-located with hosting providers).</p>        <p>As we develop our business, we may buy or sell assets or business offerings. Customer, email, and visitor information is generally one of the transferred business assets in these types of transactions. We may also transfer or assign such information in the course of corporate divestitures, mergers, or dissolution.  </p>        <p>Any personal information or content that you voluntarily disclose for posting to the Service, such as User Content, becomes available to the public.  If you remove information that you posted to the Service, copies may remain viewable in cached and archived pages of the Service, or if other Users have copied or saved that information.    </p>        <p>From time to time, we may run contests, special offers, or other events or activities ("Events") on the Service together with a third party partner.  If you provide information to such third parties, you give them permission to use it for the purpose of that Event and any other use that you approve. We cannot control third parties\' use of your information. If you do not want your information to be collected by or shared with a third party, you can choose not to participate in these Events.</p>        <p>Except as otherwise described in this Privacy Policy, ChickRx will not disclose personal information to any third party unless required to do so by law or subpoena or if we believe that such action is necessary to (a) conform to the law, comply with legal process served on us or our affiliates, or investigate, prevent, or take action regarding suspected or actual illegal activities; (b) to enforce our <a href="/legal/terms-of-use">Terms of Use</a>, take precautions against liability, to investigate and defend ourselves against any third-party claims or allegations, to assist government enforcement agencies, or to protect the security or integrity of our site; and (c) to exercise or protect the rights, property, or personal safety of ChickRx, our Users or others.</p>        <p>Non-Personally Identifiable Information:  We may share non-personally identifiable information (such as anonymous usage data, referring/exit pages and URLs, platform types, number of clicks, etc.) with interested third parties to help them understand the usage patterns for certain ChickRx services.</p>        <p>ChickRx may allow third-party ad servers or ad networks to serve advertisements on the Service. These third-party ad servers or ad networks use technology to send, directly to your browser, the advertisements and links that appear on ChickRx. They automatically receive your IP address when this happens. They may also use other technologies (such as cookies, JavaScript, or web beacons) to measure the effectiveness of their advertisements and to personalize the advertising content.  ChickRx does not provide any personally identifiable information to these third-party ad servers or ad networks without your consent. However, please note that if an advertiser asks ChickRx to show an advertisement to a certain audience and you respond to that advertisement, the advertiser or ad server may conclude that you fit the description of the audience they are trying to reach.  The ChickRx Privacy Policy does not apply to, and we cannot control the activities of, third-party advertisers.  Please consult the respective privacy policies of such advertisers for more information. </p>        <h2>How We Protect Your Information</h2>        <p>ChickRx cares about the integrity and security of your personal information.  We cannot, however, ensure or warrant the security of any information you transmit to ChickRx or guarantee that your information on the Service may not be accessed, disclosed, altered, or destroyed by breach of any of our physical, technical, or managerial safeguards.  Your privacy settings may also be affected by changes to the functionality of ChickRx\'s distributors, such as social networks.  ChickRx is not responsible for the functionality or security measures of any third party.  </p>        <p>To protect your privacy and security, we take reasonable steps (such as requesting a unique password) to verify your identity before granting you access to your account. You are responsible for maintaining the secrecy of your unique password and account information, and for controlling access to your email communications from ChickRx, at all times.</p>        <h2>Compromise of Personal Information</h2>        <p>In the event that personal information is compromised as a result of a breach of security, ChickRx will promptly notify those persons whose personal information has been compromised, in accordance with the notification procedures set forth in this Privacy Policy, or as otherwise required by applicable law.</p>        <h2>Your Choices About Your Information</h2>        <p>You may, of course, decline to submit personally identifiable information through the Service, in which case ChickRx may not be able to provide certain services to you. You may update or correct your account information and email preferences at any time by logging in to your account.  </p>        <h2>Children\'s Privacy</h2>        <p>Protecting the privacy of young children is especially important.  For that reason, ChickRx does not knowingly collect or solicit personal information from anyone under the age of 13 or knowingly allow such persons to register as members. If you are under 13, please do not send any information about yourself to us, including your name, address, telephone number, or email address. No one under age 13 is allowed to provide any personal information to or on ChickRx. In the event that we learn that we have collected personal information from a child under age 13 without verification of parental consent, we will delete that information as quickly as possible. If you believe that we might have any information from or about a child under 13, please contact us at <a href="mailto:privacy@chickrx.com">privacy@chickrx.com</a>. </p>        <h2>Links to Other Web Sites</h2>        <p>We are not responsible for the practices employed by websites linked to or from the Service, nor the information or content contained therein.  Please remember that when you use a link to go from the Service to another website, our Privacy Policy is no longer in effect. Your browsing and interaction on any other website, including those that have a link on our website, is subject to that website\'s own rules and policies. Please read over those rules and policies before proceeding.</p>        <h2>Notification Procedures</h2>        <p>It is our policy to provide notifications, whether such notifications are required by law or are for marketing or other business related purposes, to you via email notice, written or hard copy notice, or through conspicuous posting of such notice on the Service, as determined by ChickRx in its sole discretion. We reserve the right to determine the form and means of providing notifications to you, provided that you may opt out of certain means of notification as described in this Privacy Policy.</p>        <h2>Changes to Our Privacy Policy</h2>        <p>ChickRx may update its Privacy Policy from time to time, and so you should review this Policy periodically.  When we change the policy in a material way, we will update the \'last modified\' date at the top of this Privacy Policy.  Changes to this Privacy Policy are effective when they are posted on this page.   </p>        <p>If you have any questions about this Privacy Policy, the practices of this site, or your dealings with this website, please contact us at <a href="mailto:privacy@chickrx.com">privacy@chickrx.com</a>, or send mail to:</p>        <p>ChickRx, Inc.<br />        Attn: Privacy<br />        P.O. Box 749<br />        San Francisco, CA  94104 </p>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Aside:function Aside(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Aside";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Models:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Models","","",that.GetValidations("Models"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div class="Aside Container" id = "{{{InstanceId}}}">    <div class = "Aside Show">        {{#Models}}{{{Rendered}}}{{/Models}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},GettingStartedTips:function GettingStartedTips(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="GettingStartedTips";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Expert",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "GettingStartedTips Expert">        <div class = "Fields">            <h1>WELCOME!</h1>            <h3>Tips for Using ChickRx:</h3>            <ul class="DisplayListLargeArrow">                <li><strong>Answer user questions:</strong> Answer any question you see on the site, or easily find a list of questions in your broad category(ies) of expertise on the homepage\'s "Questions for Me" tab (access this tab from anywhere by clicking the "View Questions for Me" button in the site header).</li>                <li><strong>Share "Thoughts"</strong> (tips, news, insights, etc.) You can repost what you\'ve published on other sites for more exposure. Note: You own all of the content you post on ChickRx.</li>                <li><strong>Anonymously vote up posts</strong> that you find helpful or interesting (including questions, answers, Thought posts and articles). This helps us surface quality posts and acknowledge contributors for their good work.</li>                <li><strong>Customize your experience:</strong> Anonymously follow topics, Q&A, Thoughts, experts and members you like. You\'ll be notified when there\'s new activity.</li>                <li>Questions? Access the Help page or email us: Help@ChickRx.com.</li>            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("User",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "GettingStartedTips User">        <div class = "Fields">            <h1>WELCOME!</h1>            <h3>Tips for Using ChickRx:</h3>            <ul class="DisplayListLargeArrow">                <li>Customize your experience: anonymously follow topics, Q&A, Thoughts, experts and members that you like. You\'ll be notified when there\'s new activity.</li>                <li>Anonymously ask your health and wellness questions, and get responses from experts and peers.</li>                <li>Help answer other members\' questions.</li>                <li>Share "Thoughts": tips, links, products, etc.</li>                <li>Anonymously vote up helpful posts.</li>            </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("User");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Token:function Token(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Token";that.Validations=(function(){var that={};that.Token=[Dry.Validations.IsRequired("Token must have a value"),Dry.Validations.Expects("string")];that.TokenType=[Dry.Validations.IsRequired("Token type must have a value"),Dry.Validations.Expects("string")];that.NumberOfUses=[Dry.Validations.IsNumber("Number of uses must be a number"),Dry.Validations.InRange(0)];return(that)})();that.AddRpcFunctions({Save:"",Remove:"",Find:"",SetId:"",SetToken:"",SetTokenType:"",SetNumberOfUses:"",SetData:"",GetTokensByType:""});var defaultHash={Id:"",Token:"",TokenType:"",NumberOfUses:1,Data:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Token","","Token",that.GetValidations("Token"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TokenType","","TokenType",that.GetValidations("TokenType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfUses",1,"NumberOfUses",that.GetValidations("NumberOfUses"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Data","","Data",that.GetValidations("Data"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.ShowEditBox={OnClick:function(event){}};return(that)})();that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "Token ListItem">        <span class = "Fields">            <span class = "TokenType">                <span class = "Value"></span>            </span>            <span class = "Token">                <span class = "Value"></span>            </span>            <span class = "NumberOfUses">                <span class = "Value"></span>            </span>            <span class = "Data">                <span class = "Value"></span>            </span>        </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Token Edit">        <form class = "Fields">            <fieldset class = "TokenType">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" disabled="disabled" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Token">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "NumberOfUses">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Data">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <input type = "button" class="Save" value = "Save"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Output");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Save=function(callback){that.Validate(function(isValid){if(isValid){that.Api.Save(that,function(result){that.Emit("saved",result);that.Emit("close");if(callback){callback()}})}})};that.Remove=function(callback){if(that.Id()){that.Api.Remove(that.Id(),function(result){that.Emit("removed");if(callback){callback()}})}else{that.Emit("removed");if(callback){callback()}}};return(that)},ExpertInviteRequest:function ExpertInviteRequest(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ExpertInviteRequest";that.Validations=(function(){var that={};that.EmailAddress=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),{Validation:function(model,field,callback){Dry.UserInviteRequest().Api.Exists(field.Value(),function(exists){callback(!exists)})},ValidationMessage:"You have already requested an invitation."}];return(that)})();that.AddRpcFunctions({RequestInvite:""});var defaultHash={Id:"",EmailAddress:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "ExpertInviteRequest ListItem">        <span class = "Fields">            <span class = "EmailAddress">                <span class = "Value"></span>            </span>        </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Submit={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){event.Model.Api.RequestInvite(event.Model,function(result){event.Model.Emit("close")})}})}};return(that)})();that.AddView("Create",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="ExpertInviteRequest Create">        <form class="Fields">            <h2>Join the ChickRx Team of Trusted Health &amp; Wellness Experts</h2>            <p>Create your professional profile and join our community discussions - it\'s a free and effective way to gain exposure for your practice, promote your expertise, maintain a dialogue with prospective and current clients, and build your business.</p>            <fieldset class="EmailAddress">                <label>                    <span class="Label"></span>                    <input class="Value" type="text" />                </label>            </fieldset>            <!--            <fieldset class="DateOfBirth">                <label>                    <span class="Label"></span>                    <input class="Value" type="text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            -->            <input class="Submit" type="button" value="Submit"/>            <div class="EmailAddress">                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </div>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Create");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},AtomicEditFieldControl:function AtomicEditFieldControl(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AtomicEditFieldControl";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",EditModel:"",FieldName:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EditModel","","EditModel",that.GetValidations("EditModel"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"FieldName","","FieldName",that.GetValidations("FieldName"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.ShowAtomicEditPopup={OnClick:function(event){var model=event.Model;model.View("Edit");var p=Dry.Popup({Title:"Edit",Content:model});p.Show()}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "AtomicEditFieldControl Show">        <input type="button" class = "ShowAtomicEditPopup" Value = "Edit" />    </span></span>',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){model.EditModel().Fields[model.FieldName()].RenderField($("#"+model.InstanceId()+"-FieldContainer")[0])}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "AtomicEditFieldControl Edit">        <div id = \'{{{InstanceId}}}-FieldContainer\'></div>        <input type="button" class= "Save" value="Save" />        <input type="button" class= "Cancel" value="Cancel" />    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.EditModel.Render=false;that.Save=function(){var field=that.EditModel().Fields[that.FieldName()];field.Validate(function(isValid){if(isValid){that.EditModel().Api["Set"+that.FieldName()](that.EditModel().Id(),field(),function(){that.Emit("saved",field());that.Emit("close")})}})};that.Cancel=function(){that.Emit("close")};return(that)},TagNode:function TagNode(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Tag();var parent=Dry.Models.Tag();that.Parent=parent;that.Type="TagNode";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Parents:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Parents",[],"Parents",that.GetValidations("Parents"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TagNode Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "Parents">                    <td class = "Label">Parents</td>                    <td class = "Value">{{#Parents}}{{{Rendered}}}{{/Parents}}</td>                </tr>            </tbody>        </table>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Category",Dry.BaseClasses.Models.View('<div class="TagNode CategoryContainer" id = "{{{InstanceId}}}">    <div class = "TagNode Category">        <section class = "Fields">            <header class="Tag">                <h1 class="Value">{{#Tag}}{{{Rendered}}}{{/Tag}}</h1>            </header>            <section class="Subtopics hide">                <h3>Most Popular Topics:</h3>                <ul>                    <li><a>Sub Topic <span>(9)</span></a></li>                    <li><a>Another Sub Topic <span>(13)</span></a></li>                    <li><a>Third Sub Topic <span>(5)</span></a></li>                    <li><a>Last Sub Topic <span>(22)</span></a></li>                </ul>            </section>        </section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Topic",Dry.BaseClasses.Models.View('<div class="TagNode TopicContainer" id = "{{{InstanceId}}}">    <div class = "TagNode Topic">        <section class = "Fields">            <header class="Tag">                <h1 class="Value">{{#Tag}}{{{Rendered}}}{{/Tag}}</h1>                <h2 class="hide">See Synonyms for "<span class="Value">{{#Tag}}{{{Rendered}}}{{/Tag}}</span>"</h2>            </header>            <section class="Categories hide">                <h3>Categorized under:</h3>                <ul>                    <li><a>A Parent Topic <span>(9)</span></a></li>                    <li><a>Another Parent Topic <span>(5)</span></a></li>                </ul>            </section>            <section class="Subtopics hide">                <h3>Subtopics:</h3>                <ul>                    <li><a>Sub Topic <span>(9)</span></a></li>                    <li><a>Another Sub Topic <span>(13)</span></a></li>                    <li><a>Third Sub Topic <span>(5)</span></a></li>                    <li><a>Last Sub Topic <span>(22)</span></a></li>                </ul>            </section>        </section>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Vote:function Vote(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Vote";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",PostType:"",PostId:"",Voted:false,Total:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PostType","","PostType",that.GetValidations("PostType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PostId","","PostId",that.GetValidations("PostId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Voted",false,"VOTE UP ANONYMOUSLY",that.GetValidations("Voted"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Total",0,"Total",that.GetValidations("Total"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={};that.Model.OnBound=function(model){if(model.Voted()){$("#"+model.InstanceId()+" .Button").attr("disabled","disabled");model.Voted.Label("THANKS FOR VOTING")}else{model.Voted.Label("VOTE UP ANONYMOUSLY")}};function toggleButton(event){$("#"+event.Model.InstanceId()+" .Button").attr("disabled","disabled");$("#"+event.Model.InstanceId()+" .Button").removeClass("false");$("#"+event.Model.InstanceId()+" .Button").addClass("true");event.Model.Voted(true);event.Model.Voted.Label("THANKS FOR VOTING")}function vote(event){Dry.Post().Api.Vote(event.Model.PostId());event.Model.Total(event.Model.Total()+1)}that.Voted={};that.Voted.Button={OnClick:function(event){toggleButton(event);vote(event)}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div class="Vote Container" id="{{{InstanceId}}}">    <div class="Vote Edit">        <div class="Fields">            <section class="Voted">                <button class="Button {{#Voted}}{{{Rendered}}}{{/Voted}}"></button>                <footer>                    <small class="Total">(<span class="Value"></span>&nbsp;votes)</small>                </footer>            </section>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Voted={};that.Voted.Link={OnClick:function(event){if(!event.Model.Voted()){event.Model.Voted(true);Dry.Post().Api.Vote(event.Model.PostId());event.Model.Total(event.Model.Total()+1);event.Model.Refresh()}}};return(that)})();that.AddView("EditFeedItem",Dry.BaseClasses.Models.View('<span class="Vote Container" id="{{{InstanceId}}}">    <span class="Vote EditFeedItem">        <span class="Fields">            <span class="Voted">                <a class="Link {{#Voted}}{{{Rendered}}}{{/Voted}}">{{{VoteLabel}}}</a>                <small class="Total">(<span>{{#Total}}{{{Rendered}}}{{/Total}}</span>&nbsp;{{VotePlural}})</small>            </span>        </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Voted={};that.Voted.Button={OnClick:function(event){event.Model.Voted(true);Dry.Post().Api.Vote(event.Model.PostId());event.Model.Total(event.Model.Total()+1);event.Model.Refresh()}};return(that)})();that.AddView("EditAside",Dry.BaseClasses.Models.View('<div class="Vote Container" id="{{{InstanceId}}}">    <div class="Vote EditAside">        <div class="Fields">            <section class="Voted">                <header>                    <h3>{{{VoteLabel}}}</h3>                    <small class="Total">(<span>{{#Total}}{{{Rendered}}}{{/Total}}</span>&nbsp;votes)</small>                </header>                <button {{Disabled}} class="Button {{#Voted}}{{{Rendered}}}{{/Voted}}"></button>            </section>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.VoteLabel=function(){if(that.Voted()){return("THANKS FOR VOTING")}else{return("VOTE UP ANONYMOUSLY")}};that.ViewHashFunctions.Disabled=function(){if(that.Voted()){return('disabled="disabled"')}else{return("")}};that.ViewHashFunctions.VotePlural=function(){if(that.Total()===1){return"vote"}else{return"votes"}};that.CreateVoteWidget=function(post,domElement){Dry.Utility.GetCurrentUser(function(user){var voteOptions={Type:"Vote",View:"EditFeedItem",PostType:post.Type,PostId:post.Id(),Voted:user.HasVotedOn(post.Id()),Total:post.Votes()};var vote=Dry.Vote(voteOptions);vote.Render(domElement)})};return(that)},Search:function Search(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Search";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Text:"",QuestionResults:[],ArticleResults:[],BlogPostResults:[],TopicResults:[],ExpertNameResults:[],ExpertResults:[],MemberNameResults:[],MemberResults:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Text","","SEARCH",that.GetValidations("Text"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QuestionResults",[],"QuestionResults",that.GetValidations("QuestionResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ArticleResults",[],"ArticleResults",that.GetValidations("ArticleResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BlogPostResults",[],"BlogPostResults",that.GetValidations("BlogPostResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"TopicResults",[],"TopicResults",that.GetValidations("TopicResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ExpertNameResults",[],"ExpertNameResults",that.GetValidations("ExpertNameResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ExpertResults",[],"ExpertResults",that.GetValidations("ExpertResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"MemberNameResults",[],"MemberNameResults",that.GetValidations("MemberNameResults"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"MemberResults",[],"MemberResults",that.GetValidations("MemberResults"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function toggleLabel(event,field,keydown){if($(event.target).val().length>0||keydown){field.Label.Hide()}else{field.Label.Show()}}that.Text={};that.Text.Label={OnClick:function(event){event.Model.Text.Value.Focus()}};that.Text.Value={OnKeyDown:function(event){if(event.keyCode===$.ui.keyCode.ENTER){setTimeout(function(){$(".Search.Show .Fields .Text .Value").blur();$(".Search.Show .Fields .Text .SubmitSearch").focus();$(".Search.Show .Fields .Text .SubmitSearch").click()},10)}else{toggleLabel(event,event.Model.Text,true)}},OnKeyUp:function(event){toggleLabel(event,event.Model.Text)},OnBlur:function(event){toggleLabel(event,event.Model.Text)},OnFocus:function(event){toggleLabel(event,event.Model.Text)}};that.SubmitSearch={OnClick:function(event){event.Model.Text(Dry.Utility.Trim(event.Model.Text()));if(event.Model.Text()!==""){window.location="/search?query="+encodeURIComponent(event.Model.Text())}else{event.preventDefault()}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="Search Show">        <div class="Fields">            <fieldset class="Text">                <label>                    <input class="Value" type="text" />                    <span class="FieldLabel">Search</span>                </label>                <input class="SubmitSearch" type="button" value="Search" />            </fieldset>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){if(model.QuestionResults().length<=0){$(".QResults").append('<div class="result"><h3>No Questions Found</h3></div>')}}};return(that)})();that.AddView("Results",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Search Results Container">        <div class = "Fields-NoBind">                                       <h1>"{{#Text}}{{{Rendered}}}{{/Text}}" Search Results</h1>            {{#HasTopics}}            <div class = "TopicsResultsContainer">                <h2>TOPICS</h2>                <div class="ResultsContainer">                    {{#TopicResults}}                        {{{Rendered}}}                    {{/TopicResults}}                </div>            </div>            {{/HasTopics}}            {{#HasQuestions}}            <div class = "QuestionResultsContainer">                <h2>QUESTIONS</h2>                <div class="ResultsContainer">                    {{#QuestionResults}}                        {{{Rendered}}}                    {{/QuestionResults}}                </div>            </div>            {{/HasQuestions}}            {{#HasBlogPosts}}            <div class = "BlogPostResultsContainer">                <h2>THOUGHTS</h2>                <div class="ResultsContainer">                    {{#BlogPostResults}}                        {{{Rendered}}}                    {{/BlogPostResults}}                </div>            </div>            {{/HasBlogPosts}}            {{#HasArticles}}            <div class = "ArticleResultsContainer">                <h2>ARTICLES</h2>                <div class="ResultsContainer">                    {{#ArticleResults}}                        {{{Rendered}}}                    {{/ArticleResults}}                </div>            </div>            {{/HasArticles}}            {{#HasAnyExperts}}            <div class = "ExpertResultsContainer">                <h2>EXPERTS</h2>                {{#HasExperts}}                <div class="ResultsContainer">                    <h3 class="ContributorsExplain">Top Contributors in "{{#Text}}{{{Rendered}}}{{/Text}}" Topic</h3>                    {{#ExpertResults}}                        {{{Rendered}}}                    {{/ExpertResults}}                </div>                {{/HasExperts}}                {{#HasNameExperts}}                <div class="ResultsContainer">                    {{#ExpertNameResults}}                        {{{Rendered}}}                    {{/ExpertNameResults}}                </div>                {{/HasNameExperts}}            </div>            {{/HasAnyExperts}}            {{#HasAnyMembers}}            <div class = "MemberResultsContainer">                <h2>MEMBERS</h2>                {{#HasMembers}}                <div class="ResultsContainer">                    <h3 class="ContributorsExplain">Top Contributors in "{{#Text}}{{{Rendered}}}{{/Text}}" Topic</h3>                    {{#MemberResults}}                        {{{Rendered}}}                    {{/MemberResults}}                </div>                {{/HasMembers}}                {{#HasNameMembers}}                <div class="ResultsContainer">                    {{#MemberNameResults}}                        {{{Rendered}}}                    {{/MemberNameResults}}                </div>                {{/HasNameMembers}}            </div>            {{/HasAnyMembers}}            {{#HasNone}}                <h2>Sorry, no results to display</h2>            {{/HasNone}}        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasArticles=that.HasArticles=function(){return(that.ArticleResults().length>0)};that.ViewHashFunctions.HasBlogPosts=that.HasBlogPosts=function(){return(that.BlogPostResults().length>0)};that.ViewHashFunctions.HasQuestions=that.HasQuestions=function(){return(that.QuestionResults().length>0)};that.ViewHashFunctions.HasTopics=that.HasTopics=function(){return(that.TopicResults().length>0)};that.ViewHashFunctions.HasNone=function(){return(!that.HasQuestions()&&!that.HasArticles()&&!that.HasBlogPosts()&&!that.HasTopics()&&!that.HasAnyMembers()&&!that.HasAnyExperts())};that.ViewHashFunctions.HasExperts=that.HasExperts=function(){return(that.ExpertResults().length>0)};that.ViewHashFunctions.HasAnyExperts=that.HasAnyExperts=function(){return(that.ExpertResults().length>0||that.ExpertNameResults().length>0)};that.ViewHashFunctions.HasNameExperts=that.HasNameExperts=function(){return(that.ExpertNameResults().length>0)};that.ViewHashFunctions.HasNameMembers=that.HasNameMembers=function(){return(that.MemberNameResults().length>0)};that.ViewHashFunctions.HasMembers=that.HasMembers=function(){return(that.MemberResults().length>0)};that.ViewHashFunctions.HasAnyMembers=that.HasAnyMembers=function(){return(that.MemberResults().length>0||that.MemberNameResults().length>0)};return(that)},License:function License(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="License";that.Validations=(function(){var that={};that.Name=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired("License is required.")];that.Number=[Dry.Validations.Expects("string")];that.Issuer=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired("Issuing board is required.")];that.Current=[Dry.Validations.Expects("boolean")];that.ValidIn=[Dry.Validations.Expects("Tag"),Dry.Validations.IsRequiredObject("State is required.")];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",Name:"",Number:"",Issuer:"",Current:false,ValidIn:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Name","","Name",that.GetValidations("Name"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Number","","Number",that.GetValidations("Number"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Issuer","","Issuer",that.GetValidations("Issuer"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Current",false,"Current",that.GetValidations("Current"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ValidIn",null,"ValidIn",that.GetValidations("ValidIn"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var stateSelect=Dry.Select();var options=Dry.Tag().LicenseStates();options.unshift(Dry.Tag());stateSelect.Options(options);if(model.SelectedIndex!==undefined){stateSelect.SelectedIndex(model.SelectedIndex)}stateSelect.On("select",function(state){if(state.Key()!==""){model.SelectedIndex=stateSelect.SelectedIndex();model.ValidIn(state)}else{model.ValidIn(null)}});stateSelect.Render($("#"+model.InstanceId()+"-StateSelect"))}};that.Add={OnClick:function(event){event.Model.Validate(function(isValid){if(isValid){event.Model.Emit("add")}})}};that.Remove={OnClick:function(event){event.Model.Emit("remove")}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "License Input">        <form class = "Fields">            <fieldset class = "LicenseNumberDisplay">                <label>                    <span class = "FieldLabel">License Number: </span>                    <span class = "Value"></span>                </label>            </fieldset>            <div class="Optional">Optional</div>            <fieldset class = "Name">                <label>                    <span class = "FieldLabel Required">License or Certification Credential</span>                    <input class = "Value" type = "text" />                    <small>Example: Certified Personal Trainer.</small>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Issuer">                <label>                    <span class = "FieldLabel Required">Issuing Board or Organization</span>                    <input class = "Value" type = "text" />                    <small>Example: American College of Sports Medicine.</small>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Number">                <label>                    <span class = "FieldLabel">License or Certificate #</span>                    <input class = "Value" type = "text" />                    <small>(Optional)</small>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Current">                <label>                    <span class = "FieldLabel">Is this license is current?</span>                    <input class = "Value" type = "checkbox" />                    <small>Yes</small>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "ValidIn">                <label>                    <span class = "FieldLabel Required">Licensed or Certified to Practice in</span>                </label>                <div id="{{{InstanceId}}}-StateSelect"></div>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            {{^EnableRemove}}            <input class="Add" type="button" value="Finish Adding This License"/>            {{/EnableRemove}}            {{#EnableRemove}}            <input class="Remove" type="button" value="Remove"/>            {{/EnableRemove}}        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Remove={OnClick:function(event){event.Model.Emit("remove")}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "License Show">        <div class="Fields">            <section class="LicenseNumberDisplay">                <div class="FieldLabel">License Number: </div>                <div class="Value"></div>            </section>            <section class = "Name">                <div class = "FieldLabel">License or Certification Credential</div>                <div class = "Value">{{#Name}}{{{Rendered}}}{{/Name}}</div>            </section>            <section class = "Issuer">                <div class = "FieldLabel">Issuing Board or Organization</div>                <div class = "Value">{{#Issuer}}{{{Rendered}}}{{/Issuer}}</div>            </section>            <section class = "Number">                <div class = "FieldLabel">License or Certificate #</div>                <div class = "Value">{{#Number}}{{{Rendered}}}{{/Number}}</div>            </section>            <section class = "Current">                <div class = "FieldLabel">This license is current</div>                <div class = "CurrentText">{{CurrentText}}</div>            </section>            <section class = "ValidIn">                <div class = "FieldLabel">Licensed or Certified to Practice in</div>                <div class = "Value">{{#ValidIn}}{{#Tag}}{{{Rendered}}}{{/Tag}}{{/ValidIn}}</div>            </section>            {{#EnableRemove}}            <input class="Remove" type="button" value="X"/>            {{/EnableRemove}}        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.ViewHashFunctions.EnableRemove=function(){return(that.EnableRemove())};that.ViewHashFunctions.CurrentText=function(){if(that.Current()){return("Yes")}else{return("No")}};var enableRemove=false;that.EnableRemove=function(enable){if(enable===undefined){return(enableRemove)}else{enableRemove=enable;return(that)}};that.PostHashIn=function(hash){if(hash.EnableRemove){that.EnableRemove(hash.EnableRemove)}};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},RichTextEditor:function RichTextEditor(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="RichTextEditor";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Height:300,Width:522,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Height",300,"Height",that.GetValidations("Height"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Width",522,"Width",that.GetValidations("Width"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};function CleanPaste(editor){this.Editor=editor;this.Editor.on("editorContentLoaded",this.init,this,true);this.OnBeforePaste=null;this.OnAfterPaste=null}CleanPaste.prototype.init=function(){var doc=this.Editor._getDoc();if(document.all){YAHOO.util.Event.on(doc.body,"beforepaste",this.handleBeforePaste,this,true);YAHOO.util.Event.on(doc.body,"paste",this.handlePaste,this,true);YAHOO.util.Event.on(doc,"dragstart",this.handleDragDrop,this,true);YAHOO.util.Event.on(doc,"dragend",this.handleDragDrop,this,true)}else{this.Editor.on("editorKeyDown",this.handleKeyDown,this,true);YAHOO.util.Event.on(doc,"contextmenu",this.handleContextMenu,this,true)}};CleanPaste.prototype.handleKeyDown=function(e){var vkey=86;var vInsertKey=45;var isMac=(navigator?navigator.appVersion.indexOf("Mac")!=-1:false);var _this=this;if((!isMac&&e.ev.keyCode==vkey&&e.ev.ctrlKey)||(!isMac&&e.ev.keyCode==vInsertKey&&e.ev.shiftKey)||(isMac&&e.ev.keyCode==vkey&&e.ev.metaKey)){setTimeout(function(){_this.CleanPaste()},10)}};CleanPaste.prototype.handleBeforePaste=function(e){YAHOO.util.Event.stopEvent(e)};CleanPaste.prototype.handlePaste=function(){var _this=this;setTimeout(function(){_this.CleanPaste()},10)};CleanPaste.prototype.handleDragDrop=function(e){YAHOO.util.Event.stopEvent(e)};CleanPaste.prototype.handleContextMenu=function(e){YAHOO.util.Event.stopEvent(e)};CleanPaste.prototype.GetHtml=function(){this.Editor.saveHTML();var html=this.Editor.get("textarea").value;return(html)};CleanPaste.prototype.CleanPaste=function(){var sourceText=this.GetHtml();var cleanText=this.CleanHTML(sourceText);var pasteParams={sourceText:sourceText,cleanText:cleanText};if(this.OnBeforePaste!=null){this.OnBeforePaste(pasteParams)}cleanText=pasteParams.cleanText;this.Editor.setEditorHTML(cleanText);if(this.OnAfterPaste!=null){this.OnAfterPaste(pasteParams)}};CleanPaste.prototype.CleanHTML=function(html){html=this.Editor.cleanHTML(html);html=html.replace(/<(\/)*(\\?xml:|meta|link|span|font|del|ins|st1:|[ovwxp]:)((.|\s)*?)>/gi,"");html=html.replace(/(class|style|type|start)=("(.*?)"|(\w*))/gi,"");html=html.replace(/<style(.*?)style>/gi,"");html=html.replace(/<script(.*?)script>/gi,"");html=html.replace(/<!--(.*?)-->/gi,"");return html};that.Model={OnBound:function(model){var editorConfig={height:model.Height()+"px",width:model.Width()+"px",draggable:false,dompath:false,buttonType:"advanced",toolbar:{titlebar:"",collapse:false,buttons:[{group:"textstyle",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},]},{type:"separator"},{group:"alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{type:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"indentlist",buttons:[{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]}]}};var editor=new YAHOO.widget.Editor(model.InstanceId()+"-Editor",editorConfig);editor.addListener("afterRender",function(){Dry.Models.RichTextEditor[model.InstanceId()]=editor;model.Emit("rendered")});editor.render();var cleanPaste=new CleanPaste(editor);cleanPaste.OnBeforePaste=function(params){params.cleanText=Dry.Utility.SecureHtml(params.cleanText)}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}" class="yui-skin-sam">    <div class = "RichTextEditor Show">        <textarea id="{{{InstanceId}}}-Editor"></textarea>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.GetHtml=function(){var editor=Dry.Models.RichTextEditor[that.InstanceId()];if(editor){editor.saveHTML();var html=editor.get("textarea").value;return(html)}else{throw (new Error("No editor instance registered"))}};that.SetHtml=function(html){var editor=Dry.Models.RichTextEditor[that.InstanceId()];if(editor){editor.setEditorHTML(html)}else{throw (new Error("No editor instance registered"))}};that.Focus=function(){var editor=Dry.Models.RichTextEditor[that.InstanceId()];if(editor){editor.focus()}else{throw (new Error("No editor instance registered"))}};return(that)},ActivityFeed:function ActivityFeed(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ActivityFeed";that.Validations={};that.AddRpcFunctions({GetItems:""});var defaultHash={Id:"",Header:true,Title:"",Items:[],More:Dry.Models.MoreFeedItem({Type:"MoreFeedItem"}),Query:null,LoadAsync:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Header",true,"Header",that.GetValidations("Header"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Items",[],"Items",that.GetValidations("Items"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"More",Dry.Models.MoreFeedItem({Type:"MoreFeedItem"}),"More",that.GetValidations("More"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Query",null,"Query",that.GetValidations("Query"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LoadAsync",false,"LoadAsync",that.GetValidations("LoadAsync"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){if(model.More()){model.More().On("get-more",function(){model.GetMore()})}}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ActivityFeed Show">        <div class = "Fields">            {{#HasTitle}}            <div class = "BoxHeaderCenter">{{#Title}}{{{Rendered}}}{{/Title}}</div>            {{/HasTitle}}            {{#UseHeader}}            <div class = "Header">Recent Activity</div>            {{/UseHeader}}            <div class = "Items">                {{#Items}}{{{Rendered}}}{{/Items}}            </div>            <div class = "More">{{#More}}{{{Rendered}}}{{/More}}</div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasTitle=function(){return(that.Title()!=="")};that.UseHeader=function(){return(that.Header())};that.GetMore=function(){if(that.Query()){that.More().View("Loading");that.More().Refresh();if(that.Query().Skip===undefined){that.Query().Skip=0}that.Query().Skip+=5;that.Api.GetItems(that.Query(),function(items){if(items.length>0){that.Append(items)}if(items.length===5){that.More().View("Show");that.More().Refresh()}else{$("#"+that.InstanceId()+" .More").remove()}})}};that.Append=function(items){that.Items(that.Items().concat(items));Dry.Common.IterateAsync(items,function(index,item,next){item.Render($("#"+that.InstanceId()+" .Items"),function(){next()})})};return(that)},DateTime:function DateTime(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Date();var parent=Dry.Models.Date();that.Parent=parent;that.Type="DateTime";that.Validations=(function(){var that={};that.Year=[Dry.Validations.IsNumber()];that.Month=[Dry.Validations.IsNumber()];that.Day=[Dry.Validations.IsNumber()];that.WeekDay=[Dry.Validations.IsNumber()];that.Hour=[Dry.Validations.IsNumber()];that.Minute=[Dry.Validations.IsNumber()];that.Second=[Dry.Validations.IsNumber()];that.Millisecond=[Dry.Validations.IsNumber()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",Hour:0,Minute:0,Second:0,Millisecond:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Hour",0,"Hour",that.GetValidations("Hour"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Minute",0,"Minute",that.GetValidations("Minute"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Second",0,"Second",that.GetValidations("Second"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Millisecond",0,"Millisecond",that.GetValidations("Millisecond"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Output",Dry.BaseClasses.Models.View("{{#Year}}{{{Rendered}}}{{/Year}}-{{#Month}}{{{Rendered}}}{{/Month}}-{{#Day}}{{{Rendered}}}{{/Day}} {{#Hour}}{{{Rendered}}}{{/Hour}}:{{#Minute}}{{{Rendered}}}{{/Minute}}:{{#Second}}{{{Rendered}}}{{/Second}}.{{#Millisecond}}{{{Rendered}}}{{/Millisecond}}","Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Utc",Dry.BaseClasses.Models.View("{{#Year}}{{{Rendered}}}{{/Year}}-{{#Month}}{{{Rendered}}}{{/Month}}-{{#Day}}{{{Rendered}}}{{/Day}} {{#Hour}}{{{Rendered}}}{{/Hour}}:{{#Minute}}{{{Rendered}}}{{/Minute}}:{{#Second}}{{{Rendered}}}{{/Second}}.{{#Millisecond}}{{{Rendered}}}{{/Millisecond}}","Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("PostDate",Dry.BaseClasses.Models.View("<span>{{#Month}}{{{Rendered}}}{{/Month}}/{{#Day}}{{{Rendered}}}{{/Day}}/{{#Year}}{{{Rendered}}}{{/Year}}</span>","Mu",handlers));that.View("Utc");that.DateToDryDateTime=function(d){d=d||Dry.NativeDate();var md=that.DateToDryDate(d);md.Hour=d.getUTCHours();md.Minute=d.getUTCMinutes();md.Second=d.getUTCSeconds();md.Millisecond=d.getUTCMilliseconds();return(md)};that.Date=function(val){if(val===undefined){var d=Dry.NativeDate();d.setUTCFullYear(that.Year());d.setUTCMonth(that.Month()-1);d.setUTCDate(that.Day());d.setUTCHours(that.Hour());d.setUTCMinutes(that.Minute());d.setUTCSeconds(that.Second());d.setUTCMilliseconds(that.Millisecond());return(d)}else{that.Hash(that.DateToDryDateTime(val))}};that.Date(Dry.NativeDate());defaultHash={};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.LessThan=function(dt){if(that.Year()<dt.Year()){return(true)}else{if(that.Year()!==dt.Year()){return(false)}}if(that.Month()<dt.Month()){return(true)}else{if(that.Month()!==dt.Month()){return(false)}}if(that.Day()<dt.Day()){return(true)}else{if(that.Day()!==dt.Day()){return(false)}}if(that.Hour()<dt.Hour()){return(true)}else{if(that.Hour()!==dt.Hour()){return(false)}}if(that.Minute()<dt.Minute()){return(true)}else{if(that.Minute()!==dt.Minute()){return(false)}}if(that.Second()<dt.Second()){return(true)}else{if(that.Second()!==dt.Second()){return(false)}}if(that.Millisecond()<dt.Millisecond()){return(true)}else{if(that.Millisecond()!==dt.Millisecond()){return(false)}}return(false)};that.SortObjects=function(fieldName,descending){return(function(a,b){if(a[fieldName]().LessThan(b[fieldName]())){if(descending){return(1)}else{return(-1)}}else{if(descending){return(-1)}else{return(1)}}})};that.RandomSortQuery=function(fieldName,preventRecent){var query={};function computeRandomOrder(){if(Math.random()>0.5){return(1)}else{return(-1)}}query[fieldName+".Year"]=computeRandomOrder();query[fieldName+".Month"]=computeRandomOrder();query[fieldName+".Day"]=computeRandomOrder();query[fieldName+".Hour"]=computeRandomOrder();query[fieldName+".Minute"]=computeRandomOrder();query[fieldName+".Second"]=computeRandomOrder();query[fieldName+".Millisecond"]=computeRandomOrder();if(preventRecent){var allDesc=true;Dry.Common.Iterate(query,function(field,val){if(val>0){allDesc=false}});if(allDesc){query[fieldName+".Year"]=1}}return(query)};that.SortQuery=function(fieldName,order){var query={};if(order===undefined){order=-1}query[fieldName+".Year"]=order;query[fieldName+".Month"]=order;query[fieldName+".Day"]=order;query[fieldName+".Hour"]=order;query[fieldName+".Minute"]=order;query[fieldName+".Second"]=order;query[fieldName+".Millisecond"]=order;return(query)};return(that)},Gallery:function Gallery(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Gallery";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Name:"",GalleryRoot:"/Static/galleries",BaseUrl:"/galleries",Images:[],Exclude:[],InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Name","","Name",that.GetValidations("Name"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"GalleryRoot","/Static/galleries","GalleryRoot",that.GetValidations("GalleryRoot"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BaseUrl","/galleries","BaseUrl",that.GetValidations("BaseUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Images",[],"Images",that.GetValidations("Images"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Exclude",[],"Exclude",that.GetValidations("Exclude"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View("<div id='{{{InstanceId}}}'>    <div class='Gallery Input'>        <ul>        {{#Images}}            <li>{{Rendered}}</li>        {{/Images}}        </ul>    </div></div>{{{BindModelToDom}}}","Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){var images=model.Images();for(var i=0;i<images.length;i++){$("#"+images[i].ImageId()).click(function(){alert(images[i].ImageId())})}}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View("<div id='{{{InstanceId}}}'>    <div class='Gallery Edit'>        <ul>        {{#Images}}            <li id=\"{{#ImageId}}{{{Rendered}}}{{/ImageId}}\">{{{Rendered}}}</li>        {{/Images}}        </ul>    </div></div>{{{BindModelToDom}}}","Mu",handlers));handlers=(function(){var that={};that.Avatar={OnClick:function(event){$(".Avatar img").removeClass("avatar-selected");$(event.target).addClass("avatar-selected")},};that.Submit={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;var avatar=$(".avatar-selected").attr("id");if(avatar){Dry.User().Api.SetAvatar(avatar,function(){event.Model.Emit("submitted");event.Model.Running=false})}else{Dry.PopupMessage({MessageTitle:"PLEASE SELECT AN AVATAR",Message:"Please select an avatar before attempting to submit."}).Show();event.Model.Running=false}}};return(that)})();that.AddView("ChooseAvatar",Dry.BaseClasses.Models.View('<div id=\'{{{InstanceId}}}\'>    <div class=\'Gallery ChooseAvatar\'>        <!-- <header>            <h1>Click the image you wish to assign to your username:</h1>        </header>-->        <ul>        {{#Images}}            <li>                <figure>                    <a class="Avatar"><img id="{{#ImageId}}{{{Rendered}}}{{/ImageId}}" src="{{#Url}}{{{Rendered}}}{{/Url}}" alt="{{#Caption}}{{{Rendered}}}{{/Caption}}" /></a>                    <!-- <figcaption>{{#Caption}}{{{Rendered}}}{{/Caption}}</figcaption> -->                </figure>            </li>        {{/Images}}        </ul>        <footer>            <button class="Submit" type="button">submit</button>            <!-- <p>Not impressed? Instead <a class="UploadImage">Upload Your Own Image</a></p>            <p><small>(If you want to remain anonymous, maybe it\'s not the best idea to upload a picture of your face... just sayin\')</small></p> -->        </footer>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Edit");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},SplashFooter:function SplashFooter(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="SplashFooter";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Simple",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "SplashFooter Simple section">        <div class="section">             <p class="disclaimer">ChickRx is for information and entertainment purposes only, and does not provide medical advice, diagnosis or treatment.  Use of this site is subject to our <a class="legal" href="/legal/terms-of-use">Terms of Use</a> and <a class="legal" href="/legal/privacy-policy">Privacy Policy</a>.</p>            <p class="copyright">&copy; 2011 CHICKRX, INC. ALL RIGHTS RESERVED</p>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "SplashFooter Show section">        <div class="section">             <p class="disclaimer">ChickRx is for information and entertainment purposes only, and does not provide medical advice, diagnosis or treatment.  Use of this site is subject to our <a class="legal" href="/legal/terms-of-use">Terms of Use</a> and <a class="legal" href="/legal/privacy-policy">Privacy Policy</a>.</p>            <p class="copyright">&copy; 2011 CHICKRX, INC. ALL RIGHTS RESERVED</p>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "SplashFooter Input">        <h1>ChickRx in the Press</h1>        <h1>Gimme More</h1>        <a href="https://twitter.com/chickrx" class="twitter-follow-button">Follow @chickrx</a>        <div id="fb-root"></div>        <script src="http://connect.facebook.net/en_US/all.js#appId=108498209248696&amp;xfbml=1"><\/script>        <fb:like href="www.chickrx.com" send="true" layout="button_count" width="450" show_faces="true" font=""></fb:like>         <a class="ChickRxFacebookFeed" href="http://www.facebook.com/ChickRx"><img src="/images/facebook.png" /></a>        <a class="ChickRxTwitterFeed" href="http://www.twitter.com/#!/chickrx"><img src="/images/twitter.png" /></a>        <div>{{{Newsletter}}}</div>        <p class="copyright">&copy; 2011 CHICRX, LLC. ALL RIGHTS RESERVED</p>        <a href="http://www.chickrx.com/termsofuse">Terms of Use</a>        <a href="http://www.chickrx.com/privacypolicy">Privacy Policy</a>        <a href="http://www.chickrx.com/legaldisclaimers">Legal Disclaimers</a>        <a href="http://www.chickrx.com/help">Help</a>        <a href="http://www.chickrx.com/aboutus">About Us</a>        <a href="http://www.chickrx.com/contactus">Contact Us</a>        <a href="http://www.chickrx.com/careers">Careers</a>        <a href="http://www.chickrx.com/mediakit">Media Kit</a>        <p class="disclaimer">ChickRx is for information and entertainment purposes only, and does not provide medical advice, diagnosis or treatment. Use of this site is subject to our <a href="http://www.chickrx.com/termsofuse">terms of use</a> and <a href="http://www.chickrx.com/privacypolicy">privacy policy</a></p>    </div></div><script src="http://platform.twitter.com/widgets.js" type="text/javascript"><\/script> {{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Image:function Image(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Image";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",ImageId:"",Category:"",Url:"",Caption:"",Subcaption:"",Description:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ImageId","","ImageId",that.GetValidations("ImageId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Category","","Category",that.GetValidations("Category"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Url","","Url",that.GetValidations("Url"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Caption","","Caption",that.GetValidations("Caption"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Subcaption","","Subcaption",that.GetValidations("Subcaption"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Description","","Description",that.GetValidations("Description"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View("<div id='{{{InstanceId}}}'>    <div class='Image Input'>        <a href='#'><img id='{{ImageId}}' src='{{{Url}}}' alt='{{Caption}}' /><span class='Caption'>{{Caption}}</span></a>    </div></div>{{{BindModelToDom}}}","Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <figure class="Image Show">        <img id="{{#ImageId}}{{{Rendered}}}{{/ImageId}}" src="{{#Url}}{{{Rendered}}}{{/Url}}" alt="{{#Description}}{{{Rendered}}}{{/Description}}" />        {{#HasCaption}}        {{#Caption}}        <figcaption>{{{Rendered}}}{{#HasSubcaption}},{{/HasSubcaption}}</figcaption>        {{/Caption}}        {{/HasCaption}}        {{#HasSubcaption}}        {{#Subcaption}}        <figcaption>{{{Rendered}}}</figcaption>        {{/Subcaption}}        {{/HasSubcaption}}    </figure></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View("<div id='{{{InstanceId}}}'>    <div class='Image Edit'>        <a href='#'>            <img id='{{#ImageId}}{{{Rendered}}}{{/ImageId}}' src='{{#Url}}{{{Rendered}}}{{/Url}}' alt='{{#Description}}{{{Rendered}}}{{/Description}}' />            {{#Caption}}            <span class='Caption'>{{{Rendered}}}</span>            {{/Caption}}        </a>    </div></div>{{{BindModelToDom}}}","Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasCaption=function(){return(that.Caption()!=="")};that.ViewHashFunctions.HasSubcaption=function(){return(that.Subcaption()!=="")};return(that)},MoreFeedItem:function MoreFeedItem(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="MoreFeedItem";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Feed:null,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Feed",null,"Feed",that.GetValidations("Feed"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){}};that.SeeMore={OnClick:function(event){event.Model.Emit("get-more")}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "MoreFeedItem Show">        <div class = "Fields">            <a class="SeeMore">SEE MORE</a>        </div>   </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers={};that.AddView("NoMore",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "MoreFeedItem NoMore">        <div class = "Fields">            <a class="NoMore">NO MORE</a>        </div>   </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Loading",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "MoreFeedItem Loading">        <div class = "Fields">            <img src="/images/loading.gif" />        <div>   </div></div><!-- {{{BindModelToDom}}} -->',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},TermsOfUse:function TermsOfUse(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="TermsOfUse";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "TermsOfUse Show">        <h1>CHICKRX, INC.</h1>        <h2>Terms of Use Agreement</h2>        <p>This Agreement was last revised on January 23, 2012.</p>        <p><a href="#RecentUpdates">Recent updates to this Agreement</a></p>        <p>Welcome to ChickRx.com, the website and online service of ChickRx, Inc. ("ChickRx," "we," or "us").  This page explains the terms by which you may use our online and/or mobile services, web site, and software provided on or in connection with the service (collectively the "Service").  By accessing or using the Service, you signify that you have read, understood, and agree to be bound by this Terms of Use Agreement ("Agreement") and to the collection, use, and disclosure of your information as set forth in the <a href="/legal/privacy-policy">ChickRx Privacy Policy</a>, whether or not you are a registered user of our Service.  </p>        <p>We reserve the right to amend this Agreement at any time by notifying you as provided in this Agreement, provided that no notice shall be required for non-substantive changes to the Agreement. Your continued use of the Service after any such change constitutes your acceptance of the new Terms of Use.  If you do not agree to any of these terms or any future Terms of Use, do not use or access (or continue to access) the Service.  This Agreement applies to all visitors, users, and others who access the Service ("Users").</p>        <h2>1. NO MEDICAL ADVICE</h2>        <p>Users who post to our service are labeled an "expert" if they provide ChickRx with certain background information.  ChickRx does not verify or otherwise investigate these Users or any of the information they post.  All ChickRx Users, including those labeled "expert," who provide answers to medical questions and other information are in no way affiliated with or endorsed by ChickRx. Any commentary, answers, or advice  posted on this site is provided for informational purposes only and should not be construed as professional medical advice. TO THE FULLEST EXTENT PERMITTED BY LAW, ALL MEDICAL ADVICE CONTAINED ON THE SERVICE IS PROVIDED "AS IS," AND CHICKRX DISCLAIMS ALL WARRANTIES ARISING IN CONNECTION WITH ANY SUCH ADVICE, EITHER EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.</p>        <p>IN NO EVENT SHALL CHICKRX BE LIABLE FOR ANY DAMAGES (INCLUDING, WITHOUT LIMITATION, INCIDENTAL AND CONSEQUENTIAL DAMAGES, PERSONAL INJURY OR WRONGFUL DEATH, LOST PROFITS, OR DAMAGES RESULTING FROM LOST DATA OR BUSINESS INTERRUPTION) RESULTING FROM THE USE OF OR INABILITY TO USE THE SERVICE OR ANY USER ADVICE CONTAINED THEREIN, WHETHER BASED ON WARRANTY, CONTRACT, TORT, OR ANY OTHER LEGAL THEORY, AND WHETHER OR NOT CHICKRX IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. CHICKRX SHALL NOT BE LIABLE FOR ANY PERSONAL INJURY, INCLUDING DEATH, CAUSED BY YOUR USE OR MISUSE OF THE SERVICE OR ANY USER ADVICE CONTAINED THEREIN.</p>        <p>As always, we have no obligation to monitor or control the User advice posted via the Service; the advice and commentary provided by Users are their sole creation and responsibility. We do not endorse or guarantee the completeness, truthfulness, accuracy, or reliability of any medical advice, answers or messages posted by Users, nor do we endorse any opinions they express.</p>        <p>ANY ADVICE POSTED BY USERS IS NOT INTENDED TO BE MEDICAL ADVICE OR INSTRUCTIONS FOR MEDICAL DIAGNOSIS OR TREATMENT, AND NO PHYSICIAN-PATIENT RELATIONSHIP IS, OR IS INTENDED TO BE, CREATED BETWEEN YOU AND CHICKRX OR ANY OTHER USER OF THE SERVICE.</p>        <p>If you think you may have a medical emergency, call your doctor or your local emergency number, (911 in the United States) immediately.</p>        <p>1. User advice is not a substitute for professional medical advice, examination, diagnosis or treatment.</p>        <p>2. You should not delay or forego seeking treatment for a medical condition or disregard professional medical advice based on User advice.</p>        <p>3. You should always seek the advice of your physician or other qualified healthcare professional before starting or changing treatment.</p>        <p>4. User advice should not be used to diagnose, treat, cure, or prevent disease without supervision of a doctor or qualified healthcare provider.</p>        <p>5. User advice does not recommend or endorse any tests, physicians, products, procedures, opinions or other information.</p>        <p>6. User advice is not regulated by the Food and Drug Administration or any state or national medical board.</p>        <p></p>        <p>Information posted to ChickRx publicly or sent in an unsolicited message to another User  is not confidential and does not establish a physician-patient relationship.</p>        <h2>2. Use of Our Service</h2>        <p>ChickRx provides a place for Users to connect with each other on health and wellness related topics. Users can ask questions, provide answers to other Users\' questions, write blog posts, comment on other Users\' contributions and consume content by ChickRx. In addition, Users can anonymously vote up contributions they like and customize their site experience by following topics, questions and other Users.</p>        <p>      A Eligibility</p>        <p>You may use the Service only if you can form a binding contract with ChickRx, and only in compliance with this Agreement and all applicable local, state, national, and international laws, rules and regulations.  Any use or access to the Service by anyone under 13 is strictly prohibited and in violation of this Agreement.  The Service is not available to any Users previously removed from the Service by ChickRx.</p>        <p></p>        <p>      B ChickRx Accounts</p>        <p>Your ChickRx account gives you access to the services and functionality that we may establish and maintain from time to time and in our sole discretion.  We may maintain different types of accounts for different types of Users.  If you open a ChickRx account on behalf of a company, organization, or other entity, then (a) "you" includes you and that entity, and (b) you represent and warrant that you are an authorized representative of the entity with the authority to bind the entity to this Agreement, and that you agree to this Agreement on the entity\'s behalf. By connecting to ChickRx with a third-party service, you give us permission to access and use your information from that service as permitted by that service, and to store your log-in credentials for that service.</p>        <p>You may never use another User\'s account without permission.  When creating your account, you must provide accurate and complete information. You are solely responsible for the activity that occurs on your account, and you must keep your account password secure. We encourage you to use "strong" passwords (passwords that use a combination of upper and lower case letters, numbers and symbols) with your account.  You must notify ChickRx immediately of any breach of security or unauthorized use of your account.  ChickRx will not be liable for any losses caused by any unauthorized use of your account.</p>        <p>You may control your User profile and how you interact with the Service by changing the settings in your <a href="/my-account">My Account</a> page.  By providing ChickRx your email address you consent to our using the email address to send you Service-related notices, including any notices required by law, in lieu of communication by postal mail.  We may also use your email address to send you other messages, such as changes to features of the Service and special offers.  If you do not want to receive such email messages, you may opt out or change your preferences in your <a href="/my-account">My Account</a> page.  Opting out may prevent you from receiving email messages regarding updates, improvements, or offers. </p>        <p>      C Service Rules</p>        <p>You agree not to engage in any of the following prohibited activities: (i) copying, distributing, or disclosing any part of the Service in any medium, including without limitation by any automated or non-automated "scraping"; (ii) using any automated system, including without limitation "robots," "spiders," "offline readers," etc., to access the Service in a manner that sends more request messages to the ChickRx servers than a human can reasonably produce in the same period of time by using a conventional on-line web browser (except that ChickRx grants the operators of public search engines revocable permission to use spiders to copy materials from ChickRx.com for the sole purpose of and solely to the extent necessary for creating publicly available searchable indices of the materials, but not caches or archives of such materials); (iii) transmitting spam, chain letters, or other unsolicited email; (iv) attempting to interfere with, compromise the system integrity or security or decipher any transmissions to or from the servers running the Service; (v) taking any action that imposes, or may impose at our sole discretion an unreasonable or disproportionately large load on our infrastructure; (vi) uploading invalid data, viruses, worms, or other software agents through the Service; (vii) collecting or harvesting any personally identifiable information, including account names, from the Service; (viii) except as expressly provided by us, using the Service for any commercial solicitation purposes; (ix) impersonating another person or otherwise misrepresenting your affiliation with a person or entity, conducting fraud, hiding or attempting to hide your identity; (x) interfering with the proper working of the Service; (xi) accessing any content on the Service through any technology or means other than those provided or authorized by the Service; or (xii) bypassing the measures we may use to prevent or restrict access to the Service, including without limitation features that prevent or restrict use or copying of any content or enforce limitations on use of the Service or the content therein.  </p>        <p>Accessing the audiovisual content available on the Service for any purpose or in any manner other than Streaming (as defined below) is expressly prohibited.  "Streaming" means a contemporaneous digital transmission of an audiovisual work via the Internet from the ChickRx Service to a User\'s device in such a manner that the data is intended for real-time viewing and not intended to be copied, stored, permanently downloaded, or redistributed by the User.</p>        <p>We may, without prior notice, change the Service; stop providing the Service or features of the Service, to you or to users generally; or create usage limits for the Service.  We may permanently or temporarily terminate or suspend your access to the Service without notice and liability for any reason, including if in our sole determination you violate any provision of this Agreement, or for no reason.  Upon termination for any reason or no reason, you continue to be bound by this Agreement.  </p>        <p>You are solely responsible for your interactions with other ChickRx Users. We reserve the right, but have no obligation, to monitor disputes between you and other Users.  ChickRx shall have no liability for your interactions with other Users, or for any User\'s action or inaction.</p>        <h2>3. User Content </h2>        <p>Some areas of the Service allow Users to post content such as profile information, comments, questions, and other content or information (any such materials a User submits, posts, displays, or otherwise makes available on the Service "User Content").  You retain ownership of your User Content.</p>        <p>You agree not to post User Content that: (i) may create a risk of harm, loss, physical or mental injury, emotional distress, death, disability, disfigurement, or physical or mental illness to you, to any other person, or to any animal; (ii) may create a risk of any other loss or damage to any person or property; (iii) seeks to harm or exploit children by exposing them to inappropriate content, asking for personally identifiable details or otherwise; (iv) may constitute or contribute to a crime or tort; (v) contains any information or content that we deem to be unlawful, harmful, abusive, racially or ethnically offensive, defamatory, infringing, invasive of personal privacy or publicity rights, harassing, humiliating to other people (publicly or otherwise), libelous, threatening, profane, or otherwise objectionable; (vi) contains any information or content that is illegal (including, without limitation, the disclosure of insider information under securities law or of another party\'s trade secrets); (vii) contains any information or content that you do not have a right to make available under any law or under contractual or fiduciary relationships; or (viii) contains any information or content that you know is not correct and current.  You agree that any User Content that you post does not and will not violate third-party rights of any kind, including without limitation any Intellectual Property Rights (as defined below) or rights of privacy.  To the extent that your User Content contains music, you hereby represent that you are the owner of all the copyright rights, including without limitation the performance, mechanical, and sound recordings rights, with respect to each and every musical composition (including lyrics) and sound recording contained in such User Content and have the power to grant the license granted below.  ChickRx reserves the right, but is not obligated, to reject and/or remove any User Content that ChickRx believes, in its sole discretion, violates these provisions.  You understand that publishing your User Content on the Service is not a substitute for registering it with the U.S. Copyright Office, the Writer\'s Guild of America, or any other rights organization.</p>        <p>For the purposes of this Agreement, "Intellectual Property Rights" means all patent rights, copyright rights, mask work rights, moral rights, rights of publicity, trademark, trade dress and service mark rights, goodwill, trade secret rights and other intellectual property rights as may now exist or hereafter come into existence, and all applications therefore and registrations, renewals and extensions thereof, under the laws of any state, country, territory or other jurisdiction.</p>        <p>In connection with your User Content, you affirm, represent and warrant the following: </p>        <p>      A You have the written consent of each and every identifiable natural person in the User Content to use such person\'s name or likeness in the manner contemplated by the Service and this Agreement, and each such person has released you from any liability that may arise in relation to such use.  </p>        <p>      B Your User Content and ChickRx\'s use thereof as contemplated by this Agreement and the Service will not violate any law or infringe any rights of any third party, including but not limited to any Intellectual Property Rights and privacy rights.</p>        <p>      C ChickRx may exercise the rights to your User Content granted under this Agreement without liability for payment of any guild fees, residuals, payments, fees, or royalties payable under any collective bargaining agreement or otherwise.</p>        <p>      D To the best of your knowledge, all your User Content and other information that you provide to us is truthful and accurate.</p>        <p>ChickRx takes no responsibility and assumes no liability for any User Content that you or any other User or third party posts or sends over the Service.  You shall be solely responsible for your User Content and the consequences of posting or publishing it, and you agree that we are only acting as a passive conduit for your online distribution and publication of your User Content.  You understand and agree that you may be exposed to User Content that is inaccurate, objectionable, inappropriate for children, or otherwise unsuited to your purpose, and you agree that ChickRx shall not be liable for any damages you allege to incur as a result of User Content.  </p>        <h2>4. User Content License Grant</h2>        <p>By posting any User Content on the Service, you expressly grant, and you represent and warrant that you have all rights necessary to grant, to ChickRx a royalty-free, sublicensable, transferable, perpetual, irrevocable, non-exclusive, worldwide license to use, reproduce, modify, publish, list information regarding, edit, translate, distribute, syndicate, publicly perform, publicly display, and make derivative works of all such User Content and your name, voice, and/or likeness as contained in your User Content, in whole or in part, and in any form, media or technology, whether now known or hereafter developed, for use in connection with the Service and ChickRx\'s (and its successors\' and affiliates\') business, including without limitation for promoting and redistributing part or all of the Service (and derivative works thereof) in any media formats and through any media channels.  You also hereby grant each User of the Service a non-exclusive license to access your User Content through the Service, and to use, reproduce, distribute, display and perform such User Content as permitted through the functionality of the Service and under this Agreement. </p>        <p>If the features of the Service allow you to remove or delete User Content from the Service, the above licenses granted by you in your User Content terminate within a commercially reasonable time after you remove or delete such User Content from the Service. You understand and agree, however, that ChickRx may retain, but not display, distribute, or perform, server copies of User Content that have been removed or deleted. The above licenses granted by you in User Content for which the Service does not provide you a means to delete or remove are perpetual and irrevocable.</p>        <h2>5. End User License Grant  </h2>        <p>Subject to the terms and conditions of this Agreement, you are hereby granted a non-exclusive, limited, non-transferable, freely revocable license to use the Service as permitted by the features of the Service.  ChickRx reserves all rights not expressly granted herein in the Service and the ChickRx Content (as defined below).  ChickRx may terminate this license at any time for any reason or no reason.  </p>        <h2>6. Our Proprietary Rights</h2>        <p>Except for your User Content, the Service and all materials therein or transferred thereby, including, without limitation, software, images, text, graphics, illustrations, logos, patents, trademarks, service marks, copyrights, photographs, audio, videos, music, and User Content belonging to other Users (the "ChickRx Content"), and all Intellectual Property Rights related thereto, are the exclusive property of ChickRx and its licensors (including other Users who post User Content to the Service).  Except as explicitly provided herein, nothing in this Agreement shall be deemed to create a license in or under any such Intellectual Property Rights, and you agree not to sell, license, rent, modify, distribute, copy, reproduce, transmit, publicly display, publicly perform, publish, adapt, edit or create derivative works from any ChickRx Content.  Use of the ChickRx Content for any purpose not expressly permitted by this Agreement is strictly prohibited.  </p>        <p>You may choose to or we may invite you to submit comments or ideas about the Service, including without limitation about how to improve the Service or our products ("Ideas").  By submitting any Idea, you agree that your disclosure is gratuitous, unsolicited and without restriction and will not place ChickRx under any fiduciary or other obligation, and that we are free to use the Idea without any additional compensation to you, and/or to disclose the Idea on a non-confidential basis or otherwise to anyone.  You further acknowledge that, by acceptance of your submission, ChickRx does not waive any rights to use similar or related ideas previously known to ChickRx, or developed by its employees, or obtained from sources other than you.</p>        <h2>7.      Privacy</h2>        <p>We care about the privacy of our Users. We collect and use personally identifiable information and aggregate data as set forth in our <a href="/legal/privacy-policy">Privacy Policy</a>.  You understand that by using the Service you consent to the collection of such information, and to have your personal data collected, used, transferred to and processed in the United States.</p>        <h2>8. Security</h2>        <p>ChickRx cares about the integrity and security of your personal information.  However, we cannot guarantee that unauthorized third parties will never be able to defeat our security measures or use your personal information for improper purposes. You acknowledge that you provide your personal information at your own risk.</p>        <h2>9. DMCA Notice</h2>        <p>Since we respect artist and content owner rights, it is ChickRx\'s policy to respond to alleged infringement notices that comply with the Digital Millennium Copyright Act of 1998 ("DMCA").</p>        <p>If you believe that your copyrighted work has been copied in a way that constitutes copyright infringement and is accessible via the Service, please notify ChickRx\'s copyright agent as set forth in the DMCA.  For your complaint to be valid under the DMCA, you must provide the following information in writing: </p>        <p>1.  An electronic or physical signature of a person authorized to act on behalf of the copyright owner; </p>        <p>2.  Identification of the copyrighted work that you claim has been infringed; </p>        <p>3.  Identification of the material that is claimed to be infringing and where it is located on the Service; </p>        <p>4.  Information reasonably sufficient to permit ChickRx to contact you, such as your address, telephone number, and, e-mail address; </p>        <p>5.  A statement that you have a good faith belief that use of the material in the manner complained of is not authorized by the copyright owner, its agent, or law; and  </p>        <p>6.  A statement, made under penalty of perjury, that the above information is accurate, and that you are the copyright owner or are authorized to act on behalf of the owner. </p>        <p>The above information must be submitted to the following DMCA Agent:</p>        <p>Attn: DMCA Notice <br />        ChickRx, Inc.<br />        Address: P.O. Box 749<br />        San Francisco, CA  94104<br /><br />        Email: <a href="mailto:copyright@chickrx.com">copyright@chickrx.com</a><br /><br />        Online Form: <a href="/legal/copyright">click here</a><br />        <p>UNDER FEDERAL LAW, IF YOU KNOWINGLY MISREPRESENT THAT ONLINE MATERIAL IS INFRINGING, YOU MAY BE SUBJECT TO CRIMINAL PROSECUTION FOR PERJURY AND CIVIL PENALTIES, INCLUDING MONETARY DAMAGES, COURT COSTS, AND ATTORNEYS\' FEES.</p>        <p>Please note that this procedure is exclusively for notifying ChickRx and its affiliates that your copyrighted material has been infringed.  The preceding requirements are intended to comply with ChickRx\'s rights and obligations under the DMCA, including 17 U.S.C. ?512(c), but do not constitute legal advice.  It may be advisable to contact an attorney regarding your rights and obligations under the DMCA and other applicable laws.  </p>        <p>In accordance with the DMCA and other applicable law, ChickRx has adopted a policy of terminating, in appropriate circumstances, Users who are deemed to be repeat infringers. ChickRx may also at its sole discretion limit access to the Service and/or terminate the accounts of any Users who infringe any intellectual property rights of others, whether or not there is any repeat infringement.</p>        <h2>10. Third-Party Links</h2>        <p>The Service may contain links to third-party websites, advertisers, services, special offers, or other events or activities that are not owned or controlled by ChickRx.  ChickRx does not endorse or assume any responsibility for any such third-party sites, information, materials, products, or services.  If you access a third party website from the Service, you do so at your own risk, and you understand that this Agreement and ChickRx\'s Privacy Policy do not apply to your use of such sites.  You expressly relieve ChickRx from any and all liability arising from your use of any third-party website, service, or content.  Additionally, your dealings with or participation in promotions of advertisers found on the Service, including payment and delivery of goods, and any other terms (such as warranties) are solely between you and such advertisers. You agree that ChickRx shall not be responsible for any loss or damage of any sort relating to your dealings with such advertisers.</p>        <h2>11. Indemnity </h2>        <p>You agree to defend, indemnify and hold harmless ChickRx and its subsidiaries, agents, licensors, managers, and other affiliated companies, and their employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, and expenses (including but not limited to attorney\'s fees) arising from: (i) your use of and access to the Service, including any data or content transmitted or received by you; (ii) your violation of any term of this Agreement, including without limitation your breach of any of the representations and warranties above; (iii) your violation of any third-party right, including without limitation any right of privacy or Intellectual Property Rights; (iv) your violation of any applicable law, rule or regulation; (v) any claim or damages that arise as a result of any of your User Content or any that is submitted via your account; or (vi) any other party\'s access and use of the Service with your unique username, password or other appropriate security code.  </p>        <h2>12. No Warranty</h2>        <p>THE SERVICE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS.  USE OF THE SERVICE IS AT YOUR OWN RISK.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SERVICE IS PROVIDED WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  NO ADVICE OR INFORMATION, WHETHER ORAL OR WRITTEN, OBTAINED BY YOU FROM CHICKRX OR THROUGH THE SERVICE WILL CREATE ANY WARRANTY NOT EXPRESSLY STATED HEREIN.  WITHOUT LIMITING THE FOREGOING, CHICKRX, ITS SUBSIDIARIES, AND ITS LICENSORS DO NOT WARRANT THAT THE CONTENT IS ACCURATE, RELIABLE OR CORRECT; THAT THE SERVICE WILL MEET YOUR REQUIREMENTS; THAT THE SERVICE WILL BE AVAILABLE AT ANY PARTICULAR TIME OR LOCATION, UNINTERRUPTED OR SECURE; THAT ANY DEFECTS OR ERRORS WILL BE CORRECTED; OR THAT THE SERVICE IS FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS.  ANY CONTENT DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SERVICE IS DOWNLOADED AT YOUR OWN RISK AND YOU WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM SUCH DOWNLOAD OR YOUR USE OF THE SERVICE. </p>        <p>CHICKRX DOES NOT WARRANT, ENDORSE, GUARANTEE, OR ASSUME RESPONSIBILITY FOR ANY PRODUCT OR SERVICE ADVERTISED OR OFFERED BY A THIRD PARTY THROUGH THE CHICKRX SERVICE OR ANY HYPERLINKED WEBSITE OR SERVICE, AND CHICKRX WILL NOT BE A PARTY TO OR IN ANY WAY MONITOR ANY TRANSACTION BETWEEN YOU AND THIRD-PARTY PROVIDERS OF PRODUCTS OR SERVICES.  </p>        <h2>13. Limitation of Liability</h2>        <p>TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL CHICKRX, ITS AFFILIATES, AGENTS, DIRECTORS, EMPLOYEES, SUPPLIERS OR LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS, GOODWILL, USE, DATA OR OTHER INTANGIBLE LOSSES, THAT RESULT FROM THE USE OF, OR INABILITY TO USE, THIS SERVICE.  UNDER NO CIRCUMSTANCES WILL CHICKRX BE RESPONSIBLE FOR ANY DAMAGE, LOSS OR INJURY RESULTING FROM HACKING, TAMPERING OR OTHER UNAUTHORIZED ACCESS OR USE OF THE SERVICE OR YOUR ACCOUNT OR THE INFORMATION CONTAINED THEREIN.  </p>        <p>TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, CHICKRX ASSUMES NO LIABILITY OR RESPONSIBILITY FOR ANY (I) ERRORS, MISTAKES, OR INACCURACIES OF CONTENT; (II) PERSONAL INJURY OR PROPERTY DAMAGE, OF ANY NATURE WHATSOEVER, RESULTING FROM YOUR ACCESS TO OR USE OF OUR SERVICE; (III) ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SECURE SERVERS AND/OR ANY AND ALL PERSONAL INFORMATION STORED THEREIN; (IV) ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THE SERVICE; (V) ANY BUGS, VIRUSES, TROJAN HORSES, OR THE LIKE THAT MAY BE TRANSMITTED TO OR THROUGH OUR SERVICE BY ANY THIRD PARTY; (VI) ANY ERRORS OR OMISSIONS IN ANY CONTENT OR FOR ANY LOSS OR DAMAGE INCURRED AS A RESULT OF THE USE OF ANY CONTENT POSTED, EMAILED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE THROUGH THE SERVICE; AND/OR (VII) USER CONTENT OR THE DEFAMATORY, OFFENSIVE, OR ILLEGAL CONDUCT OF ANY THIRD PARTY.  IN NO EVENT SHALL CHICKRX, ITS AFFILIATES, AGENTS, DIRECTORS, EMPLOYEES, SUPPLIERS, OR LICENSORS BE LIABLE TO YOU FOR ANY CLAIMS, PROCEEDINGS, LIABILITIES, OBLIGATIONS, DAMAGES, LOSSES OR COSTS IN AN AMOUNT EXCEEDING THE AMOUNT YOU PAID TO CHICKRX HEREUNDER.</p>        <p>THIS LIMITATION OF LIABILITY SECTION APPLIES WHETHER THE ALLEGED LIABILITY IS BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, OR ANY OTHER BASIS, EVEN IF CHICKRX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  THE FOREGOING LIMITATION OF LIABILITY SHALL APPLY TO THE FULLEST EXTENT PERMITTED BY LAW IN THE APPLICABLE JURISDICTION.</p>        <p>The Service is controlled and operated from its facilities in the United States.  ChickRx makes no representations that the Service is appropriate or available for use in other locations. Those who access or use the Service from other jurisdictions do so at their own volition and are entirely responsible for compliance with all applicable United States and local laws and regulations, including but not limited to export and import regulations.  You may not use the Service if you are a resident of a country embargoed by the United States, or are a foreign person or entity blocked or denied by the United States government.  Unless otherwise explicitly stated, all materials found on the Service are solely directed to individuals, companies, or other entities located in the United States.  </p>        <h2>14. Assignment </h2>        <p>This Agreement, and any rights and licenses granted hereunder, may not be transferred or assigned by you, but may be assigned by ChickRx without restriction. Any attempted transfer or assignment in violation hereof shall be null and void.</p>        <h2>15. General </h2>        <p>      A Governing Law.  You agree that: (i) the Service shall be deemed solely based in California; and (ii) the Service shall be deemed a passive one that does not give rise to personal jurisdiction over ChickRx, either specific or general, in jurisdictions other than California.  This Agreement shall be governed by the internal substantive laws of the State of California, without respect to its conflict of laws principles. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded.  Except as otherwise agreed between the parties or as described in Section 16.B below, any claim or dispute between you and ChickRx that arises in whole or in part from the Service shall be decided exclusively by a court of competent jurisdiction located in Santa Clara County, California, unless submitted to arbitration as set forth in the following paragraph.  </p>        <p>      B Arbitration.  For any claim (excluding claims for injunctive or other equitable relief) under this Agreement where the total amount of the award sought is less than $10,000, the party requesting relief may elect to resolve the dispute through binding non-appearance-based arbitration. The party electing such arbitration shall initiate the arbitration through an established alternative dispute resolution ("ADR") provider mutually agreed upon by the parties. The ADR provider and the parties must comply with the following rules: a) the arbitration shall be conducted by telephone, online and/or be solely based on written submissions, as selected by the party initiating the arbitration; b) the arbitration shall not involve any personal appearance by the parties or witnesses unless otherwise mutually agreed by the parties; and c) any judgment on the award rendered by the arbitrator may be entered in any court of competent jurisdiction.</p>        <p>      C Notification Procedures.  ChickRx may provide notifications, whether such notifications are required by law or are for marketing or other business related purposes, to you via email notice, written or hard copy notice, or through posting of such notice on our website, as determined by ChickRx in our sole discretion. ChickRx reserves the right to determine the form and means of providing notifications to our Users, provided that you may opt out of certain means of notification as described in this Agreement.  ChickRx is not responsible for any automatic filtering you or your network provider may apply to email notifications we send to the email address you provide us.  We recommend that you add <a href="mailto:notifications@chickrx.com">notifications@chickrx.com</a> to your email address book to help ensure you receive email notifications from us.</p>        <p>      D Entire Agreement/Severability.  This Agreement, together with any amendments and any additional agreements you may enter into with ChickRx in connection with the Service, shall constitute the entire agreement between you and ChickRx concerning the Service.  If any provision of this Agreement is deemed invalid by a court of competent jurisdiction, the invalidity of such provision shall not affect the validity of the remaining provisions of this Agreement, which shall remain in full force and effect. </p>        <p>      E No Waiver.  No waiver of any term of this Agreement shall be deemed a further or continuing waiver of such term or any other term, and ChickRx\'s failure to assert any right or provision under this Agreement shall not constitute a waiver of such right or provision.  </p>        <p>Please <a href="/about/contact">contact us</a> with any questions regarding this Agreement.</p>        <p></p>        <p id="RecentUpdates">Recent Updates</p>        <p>None at this time.</p>        <p></p>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Login:function Login(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Login";that.Validations=(function(){var that={};that.UserName=[Dry.Validations.IsRequired()];that.Password=[Dry.Validations.IsRequired()];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",UserName:"",Password:"",SuccessRedirectUrl:"",LoginHandlerUrl:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserName","","Email address",that.GetValidations("UserName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Password","","Password",that.GetValidations("Password"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SuccessRedirectUrl","","SuccessRedirectUrl",that.GetValidations("SuccessRedirectUrl"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LoginHandlerUrl","","LoginHandlerUrl",that.GetValidations("LoginHandlerUrl"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.ForgotPassword={OnClick:function(event){var fp=Dry.ForgotPassword();var p=Dry.Popup({Content:fp,Modal:true});p.Show()}};that.LoginButton={OnClick:function(event){event.Model.LoginOnClickHandler(event)}};return(that)})();that.AddView("Ajax",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Login Ajax">        <h1 class="Title">Approved Members</h1>        <h1>Log In</h1>        <form class = "Fields">            <fieldset class = "UserName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Password">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <a class="ForgotPassword" href="#">Forgot Password</a>            <input class="LoginButton" type="button" value="Log In"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.PostLogin={};that.PostLogin.OnClick=function(event){event.Model.Validate(function(valid){if(valid){$("#"+event.Model.InstanceId()).find("#PasswordHash").val(Dry.Sha256(event.Model.Password()));$("#"+event.Model.InstanceId()+"-Form").submit()}})};return(that)})();that.AddView("Post",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Login Post">        <form id = \'{{{InstanceId}}}-Form\' class = "Fields" action="{{#LoginHandlerUrl}}{{{Rendered}}}{{/LoginHandlerUrl}}" method="post" >            <fieldset class = "UserName">                <label>                    <span class = "Label"></span>                    <input class = "Value" name= "UserName" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Password">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "password" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <input id="PasswordHash" type="hidden" name="Password">            <input id="PostLogin" class = "PostLogin" type="button" value="Login" />            <a class="ForgotPassword" href="#">Forgot Password</a>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){that.Password.Value.OnBlur({Model:model});that.UserName.Value.OnBlur({Model:model})}};that.LoginButton={OnClick:function(event){event.Model.LoginOnClickHandler(event)}};that.ForgotPassword={OnClick:function(event){var popupOptions={PopupTitle:"FORGOT PASSWORD?",Content:Dry.ForgotPassword(),Modal:true,Width:405};var p=Dry.Popup(popupOptions);p.Show()}};that.UserName={};function toggleLabel(event,eventType,field){if(field().length>0){field.Label.Hide()}else{if(eventType==="blur"){field.Label.Show()}else{field.Label.Hide()}}}that.Password={};that.Password.Label={OnClick:function(event){event.Model.Password.Value.Focus()}};that.Password.Value={OnKeyDown:function(event){if(event.keyCode===$.ui.keyCode.ENTER){event.Model.Fields.Password.Value.RefreshValue();event.Model.LoginOnClickHandler(event)}},OnBlur:function(event){event.Model.Fields.Password.Value.RefreshValue();toggleLabel(event,"blur",event.Model.Password)},OnFocus:function(event){event.Model.Fields.Password.Value.RefreshValue();toggleLabel(event,"focus",event.Model.Password)}};that.UserName.Value={OnKeyDown:function(event){if(event.keyCode===$.ui.keyCode.ENTER){event.Model.Fields.UserName.Value.RefreshValue();event.Model.LoginOnClickHandler(event)}},OnBlur:function(event){event.Model.Fields.UserName.Value.RefreshValue();toggleLabel(event,"blur",event.Model.UserName)},OnFocus:function(event){event.Model.Fields.UserName.Value.RefreshValue();toggleLabel(event,"focus",event.Model.UserName)}};that.UserName.Label={OnClick:function(event){event.Model.UserName.Value.Focus()}};return(that)})();that.AddView("Splash",Dry.BaseClasses.Models.View('<section id = "{{{InstanceId}}}" class="section">    <div class = "Login Splash">        <div class="header">            <h1 class="non-display">APPROVED MEMBERS</h1>        </div>        <form class = "Fields">            <fieldset class = "UserName">                <label>                    <input class = "Value" type = "text" />                    <span class = "Label"></span>                </label>            </fieldset>            <fieldset class = "Password">                <label>                    <input class = "Value" type = "password" />                    <span class = "Label"></span>                </label>            </fieldset>            <input class="LoginButton" type="button" value="LOG IN" />            <a class="ForgotPassword" href="#">Forgot Password?</a>        </form>    </div></section>{{{BindModelToDom}}}',"Mu",handlers));that.View("Ajax");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Login=function(){that.Validate(function(valid){Dry.User().Api.Login(that.UserName(),Dry.Sha256(that.Password()),function(err,success){if(err){alert("Incorrect username or password, please try again.")}else{that.Emit("end");Dry.Cookies.setItem("LoginUserName",that.UserName());if(that.SuccessRedirectUrl()){window.location=that.SuccessRedirectUrl()}}},true)})};that.LoginOnClickHandler=function(event){event.Model.Login()};if(Dry.Cookies){if(Dry.Cookies.hasItem("LoginUserName")){that.UserName(Dry.Cookies.getItem("LoginUserName"))}}return(that)},CopyrightForm:function CopyrightForm(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="CopyrightForm";that.Validations=(function(){var that={};that.OwnerName=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.LegalName=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.Title=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.PhoneNumber=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.FaxNumber=[Dry.Validations.Expects("string")];that.Address=[Dry.Validations.ExpectsValid("Address")];that.Works=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.Urls=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];that.Owner=[Dry.Validations.IsChecked("Please confirm that you are the owner.")];that.GoodFaith=[Dry.Validations.IsChecked("Please confirm that this is in good faith")];that.Accurate=[Dry.Validations.IsChecked("Please confirm that this is accurate.")];that.Signature=[Dry.Validations.IsRequired(),Dry.Validations.Expects("string")];return(that)})();that.AddRpcFunctions({Report:""});var defaultHash={Id:"",OwnerName:"",LegalName:"",Title:"",PhoneNumber:"",FaxNumber:"",Address:Dry.Models.Address({Type:"Address",View:"Input"}),Works:"",Urls:"",Owner:false,GoodFaith:false,Accurate:false,Signature:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"OwnerName","","Copyright Owner Name (Company Name if applicable)",that.GetValidations("OwnerName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LegalName","","Your Full Legal Name",that.GetValidations("LegalName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Your Title or Job Position",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PhoneNumber","","Phone Number",that.GetValidations("PhoneNumber"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"FaxNumber","","Fax Number",that.GetValidations("FaxNumber"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Address",Dry.Models.Address({Type:"Address",View:"Input"}),"Address",that.GetValidations("Address"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Works","","Description of the work(s) allegedly infringed",that.GetValidations("Works"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Urls","","URL or other description of location of the work(s) allegedly infringing",that.GetValidations("Urls"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Owner",false,"I am the owner, or an agent authorized to act on behalf of the owner of an exclusive right that is allegedly infringed",that.GetValidations("Owner"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"GoodFaith",false,"I have a good faith belief that the use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law",that.GetValidations("GoodFaith"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Accurate",false,"This notification is accurate and I acknowledge that under Section 512(f) of the DMCA any person who knowingly misrepresents that material or activity is infringing may be subject to liability for damages.",that.GetValidations("Accurate"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Signature","","Typing your full name in this box will act as your digital signature",that.GetValidations("Signature"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.SubmitButton={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;event.Model.Validate(function(modelValid){event.Model.Address().Validate(function(addressValid){if(modelValid&&addressValid){event.Model.Api.Report(event.Model,function(){window.location="/home"})}else{event.Model.Running=false}})})}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "CopyrightForm Input Form">        <h1>Report Copyright Infringement</h1>        <form class = "Fields">            <div class="RequiredDescription"><span class="Required"></span> Required fields.</div>            <fieldset class = "OwnerName">                <label>                    <span class = "Label Required">Copyright Owner Name (Company Name if applicable)</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "LegalName">                <label>                    <span class = "Label Required">Your Full Legal Name</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Title">                <label>                    <span class = "Label Required">Your Title or Job Position</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "PhoneNumber">                <label>                    <span class = "Label Required">Phone Number</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "FaxNumber">                <label>                    <span class = "Label">Fax Number</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            {{#Address}}{{{Rendered}}}{{/Address}}            <fieldset class = "Works">                <label>                    <span class = "Label Required">Description of the work(s) allegedly infringed</span>                    <textarea class = "Value"></textarea>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Urls">                <label>                    <span class = "Label Required">URL or other description of location of the work(s) allegedly infringing</span>                    <textarea class = "Value"></textarea>                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Owner">                <label>                    <span class = "Label Required">I am the owner, or an agent authorized to act on behalf of the owner of an exclusive right that is allegedly infringed</span>                    <input class = "Value" type = "checkbox" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "GoodFaith">                <label>                    <span class = "Label Required">I have a good faith belief that the use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law</span>                    <input class = "Value" type = "checkbox" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Accurate">                <label>                    <span class = "Label Required">This notification is accurate and I acknowledge that under Section 512(f) of the DMCA any person who knowingly misrepresents that material or activity is infringing may be subject to liability for damages.</span>                    <input class = "Value" type = "checkbox" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Signature">                <label>                    <span class = "Label Required">Typing your full name in this box will act as your digital signature</span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <input type="button" class="SubmitButton" value="SUBMIT"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "CopyrightForm Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "OwnerName">                    <td class = "Label">Copyright Owner Name (Company Name if applicable)</td>                    <td class = "Value">{{#OwnerName}}{{{Rendered}}}{{/OwnerName}}</td>                </tr>                <tr class = "LegalName">                    <td class = "Label">Your Full Legal Name</td>                    <td class = "Value">{{#LegalName}}{{{Rendered}}}{{/LegalName}}</td>                </tr>                <tr class = "Title">                    <td class = "Label">Your Title or Job Position</td>                    <td class = "Value">{{#Title}}{{{Rendered}}}{{/Title}}</td>                </tr>                <tr class = "PhoneNumber">                    <td class = "Label">Phone Number</td>                    <td class = "Value">{{#PhoneNumber}}{{{Rendered}}}{{/PhoneNumber}}</td>                </tr>                <tr class = "FaxNumber">                    <td class = "Label">Fax Number</td>                    <td class = "Value">{{#FaxNumber}}{{{Rendered}}}{{/FaxNumber}}</td>                </tr>                <tr class = "Address">                    <td class = "Label">Address</td>                    <td class = "Value">{{#Address}}{{{Rendered}}}{{/Address}}</td>                </tr>                <tr class = "Works">                    <td class = "Label">Description of the work(s) allegedly infringed</td>                    <td class = "Value">{{#Works}}{{{Rendered}}}{{/Works}}</td>                </tr>                <tr class = "Urls">                    <td class = "Label">URL or other description of location of the work(s) allegedly infringing</td>                    <td class = "Value">{{#Urls}}{{{Rendered}}}{{/Urls}}</td>                </tr>                <tr class = "Owner">                    <td class = "Label">I am the owner, or an agent authorized to act on behalf of the owner of an exclusive right that is allegedly infringed</td>                    <td >{{OwnerText}}</td>                </tr>                <tr class = "GoodFaith">                    <td class = "Label">I have a good faith belief that the use of the material in the manner complained of is not authorized by the copyright owner, its agent, or the law</td>                    <td>{{GoodFaithText}}</td>                </tr>                <tr class = "Accurate">                    <td class = "Label">This notification is accurate and I acknowledge that under Section 512(f) of the DMCA any person who knowingly misrepresents that material or activity is infringing may be subject to liability for damages.</td>                    <td>{{AccurateText}}</td>                </tr>                <tr class = "Signature">                    <td class = "Label">Typing your full name in this box will act as your digital signature</td>                    <td class = "Value">{{#Signature}}{{{Rendered}}}{{/Signature}}</td>                </tr>            </tbody>        </table>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "CopyrightForm ListItem">        <a href="/admin/manage-copyright/{{#Id}}{{{Rendered}}}{{/Id}}">        <span class = "Fields">            <span class = "OwnerName">                <span class = "Value"></span>            </span>            <span class = "LegalName">                <span class = "Value"></span>            </span>        </span>        </a>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.OwnerText=function(){if(that.Owner()){return("YES")}else{return("NO")}};that.ViewHashFunctions.GoodFaithText=function(){if(that.GoodFaith()){return("YES")}else{return("NO")}};that.ViewHashFunctions.AccurateText=function(){if(that.Accurate()){return("YES")}else{return("NO")}};return(that)},UserEdit:function UserEdit(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.User();var parent=Dry.Models.User();that.Parent=parent;that.Type="UserEdit";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",UserId:"",EditRoles:"",EditPassword:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"UserId","","UserId",that.GetValidations("UserId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EditRoles","","EditRoles",that.GetValidations("EditRoles"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EditPassword","","EditPassword",that.GetValidations("EditPassword"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "UserEdit ListItem">        <span class = "Fields">            <span class = "UserName">                <span class = "Value"></span>            </span>            <span class = "DisplayName">                <span class = "Value"></span>            </span>            <span class = "EmailAddress">                <span class = "Value"></span>            </span>       </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.OpenEditPassword={OnClick:function(event){var p=Dry.Popup({Title:"Change Password",Modal:true,Content:Dry.ChangePassword({UserId:event.Model.UserId()})});p.Content().On("changed",function(hash){event.Model.PasswordHash(hash);event.Model.Refresh()});p.Show()}};return(that)})();that.AddView("Edit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "UserEdit Edit">        <form class = "Fields">            <fieldset class = "UserId">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" disabled="disabled" />                </label>            </fieldset>            <fieldset class = "UserName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "DisplayName">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "EmailAddress">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "Roles">                <label>                    <span class = "Label">Roles</span>                        <span>{{#Roles}}{{{Rendered}}} {{/Roles}}<span>                    <input type="button" value = "Edit Roles" class="OpenEditRoles" />                </label>                </fieldset>            <fieldset class = "PasswordHash">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" disabled = "disabled" />                    <input type="button" value = "Edit Password" class="OpenEditPassword" />                </label>            </fieldset>                        <fieldset class = "Banned">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "checkbox" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "FailedLoginAttempts">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" disabled="disabled" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "LastLogin">                <label>                    <span class = "Label">Last Login</span>                    <span>{{#LastLogin}}{{{Rendered}}}{{/LastLogin}}</span>                </label>            </fieldset>            <fieldset class = "SignupDate">                <label>                    <span class = "Label"></span>                    <span>{{#SignupDate}}{{{Rendered}}}{{/SignupDate}}</span>                        </label>            </fieldset>                        <fieldset class = "DateOfBirth">                <label>                    <span class = "Label"></span>                    <span>{{#DateOfBirth}}{{{Rendered}}}{{/DateOfBirth}}</span>                </label>            </fieldset>            <fieldset class = "ZipCode">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "About">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <fieldset class = "ImageUrl">                <label>                    <span class = "Label"></span>                    <input class = "Value" type = "text" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>        <input type = "button" class="Save" value = "Save"/>        </form>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("TableItem",Dry.BaseClasses.Models.View('<tr id = "{{{InstanceId}}}">    <td class = "UserEdit TableItem">        <span class = "Fields">            <div class = "UserName">                <span class = "Value"></span>            </div>        </span>    </td>    <td class = "UserEdit TableItem">        <span class = "Fields">            <div class = "DisplayName">                <span class = "Value"></span>            </div>        </span>    </td>    <td class = "UserEdit TableItem">        <span class = "Fields">            <div class = "EmailAddress">                <span class = "Value"></span>            </div>        </span>    </td></tr>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Save=function(callback){Dry.User().Api.Save(Dry.User(that.Hash()),function(result){that.Emit("saved");that.Emit("close");if(callback){callback()}})};that.Remove=function(callback){console.log("HERE");console.log(that.UserId());if(that.UserId()){Dry.User().Api.Remove(that.UserId(),function(result){that.Emit("removed");if(callback){callback()}})}else{that.Emit("removed");if(callback){callback()}}};return(that)},List:function List(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="List";that.Validations=(function(){var that={};that.Header=[Dry.Validations.Expects("string")];that.Items=[Dry.Validations.Expects("string")];that.ItemView=[Dry.Validations.Expects("string")];that.EmptyMessage=[Dry.Validations.Expects("string")];that.ListModel=[];that.Query=[];that.QueryString=[Dry.Validations.IsValidEvalJson()];that.ResultsPerPage=[Dry.Validations.Expects("number")];that.CurrentPage=[Dry.Validations.Expects("number")];that.ModelEditView=[Dry.Validations.Expects("string")];return(that)})();that.AddRpcFunctions({});var defaultHash={Id:"",Header:"",Items:"",ItemView:"",EmptyMessage:"No Items",ListModel:null,Query:{},QueryString:"",QueryOnServer:true,ResultsPerPage:10,CurrentPage:0,ModelEditView:"Edit",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Header","","Header",that.GetValidations("Header"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Items","","Items",that.GetValidations("Items"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ItemView","","ItemView",that.GetValidations("ItemView"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmptyMessage","No Items","EmptyMessage",that.GetValidations("EmptyMessage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ListModel",null,"ListModel",that.GetValidations("ListModel"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Query",{},"Query",that.GetValidations("Query"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QueryString","","QueryString",that.GetValidations("QueryString"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"QueryOnServer",true,"QueryOnServer",that.GetValidations("QueryOnServer"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ResultsPerPage",10,"ResultsPerPage",that.GetValidations("ResultsPerPage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"CurrentPage",0,"CurrentPage",that.GetValidations("CurrentPage"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ModelEditView","Edit","ModelEditView",that.GetValidations("ModelEditView"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("TableView",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "List TableView">        <div class = "Fields">            {{#Header}}{{{Rendered}}}{{/Header}}            <ul class = "Content">                {{#Items}}                <li>                    {{{Rendered}}}                </li>                {{/Items}}                {{^Items}}                <li>                    <p>{{#EmptyMessage}}{{{Rendered}}}{{/EmptyMessage}} </p>                </li>                {{/Items}}           </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("ListView",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "List ListView">        <div class = "Fields">            {{#Header}}{{{Rendered}}}{{/Header}}            <ul class = "Content">                {{#Items}}                <li>                    {{{Rendered}}}                </li>                {{/Items}}                {{^Items}}                <li>                    <p>{{#EmptyMessage}}{{{Rendered}}}{{/EmptyMessage}} </p>                </li>                {{/Items}}           </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(list){function editRowModel(event){var model=Dry.Model($(event.target).parents("tr")[0]);var oldView=model.View();var oldInstanceId=model.InstanceId();model.View(list.ModelEditView());var p=Dry.Popup({Title:"Edit",Modal:true,Content:model});p.On("close",function(){model.Hash(p.Content().Hash());model.View(oldView);model.InstanceId(oldInstanceId);list.Refresh()});p.Show()}function removeRowModel(event){var model=Dry.Model($(event.target).parents("tr")[0]);model.Remove(function(){var index=-1;list.IterateItems(function(i,item){if(item.Id()===model.Id()){index=i;return(false)}});if(index>=0){list.RemoveItemAt(index)}$(event.target).parents("tr").remove()})}if($(".List.TableAddEdit .EditButtonContainer .Edit").length===0){$(".Content tbody tr").append('<td><span class="EditButtonContainer"><input type="button" class="Edit" value="Edit" /></span></td>');$(".List.TableAddEdit .EditButtonContainer .Edit").each(function(index){$(this).click(editRowModel)})}if($(".List.TableAddEdit .RemoveButtonContainer .Remove").length===0){$(".Content tbody tr").append('<td><span class="RemoveButtonContainer"><input type="button" class="Remove" value="Remove" /></span></td>');$(".List.TableAddEdit .RemoveButtonContainer .Remove").each(function(index){$(this).click(removeRowModel)})}}};that.Add={OnClick:function(event){if(event.Model.AddTemplate()){var model=Dry.Models[event.Model.ListModel().Type](event.Model.ListModel().Hash());var oldView=model.View();model.View("Add");var p=Dry.Popup({Title:"Add",Modal:true,Content:model});p.On("close",function(){model.View(oldView);event.Model.Items().push(model);event.Model.Refresh()});p.Show()}}};return(that)})();that.AddView("TableAddEdit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "List TableAddEdit">        <div class = "Fields">            <fieldset class="QueryString">                <label>                    <span class = "Label"></span>                    <input type="text" class="Value" style="float : left; width: 500px;" />                </label>                <div class = "Validations">                    <p class = "UnnamedValidations">                        <span class = "Message"></span>                    </p>                </div>            </fieldset>            <table class = "Content">                <thead class= "ListHeader"> {{#Header}}{{{Rendered}}}{{/Header}} </thead>                <tbody>                {{#Items}}                {{{Rendered}}}                {{/Items}}                {{^Items}}                <tr>                    <td>{{#EmptyMessage}}{{{Rendered}}}{{/EmptyMessage}} </td>                </tr>                {{/Items}}                <tbody>                <tfoot>                    <tr>                        <td><input type="button" class="Add" value="Add Item" /></td>                    </tr>                </tfoot>           </table>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.ListItem={};that.ListItem.Edit={OnClick:function(event){var model=Dry.Model($(event.target).parents(".ListItem"));var oldView=model.View();var oldInstanceId=model.InstanceId();model.View("Edit");var p=Dry.Popup({Title:"Edit",Modal:true,Content:model});p.On("close",function(){model.Hash(p.Content().Hash());model.View(oldView);model.InstanceId(oldInstanceId);model.Refresh()});p.Show()}};that.ListItem.Remove={OnClick:function(event){var model=Dry.Model($(event.target).parents(".ListItem"));model.Remove(function(){var index=-1;event.Model.IterateItems(function(i,item){if(item.Id()===model.Id()){index=i;return(false)}});if(index>=0){event.Model.RemoveItemAt(index)}$(event.target).parents(".ListItem").remove()})}};that.Add={OnClick:function(event){if(event.Model.AddTemplate()){var model=Dry.Models[event.Model.AddTemplate().Type](event.Model.AddTemplate().Hash());var oldView=model.View();model.View("Edit");var p=Dry.Popup({Title:"Edit",Modal:true,Content:model});p.On("close",function(){model=p.Content();model.View(oldView);event.Model.Items().push(model);event.Model.Refresh()});p.Show()}}};return(that)})();that.AddView("AddEdit",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "List AddEdit">        <div class = "Fields">            <ul class = "Content">                <li class= "ListHeader"> {{#Header}}{{{Rendered}}}{{/Header}} <li>                {{#Items}}                <li class = "ListItem">                    <span>{{{Rendered}}}</span>                    <span class="EditButtonContainer"><input type="button" class="Edit" value="Edit" /></span>                    <span class="RemoveButtonContainer"><input type="button" class="Remove" value="Remove" /></span>                </li>                {{/Items}}                {{^Items}}                <li>                    <p>{{#EmptyMessage}}{{{Rendered}}}{{/EmptyMessage}} </p>                </li>                {{/Items}}                <li>                    <input type="button" class="Add" value="Add Item" />                </li>           </ul>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Fields.ListModel.Render=false;that.SetItemsView=function(viewName){if(typeof(viewName)==="string"){viewName=viewName.toLowerCase()}else{viewName="listitem"}that.IterateItems(function(i,item){if(Dry.IsModel(item)&&item.Views[viewName]){item.View(viewName)}})};that.RemoveItemAt=function(index){Dry.Utility.RemoveElementAt(that.Items(),index)};that.IterateItems=function(f){if(Array.isArray(that.Items())){var a=that.Items();for(var i=0;i<a.length;i++){if(f(i,a[i])===false){break}}}else{f(-1,that.Items())}};that.ItemsOn=function(event,f){that.IterateItems(function(i,item){if(Dry.IsModel(item)){item.On(event,f)}})};that.QueryString.Value.On("change",function(){that.QueryString.Validate(function(isValid){if(isValid){if(that.QueryString()===""){that.Query({})}else{that.Query(eval("("+that.QueryString()+")"))}}})});that.Query.Value.On("change",function(){if(that.ListModel()&&(!Dry.Server||that.QueryOnServer())){if(that.Query()&&!that.QueryString()){that.QueryString(JSON.stringify(that.Query()))}else{var query=that.Query();var options={skip:that.ResultsPerPage()*that.CurrentPage(),limit:that.ResultsPerPage()};Dry.Logger.debug("Query: ",query);Dry.Logger.debug("Options: ",options);that.ListModel().Api.Find(query,options,function(results){that.Items(results);that.Refresh()})}}});that.Query.Value.Emit("change");that.RefreshItem=function(index){that.Items()[index].Refresh()};that.On("bound",function(){if(that.ItemView()){that.SetItemsView(that.ItemView())}});that.ItemView.Value.On("change",function(){if(that.ItemView()){that.SetItemsView(that.ItemView())}});that.Items.Value.On("change",function(){that.ItemView.Value.Emit("change")});return(that)},Comment:function Comment(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Post();var parent=Dry.Models.Post();that.Parent=parent;that.Type="Comment";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",ParentId:"",IsTopLevel:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ParentId","","Parent",that.GetValidations("ParentId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"IsTopLevel",false,"IsTopLevel",that.GetValidations("IsTopLevel"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.CommentOnComment={OnClick:function(event){event.Model.AddSmallCommentBox(event.Model);$("#"+event.Model.InstanceId()+" .Comment.Add textarea").focus()}};that.FlagComment={OnClick:function(event){var popupOptions={PopupTitle:"FLAG AS INAPPROPRIATE",Content:Dry.Flag(),Modal:true,Width:600};var p=Dry.Popup(popupOptions);p.Show()}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div class="Comment ShowContainer {{#IsTopLevel}}TopLevel{{/IsTopLevel}}" id="{{{InstanceId}}}">    <div class="Comment Show">        <div class="Fields">            <div>                <section class="author image">                    <a href="#" title="profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</a>                </section>                <div class="CommentTextContainer">                    <header>                        <a class="author profile link" {{#Author}}{{{Href}}}{{/Author}} title="profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}</a>                        <!-- <span class="Title">({{#Author}}{{#Title}}{{{Rendered}}}{{/Title}}{{/Author}})</span> -->                        <span class="date">commented on {{#PostDate}}{{{Rendered}}}{{/PostDate}}</span>                    </header>                    <div class="Comment Text">{{#Text}}{{{Rendered}}}{{/Text}}</div>                    <footer>                        <ul>                            <li><a class="FlagComment" title="Flag this comment for moderator review">FLAG</a></li>                            {{#IsTopLevel}}<li><a class="CommentOnComment" title="Respond to this comment">RESPOND TO THIS COMMENT</a></li>{{/IsTopLevel}}                        </ul>                    </footer>                </div>            </div>            <div id="{{{InstanceId}}}-Comments" class="SubComments">                {{#Comments}}{{{Rendered}}}{{/Comments}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Anonymous={};that.Anonymous.Value={OnClick:Dry.CommentStatic.AnonymousClickHandler()};that.AddComment={OnClick:Dry.CommentStatic.AddCommentClickHandler()};return(that)})();that.AddView("Add",Dry.BaseClasses.Models.View('<div class="article CommentAddContainer" id="{{{InstanceId}}}">    <div class="Comment Add">        <div class="Fields">            <div class="AuthorImage">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</div>            <!-- <div id = "{{{InstanceId}}}-Editor"></div> -->            <div class="InputContainer">                <textarea class="CommentInput" id = "{{{InstanceId}}}-Editor"></textarea>                <div class="footer">                    <input type="button" class="AddComment" value="SUBMIT" />                    <div class="Anonymous">                        <label><input type="checkbox" class="Value" /><div class="anon-label">Comment anonymously</span></label>                    </div>                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Anonymous={};that.Anonymous.Value={OnClick:Dry.CommentStatic.AnonymousClickHandler()};that.AddComment={OnClick:Dry.CommentStatic.AddCommentClickHandler()};return(that)})();that.AddView("AddLarge",Dry.BaseClasses.Models.View('<div class="article CommentAddLargeContainer" id="{{{InstanceId}}}">    <div class="Comment AddLarge">        <div class="Fields">            <div class="AuthorImage">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</div>            <!-- <div id = "{{{InstanceId}}}-Editor"></div> -->            <div class="InputContainer">                <textarea class="CommentInput" id = "{{{InstanceId}}}-Editor"></textarea>                <div class="footer">                    <input type="button" class="AddComment" value="SUBMIT" />                    <div class="Anonymous">                        <label><input type="checkbox" class="Value" /><div class="anon-label">Comment anonymously</span></label>                    </div>                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Delete={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;if(confirm("Delete this post?")){Dry.Post().Api.Delete(event.Model,function(){$("#"+event.Model.InstanceId()).parents(".FeedItem").remove()})}else{event.Model.Running=false}}};that.ToggleAnonymous={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;Dry.Post().Api.ToggleAnonymous(event.Model,function(){event.Model.Anonymous(!event.Model.Anonymous());if(event.Model.Anonymous()){event.Model.Author(Dry.User().GetAnonymous());event.Model.Refresh();event.Model.Running=false}else{Dry.Utility.GetCurrentUser(function(user){event.Model.Author(user);event.Model.Refresh();event.Model.Running=false})}})}};return(that)})();that.AddView("FeedSubItem",Dry.BaseClasses.Models.View('<div class="article Comment FeedSubItemContainer" id="{{{InstanceId}}}">    <div class="Comment FeedSubItem">        <div class="section author image">            <a title="Profile page for {{#Author}}{{{DisplayName}}}{{/Author}}">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</a>        </div>        <div class="container">            <div class="header">                <a class="author-profile-link" {{#Author}}{{{Href}}}{{/Author}} title="Profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}</a>                <span class="Title">{{#Author}}{{#IsExpert}}({{#Title}}{{{Rendered}}}{{/Title}})&nbsp;{{/IsExpert}}{{/Author}}commented:</span>            </div>            <div class="Text">                {{{TextHook}}}                <br />                {{#ShouldEnableDelete}}                    <a class="Delete">Delete Comment</a>                    {{#Anonymous}}                        {{^Rendered}}                            <a class="ToggleAnonymous">Make Anonymous</a>                        {{/Rendered}}                        {{#Rendered}}                            <a class="ToggleAnonymous">Go Public</a>                        {{/Rendered}}                    {{/Anonymous}}                {{/ShouldEnableDelete}}            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.IsTopLevel=function(){return(that.ParentType()==="Article"||that.ParentType()==="BlogPost")};that.AddLargeCommentBox=function(model){Dry.Utility.GetCurrentUser(function(user){var newComment=Dry.Comment({Type:"Comment",ParentType:model.Type,View:"AddLarge",Author:user,ParentId:model.Id()});newComment.On("add",function(){that.AddLargeCommentBox(model);var currentPost=Dry.CurrentPagePost;if(currentPost){currentPost.NumberOfComments(currentPost.NumberOfComments()+1)}});model.AddComment(newComment)})};that.AddSmallCommentBox=function(model){var comments=model.Comments();if(comments.length<=0||comments[comments.length-1].View()!=="add"){Dry.Utility.GetCurrentUser(function(user){var newComment=Dry.Comment({Type:"Comment",View:"Add",Author:user,ParentId:model.Id()});newComment.On("add",function(){var currentPost=Dry.CurrentPagePost;if(currentPost){currentPost.NumberOfComments(currentPost.NumberOfComments()+1)}});model.AddComment(newComment)})}};return(that)},Expert:function Expert(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.User();var parent=Dry.Models.User();that.Parent=parent;that.Type="Expert";that.Validations={};that.AddRpcFunctions({});var defaultHash={Website:"",Title:"",About:"",Categories:[],BusinessAddress:null,BusinessPhone:"",Position:[],AreasOfExpertise:[],Licenses:[],Education:"",NameOfBusiness:"",PracticingSince:"",AffiliatedHospitals:"",Research:"",LanguagesSpoken:"",Certified:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Website","","Website",that.GetValidations("Website"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"About","","About",that.GetValidations("About"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Categories",[],"Categories",that.GetValidations("Categories"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BusinessAddress",null,"Business Address",that.GetValidations("BusinessAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BusinessPhone","","Business Phone",that.GetValidations("BusinessPhone"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Position",[],"Positions",that.GetValidations("Position"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AreasOfExpertise",[],"AreasOfExpertise",that.GetValidations("AreasOfExpertise"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Licenses",[],"Licenses",that.GetValidations("Licenses"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Education","","Please list your degrees and training programs and where you completed them.",that.GetValidations("Education"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NameOfBusiness","","Name of your Practice/Business",that.GetValidations("NameOfBusiness"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PracticingSince","","Practicing Since",that.GetValidations("PracticingSince"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AffiliatedHospitals","","Affiliated Hospital(s)",that.GetValidations("AffiliatedHospitals"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Research","","Research/Publications",that.GetValidations("Research"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LanguagesSpoken","","Language(s) Spoken",that.GetValidations("LanguagesSpoken"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Certified",false,"Certified",that.GetValidations("Certified"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Featured",Dry.BaseClasses.Models.View('<div class="Expert Container" id="{{{InstanceId}}}">    <div class="Expert Featured">        <figure>            {{#ThumbnailImageLarge}}{{{Rendered}}}{{/ThumbnailImageLarge}}            <header>                <a class="Title" {{{Href}}}>{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}</a>                <small class="ExpertTitle">{{#Title}}{{{Rendered}}}{{/Title}}</small>            </header>        </figure>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("SearchResult",Dry.BaseClasses.Models.View('<div class="Expert Container" id="{{{InstanceId}}}">    <div class="Expert SearchResult">        <figure>            <div class="ExpertImage">                {{#SearchResultImage}}{{{Rendered}}}{{/SearchResultImage}}            </div>            <header>                <a class="DisplayName" {{{Href}}}>{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}</a>                <small class="ExpertTitle">{{#Title}}{{{Rendered}}}{{/Title}}</small>            </header>        </figure>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("InfoAside",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Expert InfoAside">        <div class="Fields">            <dl>                <dt>Position and Area(s) of Expertise:</dt>                <dd>{{#Position}}{{#Tag}}{{{Rendered}}}{{/Tag}}{{/Position}}</dd>                {{#AreasOfExpertise}}                <dd>{{#Tag}}{{{Rendered}}}{{/Tag}}</dd>                {{/AreasOfExpertise}}                <dt>Name of Practice:</dt>                <dd>{{#NameOfBusiness}}{{{Rendered}}}{{/NameOfBusiness}}</dd>                <dt>Online:</dt>                <dd>{{#Website}}{{{Rendered}}}{{/Website}}</dd>                                <dt>Location:</dt>                <dd>{{#BusinessAddress}}{{{AddressHtml}}}{{/BusinessAddress}}</dd>                                <dt>Affiliated Hospital(s):</dt>                {{#AffiliatedHospitals}}                <dd>{{{Rendered}}}</dd>                {{/AffiliatedHospitals}}                <dt>Practicing Since:</dt>                {{#PracticingSince}}                <dd>{{{Rendered}}}</dd>                {{/PracticingSince}}                                {{#Licenses}}                <dt>Licenses & Certification:</dt>                <dd class="License">{{#Name}}{{{Rendered}}}{{/Name}}, {{#Issuer}}{{{Rendered}}}{{/Issuer}}</dd>                {{/Licenses}}                                <dt>Education & Training:</dt>                {{#Education}}                <dd>{{{Rendered}}}</dd>                {{/Education}}                                <dt>Research/Publications:</dt>                {{#Research}}                <dd>{{{Rendered}}}</dd>                {{/Research}}                                <dt>Languages Spoken:</dt>                {{#LanguagesSpoken}}                <dd class="Language">{{{Rendered}}}</dd>                {{/LanguagesSpoken}}            </dl>        </div>    </div></div>',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Expert Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "Website">                    <td class = "Label">Website</td>                    <td class = "Value">{{#Website}}{{{Rendered}}}{{/Website}}</td>                </tr>                <tr class = "Title">                    <td class = "Label">Title</td>                    <td class = "Value">{{#Title}}{{{Rendered}}}{{/Title}}</td>                </tr>                <tr class = "About">                    <td class = "Label">About</td>                    <td class = "Value">{{#About}}{{{Rendered}}}{{/About}}</td>                </tr>                <tr class = "Categories">                    <td class = "Label">Categories</td>                    <td class = "Value">{{#Categories}}{{{Rendered}}}{{/Categories}}</td>                </tr>                <tr class = "BusinessAddress">                    <td class = "Label">Business Address</td>                    <td class = "Value">{{#BusinessAddress}}{{{Rendered}}}{{/BusinessAddress}}</td>                </tr>                <tr class = "BusinessPhone">                    <td class = "Label">Business Phone</td>                    <td class = "Value">{{#BusinessPhone}}{{{Rendered}}}{{/BusinessPhone}}</td>                </tr>                <tr class = "Position">                    <td class = "Label">Positions</td>                    <td class = "Value">{{#Position}}{{{Rendered}}}{{/Position}}</td>                </tr>                <tr class = "AreasOfExpertise">                    <td class = "Label">AreasOfExpertise</td>                    <td class = "Value">{{#AreasOfExpertise}}{{{Rendered}}}{{/AreasOfExpertise}}</td>                </tr>                <tr class = "Licenses">                    <td class = "Label">Licenses</td>                    <td class = "Value">{{#Licenses}}{{{Rendered}}}{{/Licenses}}</td>                </tr>                <tr class = "Education">                    <td class = "Label">Please list your degrees and training programs and where you completed them.</td>                    <td class = "Value">{{#Education}}{{{Rendered}}}{{/Education}}</td>                </tr>                <tr class = "NameOfBusiness">                    <td class = "Label">Name of your Practice/Business</td>                    <td class = "Value">{{#NameOfBusiness}}{{{Rendered}}}{{/NameOfBusiness}}</td>                </tr>                <tr class = "PracticingSince">                    <td class = "Label">Practicing Since</td>                    <td class = "Value">{{#PracticingSince}}{{{Rendered}}}{{/PracticingSince}}</td>                </tr>                <tr class = "AffiliatedHospitals">                    <td class = "Label">Affiliated Hospital(s)</td>                    <td class = "Value">{{#AffiliatedHospitals}}{{{Rendered}}}{{/AffiliatedHospitals}}</td>                </tr>                <tr class = "Research">                    <td class = "Label">Research/Publications</td>                    <td class = "Value">{{#Research}}{{{Rendered}}}{{/Research}}</td>                </tr>                <tr class = "LanguagesSpoken">                    <td class = "Label">Language(s) Spoken</td>                    <td class = "Value">{{#LanguagesSpoken}}{{{Rendered}}}{{/LanguagesSpoken}}</td>                </tr>                <tr class = "Certified">                    <td class = "Label">Certified</td>                    <td class = "Value">{{#Certified}}{{{Rendered}}}{{/Certified}}</td>                </tr>            </tbody>        </table>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Featured");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Href=function(){if(that.Key()){return("/experts/"+that.Key())}else{return("")}};that.ViewHashFunctions.Href=function(){if(that.Href()){return('href="'+that.Href()+'"')}else{return""}};that.ThumbnailImage(Dry.ExpertImage({Type:"ExpertImage",View:"SmallThumb",Url:that.ImageUrl("thumbnail")}));that.ThumbnailImageMyAccount(Dry.ExpertImage({Type:"ExpertImage",View:"MyAccountThumb",Url:that.ImageUrl("thumbnail")}));that.ThumbnailImageLarge(Dry.ExpertImage({Type:"ExpertImage",View:"BigThumb",Url:that.ImageUrl("thumbnail")}));that.ThumbnailImageLargeFeed(Dry.ExpertImage({Type:"ExpertImage",View:"BigFeedThumb",Url:that.ImageUrl("thumbnail")}));that.BlogPostImage(Dry.ExpertImage({Type:"ExpertImage",View:"BlogPostImage",Url:that.ImageUrl("thumbnail")}));that.SearchResultImage(Dry.ExpertImage({Type:"ExpertImage",View:"SearchResultImage",Url:that.ImageUrl("thumbnail")}));return(that)},Answer:function Answer(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Post();var parent=Dry.Models.Post();that.Parent=parent;that.Type="Answer";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",ParentId:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ParentId","","ParentId",that.GetValidations("ParentId"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Simple",Dry.BaseClasses.Models.View('<div class="article" id="{{{InstanceId}}}">    <div class="Answer Simple">        <!-- <a class="votes" href="#" title="number of votes for this answer">(0 votes)</a> -->        <a class="votes" title="number of votes for this answer">&nbsp;</a>        <a class="author-image" title="Profile page for {{#Author}}{{{DisplayName}}}{{/Author}}">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</a>        <div class="container">            <div class="header">                <a class="author-profile-link" href="#" title="Profile page for {{#Author}}{{{DisplayName}}}{{/Author}}">{{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}</a>                <span class="Title">({{#Author}}{{#Title}}{{{Rendered}}}{{/Title}}{{/Author}})</span>                <span class="date">answered on {{#PostDate}}{{{Rendered}}}{{/PostDate}}</span>                <!--                <div class="article share">                    <a class="email" href="#" title="share via email">share via email</a>                    <a class="twitter" href="#" title="share via twitter">share via twitter</a>                    <a class="facebook" href="#" title="share via facebook">share via facebook</a>                </div>                -->            </div>            <div class="Text">{{#Text}}{{{Rendered}}}{{/Text}}</div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.CommentOnPost={OnClick:function(event){Dry.Comment().AddSmallCommentBox(event.Model);$("#"+event.Model.InstanceId()+" .Comment.Add textarea").focus()}};that.Flag={OnClick:function(event){var popupOptions={PopupTitle:"FLAG AS INAPPROPRIATE",Content:Dry.Flag(),Modal:true,Width:600};var p=Dry.Popup(popupOptions);p.Show()}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<article class="Answer Container" id="{{{InstanceId}}}">    <div class="Answer Show">        <div class="Fields">            <section class="vote widget">                {{#VoteWidget}}{{{Rendered}}}{{/VoteWidget}}            </section>            <a class="author image" title="Profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</a>            <div class="container">                <header class="Header Answer">                    <!-- <button class="follow button"></button> -->                    <a class="author profile link" {{#Author}}{{{Href}}}{{/Author}} title="Profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}</a>                    <span class="Title">{{#Author}}{{#IsExpert}}({{#Title}}{{{Rendered}}}{{/Title}})&nbsp;{{/IsExpert}}{{/Author}}</span>                    <span class="PostDate">answered on {{#PostDate}}{{{Rendered}}}{{/PostDate}}</span>                    <!--                    <section class="share">                        <a class="email" title="share via email">share via email</a>                        <a class="twitter" title="share via twitter">share via twitter</a>                        <a class="facebook" title="share via facebook">share via facebook</a>                    </section>                    -->                </header>                <section class="Text Answer">{{#Text}}{{{Rendered}}}{{/Text}}</section>                <footer>                    <ul class="Links Answer">                        <li><a class="Flag" title="Flag this post for moderator review">FLAG</a></li>                        <li><a class="GetLink disabled" title="Get the link to this post">GET LINK</a></li>                        <li><a class="CommentOnPost" title="Comment on this answer">COMMENT ON THIS ANSWER</a></li>                    </ul>                </footer>                <section id="{{{InstanceId}}}-Comments" class="Comments">{{#Comments}}{{{Rendered}}}{{/Comments}}</section>            </div>        </div>    </div>    <div class="AnswerBorder"></div></article>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){var editor=Dry.RichTextEditor({Height:300,Width:486});editor.On("rendered",function(){editor.SetHtml(model.Text())});editor.Render($("#"+model.InstanceId()+"-Editor"));model.Editor=editor}};that.guidelines={OnClick:function(event){var popupOptions={PopupTitle:"ANSWERING GUIDELINES",Content:Dry.AnsweringGuidelines(),Modal:true,Width:600};var p=Dry.Popup(popupOptions);p.Show()}};that.Anonymous={};that.Anonymous.Value={OnClick:function(event){nextTick(function(){if(event.Model.Anonymous()){event.Model.Author(Dry.User().GetAnonymous());event.Model.Author().ThumbnailImage().Render($("#"+event.Model.InstanceId()+" .AuthorImage"),true)}else{Dry.Utility.GetCurrentUser(function(user){event.Model.Author(user);event.Model.Author().ThumbnailImage().Render($("#"+event.Model.InstanceId()+" .AuthorImage"),true)})}})}};that.AddAnswer={OnClick:function(event){var answer=event.Model;answer.Text(event.Model.Editor.GetHtml());if(answer.Text()!==""){Dry.Follow().FollowPagePost();Dry.Post().Api.AddAnswer(answer,function(newId){answer.PostDate().View("PostDate");answer.Id(newId);if(answer.Anonymous()){answer.Author(Dry.User().GetAnonymous());answer.View("Show");answer.Refresh();var currentPost=Dry.CurrentPagePost;if(currentPost){currentPost.NumberOfAnswers(currentPost.NumberOfAnswers()+1)}}else{Dry.Utility.GetCurrentUser(function(user){answer.Author(user);answer.View("Show");answer.Refresh();var currentPost=Dry.CurrentPagePost;if(currentPost){currentPost.NumberOfAnswers(currentPost.NumberOfAnswers()+1)}})}})}else{Dry.PopupMessage({MessageTitle:"Answer please...",Message:"You need to add an answer before attempting to submit."}).Show()}}};return(that)})();that.AddView("Add",Dry.BaseClasses.Models.View('<div class="article" id="{{{InstanceId}}}">    <div class="Answer Add">        <div class="Fields">            <header class="AddAnswerHeader">                <h2>ADD YOUR ANSWER</h2>                <div class="guidelines"><!--Check out our --> &nbsp;<a class="link">Answering Guidelines</a></div>            </header>            <div class="AuthorImage">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</div>            <div class="EditorContainer" id = "{{{InstanceId}}}-Editor"></div>            <div class="InputContainer">                <input type="button" class="SubmitButton AddAnswer" value="SUBMIT" />                <div class="Anonymous">                    <label><input type="checkbox" class="Value" /><div class="anon-label">Answer anonymously</span></label>                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Delete={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;if(confirm("Delete this post?")){Dry.Post().Api.Delete(event.Model,function(){$("#"+event.Model.InstanceId()).parents(".FeedItem").remove()})}else{event.Model.Running=false}}};that.ToggleAnonymous={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;Dry.Post().Api.ToggleAnonymous(event.Model,function(){event.Model.Anonymous(!event.Model.Anonymous());if(event.Model.Anonymous()){event.Model.Author(Dry.User().GetAnonymous());event.Model.Refresh();event.Model.Running=false}else{Dry.Utility.GetCurrentUser(function(user){event.Model.Author(user);event.Model.Refresh();event.Model.Running=false})}})}};return(that)})();that.AddView("FeedSubItem",Dry.BaseClasses.Models.View('<div class="article Answer Container" id="{{{InstanceId}}}">    <div class="Answer FeedSubItem">        <a class="author-image" title="Profile page for {{#Author}}{{{DisplayName}}}{{/Author}}">{{#Author}}{{#ThumbnailImage}}{{{Rendered}}}{{/ThumbnailImage}}{{/Author}}</a>        <div class="container">            <div class="header">                <a class="author-profile-link" {{#Author}}{{{Href}}}{{/Author}} title="Profile page for {{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}">{{#Author}}{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}{{/Author}}</a>                <span class="Title">{{#Author}}{{#IsExpert}}({{#Title}}{{{Rendered}}}{{/Title}})&nbsp;{{/IsExpert}}{{/Author}} answered:</span>                <div class="Text">                    {{{TextHook}}}                    <br />                    {{#ShouldEnableDelete}}                        <a class="Delete">Delete Answer</a>                        {{#Anonymous}}                            {{^Rendered}}                                <a class="ToggleAnonymous">Make Anonymous</a>                            {{/Rendered}}                            {{#Rendered}}                                <a class="ToggleAnonymous">Go Public</a>                            {{/Rendered}}                        {{/Anonymous}}                    {{/ShouldEnableDelete}}                </div>            </div>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.PopularPostLink=function(){return('Answer to <a href="'+that.Type.toLowerCase()+"s/"+that.Key()+'">'+that.Title()+"</a>")};return(that)},Post:function Post(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Post";that.Validations={};that.AddRpcFunctions({AddArticle:"",Vote:"",AddBlogPost:"",AddQuestion:"",AddAnswer:"",AddComment:"",Delete:"",ToggleAnonymous:"",IncrementViewCount:"",GetComments:"",GetPosts:"",GetPost:""});var defaultHash={Id:"",Key:"",Text:"",AuthorId:"",Author:null,Expert:false,Anonymous:false,PostDate:Dry.Models.DateTime({Type:"DateTime"}),LastActivity:null,LastPostId:"",LastPost:null,Votes:0,VoteWidget:Dry.Models.Vote({Type:"Vote"}),ViewCount:0,Tags:[],Comments:[],NumberOfComments:0,ParentType:"",EnableDelete:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Key","","Key",that.GetValidations("Key"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Text","","Text",that.GetValidations("Text"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AuthorId","","AuthorId",that.GetValidations("AuthorId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Author",null,"Author",that.GetValidations("Author"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Expert",false,"Expert",that.GetValidations("Expert"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Anonymous",false,"Anonymous",that.GetValidations("Anonymous"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PostDate",Dry.Models.DateTime({Type:"DateTime"}),"PostDate",that.GetValidations("PostDate"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LastActivity",null,"LastActivity",that.GetValidations("LastActivity"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LastPostId","","LastPostId",that.GetValidations("LastPostId"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LastPost",null,"LastPost",that.GetValidations("LastPost"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Votes",0,"Votes",that.GetValidations("Votes"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"VoteWidget",Dry.Models.Vote({Type:"Vote"}),"VoteWidget",that.GetValidations("VoteWidget"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ViewCount",0,"Views",that.GetValidations("ViewCount"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tags",[],"Tags",that.GetValidations("Tags"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Comments",[],"Comments",that.GetValidations("Comments"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfComments",0,"NumberOfComments",that.GetValidations("NumberOfComments"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"ParentType","","ParentType",that.GetValidations("ParentType"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EnableDelete",false,"EnableDelete",that.GetValidations("EnableDelete"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Post Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "Key">                    <td class = "Label">Key</td>                    <td class = "Value">{{#Key}}{{{Rendered}}}{{/Key}}</td>                </tr>                <tr class = "Text">                    <td class = "Label">Text</td>                    <td class = "Value">{{#Text}}{{{Rendered}}}{{/Text}}</td>                </tr>                <tr class = "AuthorId">                    <td class = "Label">AuthorId</td>                    <td class = "Value">{{#AuthorId}}{{{Rendered}}}{{/AuthorId}}</td>                </tr>                <tr class = "Author">                    <td class = "Label">Author</td>                    <td class = "Value">{{#Author}}{{{Rendered}}}{{/Author}}</td>                </tr>                <tr class = "Expert">                    <td class = "Label">Expert</td>                    <td class = "Value">{{#Expert}}{{{Rendered}}}{{/Expert}}</td>                </tr>                <tr class = "Anonymous">                    <td class = "Label">Anonymous</td>                    <td class = "Value">{{#Anonymous}}{{{Rendered}}}{{/Anonymous}}</td>                </tr>                <tr class = "PostDate">                    <td class = "Label">PostDate</td>                    <td class = "Value">{{#PostDate}}{{{Rendered}}}{{/PostDate}}</td>                </tr>                <tr class = "LastActivity">                    <td class = "Label">LastActivity</td>                    <td class = "Value">{{#LastActivity}}{{{Rendered}}}{{/LastActivity}}</td>                </tr>                <tr class = "LastPostId">                    <td class = "Label">LastPostId</td>                    <td class = "Value">{{#LastPostId}}{{{Rendered}}}{{/LastPostId}}</td>                </tr>                <tr class = "LastPost">                    <td class = "Label">LastPost</td>                    <td class = "Value">{{#LastPost}}{{{Rendered}}}{{/LastPost}}</td>                </tr>                <tr class = "Votes">                    <td class = "Label">Votes</td>                    <td class = "Value">{{#Votes}}{{{Rendered}}}{{/Votes}}</td>                </tr>                <tr class = "VoteWidget">                    <td class = "Label">VoteWidget</td>                    <td class = "Value">{{#VoteWidget}}{{{Rendered}}}{{/VoteWidget}}</td>                </tr>                <tr class = "ViewCount">                    <td class = "Label">Views</td>                    <td class = "Value">{{#ViewCount}}{{{Rendered}}}{{/ViewCount}}</td>                </tr>                <tr class = "Tags">                    <td class = "Label">Tags</td>                    <td class = "Value">{{#Tags}}{{{Rendered}}}{{/Tags}}</td>                </tr>                <tr class = "Comments">                    <td class = "Label">Comments</td>                    <td class = "Value">{{#Comments}}{{{Rendered}}}{{/Comments}}</td>                </tr>                <tr class = "NumberOfComments">                    <td class = "Label">NumberOfComments</td>                    <td class = "Value">{{#NumberOfComments}}{{{Rendered}}}{{/NumberOfComments}}</td>                </tr>                <tr class = "ParentType">                    <td class = "Label">ParentType</td>                    <td class = "Value">{{#ParentType}}{{{Rendered}}}{{/ParentType}}</td>                </tr>            </tbody>        </table>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.TextHook=function(){return(Dry.Utility.StripHtml(that.Text()).substr(0,300)+"...")};that.HasComments=function(){return(that.Comments().length>0)};that.HasLastPost=function(){return(that.LastPost()!==null&&that.LastPost()!==undefined)};that.HasTags=function(){var tags=that.Tags();for(var i=0;i<tags.length;i++){if(!tags[i].System()){return(true)}}return(false)};that.ViewHashFunctions.TextHook=that.TextHook;that.ViewHashFunctions.HasComments=that.HasComments;that.ViewHashFunctions.HasLastPost=that.HasLastPost;that.ViewHashFunctions.HasTags=that.HasTags;that.ViewHashFunctions.CommentPlural=function(){if(that.NumberOfComments()===1){return("COMMENT")}else{return("COMMENTS")}};that.ViewHashFunctions.ShouldEnableDelete=function(){return(that.EnableDelete())};that.ViewHashFunctions.FullHref=function(){var href="";if(that.Href){if(that.ViewHashFunctions.Href){if(that.ViewHashFunctions.Href()){href='href="http://www.chickrx.com'+that.Href()+'"'}}else{href='href="http://www.chickrx.com'+that.Href()+'"'}}return(href)};that.SetCommentsViews=function(viewName){for(var i=0;i<that.Comments().length;i++){that.Comments()[i].View(viewName);that.Comments()[i].SetCommentsViews(viewName)}};that.SetCommentsPostDateViews=function(viewName){for(var i=0;i<that.Comments().length;i++){that.Comments()[i].PostDate().View(viewName);that.Comments()[i].SetCommentsPostDateViews(viewName)}};that.AddComment=function(comment){that.Comments().push(comment);comment.Render($("#"+that.InstanceId()+"-Comments"))};that.SafeHash=function(){var h=that.Hash();if(that.Anonymous()){h.AuthorId=""}return(h)};return(that)},BasicPage:function BasicPage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.MasterPage();var parent=Dry.Models.MasterPage();that.Parent=parent;that.IsParentViewField("Body");that.Type="BasicPage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Header:Dry.Models.PageHeader({Type:"PageHeader"}),Content:"",Aside:null,Footer:Dry.Models.PageFooter({Type:"PageFooter"}),InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Header",Dry.Models.PageHeader({Type:"PageHeader"}),"",that.GetValidations("Header"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Content","","Content",that.GetValidations("Content"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Aside",null,"",that.GetValidations("Aside"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Footer",Dry.Models.PageFooter({Type:"PageFooter"}),"Footer",that.GetValidations("Footer"),false);that.AddField(field);var handlers=null;that.Views={};handlers={};that.AddView("Ask",Dry.BaseClasses.Models.View('<section class="BasicPage Ask">    <div class="wrap">\t    <section class="page-header">{{#Header}}{{{Rendered}}}{{/Header}}</section>\t    <section class="page-content">        <section class="primary-content">            {{#Content}}{{{Rendered}}}{{/Content}}       </section>       </section>    </div>\t<section class="page-footer stickyfooter">{{#Footer}}{{{Rendered}}}{{/Footer}}</section></section>',"Mu",handlers));handlers={};that.AddView("Show",Dry.BaseClasses.Models.View("<section class=\"BasicPage Show {{InnerTypeClass}}\">    <div class=\"wrap\">\t    <section class=\"page-header\">{{#Header}}{{{Rendered}}}{{/Header}}</section>\t    <section class=\"page-content\">            <section class=\"primary-content\">{{#Content}}{{{Rendered}}}{{/Content}}</section>            {{#HasAside}}            <aside>                {{#Aside}}{{{Rendered}}}{{/Aside}}            </aside>            {{/HasAside}}        </section>    </div>\t<section class=\"page-footer stickyfooter\">{{#Footer}}{{{Rendered}}}{{/Footer}}</section></section><script type=\"text/javascript\">    /* resize page if no aside elements exist */    var asideElements = $('.page-content').children('aside').length;/*    console.log(\"number of aside elements:\" + asideElements); */    if (asideElements === 0) {        $('.page-content').children('section').css('width', '100%');    }       /* remove all empty <p></p> elements from posts */    $('.article p').filter(function () {        return $.trim($(this).text()) === '';    }).remove();<\/script>","Mu",handlers));handlers={};that.AddView("Blog",Dry.BaseClasses.Models.View('<section class="BasicPage Blog">    <div class="wrap">\t    <section class="page-header">{{#Header}}{{{Rendered}}}{{/Header}}</section>\t    <section class="page-content">        <section class="primary-content">            {{#Content}}{{{Rendered}}}{{/Content}}       </section>       </section>    </div>\t<section class="page-footer stickyfooter">{{#Footer}}{{{Rendered}}}{{/Footer}}</section></section>',"Mu",handlers));handlers={};that.AddView("DemoPage",Dry.BaseClasses.Models.View('<section class="BasicPage DemoPage">    <div class="wrap">\t    <section class="page-header">{{#Header}}{{{Rendered}}}{{/Header}}</section>\t    <section class="page-content">        <section class="primary-content">            {{#Content}}{{{Rendered}}}{{/Content}}            <div class="demo-watermark"></div>        </section>       </section>    </div>\t<section class="page-footer stickyfooter">{{#Footer}}{{{Rendered}}}{{/Footer}}</section></section>',"Mu",handlers));handlers={};that.AddView("Splash",Dry.BaseClasses.Models.View('<section class="BasicPage Splash">    <div class="wrap">\t    <header class="page-header">{{#Header}}{{{Rendered}}}{{/Header}}</header>\t    <section class="page-content">{{#Content}}{{{Rendered}}}{{/Content}}</section>    </div>\t<footer class="page-footer">{{#Footer}}{{{Rendered}}}{{/Footer}}</footer></section>',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.HasAside=function(){return(that.Aside()!==null&&that.Aside()!==undefined&&that.Aside()!==false)};that.ViewHashFunctions.InnerTypeClass=function(){if(that.Content()!==null&&typeof(that.Content())==="object"&&that.Content().Type){return(that.Content().Type+"Page")}else{return("")}};that.DemoImage=function(src){that.View("DemoPage");that.Content('<img src="'+src+'"/>')};return(that)},AsideSection:function AsideSection(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="AsideSection";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",Title:"",Models:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Models","","",that.GetValidations("Models"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("SimpleUserProfile",Dry.BaseClasses.Models.View('<div class="AsideSection Container SimpleUserProfile" id = "{{{InstanceId}}}">    <div class = "AsideSection SimpleUserProfile">        {{#Models}}{{{Rendered}}}{{/Models}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Simple",Dry.BaseClasses.Models.View('<div class="AsideSection Container" id = "{{{InstanceId}}}">    <div class = "AsideSection Simple">        {{#Models}}{{{Rendered}}}{{/Models}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("SimpleTopic",Dry.BaseClasses.Models.View('<div class="AsideSection Container SimpleTopic" id = "{{{InstanceId}}}">    <div class = "AsideSection SimpleTopic">        {{#Models}}{{{Rendered}}}{{/Models}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers={};that.AddView("UserStats",Dry.BaseClasses.Models.View('<div class="AsideSection Container" id = "{{{InstanceId}}}">    <div class = "AsideSection UserStats">        <header>            <h2>USER\'S STATS</h2>        </header>        <!-- todo: Remove section image and demo-watermark for production -->        <img src="/images/aside-section-user-stats.png" alt="placeholder image for aside section functionality" />        <div class="demo-watermark"></div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("SimpleCategory",Dry.BaseClasses.Models.View('<div class="AsideSection Container SimpleCategory" id = "{{{InstanceId}}}">    <div class = "AsideSection SimpleCategory">        {{#Models}}{{{Rendered}}}{{/Models}}    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div class="AsideSection Container" id = "{{{InstanceId}}}">    <div class = "AsideSection Show">        <h1>{{#Title}}{{{Rendered}}}{{/Title}}</h1>        <div class = "Fields">            {{#Models}}{{{Rendered}}}{{/Models}}        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}return(that)},Tag:function Tag(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="Tag";that.Validations={};that.AddRpcFunctions({GetTagSuggestions:""});var defaultHash={Id:"",Tag:"",Key:"",System:false,Hidden:false,NumberOfUses:0,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Tag","","Tag",that.GetValidations("Tag"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Key","","Key",that.GetValidations("Key"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"System",false,"System",that.GetValidations("System"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Hidden",false,"Hidden",that.GetValidations("Hidden"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NumberOfUses",0,"NumberOfUses",that.GetValidations("NumberOfUses"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("SearchResult",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <section class="Tag SearchResult">        <a {{{Href}}}><h3>{{#Tag}}{{{Rendered}}}{{/Tag}}&nbsp;<span class="NumberOfUses">({{#NumberOfUses}}{{{Rendered}}}{{/NumberOfUses}})</span></h3></a>   </section></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<li id="{{{InstanceId}}}" {{#IsHidden}}class="hide"{{/IsHidden}}>    <span class="Tag Show">        <!-- <button class="follow"></button> -->        <a {{{Href}}}>{{#Tag}}{{{Rendered}}}{{/Tag}}&nbsp;<span class="NumberOfUses">({{#NumberOfUses}}{{{Rendered}}}{{/NumberOfUses}})</span></a>    </span></li><!-- {{{BindModelToDom}}} -->',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){if(model.Options().length>0&&model.Options()[0].Key()!==""){model.Options().unshift(Dry.Tag({Tag:"",Key:""}))}var select=Dry.Select({Options:model.Options(),AllowOther:true,UseAddButton:true});select.On("add",function(){if(model.Tag()!==""){model.Emit("add")}});select.On("select",function(selected){if(!selected){return}if(selected.IsOther){if(selected.Value){model.Hash({Tag:selected.Value})}else{model.Hash({Tag:""})}}else{if(selected.Key()!==""){model.Hash(selected.Hash());model.Emit("add")}}});select.Render($("#"+model.InstanceId()+"-TagSelect"))}};return(that)})();that.AddView("ArrayAddSelect",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Tag ArrayAddSelect">        <span class = "Fields">            <div id="{{{InstanceId}}}-TagSelect"></div>        </span>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Remove={OnClick:function(event){event.Model.Emit("remove")}};return(that)})();that.AddView("ArrayShow",Dry.BaseClasses.Models.View('<span id="{{{InstanceId}}}" {{#IsHidden}}class="hide"{{/IsHidden}}>    <span class="Tag ArrayShow">        <span class="Fields">            <button class="Remove"><span>{{#Tag}}{{{Rendered}}}{{/Tag}}</span></button>        </span>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.Model={OnBound:function(model){$(".Tag.ArrayAdd .Fields .Tag .Value").autocomplete({source:function(request,response){Dry.Tag().Api.GetTagSuggestions(request.term,function(err,results){if(err){return response([])}var suggestions=[];for(var i=0;i<results.length;i++){suggestions.push({label:results[i].Tag()})}response(suggestions)},true)}})}};that.AddTag={OnClick:function(event){event.Model.Tag(Dry.Utility.Trim(event.Model.Tag()));if(event.Model.Tag()!==""){$(".Tag.ArrayAdd .Fields .Tag .Value").autocomplete("destroy");event.Model.Emit("add")}}};that.TagExampleText={OnClick:function(event){$(".Tag.ArrayAdd .Fields .Tag .Value").click();$(".Tag.ArrayAdd .Fields .Tag .Value").focus()},};that.Tag={};that.Tag.Value={OnClick:function(event){$(".Tag.ArrayAdd").addClass("Active")},OnFocus:function(event){$(".Tag.ArrayAdd .Fields .Tag .Value").click()},OnKeyDown:function(event){if(event.keyCode===$.ui.keyCode.ENTER){setTimeout(function(){$(".Tag.ArrayAdd .Fields .Tag .Value").blur();$(".Tag.ArrayAdd .Fields .Tag .AddTag").focus();$(".Tag.ArrayAdd .Fields .Tag .AddTag").click()},10)}}};return(that)})();that.AddView("ArrayAdd",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "Tag ArrayAdd">        <span class = "Fields">            <span class = "Tag">                <span>                    <input class = "Value" type = "text" />                    <div class="TagExampleText">Enter a topic and click "Add"</div>                </span>                <input type="button" class="AddTag" value="Add Tag" />                <span class = "Validations">                    <span class = "UnnamedValidations">                        <span class = "Message"></span>                    </span>                </span>            </span>        </span>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));that.View("Show");var options=null;that.Options=function(opts){if(opts===undefined){return(options)}else{options=opts;return(that)}};that.PostHashIn=function(hash){if(hash.Options){that.Options(hash.Options)}};that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.Href=function(){return('href="/topics/'+that.Key()+'"')};that.ViewHashFunctions.IsHidden=function(){return(that.Hidden())};that.ViewHashFunctions.Href=that.Href;that.OptionString=function(){return(that.Tag())};that.LicenseStates=function(){var states=that.States();states.unshift(Dry.Tag({Tag:"Every state",Key:"every-state"}));states.unshift(Dry.Tag({Tag:"N/A",Key:"n-a"}));return(states)};that.States=function(){return([Dry.Tag({Tag:"Alabama",Key:"alabama"}),Dry.Tag({Tag:"Alaska",Key:"alaska"}),Dry.Tag({Tag:"Arizona",Key:"arizona"}),Dry.Tag({Tag:"Arkansas",Key:"arkansas"}),Dry.Tag({Tag:"California",Key:"california"}),Dry.Tag({Tag:"Colorado",Key:"colorado"}),Dry.Tag({Tag:"Connecticut",Key:"connecticut"}),Dry.Tag({Tag:"Delaware",Key:"delaware"}),Dry.Tag({Tag:"District Of Columbia",Key:"district-of-columbia"}),Dry.Tag({Tag:"Florida",Key:"florida"}),Dry.Tag({Tag:"Georgia",Key:"georgia"}),Dry.Tag({Tag:"Hawaii",Key:"hawaii"}),Dry.Tag({Tag:"Idaho",Key:"idaho"}),Dry.Tag({Tag:"Illinois",Key:"illinois"}),Dry.Tag({Tag:"Indiana",Key:"indiana"}),Dry.Tag({Tag:"Iowa",Key:"iowa"}),Dry.Tag({Tag:"Kansas",Key:"kansas"}),Dry.Tag({Tag:"Kentucky",Key:"kentucky"}),Dry.Tag({Tag:"Louisiana",Key:"louisiana"}),Dry.Tag({Tag:"Maine",Key:"maine"}),Dry.Tag({Tag:"Maryland",Key:"maryland"}),Dry.Tag({Tag:"Massachusetts",Key:"massachusetts"}),Dry.Tag({Tag:"Michigan",Key:"michigan"}),Dry.Tag({Tag:"Minnesota",Key:"minnesota"}),Dry.Tag({Tag:"Mississippi",Key:"mississippi"}),Dry.Tag({Tag:"Missouri",Key:"missouri"}),Dry.Tag({Tag:"Montana",Key:"montana"}),Dry.Tag({Tag:"Nebraska",Key:"nebraska"}),Dry.Tag({Tag:"Nevada",Key:"nevada"}),Dry.Tag({Tag:"New Hampshire",Key:"new-hampshire"}),Dry.Tag({Tag:"New Jersey",Key:"new-jersey"}),Dry.Tag({Tag:"New Mexico",Key:"new-mexico"}),Dry.Tag({Tag:"New York",Key:"new-york"}),Dry.Tag({Tag:"North Carolina",Key:"north-carolina"}),Dry.Tag({Tag:"North Dakota",Key:"north-dakota"}),Dry.Tag({Tag:"Ohio",Key:"ohio"}),Dry.Tag({Tag:"Oklahoma",Key:"oklahoma"}),Dry.Tag({Tag:"Oregon",Key:"oregon"}),Dry.Tag({Tag:"Pennsylvania",Key:"pennsylvania"}),Dry.Tag({Tag:"Rhode Island",Key:"rhode-island"}),Dry.Tag({Tag:"South Carolina",Key:"south-carolina"}),Dry.Tag({Tag:"South Dakota",Key:"south-dakota"}),Dry.Tag({Tag:"Tennessee",Key:"tennessee"}),Dry.Tag({Tag:"Texas",Key:"texas"}),Dry.Tag({Tag:"Utah",Key:"utah"}),Dry.Tag({Tag:"Vermont",Key:"vermont"}),Dry.Tag({Tag:"Virginia",Key:"virginia"}),Dry.Tag({Tag:"Washington",Key:"washington"}),Dry.Tag({Tag:"West Virginia",Key:"west-virginia"}),Dry.Tag({Tag:"Wisconsin",Key:"wisconsin"}),Dry.Tag({Tag:"Wyoming",Key:"wyoming"}),Dry.Tag({Tag:"Federated States of Micronesia",Key:"federated-states-of-micronesia"}),Dry.Tag({Tag:"Guam",Key:"guam"}),Dry.Tag({Tag:"Marshall Islands",Key:"marshall-islands"}),Dry.Tag({Tag:"Northern Mariana Islands",Key:"northern-mariana-islands"}),Dry.Tag({Tag:"Palau",Key:"palau"}),Dry.Tag({Tag:"Puerto Rico",Key:"puerto-rico"}),Dry.Tag({Tag:"Virgin Islands",Key:"virgin-islands"}),Dry.Tag({Tag:"Armed Forces Americas",Key:"armed-forces-americas"}),Dry.Tag({Tag:"Armed Forces Europe",Key:"armed-forces-europe"}),Dry.Tag({Tag:"Armed Forces Canada",Key:"armed-forces-canada"}),Dry.Tag({Tag:"Armed Forces Africa",Key:"armed-forces-africa"}),Dry.Tag({Tag:"Armed Forces Middle East",Key:"armed-forces-middle-east"}),Dry.Tag({Tag:"Armed Forces Pacific",Key:"armed-forces-pacific"})])};that.AreasOfExpertise=function(){return([Dry.Tag({Tag:"Addiction Treatment",Key:"addiction-treatment"}),Dry.Tag({Tag:"Allergy & Immunology",Key:"allergy-and-immunology"}),Dry.Tag({Tag:"Alternative Medicine",Key:"alternative-medicine"}),Dry.Tag({Tag:"Anesthesiology",Key:"anesthesiology"}),Dry.Tag({Tag:"Bariatrics",Key:"bariatrics"}),Dry.Tag({Tag:"Beauty",Key:"beauty"}),Dry.Tag({Tag:"Cardiology",Key:"cardiology"}),Dry.Tag({Tag:"Chiropractic Medicine",Key:"chiropractic-medicine"}),Dry.Tag({Tag:"Colorectal Surgery",Key:"colorectal-surgery"}),Dry.Tag({Tag:"Critical Care",Key:"critical-care"}),Dry.Tag({Tag:"Dentistry",Key:"dentistry"}),Dry.Tag({Tag:"Dermatology",Key:"dermatology"}),Dry.Tag({Tag:"Ear Nose & Throat (Otolaryngology)",Key:"ear-nose-and-throat-otolaryngology"}),Dry.Tag({Tag:"Emergency Medicine",Key:"emergency-medicine"}),Dry.Tag({Tag:"Endocrinology",Key:"endocrinology"}),Dry.Tag({Tag:"Family Medicine",Key:"family-medicine"}),Dry.Tag({Tag:"Fitness",Key:"fitness"}),Dry.Tag({Tag:"Gastroenterology",Key:"gastroenterology"}),Dry.Tag({Tag:"General Practice",Key:"general-practice"}),Dry.Tag({Tag:"General Surgery",Key:"general-surgery"}),Dry.Tag({Tag:"Genetics",Key:"genetics"}),Dry.Tag({Tag:"Geriatrics",Key:"geriatrics"}),Dry.Tag({Tag:"Hematology",Key:"hematology"}),Dry.Tag({Tag:"Hepatology",Key:"hepatology"}),Dry.Tag({Tag:"Holistic Medicine",Key:"holistic-medicine"}),Dry.Tag({Tag:"Infectious Disease",Key:"infectious-disease"}),Dry.Tag({Tag:"Internal Medicine",Key:"internal-medicine"}),Dry.Tag({Tag:"Mental Health",Key:"mental-health"}),Dry.Tag({Tag:"Nephrology",Key:"nephrology"}),Dry.Tag({Tag:"Neurology",Key:"neurology"}),Dry.Tag({Tag:"Nutrition",Key:"nutrition"}),Dry.Tag({Tag:"Obstetrics & Gynecology",Key:"obstetrics-and-gynecology"}),Dry.Tag({Tag:"Oncology",Key:"oncology"}),Dry.Tag({Tag:"Ophthalmology",Key:"ophthalmology"}),Dry.Tag({Tag:"Optometry",Key:"optometry"}),Dry.Tag({Tag:"Orthopedics",Key:"orthopedics"}),Dry.Tag({Tag:"Pathology",Key:"pathology"}),Dry.Tag({Tag:"Pain Management",Key:"pain-management"}),Dry.Tag({Tag:"Pediatrics/Adolescent Medicine",Key:"pediatrics-adolescent-medicine"}),Dry.Tag({Tag:"Pharmacology",Key:"pharmacology"}),Dry.Tag({Tag:"Pharmacy",Key:"pharmacy"}),Dry.Tag({Tag:"Physical Therapy & Rehabilitation",Key:"physical-therapy-and-rehabilitation"}),Dry.Tag({Tag:"Plastic Surgery",Key:"plastic-surgery"}),Dry.Tag({Tag:"Podiatry",Key:"podiatry"}),Dry.Tag({Tag:"Psychiatry",Key:"psychiatry"}),Dry.Tag({Tag:"Radiology",Key:"radiology"}),Dry.Tag({Tag:"Rheumatology",Key:"rheumatology"}),Dry.Tag({Tag:"Sexual Health",Key:"sexual-health"}),Dry.Tag({Tag:"Sleep Medicine",Key:"sleep-medicine"}),Dry.Tag({Tag:"Sports Medicine",Key:"sports-medicine"}),Dry.Tag({Tag:"Toxicology",Key:"toxicology"}),Dry.Tag({Tag:"Urology",Key:"urology"})])};that.ExpertPositions=function(){return([Dry.Tag({Tag:"Physician (MD/DO)",Key:"physician-md-do"}),Dry.Tag({Tag:"Surgeon (MD/DO)",Key:"surgeon-md-do"}),Dry.Tag({Tag:"Acupuncturist",Key:"acupuncturist"}),Dry.Tag({Tag:"Chiropractor (DC)",Key:"chiropractor-dc"}),Dry.Tag({Tag:"Clinical Social Worker",Key:"clinical-social-worker"}),Dry.Tag({Tag:"Cosmetologist",Key:"cosmetologist"}),Dry.Tag({Tag:"Dentist (DDS/DMD)",Key:"dentist-dds-dmd"}),Dry.Tag({Tag:"Dietitian",Key:"dietitian"}),Dry.Tag({Tag:"Naturopath (ND)",Key:"naturopath-nd"}),Dry.Tag({Tag:"Nutritionist",Key:"nutritionist"}),Dry.Tag({Tag:"Nurse",Key:"nurse"}),Dry.Tag({Tag:"Nurse - Advanced Practice",Key:"nurse-advanced-practice"}),Dry.Tag({Tag:"Optometrist (OD)",Key:"optometrist-od"}),Dry.Tag({Tag:"Pharmacist (Pharm.D)",Key:"pharmacist-pharm-d"}),Dry.Tag({Tag:"Physical Therapist (DPT)",Key:"physical-therapist-dpt"}),Dry.Tag({Tag:"Physician Assistant",Key:"physician-assistant"}),Dry.Tag({Tag:"Podiatrist (DPM)",Key:"podiatrist-dpm"}),Dry.Tag({Tag:"Psychologist (PsyD)",Key:"psychologist-psyd"}),Dry.Tag({Tag:"Clinical Assistant",Key:"clinical-assistant"}),Dry.Tag({Tag:"Counselor",Key:"counselor"}),Dry.Tag({Tag:"Instructor/Trainer",Key:"instructor-trainer"}),Dry.Tag({Tag:"Ph.D.",Key:"ph-d"}),Dry.Tag({Tag:"Researcher",Key:"researcher"}),Dry.Tag({Tag:"Technician",Key:"technician"}),Dry.Tag({Tag:"Therapist",Key:"therapist"})])};that.GetCategories=function(){return([Dry.Tag({Tag:"Sex & Gynecology",Key:"category-sex-and-gynecology",System:true,Hidden:true}),Dry.Tag({Tag:"Mental Health",Key:"category-mental-health",System:true,Hidden:true}),Dry.Tag({Tag:"Dermatology & Beauty",Key:"category-dermatology-and-beauty",System:true,Hidden:true}),Dry.Tag({Tag:"Relationships & Communication",Key:"category-relationships-and-communication",System:true,Hidden:true}),Dry.Tag({Tag:"Fitness & Sports Medicine",Key:"category-fitness-and-sports-medicine",System:true,Hidden:true}),Dry.Tag({Tag:"Alcohol, Smoking, & Substance Abuse",Key:"category-alcohol-smoking-and-substance-abuse",System:true,Hidden:true}),Dry.Tag({Tag:"Nutrition & Digestion",Key:"category-nutrition-and-digestion",System:true,Hidden:true}),Dry.Tag({Tag:"General Health",Key:"category-general-health",System:true,Hidden:true})])};that.IsCategory=function(tag){var cats=that.GetCategories();for(var i=0;i<cats.length;i++){if(tag.Key()===cats[i].Key()){return(true)}}return(false)};that.GetOptionalTags=function(){return([Dry.Tag({Tag:"News/Features from Around the Web",Key:"news-features-from-around-the-web"}),Dry.Tag({Tag:"Products",Key:"products"}),Dry.Tag({Tag:"Recipes",Key:"recipes"}),Dry.Tag({Tag:"Celebrities",Key:"celebrities"}),Dry.Tag({Tag:"Tips",Key:"tips"}),Dry.Tag({Tag:"Personal Experience/Story",Key:"personal-experience-story"})])};return(that)},ExpertApplication:function ExpertApplication(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=new Dry.BaseClasses.Models.BaseModel();that.Type="ExpertApplication";that.Validations=(function(){var that={};that.DisplayName=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.Title=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired()];that.EmailAddress=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired(),Dry.Validations.IsEmail()];that.EmailAddressConfirmation=[Dry.Validations.IsRequired(),Dry.Validations.IsEmail(),Dry.Validations.ConfirmField("EmailAddress","EmailAddressConfirmation","Email Addresses do not match.")];that.DateOfBirth=[Dry.Validations.Expects("Date"),{Validation:function(model,field,callback){if(model.DateOfBirth.Control){model.DateOfBirth.Control.Validate()}callback(true)},ValidationMessage:""},Dry.Validations.IsRequiredObject("Date of birth is required.")];that.BusinessAddress=[Dry.Validations.ExpectsValid("Address")];that.BusinessPhone=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired(),Dry.Validations.IsPhoneNumber()];that.Categories=[Dry.Validations.ExpectsArray("Tag"),Dry.Validations.ArrayHasElements("Categories are required.")];that.Position=[Dry.Validations.Expects("Tag"),Dry.Validations.IsRequiredObject("Position is required.")];that.AreasOfExpertise=[Dry.Validations.ExpectsArray("Tag"),Dry.Validations.ArrayHasElements("Areas of expertise are required.")];that.Licenses=[Dry.Validations.ExpectsValidArray("License"),Dry.Validations.ArrayHasElements("Licenses are required.")];that.Education=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired("Education is a required field.")];that.RecommendedExperts=[Dry.Validations.Expects("string"),Dry.Validations.IsRequired("Recommended experts is a required field.")];that.SayISentYou=[];that.About=[Dry.Validations.Expects("string"),Dry.Validations.CharacterLimit(1200)];that.Website=[Dry.Validations.Expects("string")];that.NameOfBusiness=[Dry.Validations.Expects("string")];that.PracticingSince=[Dry.Validations.Expects("string")];that.AffiliatedHospitals=[Dry.Validations.Expects("string")];that.Research=[Dry.Validations.Expects("string")];that.LanguagesSpoken=[Dry.Validations.Expects("string")];that.Certified=[];that.Agreed=[Dry.Validations.Expects("boolean"),Dry.Validations.IsChecked("You must agree to the terms.")];return(that)})();that.AddRpcFunctions({InviteExpert:"",FinishExpertSignup:"",Save:"",SaveLead:""});var defaultHash={Id:"",DisplayName:"",Title:"",EmailAddress:"",EmailAddressConfirmation:"",DateOfBirth:null,BusinessAddress:Dry.Models.Address({Type:"Address",View:"Input"}),BusinessPhone:"",Categories:[],Position:null,AreasOfExpertise:[],Licenses:[],Education:"",RecommendedExperts:"",SayISentYou:true,About:"",Website:"",NameOfBusiness:"",PracticingSince:"",AffiliatedHospitals:"",Research:"",LanguagesSpoken:"",Certified:false,Agreed:false,Invited:false,InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DisplayName","","Full Name",that.GetValidations("DisplayName"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Title","","Professional Title",that.GetValidations("Title"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddress","","Email",that.GetValidations("EmailAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"EmailAddressConfirmation","","Confirm Email",that.GetValidations("EmailAddressConfirmation"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"DateOfBirth",null,"Date of Birth",that.GetValidations("DateOfBirth"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BusinessAddress",Dry.Models.Address({Type:"Address",View:"Input"}),"Business Address",that.GetValidations("BusinessAddress"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"BusinessPhone","","Business Phone",that.GetValidations("BusinessPhone"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Categories",[],"Select the category that best encompasses your expertise",that.GetValidations("Categories"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Position",null,"Position",that.GetValidations("Position"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AreasOfExpertise",[],"Areas Of Expertise",that.GetValidations("AreasOfExpertise"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Licenses",[],"Licenses",that.GetValidations("Licenses"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Education","","Please list your degrees and training programs and where you completed them.",that.GetValidations("Education"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"RecommendedExperts","","We want to grow our community by building a team of respected experts. Please tell us who would be a great health/wellness expert for ChickRx.",that.GetValidations("RecommendedExperts"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"SayISentYou",true,"ChickRx may use my name when contacting the people I've listed.",that.GetValidations("SayISentYou"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"About","","About Me",that.GetValidations("About"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Website","","Professional Website",that.GetValidations("Website"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"NameOfBusiness","","Name of your Practice/Business",that.GetValidations("NameOfBusiness"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"PracticingSince","","Practicing Since",that.GetValidations("PracticingSince"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"AffiliatedHospitals","","Affiliated Hospital(s)",that.GetValidations("AffiliatedHospitals"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Research","","Research/Publications",that.GetValidations("Research"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"LanguagesSpoken","","Language(s) Spoken",that.GetValidations("LanguagesSpoken"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Certified",false,"Certified",that.GetValidations("Certified"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Agreed",false,"All of the information I have provided is truthful and factual. ChickRx may contact any of the boards, organizations or institutions I've listed for confirmation.",that.GetValidations("Agreed"),false);that.AddField(field);field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Invited",false,"Invited",that.GetValidations("Invited"),false);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};that.Model={OnBound:function(model){var categoryPicker=Dry.TagPicker();categoryPicker.ModelField("Categories");categoryPicker.Model(model);categoryPicker.Tags(Dry.Tag().GetCategories());categoryPicker.Max(2);categoryPicker.Render($("#"+model.InstanceId()+"-CategoryPickerContainer"));var positionSelect=Dry.Select();var positions=Dry.Tag().ExpertPositions();positions.unshift(Dry.Tag());positionSelect.Options(positions);positionSelect.AllowOther(true);positionSelect.On("select",function(position){if(!position){return model.Position(null)}if(position.IsOther){if(position.Value){model.Position(Dry.Tag({Tag:position.Value}))}else{model.Position(null)}}else{if(position.Key()!==""){model.Position(position)}else{model.Position(null)}}});positionSelect.Render($("#"+model.InstanceId()+"-PositionSelect"));var areasOfExpertise=Dry.ArrayControl({Model:model,Field:"AreasOfExpertise",InputContainerId:model.InstanceId()+"-ExpertiseInput",OutputContainerId:model.InstanceId()+"-ExpertiseOutput"});var options=Dry.Tag().AreasOfExpertise();areasOfExpertise.ItemShowHash({Type:"Tag",View:"ArrayShow"});areasOfExpertise.ItemAddHash({Type:"Tag",View:"ArrayAddSelect",Options:options});areasOfExpertise.On("add",function(tag){for(var i=0;i<options.length;i++){if(options[i].Key()===tag.Key()){Dry.Common.RemoveFromArray(options,i)}}});areasOfExpertise.On("remove",function(tag){if(tag.Key()!==""){options.push(tag)}});areasOfExpertise.Create();var licences=Dry.ArrayControl({Model:model,Field:"Licenses",InputContainerId:model.InstanceId()+"-LicensesInput",OutputContainerId:model.InstanceId()+"-LicensesOutput"});licences.ItemShowHash({Type:"License",View:"Show",EnableRemove:true});licences.ItemAddHash({Type:"License",View:"Input"});function updateLicenseNumbers(){var licences=model.Licenses();for(var i=0;i<licences.length;i++){$("#"+licences[i].InstanceId()+" .LicenseNumberDisplay .Value").html(i+1)}if(i>0){$("#"+model.InstanceId()+" .LicensesInput .Optional").html("OPTIONAL")}else{$("#"+model.InstanceId()+" .LicensesInput .Optional").html("REQUIRED")}$("#"+model.InstanceId()+" .LicensesInput .LicenseNumberDisplay .Value").html(i+1)}licences.On("add",function(lic){nextTick(updateLicenseNumbers)});licences.On("remove",function(lic){nextTick(updateLicenseNumbers)});licences.Create();updateLicenseNumbers();var dob=Dry.ThreeInputDate({IsRequired:true});model.DateOfBirth.Control=dob;dob.On("changed",function(){dob.Validate();if(dob.Date()){model.DateOfBirth(dob.Date())}else{model.DateOfBirth(null)}});dob.Render($("#"+model.InstanceId()+"-Dob"))}};function runInitialValidations(model,callback){var validSoFar=true;model.DisplayName.Validate(function(isValid){validSoFar=isValid&&validSoFar;model.EmailAddress.Validate(function(isValid){validSoFar=isValid&&validSoFar;model.EmailAddressConfirmation.Validate(function(isValid){validSoFar=isValid&&validSoFar;model.Title.Validate(function(isValid){validSoFar=isValid&&validSoFar;callback(validSoFar)})})})})}function runInitialSubmit(model){if(!model.RunningLeadSubmit){model.RunningLeadSubmit=true;runInitialValidations(model,function(isValid){if(isValid){model.IsExtended=true;$("#"+model.InstanceId()+" .ExtendedForm").removeClass("hide");Dry.ExpertApplication().Api.SaveLead(Dry.ExpertApplicationLead(model.Hash()));model.RunningLeadSubmit=false}else{model.RunningLeadSubmit=false}})}}function makeStraightMessageArray(array,messages){if(typeof(messages)==="object"){Dry.Common.Iterate(messages,function(prop,val){makeStraightMessageArray(array,val)})}else{array.push(messages)}}function displayAllValidationMessages(messages){var messageArray=[];makeStraightMessageArray(messageArray,messages);var str="";for(var i=0;i<messageArray.length;i++){str+='<div class = "Validations">'+messageArray[i]+"</div>"}$(".FormValidations").show();$(".FormValidationsContainer").html(str)}function runFullSubmit(model){if(!model.RunningSubmit){model.RunningSubmit=true;model.Validate();model.Validate(function(messages){if(!messages){Dry.ExpertApplication().Api.Save(model,function(){var share=Dry.Share({FacebookLink:"http://www.chickrx.com",TwitterLink:"http://www.chickrx.com"});var p=Dry.PopupMessage({MessageTitle:"Thank you--we'll be in touch soon!",Message:"Tell your friends/followers that you'll be part of this great new community:",Model:share,Width:373,Height:150});p.On("close",function(){window.location="/home"});p.Show();model.RunningSubmit=false})}else{displayAllValidationMessages(messages);model.RunningSubmit=false}},true)}}that.SubmitButton={OnClick:function(event){if(!event.Model.IsExtended){runInitialSubmit(event.Model)}else{runFullSubmit(event.Model)}}};that.Education={};that.Education.Value={OnClick:function(event){$(".Education .Value").focus()},OnFocus:function(event){$(".Education .ExampleText").hide()}};that.Education.ExampleText={OnClick:function(event){$(".Education .Value").focus()}};function updateAboutNumChars(){var numLeft=(1200-$(".About .Value").val().length);$(".About small").html("("+numLeft+" characters left)");if(numLeft<0){$(".About small").addClass("AboutHighlight")}else{$(".About small").removeClass("AboutHighlight")}}that.About={};that.About.Value={OnClick:function(event){$(".About .Value").focus()},OnFocus:function(event){$(".About .ExampleText").hide()},OnKeyDown:function(event){updateAboutNumChars()},OnKeyUp:function(event){updateAboutNumChars()}};that.About.ExampleText={OnClick:function(event){$(".About .Value").focus()}};return(that)})();that.AddView("Input",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ExpertApplication Input Form">        <div class = "BoxHeaderLeft">EXPERT SIGNUP</div>        <div class="FormContainer">            <h1>Join the ChickRx Team of Trusted Health & Wellness Experts</h1>            <div class="Description">Create your professional profile and join our community discussions - it\'s a free and effective way to gain exposure for your practice, promote your expertise, maintain a dialogue with prospective and current clients, and build your business.</div>            <div class="RequiredDescription"><span class="Required"></span> Required fields.</div>            <form class = "Fields">                <fieldset class = "DisplayName">                    <label>                        <span class = "FieldLabel Required">Full Name</span>                        <input class = "Value" type = "text" />                        <small>As you\'d like it to appear on the site. <br /> Example: Dr. Jane Smith</small>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "Title">                    <label>                        <span class = "FieldLabel Required">Professional Title</span>                        <input class = "Value" type = "text" />                        <small>Examples: Dermatologist OR Licensed Marriage & Family Therapist.</small>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "EmailAddress">                    <label>                        <span class = "FieldLabel Required">Email</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "EmailAddressConfirmation">                    <label>                        <span class = "FieldLabel Required">Confirm Email</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <div class="ExtendedForm hide">                                <fieldset class = "DateOfBirth DateFieldset">                    <label>                        <span class = "FieldLabel Required">Date of Birth</span>                    </label>                    <div class="DateContainer" id="{{{InstanceId}}}-Dob"></div>                    <small>This is to ensure authenticity, but wont display on your profile.</small>                    <!--                     <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                    -->                </fieldset>                <!--                 <fieldset class = "BusinessAddress">                    <label>                        <span class = "FieldLabel Required">Business Address</span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                -->                                <div class = "AddressLabel">Business Address</div>                                {{#BusinessAddress}}{{{Rendered}}}{{/BusinessAddress}}                <fieldset class = "BusinessPhone">                    <label>                        <span class = "FieldLabel Required">Business Phone</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                                <h2>YOUR CATEGORIES</h2>                                <fieldset class = "Categories">                    <label>                        <span class = "FieldLabel Required">Select the category that best encompasses your expertise (2 max)</span>                    </label>                    <small>(This informs which user questions we highlight for you)</small>                    <div class="CategoryPickerContainer" id="{{{InstanceId}}}-CategoryPickerContainer"></div>                </fieldset>                                <h2>PROFESSIONAL QUALIFICATIONS</h2>                                <fieldset class = "Position">                    <label>                        <span class = "FieldLabel Required">Position</span>                    </label>                    <div id="{{{InstanceId}}}-PositionSelect"></div>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "AreasOfExpertise">                    <label>                        <span class = "FieldLabel Required">Area(s) of Expertise</span>                    </label>                    <div class = "ExpertiseInput" id="{{{InstanceId}}}-ExpertiseInput"></div>                    <small>(Select all that apply)</small>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <div id="{{{InstanceId}}}-ExpertiseOutput" class="ExpertiseOutput"></div>                                <h3>LICENSES</h3>                                <div id="{{{InstanceId}}}-LicensesOutput" class="LicensesOutput"></div>                <div id="{{{InstanceId}}}-LicensesInput" class="LicensesInput"></div>                                <h3>EDUCATION & TRAINING</h3>                                <fieldset class = "Education">                    <label>                        <span class = "FieldLabel Required">Please list your degrees and training programs and where you completed them.</span>                        <textarea class = "Value"></textarea>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                    <div class="ExampleText">                        Example:<br />                        B.A. University of Pennsylvania<br />                        MD, Stanford University Medical School<br />                        Residency, University of California San Francisco                    </div>                </fieldset>                                <h2>EXPERTS YOU RESPECT</h2>                                <fieldset class = "RecommendedExperts">                    <label>                        <span class = "FieldLabel Required">We want to grow our community by building a team of respected experts. Please tell us who would be a great health/wellness expert for ChickRx.</span>                        <small>(For each expert, please include their name, position, and email address or phone number)</small>                        <textarea class = "Value" ></textarea>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "SayISentYou">                    <label>                        <input class = "Value" type = "checkbox" />                        <span class = "FieldLabel">ChickRx may use my name when contacting the people I\'ve listed.</span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                                <h2>MORE INFORMATION <span class="Optional">(OPTIONAL)</span></h2>                <fieldset class = "About">                    <label>                        <span class = "FieldLabel">About Me</span>                        <small>(1200 characters left)</small>                        <textarea class = "Value"></textarea>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                    <div class="ExampleText">                        Briefly tell the ChickRx community about yourself <br/>                        (background, professional and/or personal <br/>                        interests, etc.)                    </div>                </fieldset>                <fieldset class = "Website">                    <label>                        <span class = "FieldLabel">Professional Website</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "NameOfBusiness">                    <label>                        <span class = "FieldLabel">Name of your Practice/Business</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "PracticingSince">                    <label>                        <span class = "FieldLabel">Practicing Since</span>                        <input class = "Value" type = "text" />                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "AffiliatedHospitals">                    <label>                        <span class = "FieldLabel">Affiliated Hospital(s)</span>                        <input class = "Value" type = "text" />                        <small>If multiple, separate with commas.</small>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "Research">                    <label>                        <span class = "FieldLabel">Research/Publications</span>                        <input class = "Value" type = "text" />                        <small>If multiple, separate with commas.</small>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "LanguagesSpoken">                    <label>                        <span class = "FieldLabel">Language(s) Spoken</span>                        <input class = "Value" type = "text" />                        <small>If multiple, separate with commas.</small>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                <fieldset class = "Agreed">                    <label>                        <span class="Required"></span><input class = "Value" type = "checkbox" />                        <span class = "FieldLabel">All of the information I have provided is truthful and accurate. ChickRx may contact any of the boards, organizations or institutions I\'ve listed for confirmation.</span>                    </label>                    <div class = "Validations">                        <p class = "UnnamedValidations">                            <span class = "Message"></span>                        </p>                    </div>                </fieldset>                                <div class="FormValidations">                    <h3>Please take care of the following issues before attempting to submit.</h3>                    <div class="FormValidationsContainer">                    </div>                </div>                                </div> <!-- EXTENDED FORM -->                                <fieldset class="SubmitFieldset">                    <input type="button" class="SubmitButton" value="SUBMIT" />                </fieldset>            </form>        </div>    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};that.InviteExpert={OnClick:function(event){if(event.Model.Running){return}event.Model.Running=true;Dry.ExpertApplication().Api.InviteExpert(event.Model.Id(),function(result){event.Model.Running=false;if(result==="EXISTS"){alert("THIS EMAIL ALREADY EXISTS, PLEASE CONTACT YOUR ADMINISTRATOR")}else{alert("EXPERT SUCCESSFULLY INVITED");window.location="/admin/manage-expert-applications"}})}};return(that)})();that.AddView("Show",Dry.BaseClasses.Models.View('<div id = "{{{InstanceId}}}">    <div class = "ExpertApplication Show">        <table class = "Fields">            <thead>                <tr>                    <th>Field Names</th>                    <th>Field Values</th>                </tr>            </thead>            <tfoot>            </tfoot>            <tbody>                <tr class = "DisplayName">                    <td class = "Label">Full Name</td>                    <td class = "Value">{{#DisplayName}}{{{Rendered}}}{{/DisplayName}}</td>                </tr>                <tr class = "Title">                    <td class = "Label">Professional Title</td>                    <td class = "Value">{{#Title}}{{{Rendered}}}{{/Title}}</td>                </tr>                <tr class = "EmailAddress">                    <td class = "Label">Email</td>                    <td class = "Value">{{#EmailAddress}}{{{Rendered}}}{{/EmailAddress}}</td>                </tr>                <tr class = "EmailAddressConfirmation">                    <td class = "Label">Confirm Email</td>                    <td class = "Value">{{#EmailAddressConfirmation}}{{{Rendered}}}{{/EmailAddressConfirmation}}</td>                </tr>                <tr class = "DateOfBirth">                    <td class = "Label">Date of Birth</td>                    <td class = "Value">{{#DateOfBirth}}{{{Rendered}}}{{/DateOfBirth}}</td>                </tr>                <tr class = "BusinessAddress">                    <td class = "Label">Business Address</td>                    <td class = "Value">{{#BusinessAddress}}{{{Rendered}}}{{/BusinessAddress}}</td>                </tr>                <tr class = "BusinessPhone">                    <td class = "Label">Business Phone</td>                    <td class = "Value">{{#BusinessPhone}}{{{Rendered}}}{{/BusinessPhone}}</td>                </tr>                <tr class = "Categories">                    <td class = "Label">Select the category that best encompasses your expertise</td>                    <td class = "Value">{{#Categories}}{{{Rendered}}}{{/Categories}}</td>                </tr>                <tr class = "Position">                    <td class = "Label">Position</td>                    <td class = "Value">{{#Position}}{{{Rendered}}}{{/Position}}</td>                </tr>                <tr class = "AreasOfExpertise">                    <td class = "Label">Areas Of Expertise</td>                    <td class = "Value">{{#AreasOfExpertise}}{{{Rendered}}}{{/AreasOfExpertise}}</td>                </tr>                <tr class = "Licenses">                    <td class = "Label">Licenses</td>                    <td class = "Value">{{#Licenses}}{{{Rendered}}}{{/Licenses}}</td>                </tr>                <tr class = "Education">                    <td class = "Label">Please list your degrees and training programs and where you completed them.</td>                    <td class = "Value">{{#Education}}{{{Rendered}}}{{/Education}}</td>                </tr>                <tr class = "RecommendedExperts">                    <td class = "Label">We want to grow our community by building a team of respected experts. Please tell us who would be a great health/wellness expert for ChickRx.</td>                    <td class = "Value">{{#RecommendedExperts}}{{{Rendered}}}{{/RecommendedExperts}}</td>                </tr>                <tr class = "SayISentYou">                    <td class = "Label">ChickRx may use my name when contacting the people I\'ve listed.</td>                    <td>{{SayISentYouText}}</td>                </tr>                <tr class = "About">                    <td class = "Label">About Me</td>                    <td class = "Value">{{#About}}{{{Rendered}}}{{/About}}</td>                </tr>                <tr class = "Website">                    <td class = "Label">Professional Website</td>                    <td class = "Value">{{#Website}}{{{Rendered}}}{{/Website}}</td>                </tr>                <tr class = "NameOfBusiness">                    <td class = "Label">Name of your Practice/Business</td>                    <td class = "Value">{{#NameOfBusiness}}{{{Rendered}}}{{/NameOfBusiness}}</td>                </tr>                <tr class = "PracticingSince">                    <td class = "Label">Practicing Since</td>                    <td class = "Value">{{#PracticingSince}}{{{Rendered}}}{{/PracticingSince}}</td>                </tr>                <tr class = "AffiliatedHospitals">                    <td class = "Label">Affiliated Hospital(s)</td>                    <td class = "Value">{{#AffiliatedHospitals}}{{{Rendered}}}{{/AffiliatedHospitals}}</td>                </tr>                <tr class = "Research">                    <td class = "Label">Research/Publications</td>                    <td class = "Value">{{#Research}}{{{Rendered}}}{{/Research}}</td>                </tr>                <tr class = "LanguagesSpoken">                    <td class = "Label">Language(s) Spoken</td>                    <td class = "Value">{{#LanguagesSpoken}}{{{Rendered}}}{{/LanguagesSpoken}}</td>                </tr>                <tr class = "Certified">                    <td class = "Label">Certified</td>                    <td class = "Value">{{#Certified}}{{{Rendered}}}{{/Certified}}</td>                </tr>                <tr class = "Agreed">                    <td class = "Label">All of the information I have provided is truthful and factual. ChickRx may contact any of the boards, organizations or institutions I\'ve listed for confirmation.</td>                    <td class = "Value">{{#Agreed}}{{{Rendered}}}{{/Agreed}}</td>                </tr>                <tr class = "Invited">                    <td class = "Label">Invited</td>                    <td>{{InvitedText}}</td>                </tr>                {{#Invited}}                {{^Rendered}}                    <tr>                        <td></td>                        <td><input class = "InviteExpert" type="button" value="SEND EMAIL TO INVITE EXPERT" /></td>                    </tr>                {{/Rendered}}                {{/Invited}}            </tbody>        </table>            </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("ListItem",Dry.BaseClasses.Models.View('<span id = "{{{InstanceId}}}">    <span class = "ExpertApplication ListItem">    <a {{{Href}}}>        <span class = "Fields">            <span class = "DisplayName">                <span class = "Label"></span>                <span class = "Value"></span>            </span>            <br />            <span class = "Title">                <span class = "Label"></span>                <span class = "Value"></span>            </span>            <br />            <span class = "EmailAddress">                <span class = "Label"></span>                <span class = "Value"></span>            </span>            <br />        </span>    </a>    </span></span>{{{BindModelToDom}}}',"Mu",handlers));that.View("Input");that.Hash(defaultHash);if(typeof(serializedModel)==="object"||typeof(serializedModel)==="string"){that.Hash(serializedModel)}that.ViewHashFunctions.Href=function(){return('href="/admin/manage-expert-applications/'+that.Id()+'"')};that.ViewHashFunctions.SayISentYouText=function(){if(that.SayISentYou()){return("YES")}else{return("NO")}};that.ViewHashFunctions.InvitedText=function(){if(that.Invited()){return("YES")}else{return("NO")}};return(that)},ExpertImage:function ExpertImage(serializedModel,dryInstance){try{Dry=Dry}catch(noDry){if(dryInstance){Dry=dryInstance}}var that=Dry.Models.Image();var parent=Dry.Models.Image();that.Parent=parent;that.Type="ExpertImage";that.Validations={};that.AddRpcFunctions({});var defaultHash={Id:"",InstanceId:""};var field=null;field=Dry.BaseClasses.Models.ModelFields.Basic(that,"Id","","Id",that.GetValidations("Id"),true);that.AddField(field);var handlers=null;that.Views={};handlers=(function(){var that={};return(that)})();that.AddView("MyAccountThumb",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <figure class="ExpertImage MyAccountThumb">        <div class="image-container">            <img id="{{#ImageId}}{{{Rendered}}}{{/ImageId}}" src="{{#Url}}{{{Rendered}}}{{/Url}}" alt="{{#Description}}{{{Rendered}}}{{/Description}}" />            <p class="overlay"><span>EXPERT</span></p>        </div>        <!--        {{#Caption}}        <figcaption class="caption">{{{Rendered}}}</figcaption>        {{/Caption}}        {{#Subcaption}}        <figcaption class="subcaption">{{{Rendered}}}</figcaption>        {{/Subcaption}}        -->    </figure></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("BigFeedThumb",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <figure class="ExpertImage BigFeedThumb">        <div class="image-container">            <img id="{{#ImageId}}{{{Rendered}}}{{/ImageId}}" src="{{#Url}}{{{Rendered}}}{{/Url}}" alt="{{#Description}}{{{Rendered}}}{{/Description}}" />            <p class="overlay"><span>EXPERT</span></p>        </div>        <!--        {{#Caption}}        <figcaption class="caption">{{{Rendered}}}</figcaption>        {{/Caption}}        {{#Subcaption}}        <figcaption class="subcaption">{{{Rendered}}}</figcaption>        {{/Subcaption}}        -->    </figure></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("Profile",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div class="ExpertImage Profile">        <div class="image-container">            <img id="{{#ImageId}}{{{Rendered}}}{{/ImageId}}" src="{{#Url}}{{{Rendered}}}{{/Url}}" alt="{{#Description}}{{{Rendered}}}{{/Description}}" />            <p class="overlay"><span>EXPERT</span></p>        </div>        <!--        {{#Caption}}        <div class="caption">{{{Rendered}}}</div>        {{/Caption}}        {{#Subcaption}}        <div class="subcaption">{{{Rendered}}}</div>        {{/Subcaption}}        -->    </div></div>{{{BindModelToDom}}}',"Mu",handlers));handlers=(function(){var that={};return(that)})();that.AddView("SmallThumb",Dry.BaseClasses.Models.View('<div id="{{{InstanceId}}}">    <div 
