PageSourceSearch

https://static.core77.com/javascripts/library/base_library.min.js?v=508

js core77.com collected 2026-09-24 08:28:28 UTC 945,199 bytes, 1 lines download raw bytes

1String.prototype.clean_white_space=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace(/\s\s*/," ").replace(/&(nbsp);/g,"").replace(/&#65279;/g,"")},String.prototype.clean_leading_space=function(){return this.replace(/^\s\s*/,"")},String.prototype.word_trunc=function(_count,_add_ellipses){if(0<this.length){for(var words=this.clean_white_space().split(/\s/g),_return=new String,k=0;k<_count;k++)General.is_null_empty_undefined(words[k])||(_return+=words[k]+" ");return _return+=_add_ellipses&&words.length>_count?"...":""}},String.prototype.char_trunc=function(_count,_add_ellipses){if(0<this.length)return this.substring(0,_count)+(_add_ellipses&&this.length>_count?"...":"")},String.prototype.char_trunc_to_prev_word_end=function(_count,_add_ellipses){if(0<this.length){for(var _prev_word_end=0,k=0;k<_count;k++)_prev_word_end=/\s/.test(this[k])?k:_prev_word_end;var _return=this.substring(0,_prev_word_end);return _return+=_add_ellipses&&this.length>_count?"...":""}},String.format=function(){for(var str=arguments[0],k=0;k<arguments.length-1;k++)var repl_regex=new RegExp("\\{"+k+"\\}","gm"),str=str.replace(repl_regex,arguments[k+1]);return str},String.prototype.append=function(_str){return String.format("{0}{1}",this,_str)},String.prototype.prepend=function(_str){return String.format("{0}{1}",_str,this)},String.prototype.is_valid_email=function(){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$/.test(this)},String.prototype.is_valid_URL=function(){return/^(https?|ftp|file):\/\/.+$/.test(this)},String.prototype.remove_title_from_permalink_for_social_share=function(){return this.replace(this.substr(this.lastIndexOf("/")+1),"")},String.prototype.add_protocol_to_link_if_needed=function(){return new RegExp("^https?://(www.)?").test(this)?this:String.format("http://{0}",this)},String.prototype.user_external_link_as_icon=function(){var result="",facebook_reg=new RegExp("(facebook)"),linkedin_reg=new RegExp("(linkedin)"),twitter_reg=new RegExp("(twitter)");return result=""!=this?facebook_reg.test(this)?"Y":linkedin_reg.test(this)?"U":twitter_reg.test(this)?"m":"x":result},String.prototype.to_empty_string_if_zero=function(){return 0===parseInt(this)?"":this},String.prototype.insert=function(index,string){return 0<index?this.substring(0,index)+string+this.substring(index,this.length):string+this},String.prototype.convert_string_to_url=function(){return this.replace(/\s/gi,"-").replace(/([^0-9a-zA-Z\-])/gi,"")},String.prototype.remove_all_non_numbers_letters_spaces=function(){return this.replace(/([^0-9a-zA-Z\s])/gi,"")},Number.prototype.thousand_to_k=function(){return 999<this?(this/1e3).toFixed(1)+"K":this},Array.prototype.shuffle=function(){for(var i=this.length;--i;){var j=Math.floor(Math.random()*(i+1)),temp=this[i];this[i]=this[j],this[j]=temp}return this},Array.prototype.contains=function(_val){for(var k=0;k<this.length;k++)if(this[k]===_val)return!0;return!1},Array.prototype.indexOf=function(obj,start){for(var i=start||0,j=this.length;i<j;i++)if(this[i]===obj)return i;return-1},Function.prototype.inherits=function(parent_class_or_object){var extendsFrom;return parent_class_or_object.constructor==Function?((extendsFrom=function(){}).prototype=parent_class_or_object.prototype,this.prototype=new extendsFrom,(this.prototype.constructor=this).fn=this.prototype):(this.prototype=parent_class_or_object,(this.prototype.constructor=this).fn=this.prototype,this.prototype.parent=parent_class_or_object),this},Date.prototype.get_day_as_string=function(num_chars){var day_str_ar=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_day=this.getDay();return null!=num_chars?day_str_ar[_day].substring(0,num_chars):day_str_ar[_day]},Date.prototype.get_month_as_string=function(num_chars){var month_str_ar=["January","February","March","April","May","June","July","August","September","October","November","December"],_month=this.getMonth();return null!=num_chars?month_str_ar[_month].substring(0,num_chars):month_str_ar[_month]},Date.prototype.to_DDD_MMM_d=function(){return this.get_day_as_string(3)+" "+this.get_month_as_string(3)+" "+this.getDate()},Date.prototype.to_MMM_d=function(){return this.get_month_as_string(3)+" "+this.getDate()},Date.prototype.to_MM_DD_YYYY=function(){return String.format("{0}/{1}/{2}",this.getMonth()+1,this.getDate(),this.getFullYear())},Date.prototype.to_DDD=function(){return this.get_day_as_string(3)},Date.prototype.to_d=function(){return this.getDate()},Date.prototype.ToMonthDayAndYearIfNotCurrent=function(){var _fulldate=String.format("{0} {1}",this.get_month_as_string(3),this.getDate()),_this_year=new Date;return _fulldate=this.getFullYear()!=_this_year.getFullYear()?String.format("{0}, {1}",_fulldate,this.getFullYear()):_fulldate},Date.prototype.standard_timezone_offset=function(){var jan=new Date(this.getFullYear(),0,1),jul=new Date(this.getFullYear(),6,1);return Math.max(jan.getTimezoneOffset(),jul.getTimezoneOffset())},Date.prototype.dst=function(){return this.getTimezoneOffset()<this.standard_timezone_offset()},Date.prototype.add_days=function(days){return this.setDate(this.getDate()+parseInt(days)),this},Math.linearTween=function(t,b,c,d){return c*t/d+b},Math.easeInQuad=function(t,b,c,d){return c*(t/=d)*t+b},Math.easeOutQuad=function(t,b,c,d){return-c*(t/=d)*(t-2)+b},Math.easeInOutQuad=function(t,b,c,d){return(t/=d/2)<1?c/2*t*t+b:-c/2*(--t*(t-2)-1)+b},Math.easeInCubic=function(t,b,c,d){return c*(t/=d)*t*t+b},Math.easeOutCubic=function(t,b,c,d){return t/=d,c*(--t*t*t+1)+b},Math.easeInOutCubic=function(t,b,c,d){return(t/=d/2)<1?c/2*t*t*t+b:c/2*((t-=2)*t*t+2)+b},Math.easeInQuart=function(t,b,c,d){return c*(t/=d)*t*t*t+b},Math.easeOutQuart=function(t,b,c,d){return t/=d,-c*(--t*t*t*t-1)+b},Math.easeInOutQuart=function(t,b,c,d){return(t/=d/2)<1?c/2*t*t*t*t+b:-c/2*((t-=2)*t*t*t-2)+b},Math.easeInQuint=function(t,b,c,d){return c*(t/=d)*t*t*t*t+b},Math.easeOutQuint=function(t,b,c,d){return t/=d,c*(--t*t*t*t*t+1)+b},Math.easeInOutQuint=function(t,b,c,d){return(t/=d/2)<1?c/2*t*t*t*t*t+b:c/2*((t-=2)*t*t*t*t+2)+b},Math.easeInSine=function(t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},Math.easeOutSine=function(t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},Math.easeInOutSine=function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},Math.easeInExpo=function(t,b,c,d){return c*Math.pow(2,10*(t/d-1))+b},Math.easeOutExpo=function(t,b,c,d){return c*(1-Math.pow(2,-10*t/d))+b},Math.easeInOutExpo=function(t,b,c,d){return(t/=d/2)<1?c/2*Math.pow(2,10*(t-1))+b:(t--,c/2*(2-Math.pow(2,-10*t))+b)},Math.easeInCirc=function(t,b,c,d){return t/=d,-c*(Math.sqrt(1-t*t)-1)+b},Math.easeOutCirc=function(t,b,c,d){return t/=d,t--,c*Math.sqrt(1-t*t)+b},Math.easeInOutCirc=function(t,b,c,d){return(t/=d/2)<1?-c/2*(Math.sqrt(1-t*t)-1)+b:(t-=2,c/2*(Math.sqrt(1-t*t)+1)+b)};var GOOGLE_AD_ZONES={},AD_ZONES={};function rad(x){return x*Math.PI/180}AD_ZONES.specific_zones=["homepage","education","buyout","buyout_autodesk","buyout_protolabs","high_impact"];var Object_Base=function(_obj){},User=(Object_Base.initialize_obj_properties_to_null=function(_list){for(var _obj={},k=0;k<_list.length;k++)_obj[_list[k]]=null;return _obj},Object_Base.prototype={constructor:Object_Base,set_property:function(_prop,_val,_clbk){this[_prop]=_val,General.is_valid_callback(_clbk)&&_clbk()}},function(_obj){Object_Base.call(this,_obj),this.name=_obj.name,this.avatar=_obj.avatar,this.link=_obj.link,this.id=General.is_null_empty_undefined(_obj.id)?"":_obj.id,this.profile_complete=!("true"!=_obj.profile_complete&&!_obj.profile_complete)}),Conference_Attendee=(User.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.id=General.is_null_empty_undefined(_obj.id)?"":_obj.id,this.name=General.is_null_empty_undefined(_obj.name)?"":_obj.name,this.location=new Address_Base,this.job_title=General.is_null_empty_undefined(_obj.job_title)?"":_obj.job_title,this.company_name=General.is_null_empty_undefined(_obj.company_name)?"":_obj.company_name,this.web_link=General.is_null_empty_undefined(_obj.web_link)?"":_obj.web_link,this.twitter_handle=General.is_null_empty_undefined(_obj.twitter_handle)?"":_obj.twitter_handle,this.question2=General.is_null_empty_undefined(_obj.question2)?"":_obj.question2,this.about=General.is_null_empty_undefined(_obj.about)?"":_obj.about,this.image2=""}),Virtual_Student_Panelist=(Conference_Attendee.inherits(Object_Base),C
1onference_Attendee.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='errors' class='generic_message'><div class='conf_h1'>Hang On!</div>"+"<p class='conf_p1'>We need the following information to add you to our yearbook:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.name)&&(_html+="<li>Your Name</li>",is_valid=!1),General.is_null_empty_undefined(this.job_title)&&(_html+="<li>Your Job Title</li>",is_valid=!1),General.is_null_empty_undefined(this.company_name)&&(_html+="<li>Your Company</li>",is_valid=!1),General.is_null_empty_undefined(this.location.location_string)&&(_html+="<li>Your Location</li>",is_valid=!1),General.is_null_empty_undefined(this.about)&&(_html+="<li>Your design mission</li>",is_valid=!1),General.is_null_empty_undefined(this.question2)&&(_html+="<li>Your favorite song for our playlist</li>",is_valid=!1),$("#add_image_2_wrapper").hasClass("has_content")||(_html+="<li>A picture of yourself</li>",is_valid=!1),is_valid||((error_modal=new Quick_Modal({appendTo:"core77",attach_class:"thank_you_modal",add_close_button:!0})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},Conference_Attendee.fn.get_params=function(){var loc=this;return{id:loc.id,name:loc.name,job_title:loc.job_title,company_name:loc.company_name,about:loc.about,email:loc.email,twitter_handle:loc.twitter_handle,web_link:loc.web_link,question2:loc.question2,location:{address1:loc.location.address_1,city:loc.location.city,state_abbreviation:loc.location.state_abbreviation,country_abbreviation:loc.location.country_abbreviation,zip:loc.location.zip,latitude:loc.location.latitude,longitude:loc.location.longitude,location_string:loc.location.location_string}}},function(_obj){Object_Base.call(this,_obj),this.id=General.is_null_empty_undefined(_obj.id)?"":_obj.id,this.name=General.is_null_empty_undefined(_obj.name)?"":_obj.name,this.title=General.is_null_empty_undefined(_obj.title)?"":_obj.title,this.company=General.is_null_empty_undefined(_obj.company)?"":_obj.company,this.social_link=General.is_null_empty_undefined(_obj.social_link)?"":_obj.social_link,this.bio=General.is_null_empty_undefined(_obj.bio)?"":_obj.bio,this.city=General.is_null_empty_undefined(_obj.city)?"":_obj.city,this.avatar_image="",this.category_ids_csv=General.is_null_empty_undefined(_obj.category_ids_csv)?"":_obj.category_ids_csv}),STATUS_CODE=(Virtual_Student_Panelist.inherits(Object_Base),Virtual_Student_Panelist.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='errors' class='generic_message'><div class='conf_h1'>Hang On!</div>"+"<p class='conf_p1'>We need the following information to best match you with a design show.</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.name)&&(_html+="<li>Your Name</li>",is_valid=!1),!General.is_null_empty_undefined(this.email)&&this.email.is_valid_email()||(is_valid=(General.is_null_empty_undefined(this.email)?_html+="<li>Your Email</li>":_html+="<li>A valid Email</li>",!1)),General.is_null_empty_undefined(this.title)&&(_html+="<li>Your Job Title</li>",is_valid=!1),General.is_null_empty_undefined(this.company)&&(_html+="<li>Your Company</li>",is_valid=!1),(is_valid=General.is_null_empty_undefined(this.bio)||500<this.bio.length?(General.is_null_empty_undefined(this.bio)?_html+="<li>Your Brief Bio</li>":_html+="<li>Your Brief Bio is over the limit of 500 characters</li>",!1):is_valid)||((error_modal=new Quick_Modal({appendTo:"core77",attach_class:"thank_you_modal",add_close_button:!0})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},Virtual_Student_Panelist.fn.get_params=function(){return{id:this.id,name:this.name,title:this.title,company:this.company,bio:this.bio,email:this.email,social_link:this.social_link,city:this.city,category_ids_csv:this.category_ids_csv}},{session_timeout:-1,not_activated:-2,deactivated:-3,no_email:2,ok:1}),General=function(){},CONSOLE_TYPES=(General.is_mobile_device=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},General.format_time=function(_hours,_mins,show_min_zero){var _meridiem=12<_hours?"PM":"AM",_hours=(_mins=0==_mins?"00":_mins,_hours=12<_hours?_hours-12:_hours);return""!=(_mins=show_min_zero||"00"!=_mins?_mins:"")&&(_hours+=String.format(":{0}",_mins)),_hours+=String.format(" {0}",_meridiem)},General.is_compare_logic=function(value,compare_list,or_and){for(var bool_array=[],k=0;k<compare_list.length;k++)bool_array.push(value==compare_list[k]);return"&&"==or_and?!bool_array.contains(!1):"||"==or_and?!!bool_array.contains(!0):void 0},General.get_unique_id=function(){var page_as_html=$("#core77").html();do{var _milliseconds=(new Date).getMilliseconds(),unique_identifier=(16777215*Math.random()<<0).toString(16)+"_"+Math.floor((900*Math.random()+100)*_milliseconds/100),_milliseconds=new RegExp(unique_identifier)}while(_milliseconds.test(page_as_html));return unique_identifier},General.is_null_empty_undefined=function(_val,_default_text){return null!=_default_text?null==_val||""===_val||_val===new String||_val===_default_text:null==_val||""===_val},General.is_a_number=function(_val){return!isNaN(+_val)},General.is_valid_callback=function(_clbk){return!General.is_null_empty_undefined(_clbk)&&"function"==typeof _clbk},General.is_browser_block=function(){return void 0===window.FormData||isIE()},General.do_when=function(predicate,action,timeout_step){predicate()?action():setTimeout(General.do_when,timeout_step,predicate,action,timeout_step)},General.load_js_css=function(_src,filetype,_callback,loc){var _ready,useSSL,_ref;"js"==filetype?(_ready=!1,(_ref=document.createElement("script")).type="text/javascript",_ref.async=!0,useSSL="https:"==document.location.protocol,_ref.src=(useSSL?"https:":"http:")+_src,_ref.onload=_ref.onreadystatechange=function(){_ready||this.readyState&&"complete"!=this.readyState&&"loaded"!=this.readyState||(_ready=!0,_callback(loc))}):"css"==filetype&&((_ref=document.createElement("link")).rel="stylesheet",_ref.type="text/css",_ref.href=_src),void 0!==_ref&&document.getElementsByTagName("head")[0].appendChild(_ref)},General.addCommas=function(nStr){for(var nStr=(nStr+="").split("."),x1=nStr[0],nStr=1<nStr.length?"."+nStr[1]:"",rgx=/(\d+)(\d{3})/;rgx.test(x1);)x1=x1.replace(rgx,"$1,$2");return x1+nStr},General.is_logged_in=function(){return 0==$("#login").length},General.status_ok=function(_str,loc){if(-1==_str){loading.remove();var current_page=window.location.pathname.split("/").pop(),_html=(null!=loc&&(current_page=current_page.replace("create","edit"),current_page+=String.format("?post_id={0}",loc.data.post_id)),current_page=String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("account/"),current_page),""),current_page=(_html=(_html=(_html=new String)+"<div class='generic_message'><h3>Your session has timed out!</h3>"+"<p>You'll need to log back in if you want your work to be saved and you wish to continue your session. </p>")+String.format("<ul class='modal_bottom'><li><a class='btn' href='{0}?return_url={1}'>Log in now</a></li></ul></div>",GLOBALS.PUBLISH_ROOT_PATH.append("login"),current_page),new Quick_Modal({appendTo:"core77",close_off:!0}));current_page.set_form_width(500),current_page.set_content(_html),current_page.draw_overlay()}else if("-2"==_str||-2==_str){loading.remove();var current_page=$("#user_name").val()||"",current_page=-1<current_page.indexOf("@")?current_page:"",_html=new String,_resend_widget_id=(_html=(_html=(_html=(_html+="<div class='branded_modal'><h3>K</h3><h4 id='context_specific_header'>Hang on...</h4>")+"<p id='context_specific_messaging'>You can't access your Core77 account until you activate it. Check for a link in the email we sent you when you first created your account. If you can't find that email, please enter your email address below and click \"Resend My Activation Link\".</p>"+"<div id='form_wrap'><label for='your_email'>Email<em id='user_activate_email_error'></em></label><input type='text' id='user_activate_email' value='' />")+"<div id='resend_recaptcha' style='margin: 15px 0;'></div>"+"<span id='resend_recaptcha_error' class='text-danger' style='display:none; color:#c00;'>Please complete the captcha.</span>")+String.format("<ul class=''><li><a id='resend_activation_code' class='btn' href='#'>Resend My Activation Link</a></li></ul></div></div>",""),General.is_null_empty_undefined(loc.register_modal)||(loc.register_modal.remove_overlay(),loc.register_modal=null),General.is_null_empty_undefined(loc.log_in_modal)||(loc.log_in_modal.remove_overlay(),loc.log_in_modal=null),loc.register_modal=new Quick_Modal({appendTo:"core77"}),loc.register_modal.set_form_width(500),loc.register_modal.set_content(_html),loc.register_modal.draw_overlay(),$("#user_activate_email").val(current_page).on("focus.resend_activation click.resend_activation keyup.resend_activation",function(event){$(this).removeClass("error"),$("#user_activate_email_error").text("").removeClass("error")}),null);!function _render_resend_captcha(){"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.render?_resend_widget_id=grecaptcha.render("resend_recaptcha",{sitekey:$("#recaptcha_v2_site_key").val()}):setTimeout(_render_resend_captcha,100)}(),$("#resend_activation_code").live("click.resend_activation",function(event){var captcha_token=null!==_resend_widget_id&&"undefined"!=typeof grecaptcha?grecaptcha.getResponse(_resend_widget_id):"";if(!captcha_token)return $("#resend_recaptcha_error").show(),!1;""!=$("#user_activate_email").val()?$.post(GLOBALS.PUBLISH_ROOT_PATH_SECURE.append("home/resend-activation-code"),{email:$("#user_activate_email").val(),"g-recaptcha-response":captcha_token},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?(message_slider("Check your email we've just sent another activation email!"),$("#resend_activation_code").die("click.resend_activation"),$("#user_activate_email").die("click.resend_activation"),loc.register_modal.remove_overlay()):($("#user_activate_email").addClass("error"),$("#user_activate_email_error").text(General.error_text.email_not_exist).addClass("error"),"undefined"!=typeof grecaptcha&&null!==_resend_widget_id&&grecaptcha.reset(_resend_widget_id))}):$("#user_activate_email").addClass("error").prev().find("em").text("Please enter an email address").addClass("error")})}else{var aquire_email;if("-3"!=_str&&-3!=_str)return"2"==_str||2==_str?(loading.remove(),null==Cookie.read("email_remind_later")&&(_html=new String,_html+="<div class='branded_modal'><h3>K</h3><h4 id='context_specific_header'>Something's missing...</h4><p id='context_specific_messaging'>Adding an email address will allow you to access your account in the event <span style='text-decoration: line-through;'>of total anarchy</span> your social credentials don't work.</p><div class='form_wrap'><label for='your_email'>Email<em></em></label><input type='text' id='user_aquired_email' value='' /><ul class=''><li class='left'><a id='complete_email' class='btn' href='#'>Complete</a></li><li class='left'><a class='btn secondary_action' id='email_remind_later' href='#'>Remind me later</a></li></ul></div></div>",(aquire_email=new Quick_Modal({appendTo:"core77"})).set_form_width(500),aquire_email.set_content(_html),aquire_email.draw_overlay(),$("#email_remind_later").live("click.email_remind",function(event){Cookie.create("email_remind_later",!0,7),$("#user_aquired_email").die("click.email_remind"),$("#complete_email").die("click.email_remind"),aquire_email.remove_overlay()}),$("#user_aquired_email").live("click.email_remind",function(event){$("#user_activate_email").removeClass("error").prev().find("em").text("").removeClass("error")}),$("#complete_email").live("click.email_remind",function(event){""!=$("#user_aquired_email").val()?GLOBALS.IS_LOGGED_IN&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("home/settings_change_email"),{new_email:$("#user_aquired_email").val()},function(data){1==(data=General.parse_json_if_needed(data)).status||"ok"==data.status?(message_slider(General.success_text.email_updated),Cookie.erase("needs_valid_email"),$("#email_remind_later").die("click.email_remind"),$("#user_aquired_email").die("click.email_remind"),aquire_email.remove_overlay()):alert("There was an error, please contact support")}):$("#user_aquired_email").addClass("error").prev().find("em").text("Please enter an email address").addClass("error")})),!0):"ok"==_str||1==_str;Shell_Base.proceed_log_out()}},General.parse_json_if_needed=function(_str){return null!=_str.status?_str:$.parseJSON(_str)},General.is_in_folder=function(_folder_name){return window.location.toString().split("//")[1].split("/")[1]==_folder_name},General.plural_handler=function(count,word,plural_chars,plural_word){return General.is_null_empty_undefined(plural_chars)&&(plural_chars="s"),General.is_null_empty_undefined(plural_word)&&(plural_word=""),1===count?word:General.is_null_empty_undefined(plural_word)?word+plural_chars:plural_word},General.default_text={join_now_modal_header:"Join Now",join_now_modal_message:"Create a Core77 Account",sign_in_modal_header:"Sign In",sign_in_modal_message:"",join_modal_header_comment:"Join Now",join_modal_message_comment:"To post a comment please create a Core77 Account",sign_in_modal_header_comment:"Sign In",sign_in_modal_message_comment:"To post a comment to Core77 please Sign In"},General.error_text={email_not_exist:"That email is not in our system"}
1,General.success_text={award_post_vote:"Thank you for voting!",post_recommends:"You have favorited this post",channel_subscribes:"You have subscribed to this channel",user_subscribes:"You have subscribed to this user",post_feature:"The post has been featured",must_read:"This post is now a must read",post_sponsor:"The post is now flagged as a Sponsored post",comment_up_vote:"Comment up voted",comment_down_vote:"Comment down voted",comment_reported_as_spam:"Comment reported",comment_make:"Your comment has been added",logged_in_success:"You are now logged in",log_out_success:"You are now logged out",channel_info_saved:"The Channel has been updated",post_omit:"The post has been omitted from your selected channels",post_unpublished:"The post has been unpublished from the selected channels",post_unomit:"The post has been reset to pending from your selected channels",post_saved:"You have saved",post_auto_saved:"Saved",profile_auto_saved:"Saved",award_entry_saved:"You have saved this award entry",avatar_upload:"Your Avatar has been uploaded",profile_image_upload:"Your profile logo has been uploaded",lead_image_upload:"Post Lead Image has been uploaded",user_role_add:"New User Role has been added",user_role_remove:"The User Role has been removed",profile_saved:"Your Profile has been saved",lead_image_uploaded:"The lead image was saved",lead_image_crop:"The lead image was successfully cropped",avatar_image_crop:"Your avatar was successfully cropped",profile_image_crop:"Your profile logo was successfully cropped",comment_denied:"The comment has been denied",comment_approved:"The comment has been approved",title_image_uploaded:"The title image was successfully uploaded",title_image_removed:"The title image was successfully removed",title_video_embed_uploaded:"The title video embed was successfully uploaded",title_video_embed_removed:"The title video embed was successfully removed",spotlight_created_from_title_image:"The spotlight image was successfully created from the title image",pdf_file_uploaded:"The pdf file has been uploaded",video_file_uploaded:"The video file has been uploaded",changed_user:"The author has been changed",post_date_changed:"The published date has been changed",post_scheduled:"The post has been scheduled",channel_added:"Your selected channels have been added",award_status_update:"Award status has been updated",password_updated:"Your password has been updated",design_event_saved:"You have saved this event",community_choice_vote:"Your vote has been cast",community_choice_unvote:"Your vote has been removed",email_updated:"Thanks we've updated your email",newsletter_signup_success:"Thanks your email has been added",manual_new_user_created:"The new user has been created",award_category_added:"You have successfully added the award category",design_guide_upvote:"You have upvoted this design guide"},General.how_many_columns=function(){var window_width=$(window).width();return window_width<=1280?2:window_width<=1580?3:window_width<=1880?4:5},General.user_plog_url=function(_handle){return String.format("{0}users/{1}",GLOBALS.PUBLISH_ROOT_PATH,_handle)},General.is_post_status_queued_scheduled_published=function(_status){return _status==POST_STATUS_TYPES.QUEUED||_status==POST_STATUS_TYPES.SCHEDULED||_status==POST_STATUS_TYPES.PUBLISHED},General.get_key_by_value=function(_obj,value){for(var prop in _obj)if(_obj.hasOwnProperty(prop)&&_obj[prop]===value)return prop},General.image_loaded=function(_obj){var load_img=new Image;load_img.onload=function(){_obj.callback(_obj.$node,_obj.new_img,_obj.$top_parent)},load_img.src=_obj.new_img},General.sanitize_html_out_form_field=function(_filter_selector){var _html=String.format("<div id='sanitize_html'>{0}</div>",$(_filter_selector).val()),_html=($(_html).appendTo($("body")),$("#sanitize_html").text());return $("#sanitize_html").remove(),$(_filter_selector).val(_html),_html},General.sanitize_html_out=function(_html){_html=String.format("<div id='sanitize_html'>{0}</div>",_html),$(_html).appendTo($("body")),_html=$("#sanitize_html").text();return $("#sanitize_html").remove(),_html},General.wrap_and_reset_form=function(_elem){_elem.wrap("<form>").closest("form").get(0).reset(),_elem.unwrap()},General.get_current_server_time=function(){var offset=(new Date).dst()?-4:-5,clientDate=new Date,clientDate=clientDate.getTime()+6e4*clientDate.getTimezoneOffset();return new Date(clientDate+36e5*offset)},General.get_time_in_24_clock=function(time){var hour,hold_time;if(/(PM|AM)/gi.test(time))return hold_time=(hold_time=time.split(" "))[0].split(":"),/PM/gi.test(time)?hour=parseInt(hold_time[0])+12:/AM/gi.test(time)&&(hour=12==parseInt(hold_time[0])?0:hold_time[0]),{hours:hour,minutes:hold_time[1]};printf(time,"wrong time format")},General.end_datetime_before_start_datetime=function(start_date,start_time,end_date,end_time){var start_date=start_date.clean_white_space().split("/"),start_time=General.get_time_in_24_clock(start_time.clean_white_space()),event_start=new Date(start_date[2],start_date[0]-1,start_date[1],start_time.hours,start_time.minutes,0,0),start_date=end_date.clean_white_space().split("/"),start_time=General.get_time_in_24_clock(end_time.clean_white_space());return new Date(start_date[2],start_date[0]-1,start_date[1],start_time.hours,start_time.minutes,0,0)<event_start},General.event_type_as_string=function(type){var result="";switch(type){case EVENT_TYPES.COMPETITION:result="competition";break;case EVENT_TYPES.CONFERENCE:result="conference";break;case EVENT_TYPES.EXHIBITION:result="exhibition";break;case EVENT_TYPES.CLASS_WORKSHOP:result="class / workshop";break;case EVENT_TYPES.TRADE_SHOW_FAIR:result="trade show / fair";break;case EVENT_TYPES.PRESENTATION_DISCUSSION:result="presentation / discu
1ssion";break;case EVENT_TYPES.OPENING_PARTY:result="opening / party"}return result},General.functionality_for_specific_users=function(valid_users){return valid_users.contains(parseInt(GLOBALS.USER_SESSION.id))},General.randomBase=function(min,max){return Math.random()*(max-min)+min},General.randomPos=function(max,offset){return offset=General.is_null_empty_undefined(offset)?0:offset,Math.floor(General.randomBase(0-offset,max+offset))},General.from_side_list=["from_top","from_right","from_bottom","from_left"],General.generate_random_XY_off_screen=function(shape,from,dimension){var temp,start_point=new Coordinates,end_point=new Coordinates,old_from="";switch(new RegExp("from_in_place").test(from)&&(from=(temp=from.split("*"))[0],old_from=temp[1]),from){case"from_top":end_point.set({x:General.randomPos($(window).width()),y:$(window).height()}),start_point.set({x:General.randomPos($(window).width()),y:-1*dimension.height});break;case"from_right":end_point.set({x:-1*dimension.width-$(window).width(),y:General.randomPos($(window).height())}),start_point.set({x:$(window).width(),y:General.randomPos($(window).height())});break;case"from_bottom":end_point.set({x:General.randomPos($(window).width()),y:-1*dimension.height-$(window).height()}),start_point.set({x:General.randomPos($(window).width()),y:-1*dimension.height});break;case"from_left":end_point.set({x:$(window).width(),y:General.randomPos($(window).height())}),start_point.set({x:-1*dimension.width,y:General.randomPos($(window).width())});break;case"from_in_place":for(var truncated_from_side_list=[],k=0;k<General.from_side_list.length;k++)General.from_side_list[k]!=old_from&&truncated_from_side_list.push(General.from_side_list[k]);printf(_from=truncated_from_side_list[Math.floor(General.randomBase(0,3))]);var random_end_point=General.generate_random_XY_off_screen(null,_from,dimension);from=_from,random_end_point.end_point.x<0?random_end_point.end_point.x+=shape.x1:random_end_point.end_point.x-=shape.x1,random_end_point.end_point.y<0?random_end_point.end_point.y+=shape.y1:random_end_point.end_point.y-=shape.y1,end_point.set({x:random_end_point.end_point.x,y:random_end_point.end_point.y}),start_point.set({x:shape.x1,y:shape.y1})}return{start_point:start_point,end_point:end_point,from:from}},General.resolve_url=function(_url,force_https){null==force_https&&(force_https=!1);var _return="";return General.is_null_empty_undefined(_url)||(_return=/https?:\/\//.test(_url)?_url:_url.prepend("http://")),_return=force_https&&_url!=_return?_return.replace("http://","https://"):_return},General.is_chrome=function(){var isChromium=window.chrome,winNav=window.navigator,vendorName=winNav.vendor,isOpera=-1<winNav.userAgent.indexOf("OPR"),isIEedge=-1<winNav.userAgent.indexOf("Edge"),winNav=winNav.userAgent.match("CriOS")||null!=isChromium&&"Google Inc."===vendorName&&0==isOpera&&0==isIEedge?!0:!1;return winNav},General.get_chrome_version=function(){var raw=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return!!raw&&parseInt(raw[2],10)},General.scroll_to_top=function(){$("html, body").animate({scrollTop:0},"slow")},General.scroll_to_data_goto=function(data_goto,offset){offset=null!=offset?offset:0,data_goto=$(String.format("[data-goto={0}]",data_goto)).offset().top-offset;$("html, body").animate({scrollTop:data_goto},200)},General.scroll_to_top_non_main_frame=function($node,offset){$node.animate({scrollTop:0-(null!=offset?offset:0)},200)},General.scroll_to_data_goto_non_main_frame=function(data_goto,$node,offset){offset=null!=offset?offset:0,data_goto=$(String.format("[data-goto={0}]",data_goto)).offset().top-offset;$node.animate({scrollTop:data_goto},200)},General.linear_convert=function(_obj){return _obj.current_number*_obj.max_scaled_number/_obj.max_current_number},General.getCoordinatesForPercent=function(percent){return new Coordinates({x:Math.cos(2*Math.PI*percent),y:Math.sin(2*Math.PI*percent)})},General.is_inline_level_node=function(_obj){General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["jquery_element","exact_to_check"]));var _unit="";return General.is_null_empty_undefined(_obj.jquery_element)?General.is_null_empty_undefined(_obj.exact_to_check)||(_unit=_obj.exact_to_check):null==(_unit=_obj.jquery_element.context.localName)&&(_unit=_obj.jquery_element.context.nodeName),General.is_compare_logic(_unit,["b","i","em","strong","a","span","strike","#text","B","I","EM","STRONG","A","SPAN","STRIKE","#TEXT"],"||")},General.replace_node_with_new_node_type=function($current_node_,_clone_id,_new_node_type){var current_id=General.is_null_empty_undefined($current_node_.attr("id"))?General.get_unique_id():$current_node_.attr("id"),_filtered_id=current_id,_clone_id=(/_c_c*?$/.test(current_id)&&(_filtered_id=_filtered_id.replace(/_c_c.*/,"")),String.format("{0}_c",_filtered_id)),current_id=$current_node_[0].innerHTML,_filtered_id=String.format("<{0} id='{1}'>{2}</{0}>",_new_node_type,_clone_id,current_id);return $(_filtered_id).insertBefore($current_node_),$current_node_.remove(),_clone_id},General.remove_rangy_node_and_clean_out_anomaly=function(_str){_str=_str.replace(/<(\/?span).*?>/gi,"");return 1==_str.length&&null==_str[1]?"":_str},General.make_empty_p_tag_with_br_and_id=function(_id){return null==_id&&(_id=General.get_unique_id()),String.format("<p id='{0}'><br></p>",_id)}
1,General.p_added_for_space=function(_id){return null==_id&&(_id=General.get_unique_id()),{html:String.format("<p id='{0}'><br></p>",_id),id:_id}},General.flash_class_add=function($this,classname,_interval){$this.addClass(classname),setTimeout(function(){$this.removeClass(classname)},_interval)},General.new_tab_link_override=function(_link,_same_tab){(_same_tab?$(String.format("<a href='{0}'></a>",_link)):$(String.format("<a href='{0}' target='blank'></a>",_link)))[0].click()},General.is_class_property=function(_item){return"function"!=typeof _item},{LOG:"log",ERROR:"error"});function printf(to_print,title,type){type=null!=type?type:CONSOLE_TYPES.LOG;var a_sub_dom_dom=window.location.hostname.split(".");/dev2|dev/.test(a_sub_dom_dom[0])&&(type==CONSOLE_TYPES.ERROR&&(window.console&&window.console.error?(title=null!=title?title:"",window.console.error(to_print,title)):type=CONSOLE_TYPES.LOG),type==CONSOLE_TYPES.LOG)&&window.console&&window.console.log&&(null!=title&&window.console.log("----------- "+title+" ----------"),window.console.log(to_print))}function message_slider(_message,has_error,is_yield){clearTimeout(General.message_slider_timeout);var class_add=(has_error=null!=has_error&&has_error)?"error":"",class_add=(is_yield=null!=is_yield&&is_yield)?"!":class_add,_icon=has_error?"!":"n",_icon=is_yield?"yield":_icon,_html=String.format("<div class='message_slider {0}'><p>",class_add);if(_message instanceof Array)for(var k=0;k<_message.length;k++)_html+=String.format("<span class='c77_icon'>{0}</span>{1}",_icon,_message[k]),k<_message.length-1&&(_html+="<br/>");else"string"==typeof _message&&(_html+=String.format("<span class='c77_icon'>{0}</span>{1}",_icon,_message));_html+="</p></div>",$(_html).appendTo("body"),setTimeout(function(){$(".message_slider").addClass("show_message"),has_error||is_yield||(message_slider.message_slider_timeout=setTimeout(function(){message_slider.close()},4e3))},200)}message_slider.close=function(){$(".message_slider").removeClass("show_message"),$(".message_slider").remove()};var COOKIE_MODE={FULL_DATA:0,C77DA_2017:1};function isIE(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");return 0<msie||navigator.userAgent.match(/Trident.*rv\:11\./)?printf("IE"+parseInt(ua.substring(msie+5,ua.indexOf(".",msie)))):msie=!1,msie}var Cookie={create:function(name,value,days,domain){days=days?((date=new Date).setTime(date.getTime()+24*days*60*60*1e3),"; expires="+date.toGMTString()):"";var date="domain=.core77.com;";domain&&(date="domain=."+domain+".com;"),document.cookie=name+"="+escape(value)+days+";"+date+"path=/"},read:function(name){for(var nameEQ=name+"=",ca=document.cookie.split(";"),k=0;k<ca.length;k++){for(var c=ca[k];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(nameEQ))return unescape(c.substring(nameEQ.length,c.length))}return null},erase:function(name){Cookie.create(name,"",-1)},campaign_tracker:function(_obj){var cookie_mode=General.is_null_empty_undefined(_obj.cookie_mode)?COOKIE_MODE.FULL_DATA:_obj.cookie_mode,cookie_length=General.is_null_empty_undefined(_obj.cookie_length)?180:_obj.cookie_length,current_cookie=General.is_null_empty_undefined(Cookie.read(_obj.cookie_name))?"":unescape(Cookie.read(_obj.cookie_name)),utm_source=$("#utm_source").val(),utm_medium=$("#utm_medium").val(),utm_term=$("#utm_term").val(),utm_content=$("#utm_content").val(),utm_campaign=$("#utm_campaign").val(),cookie_data="";cookie_mode==COOKIE_MODE.FULL_DATA?(cookie_data=General.is_null_empty_undefined(utm_source)?"":String.format("source={0}",utm_source),cookie_data=(cookie_data=(cookie_data=(cookie_data=(cookie_data=(cookie_data=(cookie_data=(cookie_data+=General.is_null_empty_undefined(cookie_data)||"&"==cookie_data.charAt(cookie_data.length-1)?"":"&")+(General.is_null_empty_undefined(utm_medium)?"":String.format("medium={0}",utm_medium)))+(General.is_null_empty_undefined(cookie_data)||"&"==cookie_data.charAt(cookie_data.length-1)?"":"&"))+(General.is_null_empty_undefined(utm_term)?"":String.format("term={0}",utm_term)))+(General.is_null_empty_undefined(cookie_data)||"&"==cookie_data.charAt(cookie_data.length-1)?"":"&"))+(General.is_null_empty_undefined(utm_content)?"":String.format("content={0}",utm_content)))+(General.is_null_empty_undefined(cookie_data)||"&"==cookie_data.charAt(cookie_data.length-1)?"":"&"))+(General.is_null_empty_undefined(utm_campaign)?"":String.format("campaign={0}",utm_campaign)),General.is_null_empty_undefined(current_cookie)||(cookie_data=(cookie_data+=General.is_null_empty_undefined(cookie_data)||"&"==cookie_data.charAt(cookie_data.length-1)?"":"&")+(General.is_null_empty_undefined(utm_medium)?"":"multi=true"))):cookie_mode==COOKIE_MODE.C77DA_2017&&(cookie_data=General.is_null_empty_undefined(current_cookie,",")?"":current_cookie,cookie_data+=General.is_null_empty_undefined(cookie_data)?"":",",General.is_null_empty_undefined(document.referrer)||document.referrer,cookie_data+=General.is_null_empty_undefined(utm_campaign)?document.referrer:utm_campaign),General.is_null_empty_undefined(cookie_data,"multi=true")||Cookie.create(_obj.cookie_name,cookie_data,cookie_length)}},loading={create:function($context,new_inline_version){var mode=General.is_null_empty_undefined($context)?"global":"local",node_selector=($context="local"==mode?$context:$("body"),"local"==mode?"class=":"id="),_html="";(new_inline_version=!General.is_null_empty_undefined(new_inline_version)&&new_inline_version)?(new_inline_version=$(".flex_col").width()/4,_html=(_html+="<div class='inline_loader'><span>Loading...</span>")+String.format("<svg version='1.1' class='' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='{0}px' height='{1}px' viewBox='0 0 {0} {1}' enable-background='new 0 0 {0} {1}' xml:space='preserve'>",new_inline_version,50)+"<circle class='circle_1' fill='#00FFFF' cx='12.5' cy='15' r='12.5'/><rect class='rectangle_1' x='34.315' y='3' fill='#00FFFF' width='24' height='24'/><polygon class='triangle_1' fill='#00FFFF' points='67.63,27 81.486,3 95.342,27 '/>
1<circle class='circle_2' fill='#00FFFF' cx='117.157' cy='15' r='12.5'/><rect class='rectangle_2' x='138.973' y='3' fill='#00FFFF' width='24' height='24'/><polygon class='triangle_2' fill='#00FFFF' points='172.287,27 186.144,3 199.999,27 '/></svg></div>"):(_html=String.format("<div {0}'{1}_loader_wrapper'><div {0}'{1}_loader'>",node_selector,mode),_html+="<svg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 350 252' enable-background='new 0 0 350 252' xml:space='preserve'> <path id='f_h_7_1' fill-rule='evenodd' clip-rule='evenodd' fill='none' stroke='#f60' stroke-width='8' d='M162.981,12.604 c0.547-0.026,1.095-0.05,1.645-0.073c7.631,11.345,13.44,24.521,18.982,37.961c-9.577,24.652-20.68,47.763-32.783,69.88 c2.805,7.835,10.41,10.864,12.074,19.845c-8.573,1.771-16.492,4.211-25.017,6.04c-19.157,28.006-35.576,58.748-57.806,83.682 c-13.215,2.602-24.748,6.878-40.544,6.903c11.459-21.813,27.887-45.843,39.836-70.155'/> <path id='f_h_7_2' fill-rule='evenodd' clip-rule='evenodd' fill='none' stroke='#f60' stroke-width='8' d='M79.368,166.687 c0.238-0.484,0.474-0.969,0.708-1.453c-4.829-8.976-11.881-15.72-17.255-24.156c9.478-5.195,21.264-8.069,32.784-11.216 c10.562-17.908,17.591-39.346,25.022-60.389c-27.025,1.735-53.306,11.68-78.506,18.116c1.72-16.969,5.309-32.07,8.62-47.45 c32.812-13.784,67.757-25.428,112.241-27.534'/> <path id='s_h_7_1' fill-rule='evenodd' clip-rule='evenodd' fill='none' stroke='#f60' stroke-width='8' d='M220.367,170.945 c0.402-0.754,0.802-1.508,1.197-2.261c-5.766-8.324-11.316-16.864-17.254-25.02c9.275-5.1,22.275-6.48,33.647-9.491 c8.636-16.66,15.796-34.813,22.421-53.488c-24.772-0.32-49.957,6.388-73.324,10.353c2.42-16.277,6.498-30.896,10.355-45.724 c27.854-11.028,60.743-17.04,97.827-18.839'/> <path id='s_h_7_2' fill-rule='evenodd' clip-rule='evenodd' fill='none' stroke='#f60' stroke-width='8' d='M295.237,26.476 c1.032-0.05,2.068-0.097,3.107-0.141c5.818,14.013,20.16,26.865,19.852,43.137c-0.187,8.879-7.639,21.362-12.091,30.194 c-4.947,9.864-9.8,19.104-14.657,26.744c4.006,7.502,11.165,11.845,12.939,21.569c-10.181,1.033-18.425,4.014-27.603,6.04 c-13.158,20.059-27.876,45.435-44.009,66.429c-4.753,6.193-11.396,15.972-17.246,18.979c-10.508,5.391-24.1,4.163-38.83,6.041 c13.02-23.022,30.084-49.037,43.667-74.523'/> <path id='bgd_1' fill-rule='evenodd' clip-rule='evenodd' fill='#303743' d='M164.626,11.531c7.631,11.345,13.44,24.521,18.982,37.961 c-9.577,24.652-20.68,47.763-32.783,69.88c2.805,7.835,10.41,10.864,12.074,19.845c-8.573,1.771-16.492,4.211-25.017,6.04 c-19.157,28.006-35.576,58.748-57.806,83.682c-13.215,2.602-24.748,6.878-40.544,6.903c11.688-22.248,28.543-46.801,40.544-71.608 c-4.829-8.976-11.881-15.72-17.255-24.156c9.478-5.195,21.264-8.069,32.784-11.216c10.562-17.908,17.591-39.346,25.022-60.389 c-27.025,1.735-53.306,11.68-78.506,18.116c1.72-16.969,5.309-32.07,8.62-47.45C83.956,25.185,119.357,13.425,164.626,11.531z'/> <path id='bgd_2' fill-rule='evenodd' clip-rule='evenodd' fill='#303743' d='M298.345,25.335c5.818,14.013,20.16,26.865,19.852,43.137 c-0.187,8.879-7.639,21.362-12.091,30.194c-4.947,9.864-9.8,19.104-14.657,26.744c4.006,7.502,11.165,11.845,12.939,21.569 c-10.181,1.033-18.425,4.014-27.603,6.04c-13.158,20.059-27.876,45.435-44.009,66.429c-4.753,6.193-11.396,15.972-17.246,18.979 
1c-10.508,5.391-24.1,4.163-38.83,6.041c13.405-23.704,31.099-50.58,44.864-76.784c-5.766-8.324-11.316-16.864-17.254-25.02 c9.275-5.1,22.275-6.48,33.647-9.491c8.636-16.66,15.796-34.813,22.421-53.488c-24.772-0.32-49.957,6.388-73.324,10.353 c2.42-16.277,6.498-30.896,10.355-45.724C226.039,32.979,259.989,26.944,298.345,25.335z'/> </svg></div></div>"),$(_html).appendTo($context).addClass("fade_in"),isIE()?$("#global_loader").addClass("IE_animate"):($context.find("#f_h_7_1").attr({class:"path"}),$context.find("#f_h_7_2").attr({class:"path2"}),$context.find("#s_h_7_1").attr({class:"path"}),$context.find("#s_h_7_2").attr({class:"path2"}),$context.find("#bgd_1").attr({class:"bgd"}),$context.find("#bgd_2").attr({class:"bgd"}))},remove:function($context){("local"==(General.is_null_empty_undefined($context)?"global":"local")?($context.find("div.local_loader_wrapper").remove(),$context.find(".inline_loader")):$("div#global_loader_wrapper")).remove()},update_progress:function(_percent,$context){var mode=General.is_null_empty_undefined($context)?"global":"local",class_or_id=($context="local"==mode?$context:$("body"),"local"==mode?".":"#"),class_or_id_text="local"==mode?"class":"id",mode=$(String.format("{0}{1}_loader_wrapper",class_or_id,mode)),class_or_id_text=(0==$context.find($(String.format("{0}loader_progress_wrap",class_or_id))).length&&(class_or_id_text=String.format("<div {0}='loader_progress_wrap'>",class_or_id_text),class_or_id_text+="<div class='loader_progress_bg'><span class='progress_bar'></span></div><span class='progress_text'>0%</span></div>",$(class_or_id_text).appendTo(mode)),parseInt(_percent)<100?parseInt(_percent)+"%":"Processing...");$context.find($(String.format("{0}loader_progress_wrap .progress_bar",class_or_id))).css({width:_percent+"%"}),$context.find($(String.format("{0}loader_progress_wrap .progress_text",class_or_id))).text(class_or_id_text)}},GLOBALS=function(){},Rebrandly=(GLOBALS.ROOT_PATH=$("#root_path").val(),GLOBALS.SECURE_ROOT_PATH=$("#secure_root_path").val(),GLOBALS.PUBLISH_ROOT_PATH_SECURE=$("#publish_root_path_secure").val(),GLOBALS.WEB_ROOT_PATH_SECURE=$("#web_root_path_secure").val(),GLOBALS.STATIC_ROOT_PATH=$("#static_root_path").val(),GLOBALS.PUBLISH_ROOT_PATH=$("#publish_root_path").val(),GLOBALS.WEB_ROOT_PATH=$("#web_root_path").val(),GLOBALS.AWARDS_ROOT_PATH=$("#awards_root_path").val(),GLOBALS.IS_LOGGED_IN="true"==$("#is_logged_in").val(),GLOBALS.PROFILE_COMPLETE="true"==$("#is_profile_complete").val(),GLOBALS.USER_SESSION=new User({name:GLOBALS.IS_LOGGED_IN?$("#session_name").val():"",avatar:GLOBALS.IS_LOGGED_IN?$("#session_avatar").val():"",link:GLOBALS.IS_LOGGED_IN?$("#session_link").val():"",id:GLOBALS.IS_LOGGED_IN?$("#session_id").val():""}),GLOBALS.SESSION_COOKIE_NAME=$("#session_c_name").val(),GLOBALS.COOKIE_CODEX_NAME=$("#sso_c_name").val(),GLOBALS.PAGE_SIZE=35,GLOBALS.PAGE_WIDTH_BOUNDRY=1100,GLOBALS.C77DA_COOKIE_NAME="c77da_2017_campaign",GLOBALS.COMMENT_ON_COOKIE="c77_comments_on",GLOBALS.COOKIE_POLICY_ACCEPT="accept_cookie_policy",GLOBALS.POSTLET_WIDGET_PLACEMENT_IN_LIST=parseInt($("#postlet_widget_placement_in_list").val()),GLOBALS.POSTLET_COUNT_PAGE_1=parseInt($("#postlet_count_page_1").val()),GLOBALS.PUBLISHED_POST_COUNT_PAGE_1=parseInt($("#published_post_count_page_1").val()),GLOBALS.REBRANDLY_API_KEY="37a39e55be034041894920adc5549c96",GLOBALS.REBRANDLY_WORKSPACE_ID="b4708ef76de241a0bfda6ef4d28375b1",GLOBALS.REBRANDLY_DOMAIN_NAME="c77.in",function(){}),DESIGN_DIRECTORY_AD_PLACEMENT=(Rebrandly.get_shortened_link=function(_add_loading,_url,_clbk){_add_loading&&loading.create();var _url={destination:_url,domain:{fullName:GLOBALS.REBRANDLY_DOMAIN_NAME}},requestHeaders={"Content-Type":"application/json",apikey:GLOBALS.REBRANDLY_API_KEY,workspace:GLOBALS.REBRANDLY_WORKSPACE_ID};$.ajax({url:"https://api.rebrandly.com/v1/links",type:"post",data:JSON.stringify(_url),headers:requestHeaders,dataType:"json",success:function(link){_add_loading&&loading.remove(),printf(String.format("Long URL was {0}}, short URL is {1}",link.destination,link.shortUrl)),_clbk(link.shortUrl)},fail:function(){_add_loading&&loading.remove(),_clbk("")}})},{tile:0,design_firms:1,footer:2}),USER_OBJECT_XREF_TYPES={channel_subscribes:1,user_subscribes:2,post_recommends:3,post_feature:4,post_sponsor:5,post_comment:6,must_read:7,design_event_save:8,award_post_vote:9,gift_guide_vote:10,design_guide_upvote:11},POST_STATUS_TYPES={NONE:0,DRAFT:1,QUEUED:2,PENDING:3,SCHEDULED:4,PUBLISHED:5,REJECTED:6}
1,CHANNEL_UPDATE_STATUS={REMOVE:0,ADD:1},AWARD_CATEGORIES={Consumer_Product:1,Commercial_Equipment:2,Furniture_n_Lighting:3,Built_Environment:4,Visual_Communication:5,Packaging:6,Interaction:7,Service_Design:8,Transportation:9,Design_for_Social_Impact:10,Design_Education_Initiative:11,Strategy_n_Research:12,Open_Design:14,Design_Concept:15,Health_n_Wellness:16,Home_n_Living:17,Sports_n_Recreation:18,Tools_n_Work:19,Consumer_Technology:20,Personal_Accessory:21,Crowdfunding:22,Speculative_Design:23,Apps_n_Platforms:24,A_s_V_n_Photography_Equipment:25,Branding_n_Identity:26,Emerging_Technologies:27,Gaming:28,Robotics:29,Sports_n_Outdoors:30,Sustainability:31,Tools:32,Toys_n_Play:33,Lifestyle_Accessories:34},AWARD_CATEGORIES_SERVICE={current:null,names:{},load:function(_callback){var loc=this;null!=loc.current?_callback():$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/get_award_categories"),{},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?(loc.current=data.data.current,$.each(data.data.all,function(index,val){loc.names[this.id]=this.name})):loc.current=[],_callback()}).fail(function(){loc.current=[],_callback()})},name_for:function(_id){return null!=this.names[_id]?this.names[_id]:null!=(_id=General.get_key_by_value(AWARD_CATEGORIES,_id))?_id.replace(/_n_/gi," & ").replace(/_s_/gi,"/").replace(/_/gi," "):""}},POST_TYPES={NONE:0,BLOG:1,GALLERY:2,CALENDAR:3,JOB_OF_THE_DAY:4,PROJECT:5,AWARDS:6,GIFT_GUIDE:7,SPONSORED_TILE:8,POSTLET:11,PROFILE_FIRM_PROJECT:15},EVENT_TYPES={NONE:0,EVENT:1,COMPETITION:2,CONFERENCE:3,EXHIBITION:4,CLASS_WORKSHOP:5,TRADE_SHOW_FAIR:6,PRESENTATION_DISCUSSION:7,OPENING_PARTY:8},VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET={ALL:0,ONLY_READY:1,ONLY_COMING_SOON:2},VIRTUAL_STUDENT_SHOW_SORT_BY={ALPHA_SCHOOL_SHOW:0,OPENING_DATE:1},DESIGN_FIRM_SORT_BY={NONE:0,NAME:1,LAST_UPDATED:2},FLEX_STOPS={UP_3:985,UP_2:685,UP_1:400,get_stop:function(){var window_width=$(window).width();return $("#core77").hasClass("max_UP_2")?window_width>FLEX_STOPS.UP_3||window_width>FLEX_STOPS.UP_2?{str:"up_2",tracker:3}:{str:"up_1",tracker:4}:window_width>FLEX_STOPS.UP_3?{str:"up_3",tracker:4}:window_width>FLEX_STOPS.UP_2?{str:"up_2",tracker:3}:{str:"up_1",tracker:4}},layout:{sterilize:function($this){$this.find(".exception_ad").remove(),$this.find(".exception").remove(),$this.find("> li").removeClass("mod_1 mod_2 mod_1_r mod_2_r col_300 tall end_row"),$this.find("> li:not(.placeholder_zone) > div").removeClass()},create_jotd_exception:function(_target){var exception_class_add=String.format("exception_{0}","core77_jotd"),original_id=String.format("#{0}","core77_jotd"),exception_class_add=($(_target).addClass(exception_class_add),String.format("<li class='exception_jotd' id='{0}_clone'>{1}</li>","core77_jotd",$(original_id).html()));$(exception_class_add).insertAfter($(_target))},create_exception:function(_target,_index,_context){var exception_class_add=String.format("exception_{0}",_context[_index]),original_id=String.format("#{0}",_context[_index]),exception_class_add=($(_target).addClass(exception_class_add),$(original_id).html()),original_id=($(original_id).attr("data-include-promo-zone-at-bottom"),String.format("<li class='exception' id='{0}_clone'>{1}</li>",_context[_index],exception_class_add));$(original_id).insertBefore($(_target))},create_ad_exception:function(_target,type){new String;if("in_content"==type){new String;for(var _custom_in_content_ad_pages=AD_ZONES.specific_zones,k=0;k<_custom_in_content_ad_pages.length;k++)$("#core77").hasClass(_custom_in_content_ad_pages[k])&&_custom_in_content_ad_pages[k];type=String.format("<div class='adlet_zone_public_wrap'>{0}</div>",$(".adlet_zone_public_wrap").html()),type=String.format("<li class='exception_ad ad_zone_add_in'>{0}</li>",type);$(type).insertAfter($(_target))}},induce_pattern_location:{spot_0:function(pattern_spot,inner_count,pattern_run_count){return 2==pattern_spot&&0==inner_count&&0==pattern_run_count},spot_1:function(pattern_spot,inner_count,pattern_run_count){return 3==pattern_spot&&0==inner_count&&0==pattern_run_count},spot_2:function(pattern_spot,inner_count,pattern_run_count){return 2==pattern_spot&&0==inner_count&&1==pattern_run_count},spot_3:function(pattern_spot,inner_count,pattern_run_count){return 0==pattern_spot&&0==inner_count&&2==pattern_run_count}},init:function(_clbk,induce_ad){var this_get_stop=FLEX_STOPS.get_stop(),pattern_run_count=0,ul_count=0,exception_node_list=new Array;$(".exception_source[data-exception-source=true]").each(function(index,val){exception_node_list.push($(this).attr("id"))}),$("iframe.page_up_ad").length;$("ul.golden_layout").each(function(index,val){var _html,$ul,inner_count,inner_pattern_run_count,pattern_spot,exception_number;$(this).hasClass(FLEX_STOPS.get_stop().str)||($(this).removeClass("up_1 up_2 up_3"),$("#core77").hasClass("permalink")||(_html=new String,($ul=$(this)).find(".ad_exception_row > div.post_exception_div").each(function(index,val){_html+=String.format("<li>{0}</li>",$(this).html())}),$(_html).insertBefore($ul.find(".ad_exception_row")),$ul.find(".ad_exception_row").remove(),$ul.find(".placeholder_li").remove()),FLEX_STOPS.layout.sterilize($(this)),$(this).addClass(FLEX_STOPS.get_stop().str),inner_pattern_run_count=inner_count=pattern_spot=0,$("#core77").hasClass("permalink")&&(pattern_spot=[1,3][Math.floor(2*Math.random())]),exception_number=0,$(this).find("> li").each(function(index,val){var pattern_name=FLEX_STOPS.layout.pattern[pattern_spot],pattern_name=FLEX_STOPS.layout[pattern_name][this_get_stop.str][inner_count],$li=$(this);$li.addClass(pattern_name[0]),0<exception_node_list.length&&0==ul_count&&exception_number<exception_node_list.length&&$.each(FLEX_STOPS.layout.induce_pattern_location,function(index,val){this(pattern_spot,inner_count,pattern_run_count)&&(FLEX_STOPS.layout.create_exception($li,exception_number,exception_node_list),exception_number++)}),(index+1)%this_get_stop.tracker==0&&0<index?(pattern_run_count=pattern_spot<FLEX_STOPS.layout.pattern.length-1?pattern_run_count:pattern_run_count+1,inner_pattern_run_count=pattern_spot<FLEX_STOPS.layout.pattern.length-1?inner_pattern_run_count:inner_pattern_run_count+1,pattern_spot=pattern_spot<FLEX_STOPS.layout.pattern.length-1?pattern_spot+1:0,inner_count=0):inner_count++})),ul_count++}),General.is_valid_callback(_clbk)&&_clbk()},pattern:["mod_2_r","mod_1_r","mod_2","mod_1"],mod_1:{up_3:[["mod_1 col_300 tall"],["mod_1 col_300 tall"],["mod_1 col_300 tall"],["mod_1 col_300 tall"]],up_2:[["mod_1 col_300 tall"],["mod_1 col_300 tall"],["mod_1 col_300 tall"]],up_1:[["mod_1 col_300 tall"],["mod_1 col_300 tall"],["mod_1 col_300 tall"],["mod_1 col_300 tall"]]},mod_1_r:{up_3:[["mod_1_r col_300 tall"],["mod_1_r col_300 tall"],["mod_1_r col_300 tall"],["mod_1_r col_300 tall"]],up_2:[["mod_1_r col_300 tall"],["mod_1_r col_300 tall"],["mod_1_r col_300 tall"]],up_1:[["mod_1_r col_300 tall"],["mod_1_r col_300 tall"],["mod_1_r col_300 tall"],["mod_1_r col_300 tall"]]},mod_2:{up_3:[["mod_2 col_300 tall"],["mod_2 col_300 tall"],["mod_2 col_300 tall"],["mod_2 col_300 tall"]],up_2:[["mod_2 col_300 tall"],["mod_2 col_300 tall"],["mod_2 col_300 tall"]],up_1:[["mod_2 col_300 tall"],["mod_2 col_300 tall"],["mod_2 col_300 tall"],["mod_2 col_300 tall"]]},mod_2_r:{up_3:[["mod_2_r col_300 tall"],["mod_2_r col_300 tall"],["mod_2_r col_300 tall"],["mod_2_r col_300 tall"]],up_2:[["mod_2_r col_300 tall"],["mod_2_r col_300 tall"],["mod_2_r col_300 tall"]],up_1:[["mod_2_r col_300 tall"],["mod_2_r col_300 tall"],["mod_2_r col_300 tall"],["mod_2_r col_300 tall"]]}}},KEYS={backspace:8,spacebar:32,tab:9,enter:13,shift:16,shift:function(e){return e.shiftKey||16==e.which},ctrl:17,alt:18,caps_lock:20,escape:27,page_up:33,page_down:34,end:35,home:36,left_arrow:37,up_arrow:38,right_arrow:39,down_arrow:40,insert:45,del:46,left_cmd:91,right_cmd:92,select:93,comma:188,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,quote:222,s
1ave:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||83!=c)},undo:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(122==c||90==c)||e.shiftKey)},valid_keyset_for_undo_start:function(e){return!(KEYS.undo(e)||KEYS.redo(e)||KEYS.ctrl_cmd(e)||e.ctrlKey||e.metaKey||e.shiftKey||91==e.which||18==e.which)},redo:function(e){var c=e.keyCode,ctrlDown=e.ctrlKey||e.metaKey;return!!(e.shiftKey&&ctrlDown&&(122==c||90==c)||ctrlDown&&(121==c||89==c))},paste:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||86!=c)},copy:function(which){return 91==which&&67==which||92==which&&67==which},cut:function(which){return 91==which&&88==which||92==which&&88==which},all:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||65!=c)},bold:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(98==c||66==c))},italic:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(105==c||73==c))},link:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(108==c||76==c))},blockquote:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(222==c||192==c)||e.shiftKey)},pullquote:function(e){var c=e.keyCode;return!!((e.ctrlKey||e.metaKey)&&(222==c||192==c)&&e.shiftKey)},strikethrough:function(e){var c=e.keyCode;return!(!(e.ctrlKey||e.metaKey)||!(107==c||75==c))},soft_return:function(e){var c=e.keyCode;return!(!e.shiftKey||c!=this.enter)},prev_word_select:function(e){var c=e.keyCode,ctrlDown=e.ctrlKey||e.metaKey;return!(!e.shiftKey||!ctrlDown||c!=this.left_arrow)},next_word_select:function(e){var c=e.keyCode,ctrlDown=e.ctrlKey||e.metaKey;return!(!e.shiftKey||!ctrlDown||c!=this.right_arrow)},arrow_select:function(e){var c=e.keyCode,shiftDown=e.shiftKey;e.ctrlKey||e.metaKey;return!!(shiftDown&&c==this.left_arrow||shiftDown&&c==this.right_arrow||shiftDown&&c==this.up_arrow||shiftDown&&c==this.down_arrow)},ctrl_cmd:function(e){return e.ctrlKey||e.metaKey||91==e.which||92==e.which}},Selection={rangy_saveSelection:function(){return $(".rangySelectionBoundary").remove(),null!=rangy.saveSelection?{saved_selection:rangy.saveSelection(),saved_active_element:document.activeElement}:null},rangy_restoreSelection:function(_obj){_obj.saved_selection&&rangy.restoreSelection(_obj.saved_selection,!0)},rangy_select_all_text:function(_obj){var el="",range=(General.is_null_empty_undefined(_obj.id)?General.is_null_empty_undefined(_obj.actual_element)||(el=_obj.actual_element):el=document.getElementById(_obj.id),rangy.createRange()),el=(range.selectNodeContents(el),rangy.getSelection());el.setSingleRange(range),_obj.is_default||(General.is_null_empty_undefined(_obj.collapse_to_end)?el.collapseToStart():el.collapseToEnd())},get_selection_info:function(){var selection,rect,range,_ret={top_left:new Coordinates,content:new String,parent:new String};return window.getSelection?((selection=window.getSelection()).rangeCount&&(range=selection.getRangeAt(0).cloneRange()).getClientRects&&(null!=(rect=range.getClientRects()[0])&&(_ret.top_left.set({x:rect.left,y:rect.top}),_ret.parent=range.startContainer),_ret.parent=General.is_inline_level_node({exact_to_check:range.startContainer.nodeName})?range.startContainer.parentNode:range.startContainer),_ret.content=selection.toString()):document.selection&&(range=document.selection.createRange(),_ret.top_left.set({x:range.boundingLeft,y:range.boundingTop}),_ret.parent=range.parentElement,_ret.content=document.selection.createRange().text),_ret},get_actual_focus_node_rare_usage:function(){var focus_node,selection;return window.getSelection&&(selection=window.getSelection(),General.is_null_empty_undefined(selection.anchorNode)||(focus_node=selection.focusNode)),focus_node},get_focus_node:function(){var focus_node,selection;return window.getSelection&&(selection=window.getSelection(),General.is_null_empty_undefined(selection.anchorNode)||(focus_node="#text"==selection.focusNode.nodeName?selection.focusNode.parentNode:selection.focusNode)),focus_node},is_range:function(){if(window.getSelection)return!window.getSelection().isCollapsed},is_caret:function(){if(window.getSelection)return window.getSelection().isCollapsed},get_all_selected_nodes:function(){var result=[];if(window.getSelection){var sel=window.getSelection();if(sel.rangeCount){for(var _block_level_parent=(selRange=sel.getRangeAt(0)).commonAncestorContainer;_block_level_parent&&General.is_inline_level_node({jquery_element:$(_block_level_parent)});)_block_level_parent=_block_level_parent.parentElement;for(var _nodes_list=_block_level_parent.childNodes,start_container=selRange.startContainer;start_container&&General.is_inline_level_node({jquery_element:$(start_container)});)start_container=start_container.parentElement;for(var end_container=selRange.endContainer;end_container&&General.is_inline_level_node({jquery_element:$(end_container)});)end_container=end_container.parentElement;var is_started=!1,is_ended=!1;null!=$(start_container).attr("data-editor")&&(start_container=selRange.startContainer,is_started=!0),null!=$(end_container).attr("data-editor")&&(end_container=selRange.endContainer,is_started=!0);for(var k=0;k<_nodes_list.length;k++){var _this_child=_nodes_list[k];_this_child==start_container&&(is_started=is_started||!0),General.is_compare_logic(_this_child.nodeName,["#text","DIV","div"],"||")||General.is_inline_level_node({exact_to_check:_this_child.localName})||is_started&&!is_ended&&result.push(_this_child),_this_child==end_container&&is_started&&!is_ended&&(is_ended=!0)}return result}document.selection&&document.selection.type}},is_spanning_multi_nodes:function(){var sel,result=!1;return window.getSelection&&((sel=window.getSelection()).rangeCount?(selRange=sel.getRangeAt(0),result=(testRange=selRange.cloneRange()).startContainer!=testRange.endContainer):document.selection&&document.selection.type),result},get_start_end_offset:function(){var result=!1;if(window.getSelection){var sel=window.getSelection();if(sel.rangeCount){selRange=sel.getRangeAt(0),testRange=selRange.cloneRange();var _node=("#text"==sel.anchorNode.localName||"#text"==sel.anchorNode.nodeName?sel.anchorNode.parentElement:sel.anchorNode).localName,_data=null!=sel.anchorNode.data?sel.anchorNode.data:sel.anchorNode.innerHTML,_focus_node=focus_node="#text"==sel.anchorNode.nodeName.toString()?sel.focusNode.parentNode:sel.focusNode,_offset=("span"!=_node||$(_focus_node).hasClass("caption")||(_focus_node=sel.focusNode.parentNode.parentNode),0),text_offset=0;if(/^(text|#text|a|b|i)$/.test(sel.anchorNode.localName)||/^(text|#text|a|b|i)$/.test(sel.anchorNode.nodeName))for(var _found=!1,k=0;k<sel.anchorNode.parentNode.childNodes.length;k++){var _that=sel.anchorNode.parentNode.childNodes[k],check_text=null!=_that.data?_that.data:_that.innerHTML;check_text==_data||_found||(text_offset+=check_text.length),(check_text=null!=_that.outerHTML?_that.outerHTML:check_text)==_data||_found?_found=!0:_offset+=check_text.length}result={start:testRange.startOffset+_offset,end:testRange.endOffset+_offset,data:_data,node:_node,is_cursor:sel.isCollapsed,focus_node:_focu
1s_node,text_start:testRange.startOffset+text_offset,text_end:testRange.startOffset+text_offset}}else document.selection&&document.selection.type}return result},restore_selection_new:function(_obj){var _unique_id,_node=$(String.format("#{0}",$(_obj.focus_node).attr("id"))).get(0);0==_obj?(_unique_id=General.get_unique_id(),$($("#post > p").get(0)).attr({id:_unique_id}),_node=$(String.format("#{0}",_unique_id)).get(0)):null==_node&&(_node=$(String.format("#{0}",$($("#post > p").get(0)).attr("id"))).get(0)),Selection.set_selection_range(_node,_obj.text_start,_obj.text_end)},clear_selection:function(){document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges()},select_all_text:function(element){},select_all_text_comments:function(element){var selection,range;document.body.createTextRange?((range=document.body.createTextRange()).moveToElementText(element),range.select()):window.getSelection&&(selection=window.getSelection(),(range=document.createRange()).selectNodeContents(element),selection.removeAllRanges(),selection.addRange(range))},getTextNodesIn:function(node){var textNodes=new Array;if(3==node.nodeType)textNodes.push(node);else for(var children=node.childNodes,i=0;i<children.length;++i)textNodes.push.apply(textNodes,Selection.getTextNodesIn(children[i]));return textNodes},set_selection_range:function(el,start,end){if(document.createRange&&window.getSelection){for(var endCharCount,textNode,range=document.createRange(),textNodes=(range.selectNodeContents(el),Selection.getTextNodesIn(el)),foundStart=!1,charCount=0,i=0;textNode=textNodes[i++];){if(endCharCount=charCount+textNode.length,!foundStart&&charCount<=start&&(start<endCharCount||start==endCharCount&&i<=textNodes.length)&&(range.setStart(textNode,start-charCount),foundStart=!0),foundStart&&end<=endCharCount){range.setEnd(textNode,end-charCount);break}
1charCount=endCharCount}var sel=window.getSelection();sel.removeAllRanges(),sel.addRange(range)}else document.selection&&document.body.createTextRange&&((sel=document.body.createTextRange()).moveToElementText(el),sel.collapse(!0),sel.moveEnd("character",end),sel.moveStart("character",start),sel.select())},get_selection_dimensions:function(){var range,sel=document.selection,width=0,height=0;return sel?"Control"!=sel.type&&(width=(range=sel.createRange()).boundingWidth,height=range.boundingHeight):window.getSelection&&(sel=window.getSelection()).rangeCount&&(range=sel.getRangeAt(0).cloneRange()).getBoundingClientRect&&(width=(sel=range.getBoundingClientRect()).right-sel.left,height=sel.bottom-sel.top),{width:width,height:height}},is_start_end:function(el){var selRange,testRange,sel,atStart=!1,atEnd=!1;return window.getSelection?(sel=window.getSelection()).rangeCount&&((testRange=(selRange=sel.getRangeAt(0)).cloneRange()).selectNodeContents(el),testRange.setEnd(selRange.startContainer,selRange.startOffset),atStart=""==testRange.toString().clean_white_space(),testRange.selectNodeContents(el),testRange.setStart(selRange.endContainer,selRange.endOffset),atEnd=""==testRange.toString().clean_white_space()):document.selection&&"Control"!=document.selection.type&&((testRange=(selRange=document.selection.createRange()).duplicate()).moveToElementText(el),testRange.setEndPoint("EndToStart",selRange),atStart=""==testRange.text,testRange.moveToElementText(el),testRange.setEndPoint("StartToEnd",selRange),atEnd=""==testRange.text),{atStart:atStart,atEnd:atEnd}},replace_selected_text:function(replacementText,focus_node){var range;window.getSelection?(focus_node=focus_node.getSelection()).rangeCount&&((range=focus_node.getRangeAt(0)).deleteContents(),range.insertNode(document.createTextNode(replacementText))):document.selection&&document.selection.createRange&&((range=document.selection.createRange()).text=replacementText)},save_selection:function(){if(window.getSelection){var sel=window.getSelection();if("#text"==sel.anchorNode.nodeName&&General.is_inline_level_node({exact_to_check:sel.anchorNode.parentNode.nodeName})&&printf("we are in an inline element now, so selection will be off from the parent."),sel.getRangeAt&&sel.rangeCount)return sel.getRangeAt(0).cloneRange()}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null},restore_selection:function(range){var sel;range&&(window.getSelection?((sel=window.getSelection()).removeAllRanges(),sel.addRange(range)):document.selection&&range.select&&range.select())},insert_dom_node_at_range:function(node_name,special_class,add_node_here){if(window.getSelection){for(var reset_focus_node=!1,selection=window.getSelection(),range=selection.getRangeAt(0),node_add=document.createElement(node_name),_start_container=("br"!=node_name&&"split"!=node_name||node_add.setAttribute("class",special_class),range.startContainer),_end_container=range.endContainer;_start_container&&General.is_inline_level_node({exact_to_check:_start_container.nodeName});)_start_container=_start_container.parentElement;for(;_end_container&&General.is_inline_level_node({exact_to_check:_end_container.nodeName});)_end_container=_end_container.parentElement;return 0==range.endOffset&&range.startOffset>range.endOffset&&_start_container.nextSibling==_end_container&&(Selection.rangy_select_all_text({collapse_to_end:!0,actual_element:_start_container,is_default:!1}),reset_focus_node=!0,range=(selection=window.getSelection()).getRangeAt(0)),range.deleteContents(),range.insertNode(node_add),range.collapse(!1),range.selectNodeContents(node_add),selection.removeAllRanges(),selection.addRange(range),!!reset_focus_node&&_start_container}}},Post_Data_Base=function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={post_id:null,social_excerpt:null}),this.post_id=General.is_null_empty_undefined(_obj.id)?"":_obj.id,this.social_excerpt=General.is_null_empty_undefined(_obj.social_excerpt)?"":_obj.social_excerpt},Post_Data=(Post_Data_Base.inherits(Object_Base),function(_obj,l_image){Post_Data_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={user_profile:null,post_id:null,title:null,excerpt:null,images:null,lead_image:null,channels:new Array,body_text:null,post_type:null,rss_version:null}),this.user_id=General.is_null_empty_undefined(_obj.user_profile)?"":_obj.user_profile.user_id,this.is_published=!General.is_null_empty_undefined(_obj.published_into_channel)&&_obj.published_into_channel,this.title=General.is_null_empty_undefined(_obj.title)?"":_obj.title,this.subtitle=General.is_null_empty_undefined(_obj.subtitle)?"":_obj.subtitle,this.post_type=General.is_null_empty_undefined(_obj.type)?"":_obj.type,this.excerpt=General.is_null_empty_undefined(_obj.excerpt)?"":_obj.excerpt,this.images=General.is_null_empty_undefined(_obj.images)?[]:_obj.images,General.is_null_empty_undefined(l_image)||General.is_null_empty_undefined(l_image.image)?this.lead_image=_obj.lead_image:this.lead_image=new Image_Crop({src:l_image.image.url,file_id:l_image.image.id,dimension:new Dimensions({width:l_image.image.width,height:l_image.image.height}),crop_rectangle:new Crop_Rectangle({x1:l_image.crop.x1,x2:l_image.crop.x2,y1:l_image.crop.y1,y2:l_image.crop.y2}),crop_source_image:new Image_Base({src:l_image.source.url,file_id:l_image.source.id,dimension:new Dimensions({width:l_image.source.width,height:l_image.source.height})})}),this.channels=new Array;for(var k=0;k<_obj.channels.length;k++)this.channels.push(_obj.channels.id);this.body_text=General.is_null_empty_undefined(_obj.body_text)?"":_obj.body_text,this.rss_version=General.is_null_empty_undefined(_obj.rss_version)?"":_obj.rss_version,this.integration_id=General.is_null_empty_undefined(_obj.integration_id)?"":_obj.integration_id,this.integration_id_content_require_registration_lock=General.is_null_empty_undefined(_obj.integration_id_content_require_registration_lock)?"":_obj.integration_id_content_require_registration_lock,this.webinar_episode_title=General.is_null_empty_undefined(_obj.webinar_episode_title)?"":_obj.webinar_episode_title}),Blog_Post_Data=(Post_Data.inherits(Post_Data_Base),Post_Data.upload_zone_has_content=function(_parent_id){return $("#"+_parent_id).find(".upload_zone").hasClass("has_content")},Post_Data.fn.is_valid=function(){return!0},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)}),Coroflot_Blog_Post_Data=(Blog_Post_Data.inherits(Post_Data),Blog_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On!</h3>"+"<p>Before you submit a post for publication, please complete the following: </p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Post Title</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>
1The Thumbnail Image</li>",is_valid=!1),1==this.channels&&(_html+="<li>Select at least one Channel Tag</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),printf(this),is_valid},function(_obj,l_image){Blog_Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={tags:null,old_url_name:null}),this.tags=General.is_null_empty_undefined(_obj.tags)?"":_obj.tags,this.old_url_name=General.is_null_empty_undefined(_obj.old_url_name)?"":_obj.old_url_name}),Sponsored_Blog_Post_Data=(Coroflot_Blog_Post_Data.inherits(Blog_Post_Data),Coroflot_Blog_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>Before you can submit a Coroflot Blog Post, you need to complete the following: </p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Blog Post Title</li>",is_valid=!1),$("#add_coroflot_blog_post_listing_image").hasClass("has_content")||(_html+="<li>Add a Coroflot Blog Post Listing Image</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Coroflot Blog Post Thumbnail is required</li>",is_valid=!1),General.is_null_empty_undefined(this.excerpt)&&(_html+="<li>The Coroflot Blog Post Excerpt is required</li>",is_valid=!1),General.is_null_empty_undefined(this.tags)&&(_html+="<li>The Coroflot Blog Post Tags are required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Blog_Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={sponsor_name:null,sponsor_details:null,sponsor_link:null}),this.sponsor_name=General.is_null_empty_undefined(_obj.sponsor_name)?"":_obj.sponsor_name,this.sponsor_details=General.is_null_empty_undefined(_obj.sponsor_details)?"":_obj.sponsor_details,this.sponsor_link=General.is_null_empty_undefined(_obj.sponsor_link)?"":_obj.sponsor_link}),Calendar_Post_Data=(Sponsored_Blog_Post_Data.inherits(Blog_Post_Data),function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={event_type:null,event_link:null,start_date:null,start_time:null,end_date:null,end_time:null,address:null,venue_name:null}),this.event_type=General.is_null_empty_undefined(_obj.event_type)?"":_obj.event_type,this.event_link=General.is_null_empty_undefined(_obj.event_link)?"":_obj.event_link,this.start_date=General.is_null_empty_undefined(_obj.start_date)?"":_obj.start_date,this.start_time=General.is_null_empty_undefined(_obj.start_time)?"":_obj.start_time,this.end_date=General.is_null_empty_undefined(_obj.end_date)?"":_obj.end_date,this.end_time=General.is_null_empty_undefined(_obj.end_time)?"":_obj.end_time,this.address=new Address_Base,this.venue_name=General.is_null_empty_undefined(_obj.venue_name)?"":_obj.venue_name}),Design_Event_Post_Data=(Calendar_Post_Data.inherits(Post_Data),function(_obj,l_image){Calendar_Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={neighborhood:null});l_image="";General.is_null_empty_undefined(_obj.neighbourhood)?General.is_null_empty_undefined(_obj.neighborhood)||(l_image=_obj.neighborhood):l_image=_obj.neighbourhood,this.neighborhood=General.is_null_empty_undefined(l_image)?"":l_image}),Image_Collection_Post_Data_Base=(Design_Event_Post_Data.inherits(Calendar_Post_Data),Design_Event_Post_Data.fn.is_valid=function(){var loc=this,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>Before your event is complete, you must fill in the following sections, then you can submit your event! </p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(loc.title,"Untitled")&&(_html+="<li>The Event Title</li>",is_valid=!1),General.is_null_empty_undefined(loc.neighborhood)&&(_html+="<li>Select a Neighborhood</li>",is_valid=!1),General.is_null_empty_undefined(loc.venue_name)&&(_html+="<li>The Venue Name</li>",is_valid=!1),General.is_null_empty_undefined(loc.address.full_location)&&(_html+="<li>The Venue Address</li>",is_valid=!1),General.is_null_empty_undefined(loc.body_text.toString())&&
1(_html+="<li>A Description for your event</li>",is_valid=!1),General.is_null_empty_undefined(loc.event_type,0)&&(_html+="<li>The Event Type</li>",is_valid=!1),General.end_datetime_before_start_datetime(loc.start_date,loc.start_time,loc.end_date,loc.end_time)&&(_html+="<li>The Event End Date must be later than the Event Start Date</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((loc=new Quick_Modal({appendTo:"core77"})).set_content(_html),loc.set_form_width(500),loc.draw_overlay()),is_valid},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={slideshow_id:null}),this.slideshow_id=General.is_null_empty_undefined(_obj.image_collection_id)?new String:_obj.image_collection_id}),Gallery_Post_Data=(Image_Collection_Post_Data_Base.inherits(Post_Data),function(_obj,l_image){Image_Collection_Post_Data_Base.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={address:null}),this.address=new Address_Base}),Project_Post_Base_Data=(Gallery_Post_Data.inherits(Image_Collection_Post_Data_Base),function(_obj,l_image){Image_Collection_Post_Data_Base.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={designer_name:null,project_for:null,external_link:null,overview:null,team_credits:null,details:null}),this.designer_name=General.is_null_empty_undefined(_obj.designer_name)?"":_obj.designer_name,this.project_for=General.is_null_empty_undefined(_obj.award_for)?"":_obj.project_for,this.external_link=General.is_null_empty_undefined(_obj.external_link)?"":_obj.external_link,this.overview=General.is_null_empty_undefined(_obj.overview)?"":_obj.overview,this.team_credits=General.is_null_empty_undefined(_obj.team_credits)?"":_obj.team_credits,this.details=General.is_null_empty_undefined(_obj.details)?"":_obj.details}),Gift_Guide_Post_Data=(Project_Post_Base_Data.inherits(Image_Collection_Post_Data_Base),function(_obj,l_image){Image_Collection_Post_Data_Base.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={keywords:null}),this.keywords=General.is_null_empty_undefined(_obj.keywords)?"":_obj.keywords}),Project_Post_Data=(Gift_Guide_Post_Data.inherits(Image_Collection_Post_Data_Base),Gift_Guide_Post_Data.fn.is_valid=function(){var text_number_arr,error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Gift Guide Title is required</li>",is_valid=!1),$(".gallery_zone li").length<4&&(_html+="<li>You need to upload at least three Gift Guide Items</li>",is_valid=!1),4<=$(".gallery_zone li").length&&(text_number_arr=["First","Second","Third","Forth","Fifth"],$(".gallery_zone li").each(function(index,val){$(this).hasClass("add_new")||(""==$(this).find(".title").text()&&(_html+=String.format("<li>The {0} Gift Guide Item needs to have a title</li>",text_number_arr[index]),is_valid=!1),""==$(this).find(".description").text()&&(_html+=String.format("<li>The {0} Gift Guide Item needs to have a description</li>",text_number_arr[index]),is_valid=!1),""==$(this).find(".link").text()&&(_html+=String.format("<li>The {0} Gift Guide Item needs to have a link</li>",text_number_arr[index]),is_valid=!1),""==$(this).find(".price").text()&&(_html+=String.format("<li>The {0} Gift Guide Item needs to have a price</li>",text_number_arr[index]),is_valid=!1),""==$(this).find(".currency_abbreviation").text()&&(_html+=String.format("<li>The {0} Gift Guide Item needs to have a currency</li>",text_number_arr[index]),is_valid=!1))})),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Project_Post_Base_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={project_type:null,tag:null}),this.project_type=General.is_null_empty_undefined(_obj.project_type)?new String:_obj.project_type,this.tag=General.is_null_empty_undefined(_obj.tag)?new String:_obj.tag}),Profile_Firm_Project_Post_Data=(Project_Post_Data.inherits(Project_Post_Base_Data),Project_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Project Title is required</li>",is_valid=!1),General.is_null_empty_undefined(this.designer_name)&&(_html+="<li>The Designer/Firm name is required</li>",is_valid=!1),General.is_null_empty_undefined(this.overview)&&(_html+="<li>The Project Overview is required</li>",is_valid=!1),!General.is_null_empty_undefined(this.project_type)&&0!=
1parseInt(this.project_type)||(_html+="<li>The Project Type is required</li>",is_valid=!1),1==$(".gallery_zone li").length&&(_html+="<li>You need to upload at least one Project Image</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Project_Post_Base_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={is_public:null,profile_id:null}),this.is_public=General.is_null_empty_undefined(_obj.is_public)?"":_obj.is_public,this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?"":_obj.profile_id,this.designer_name=void 0,this.external_link=void 0,this.overview=void 0,this.specialties=[]}),Virtual_Student_Project_Post_Data=(Profile_Firm_Project_Post_Data.inherits(Project_Post_Base_Data),Profile_Firm_Project_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title)&&(_html+="<li>The Project Title is required</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Project Thumbnail is required</li>",is_valid=!1),1==$(".gallery_zone li").length&&(_html+="<li>You need to upload at least one Project Image</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Project_Post_Base_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={embed_code:null,school_id:null,show_id:null,show_type:null}),this.embed_code=General.is_null_empty_undefined(_obj.embed_code)?"":_obj.embed_code,this.school_id=General.is_null_empty_undefined(_obj.school_id)?0:_obj.school_id,this.show_id=General.is_null_empty_undefined(_obj.show_id)?0:_obj.show_id,this.show_type=General.is_null_empty_undefined(_obj.show_type)?0:_obj.show_type,this.show_type=parseInt(this.show_type)}),Award_Post_Data=(Virtual_Student_Project_Post_Data.inherits(Project_Post_Base_Data),Virtual_Student_Project_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return 2===this.show_type&&General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Project Title is required</li>",is_valid=!1),General.is_null_empty_undefined(this.designer_name)&&(_html+="<li>The Designer/Firm name is required</li>",is_valid=!1),General.is_null_empty_undefined(this.overview)&&(_html+="<li>The Project Overview is required</li>",is_valid=!1),$(".gallery_zone li").length<4&&(_html+="<li>You need to upload at least three Project Images</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Project_Post_Base_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={categories:null,pdf_file_url:null,video_url:null,award_post_entry_type:null,admin_notes:null}),this.categories=new Array,this.award_post_entry_type=General.is_null_empty_undefined(_obj.award_post_entry_type)?new String:parseInt(_obj.award_post_entry_type),this.pdf_file_url=General.is_null_empty_undefined(_obj.pdf_file_url)?new String:_obj.pdf_file_url,this.video_url=General.is_null_empty_undefined(_obj.video_url)?new String:_obj.video_url,this.admin_notes=General.is_null_empty_undefined(_obj.admin_notes)?new String:_obj.admin_notes,this.designer_twitter_handle=General.is_null_empty_undefined(_obj.designer_twitter_handle)?new String:_obj.designer_twitter_handle,this.client_twitter_handle=General.is_null_empty_undefined(_obj.client_twitter_handle)?new String:_obj.client_twitter_handle,this.date_to_market=General.is_null_empty_undefined(_obj.date_to_market)?new String:_obj.date_to_market,this.use_keyshot=General.is_null_empty_undefined(_obj.use_keyshot)?0:parseInt(_obj.use_keyshot),this.use_fusion=General.is_null_empty_undefined(_obj.use_fusion)?0:parseInt(_obj.use_fusion),this.use_stratasys=General.is_null_empty_undefined(_obj.use_stratasys)?0:parseInt(_obj.use_stratasys),this.is_special_prize_eligible=General.is_null_empty_undefined(_obj.is_special_prize_eligible)?0:parseInt(_obj.is_special_prize_eligible)}),Job_Of_The_Day_Post_Data=(Award_Post_Data.inherits(Project_Post_Base_Data),Award_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors' class='award_choices_over'><h3>Incomplete</h3>"+"<p>Your entry must be complete before adding to your cart. Please fill in:</p><ul class='award_error_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Project Title</li>",is_valid=!1),General.is_null_empty_undefined(this.designer_name)&&(_html+="<li>The Designer/Firm name</li>",is_valid=!1),General.is_null_empty_undefined(this.project_for)&&(1==this.award_post_entry_type?_html+="<li>The School Name</li>":_html+="<li>The Client Name</li>",is_valid=!1),General.is_null_empty_undefined(this.overview)&&(_html+="<li>The Project Overview</li>
1",is_valid=!1),General.is_null_empty_undefined(this.details)&&(_html+="<li>The Project Details</li>",is_valid=!1),0==this.categories.length&&(_html+="<li>At least one Category</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Project Thumbnail</li>",is_valid=!1),1==$(".gallery_zone li").length&&(_html+="<li>At least one Project Image</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0})).set_content(_html),error_modal.set_form_width(700),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={job_id:null,company_name:null,job_title:null}),this.company_name=General.is_null_empty_undefined(_obj.company_name)?"":_obj.company_name,this.job_title=General.is_null_empty_undefined(_obj.job_title)?"":_obj.job_title,this.job_id=General.is_null_empty_undefined(_obj.job_id)?"":_obj.job_id,this.job_city=General.is_null_empty_undefined(_obj.job_city)?"":_obj.job_city,this.job_state=General.is_null_empty_undefined(_obj.job_state)?"":_obj.job_state,this.job_country=General.is_null_empty_undefined(_obj.job_country)?"":_obj.job_country}),Sponsored_Tile_Post_Data=(Job_Of_The_Day_Post_Data.inherits(Post_Data),function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={link:null}),this.link=General.is_null_empty_undefined(_obj.link)?"":_obj.link,this.hint=General.is_null_empty_undefined(_obj.hint)?"":_obj.hint}),Postlet_Post_Data=(Sponsored_Tile_Post_Data.inherits(Post_Data),Sponsored_Tile_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Title is required</li>",is_valid=!1),General.is_null_empty_undefined(this.link)&&(_html+="<li>The External Link is required</li>",is_valid=!1),General.is_null_empty_undefined(this.excerpt)&&(_html+="<li>The Tile Excerpt is required</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Tile Thumbnail is required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={source_link:null,source_name:null,postlet_type:null}),this.source_link=General.is_null_empty_undefined(_obj.source_link)?"":_obj.source_link,this.source_link_shortened=General.is_null_empty_undefined(_obj.source_link_shortened)?"":_obj.source_link_shortened,this.source_name=General.is_null_empty_undefined(_obj.source_name)?"":_obj.source_name,this.postlet_type=General.is_null_empty_undefined(_obj.postlet_type)?1:_obj.postlet_type}),Resource_Post_Data=(Postlet_Post_Data.inherits(Post_Data),Postlet_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Title is required</li>",is_valid=!1),General.is_null_empty_undefined(this.source_link)&&(_html+="<li>The Source Link is required</li>",is_valid=!1),General.is_null_empty_undefined(this.source_name)&&(_html+="<li>The Source Name is required</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Tile Thumbnail is required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={source_link:null,source_name:null,postlet_type:null}),this.details=General.is_null_empty_undefined(_obj.details)?"":_obj.details,this.price=General.is_null_empty_undefined(_obj.price)?"":_obj.price,this.currency_abbreviation=General.is_null_empty_undefined(_obj.currency_abbreviation)?"":_obj.currency_abbreviation,this.resource_type=General.is_null_empty_undefined(_obj.resource_type)?0:parseInt(_obj.resource_type),this.urls=General.is_null_empty_undefined(_obj.urls)?"":_obj.urls,this.url=General.is_null_empty_undefined(_obj.url)?"":_obj.url}),Product_Tile_Post_Data=(Resource_Post_Data.inherits(Post_Data),Resource_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Title is required</li>",is_valid=!1),0===parseInt(this.resource_type)&&(_html+="<li>The Resource Type is required</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Tile Thumbnail is required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Post_Data.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={price:null,link:null,category:null}),this.link=General.is_null_empty_undefined(_obj.link)?"":_obj.link,this.price=General.is_null_empty_undefined(_obj.price)?"":_obj.price,this.category=General.is_null_empty_undefined(_obj.category)?"":_obj.category}),Post_Public_Data=(Product_Tile_Post_Data.inherits(Post_Data),Product_Tile_Post_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return General.is_null_empty_undefined(this.title,"Untitled")&&(_html+="<li>The Product Title is required</li>",is_valid=!1),General.is_null_empty_undefined(this.link)&&(_html+="<li>The Product Link is required</li>",is_valid=!1),General.is_null_empty_undefined(this.excerpt)&&(_html+="<li>The Product Excerpt is required</li>",is_valid=!1),General.is_null_empty_undefined(this.price)&&(_html+="<li>The Product Price is required</li>",is_valid=!1),General.is_null_empty_undefined(this.category)&&(_html+="<li>The Product Category is required</li>",is_valid=!1),Post_Data.upload_zone_has_content("lead_image_wrap")||(_html+="<li>The Tile Thumbnail is required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj,l_image){Post_Data_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={legacy_url:null}),this.legacy_url=General.is_null_empty_undefined(_obj.legacy_url)?"":_obj.legacy_url}),Resource_Post_Public_Data=(Post_Public_Data.inherits(Post_Data_Base),function(_obj,l_image){Post_Data_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={owner_id:null,added_by_id:null}),this.owner_id=General.is_null_empty_undefined(_obj.owner_id)?0:_obj.owner_id,this.added_by_id=General.is_null_empty_undefined(_obj.added_by_id)?0:_obj.added_by_id}),Profile_Data_Base=(Resource_Post_Public_Data.inherits(Post_Data_Base),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={profile_id:null}),this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?"":_obj.profile_id}),Firm_Profile_Data=(Profile_Data_Base.inherits(Object_Base),Profile_Data_Base.upload_zone_has_content=function(_parent_id){return!0},function(_obj,l_image){Profile_Data_Base.call(this,_obj,l_image),General.is_null_empty_undefined(_obj)&&(_obj={name:null,description:null,year_founded:null,employees:null,clients:null,affiliations:null}),this.name=General.is_null_empty_undefined(_obj.name)?"":_obj.name,this.main_website=General.is_null_empty_undefined(_obj.main_website)?"":_obj.main_website,this.description=General.is_null_empty_undefined(_obj.description)?"":_obj.description,this.year_founded=General.is_null_empty_undefined(_obj.year_founded)?0:_obj.year_founded,this.employees=General.is_null_empty_undefined(_obj.employees)?"":_obj.employees,this.ga_code=General.is_null_empty_undefined(_obj.ga_code)?"":_obj.ga_code,this.clients=General.is_null_empty_undefined(_obj.clients)?"":_obj.clients,this.affiliations=General.is_null_empty_undefined(_obj.affiliations)?"":_obj.affiliations,this.firm_type=General.is_null_empty_undefined(_obj.firm_type)?0:_obj.firm_type,this.specialties=[]}),Channel_Public_Data=(Firm_Profile_Data.inherits(Profile_Data_Base),Firm_Profile_Data.fn.is_valid=function(){var error_modal,_html=new String,is_valid=(_html=_html+"<div id='post_errors'><h3>Hang On</h3>"+"<p>The following information is required:</p><ul class='bullet_list'>",!0);return 0==this.firm_type&&(_html+="<li>The Company Type is required</li>",is_valid=!1),General.is_null_empty_undefined(this.name)&&(_html+="<li>The Company/Firm Name is required</li>",is_valid=!1),General.is_null_empty_undefined(this.main_website)&&(_html+="<li>The Website is required</li>",is_valid=!1),General.is_null_empty_undefined(this.description)&&(_html+="<li>The About Us is required</li>",is_valid=!1),0==this.year_founded&&(_html+="<li>The Year Founded is required</li>",is_valid=!1),_html+="</ul><ul><li class='quick_m_close'><a class='btn' href='#'>Ok</a></li></ul></div>",is_valid||((error_modal=new Quick_Modal({appendTo:"core77"})).set_content(_html),error_modal.set_form_width(500),error_modal.draw_overlay()),is_valid},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={channel_id:null,name:null,description:null,template:null}),this.channel_id=General.is_null_empty_undefined(_obj.id)?new String:_obj.id,this.name=General.is_null_empty_undefined(_obj.name)?new String:_obj.name,this.description=General.is_null_empty_undefined(_obj.description)?new String:_obj.description,this.template=General.is_null_empty_undefined(_obj.template)?new String:_obj.template,this.number_of_posts=General.is_null_empty_undefined(_obj.number_of_posts)?-1:_obj.number_of_posts,this.number_of_postlets=General.is_null_empty_undefined(_obj.number_of_postlets)?-1:_obj.number_of_postlets}),Channel_Parameters_Data=(Channel_Public_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.page_number=1}),Calendar_Channel_Parameters_Data=(Channel_Parameters_Data.inherits(Object_Base),function(_obj){Channel_Parameters_Data.call(this,_obj),this.type=0,this.id=General.is_null_empty_undefined(_obj.id)?new String:_obj.id}),Gift_Guide_Channel_Parameters_Data=(Calendar_Channel_Parameters_Data.inherits(Channel_Parameters_Data),function(_obj){Channel_Parameters_Data.call(this,_obj),this.sort_by="recent",this.featured=!1,this.keywords=""}),Design_Guide_Channel_Parameters_Data=(Gift_Guide_Channel_Parameters_Data.inherits(Channel_Parameters_Data),Gift_Guide_Channel_Parameters_Data.fn.rewrite_url=function(){var qs="",qs=(qs=(qs=(qs+=1<this.page_number?String.format("{0}page_number={1}",0<"".length?"&":"",this.page_number):"")+(""!=this.sort_by?String.format("{0}sort_by={1}",0<qs.length?"&":"",this.sort_by):""))+("true"==this.featured||this.featured?String.format("{0}featured={1}",0<qs.length?"&":"",this.featured):""))+(""!=this.keywords?String.format("{0}keywords={1}",0<qs.length?"&":"",this.keywords):"");General.is_null_empty_undefined(qs)?window.location.hash="_=_":window.location.hash=qs},function(_obj){Channel_Parameters_Data.call(this,_obj),this.sort_by=parseInt($(".sort_by >
1 li.active").data("sort-by"))}),Project_Channel_Parameters_Data=(Design_Guide_Channel_Parameters_Data.inherits(Channel_Parameters_Data),Design_Guide_Channel_Parameters_Data.fn.rewrite_url=function(){},function(_obj){Channel_Parameters_Data.call(this,_obj),this.sort_by="recent",this.tag=0}),Design_Event_Data_NY=(Project_Channel_Parameters_Data.inherits(Channel_Parameters_Data),Project_Channel_Parameters_Data.fn.rewrite_url=function(){var qs="",qs=(qs=(qs+=1<this.page_number?String.format("{0}page_number={1}",0<"".length?"&":"",this.page_number):"")+("recent"!=this.sort_by?String.format("{0}sort_by={1}",0<qs.length?"&":"",this.sort_by):""))+(0!=this.tag?String.format("{0}tag={1}",0<qs.length?"&":"",this.tag):"");General.is_null_empty_undefined(qs)?window.location.hash="_=_":window.location.hash=qs},function(_obj){Object_Base.call(this,_obj),this.events=[];for(var k=0;k<_obj.event_list.length;k++){var new_obj=new Design_Event_Post_Data(_obj.event_list[k],null);new_obj.address.set_property("address_1",_obj.event_list[k].address.address1),new_obj.address.set_property("city",_obj.event_list[k].address.city),new_obj.address.set_property("state_abbreviation",_obj.event_list[k].address.state_abbreviation),new_obj.address.set_property("country_abbreviation",_obj.event_list[k].address.country_abbreviation),new_obj.address.set_property("zip",_obj.event_list[k].address.zip),new_obj.address.set_property("latitude",_obj.event_list[k].address.latitude),new_obj.address.set_property("longitude",_obj.event_list[k].address.longitude),new_obj.address.set_property("location_string",_obj.event_list[k].address.location_string),this.events.push(new_obj)}}),Plog_Public_Data=function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={user_id:null,name:null,description:null,handle:null,avatar_url:null,title:null}),this.user_id=General.is_null_empty_undefined(_obj.user_id)?new String:_obj.user_id,this.name=General.is_null_empty_undefined(_obj.name)?new String:_obj.name,this.title=General.is_null_empty_undefined(_obj.title)?new String:_obj.title,this.description=General.is_null_empty_undefined(_obj.description)?new String:_obj.description,this.handle=General.is_null_empty_undefined(_obj.handle)?new String:_obj.handle,this.avatar_url=General.is_null_empty_undefined(_obj.avatar_url)?new String:_obj.avatar_url},Active_Channel_Post_Data=(Plog_Public_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={lead_image:null,spotlight_image_small_url:null,title:null,permalink:null,author_name:null}),this.lead_image=General.is_null_empty_undefined(_obj.lead_image)?new String:_obj.lead_image,this.spotlight_image_small_url=General.is_null_empty_undefined(_obj.spotlight_image_small_url)?new String:_obj.spotlight_image_small_url,this.title=General.is_null_empty_undefined(_obj.title)?new String:_obj.title,this.permalink=General.is_null_empty_undefined(_obj.permalink)?new String:_obj.permalink,this.user_profile=General.is_null_empty_undefined(_obj.user_profile)?new String:_obj.user_profile}),Active_Channel_Data=(Active_Channel_Post_Data.inherits(Object_Base),function(_obj){if(Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={channel_id:null,name:null,description:null,template:null}),this.channel_id=General.is_null_empty_undefined(_obj.id)?new String:_obj.id,this.name=General.is_null_empty_undefined(_obj.name)?new String:_obj.name,this.description=General.is_null_empty_undefined(_obj.description)?new String:_obj.description,this.latest_posts=new Array,!General.is_null_empty_undefined(_obj.posts))for(var k=0;k<_obj.posts.length;k++){var p=_obj.posts[k];General.is_null_empty_undefined(p)||this.latest_posts.push(new Active_Channel_Post_Data({lead_image:p.lead_image_url,spotlight_image_small_url:p.spotlight_image_small_url,title:p.title,permalink:p.permalink,user_profile:new User({name:p.user_profile.name,link:GLOBALS.PUBLISH_ROOT_PATH.append("users/"+p.user_profile.handle),id:p.user_profile.user_id})}))}}),Channel_Nav_Data=(Active_Channel_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={channel_id:null,name:null,link:null,width:null}),this.channel_id=General.is_null_empty_undefined(_obj.channel_id)?new String:_obj.channel_id,this.name=General.is_null_empty_undefined(_obj.name)?new String:_obj.name,this.link=General.is_null_empty_undefined(_obj.link)?new String:_obj.link,this.width=General.is_null_empty_undefined(_obj.width)?new String:_obj.width}),Twitter_Embed_Data=(Channel_Nav_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={html:null,id:null}),this.html=General.is_null_empty_undefined(_obj.html)?"":_obj.html,this.id=General.is_null_empty_undefined(_obj.id)?"":_obj.id}),Channel_Nav_Section=(Twitter_Embed_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={contents:null,segment:null}),this.contents=General.is_null_empty_undefined(_obj.contents)?new Array:_obj.contents,this.segment=General.is_null_empty_undefined(_obj.segment)?new Array:_obj.segment,this.container_id=General.is_null_empty_undefined(_obj.container_id)?new String:"#"+_obj.container_id}),Mouse_Select=(Channel_Nav_Section.inherits(Object_Base),Channel_Nav_Section.fn.create_nav_node=function(index,loc){return String.format("<li data-channel-id='{0}'><a href='{1}' class='trans_all'>{2}</a></li>",loc.contents[index].channel_id,loc.contents[index].link,loc.contents[index].name)},Channel_Nav_Section.fn.calculate_segment_array=function(_ul_width){this.set_property("segment",new Array),this.segment.push(0);for(var measure_width=0,k=0;k<this.contents.length;k++)measure_width+this.contents[k].width>_ul_width?(this.segment.push(k),measure_width=0):measure_width+=this.contents[k].width},Channel_Nav_Section.fn.create_nav_in_segments=function(){for(var loc=this,_html=new String,k=0;k<loc.segment.length;k++){_html+="<ul class='trans_all_slow'>";for(var _end=General.is_null_empty_undefined(loc.segment[k+1])?loc.contents.length:loc.segment[k+1],m=loc.segment[k];m<_end;m++)_html+=loc.create_nav_node(m,loc);_html+="</ul>"}if(1<loc.segment.length){_html+="<div class='channel_pager trans_all' id='more_channels'>";
1for(k=0;k<loc.segment.length;k++)_html+="<span class='trans_all'></span>";_html+="</div>"}$(loc.container_id).empty(),$(_html).appendTo($(loc.container_id)),$(loc.container_id.append(" ul")).addClass("next"),$(loc.container_id.append(" ul:first-child")).removeClass("next").addClass("current"),$(loc.container_id.append(" .channel_pager span:first-child")).addClass("current")},function(_obj){this.type=_obj.type,this.value=_obj.value,this.id=_obj.id}),Mouse_Selection_Collection=(Mouse_Select.prototype={set_type:function(val){this.type=val}},function(){this.members=new Array,this.pivot_point=-1,this.direction=new String}),Coordinates=(Mouse_Selection_Collection.prototype={constructor:Mouse_Selection_Collection,set_pivot_point:function(){for(var loc=this,k=0;k<loc.members.length;k++)"normal"!=loc.members[k].type&&"cmd"!=loc.members[k].type||(loc.pivot_point=loc.members[k].value),k==loc.members.length-1&&-1==loc.pivot_point&&"shift"==loc.members[k].type&&(loc.pivot_point=loc.members[k].value)},reset:function(){this.members=new Array},set_direction:function(_val){this.direction=_val},value_exists:function(_val){for(var _return=-1,k=0;k<this.members.length;k++)this.members[k].value==_val&&(_return=k);return _return},add:function(_obj){var _index=this.value_exists(_obj.value);"normal"==_obj.type?(this.reset(),this.members.push(new Mouse_Select(_obj))):-1<_index?"cmd"==_obj.type?this.remove_one(_index):"shift"==_obj.type&&this.members[_index].set_type("shift"):this.members.push(new Mouse_Select(_obj)),this.set_pivot_point()},remove_one:function(index){this.members.splice(index,1)},remove_many_by_value:function(value_array){for(var k=0;k<value_array.length;k++){for(var to_remove=-1,m=0;m<this.members.length;m++)value_array[k]==this.members[m].value&&(to_remove=m);this.remove_one(to_remove)}},get_ids_as_csv_from_selected:function(){for(var _return=new Array,k=0;k<this.members.length;k++)_return.push(this.members[k].id);return _return.join(",")}},function(_obj){Object_Base.call(this,_obj),this.x=null!=_obj?_obj.x:0,this.y=null!=_obj?_obj.y:0}),Dimensions=(Coordinates.inherits(Object_Base),Coordinates.fn.set=function(_obj){this.x=_obj.x,this.y=_obj.y},Coordinates.fn.set_x=function(val){this.x=val},Coordinates.fn.set_y=function(val){this.y=val},Coordinates.fn.get=function(){return this},function(_obj){Object_Base.call(this,_obj),this.width=General.is_null_empty_undefined(_obj)?0:_obj.width,this.height=General.is_null_empty_undefined(_obj)?0:_obj.height}),Crop_Rectangle=(Dimensions.inherits(Object_Base),Dimensions.fn.set=function(_obj){this.width=_obj.width,this.height=_obj.height},Dimensions.fn.set_width=function(val){this.width=val},Dimensions.fn.set_height=function(val){this.height=val},Dimensions.fn.get=function(){return this},Dimensions.fn.is_orientation=function(_check){return _check.toLowerCase()==this.get_orientation()},Dimensions.fn.get_orientation=function(){new String;return this.width>this.height?"landscape":this.height>this.width?"portrait":"square"},Dimensions.fn.priv_landscape_convert=function(converted,con_width,con_height){return converted.width=parseInt(con_height*this.width/this.height),converted.height=con_height,converted.half_remainder=converted.width-con_width<0?0:(converted.width-con_width)/2,converted},Dimensions.fn.priv_portrait_convert=function(converted,con_width,con_height){return converted.width=con_width,converted.height=parseInt(con_width*this.height/this.width),converted.half_remainder=converted.height-con_height<0?0:(converted.height-con_height)/2,converted},Dimensions.fn.linear_convert=function(con_width,con_height){var converted={width:-1,height:-1,half_remainder:-1};return converted=this.is_orientation("landscape")?parseInt(con_height*this.width/this.height)<con_width?this.priv_portrait_convert(converted,con_width,con_height):this.priv_landscape_convert(converted,con_width,con_height):parseInt(con_width*this.height/this.width)<con_height?this.priv_landscape_convert(converted,con_width,con_height):this.priv_portrait_convert(converted,con_width,con_height)},function(_obj){Object_Base.call(this,_obj),this.x1=General.is_null_empty_undefined(_obj)?0:_obj.x1,this.y1=General.is_null_empty_undefined(_obj)?0:_obj.y1,this.x2=General.is_null_empty_undefined(_obj)?0:_obj.x2,this.y2=General.is_null_empty_undefined(_obj)?0:_obj.y2}),Image_Base=(Crop_Rectangle.inherits(Object_Base),Crop_Rectangle.fn.xxxxxxx=function(_obj){},function(_obj){Object_Base.call(this,_obj),this.src=_obj.src,this.file_id=_obj.file_id,this.dimension=_obj.dimension,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?null:_obj.shell_obj}),Image_Crop=(Image_Base.inherits(Object_Base),function(_obj){Image_Base.call(this,_obj),this.crop_rectangle=_obj.crop_rectangle,this.crop_source_image=_obj.crop_source_image}),Avatar_Image=(Image_Crop.inherits(Image_Base),Image_Crop.fn.xxxxxxxxx=function(_prop,_val){this[_prop]=_val},function(_obj){Image_Crop.call(this,_obj)}),Address_Base=(Avatar_Image.inherits(Image_Crop),function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["address_1","city","state_abbreviation","country_abbreviation","zip","latitude","longitude","location_string"])),this.full_location="",this.address_1=General.is_null_empty_undefined(_obj.address_1)?"":_obj.address_1,this.city=General.is_null_empty_undefined(_obj.city)?"":_obj.city,this.state_abbreviation=General.is_null_empty_undefined(_obj.state_abbreviation)?"":_obj.state_abbreviation,this.country_abbreviation=General.is_null_empty_undefined(_obj.country_abbreviation)?"":_obj.country_abbreviation,this.zip=General.is_null_empty_undefined(_obj.zip)?"":_obj.zip,this.latitude=General.is_null_empty_undefined(_obj.latitude)?"":_obj.latitude,this.longitude=General.is_null_empty_undefined(_obj.longitude)?"":_obj.longitude,this.location_string=General.is_null_empty_undefined(_obj.location_string)?"":_obj.location_string}),Value_Text=(Address_Base.inherits(Object_Base),Address_Base.fn.set_property=function(_prop,_val){this[_prop]=_val,this.build_full_location()},Address_Base.fn.build_full_location=function(){var loc=this;loc.full_location=new String,loc.full_location+=General.is_null_empty_undefined(loc.city)?"":String.format("{0}, ",loc.city),loc.full_location+=General.is_null_empty_undefined(loc.state_abbreviation)?"":String.format("{0} ",loc.state_abbreviation),loc.full_location+=General.is_null_empty_undefined(loc.country_abbreviation)?"":String.format("{0} ",loc.country_abbreviation),loc.full_location+=General.is_null_empty_undefined(loc.zip)?"":String.format("{0}",loc.zip)},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj={id:null,value:null,text:null}),this.id=General.is_null_empty_undefined(_obj.id)?"":String.format("#{0}",_obj.id),this.value=General.is_null_empty_undefined(_obj.value)?"":_obj.value,this.text=General.is_null_empty_undefined(_obj.text)?"":_obj.text}),Form_Handling_Base=(Value_Text.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.$form=_obj.$form,General.is_null_empty_undefined(_obj.email)?this.email=new Value_Text:this.email=new Value_Text({id:_obj.email,value:_obj.$form.find("#"+_obj.email).val(),text:_obj.$form.find("#"+_obj.email).prev().find("em").attr("data-default-text")})}),Award_Payment_Billing_Form=(Form_Handling_Base.inherits(Object_Base),Form_Handling_Base.fn.set_error=function(error,_obj,error_txt){error?(this.$form.find(_obj.id).addClass("error"),this.$form.find(_obj.id).parents("li").find("label em").text(error_txt).addClass("error")):(this.$form.find(_obj.id).removeClass("error"),this.$form.find(_obj.id).parents("li").find("label em").text(_obj.text).removeClass("error"))},function(_obj){Form_Handling_Base.call(this,_obj),General.is_null_empty_undefined(_obj.contact_name)?this.contact_name=new Value_Text:this.contact_name=new Value_Text({id:_obj.contact_name,value:_obj.$form.find("#"+_obj.contact_name).val(),text:_obj.$form.find("#"+_obj.contact_name).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.phone)?this.phone=new Value_Text:this.phone=new Value_Text({id:_obj.phone,value:_obj.$form.find("#"+_obj.phone).val(),text:_obj.$form.find("#"+_obj.phone).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.credit_card_number)?this.credit_card_number=new Value_Text:this.credit_card_number=new Value_Text({id:_obj.credit_card_number,value:_obj.$form.find("#"+_obj.credit_card_number).val(),text:_obj.$form.find("#"+_obj.credit_card_number).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.csc)?this.csc=new Value_Text:this.csc=new Value_Text({id:_obj.csc,value:_obj.$form.find("#"+_obj.csc).val(),text:_obj.$form.find("#"+_obj.csc).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.cardholder_name)?this.cardholder_name=new Value_Text:this.cardholder_name=new Value_Text({id:_obj.cardholder_name,value:_obj.$form.find("#"+_obj.cardholder_name).val(),text:_obj.$form.find("#"+_obj.cardholder_name).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.agree_to_release)?this.agree_to_release=new Value_Text:this.agree_to_release=new Value_Text({id:_obj.agree_to_release,value:!_obj.$form.find("#"+_obj.agree_to_release).hasClass("checked"),text:_obj.$form.find("#"+_obj.agree_to_release).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.agree_to_timeframe)?this.agree_to_timeframe=new Value_Text:this.agree_to_timeframe=new Value_Text({id:_obj.agree_to_timeframe,value:!_obj.$form.find("#"+_obj.agree_to_timeframe).hasClass("checked"),text:_obj.$form.find("#"+_obj.agree_to_timeframe).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.address_1)?this.address_1=new Value_Text:this.address_1=new Value_Text({id:_obj.address_1,value:_obj.$form.find("#"+_obj.address_1).val(),text:_obj.$form.find("#"+_obj.address_1).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.city)?this.city=new Value_Text:this.city=new Value_Text({id:_obj.city,value:_obj.$form.find("#"+_obj.city).val(),text:_obj.$form.find("#"+_obj.city).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.zip)?this.zip=new Value_Text:this.zip=new Value_Text({id:_obj.zip,value:_obj.$form.find("#"+_obj.zip).val(),text:_obj.$form.find("#"+_obj.zip).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.country)?this.country=new Value_Text:this.country=new Value_Text({id:_obj.country,value:_obj.$form.find("#"+_obj.country).val(),text:_obj.$form.find("#"+_obj.country).prev().find("em").attr("data-default-text")})}),Adlet_Payment_Billing_Form=(Award_Payment_Billing_Form.inherits(Form_Handling_Base),Award_Payment_Billing_Form.fn.validate=function(){var loc=this,_error=!loc.email.value.is_valid_email();return loc.set_error(_error,loc.email,"Please enter a valid email"),_error=General.is_null_empty_undefined(loc.contact_name.value),loc.set_error(_error,loc.contact_name,"Required"),_error=General.is_null_empty_undefined(loc.phone.value),loc.set_error(_error,loc.phone,"Required"),_error=General.is_null_empty_undefined(loc.credit_card_number.value),loc.set_error(_error,loc.credit_card_number,"Required"),_error=General.is_null_empty_undefined(loc.csc.value),loc.set_error(_error,loc.csc,"Required"),_error=General.is_null_empty_undefined(loc.cardholder_name.value),loc.set_error(_error,loc.cardholder_name,"Required"),_error=loc.agree_to_release.value,loc.set_error(_error,loc.agree_to_release,"Required"),_error=loc.agree_to_timeframe.value,loc.set_error(_error,loc.agree_to_timeframe,"Required"),_error=General.is_null_empty_undefined(loc.address_1.value),loc.set_error(_error,loc.address_1,"Required"),_error=General.is_null_empty_undefined(loc.city.value),loc.set_error(_error,loc.city,"Required"),_error=General.is_null_empty_undefined(loc.zip.value),loc.set_error(_error,loc.zip,"Required"),_error=General.is_null_empty_undefined(loc.country.value),loc.set_error(_error,loc.country,"Required"),!(0<loc.$form.find("input.error").length)},function(_obj){Form_Handling_Base.call(this,_obj),General.is_null_empty_undefined(_obj.contact_name)?this.contact_name=new Value_Text:this.contact_name=new Value_Text({id:_obj.contact_name,value:_obj.$form.find("#"+_obj.contact_name).val(),text:_obj.$form.find("#"+_obj.contact_name).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.company_name)?this.company_name=new Value_Text:this.company_name=new Value_Text({id:_obj.company_name,value:_obj.$form.find("#"+_obj.company_name).val(),text:_obj.$form.find("#"+_obj.company_name).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.phone)?this.phone=new Value_Text:this.phone=new Value_Text({id:_obj.phone,value:_obj.$form.find("#"+_obj.phone).val(),text:_obj.$form.find("#"+_obj.phone).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.credit_card_number)?this.credit_card_number=new Value_Text:this.credit_card_number=new Value_Text({id:_obj.credit_card_number,value:_obj.$form.find("#"+_obj.credit_card_number).val(),text:_obj.$form.find("#"+_obj.credit_card_number).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.csc)?this.csc=new Value_Text:this.csc=new Value_Text({id:_obj.csc,value:_obj.$form.find("#"+_obj.csc).val(),text:_obj.$form.find("#"+_obj.csc).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.cardholder_name)?this.cardholder_name=new Value_Text:this.cardholder_name=new Value_Text({id:_obj.cardholder_name,value:_obj.$form.find("#"+_obj.cardholder_name).val(),text:_obj.$form.find("#"+_obj.cardholder_name).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.link)?this.link=new Value_Text:this.link=new Value_Text({id:_obj.link,value:_obj.$form.find("#"+_obj.link).val(),text:_obj.$form.find("#"+_obj.link).prev().find("em").attr("data-default-text")})}),User_Cred_Base=(Adlet_Payment_Billing_Form.inherits(Form_Handling_Base),Adlet_Payment_Billing_Form.fn.validate=function(){var loc=this,_error=!loc.email.value.is_valid_email();return loc.set_error(_error,loc.email,"Please enter a valid email"),_error=General.is_null_empty_undefined(loc.contact_name.value),loc.set_error(_error,loc.contact_name,"Required"),_error=General.is_null_empty_undefined(loc.company_name.value),loc.set_error(_error,loc.company_name,"Required"),_error=General.is_null_empty_undefined(loc.phone.value),loc.set_error(_error,loc.phone,"Required"),_error=General.is_null_empty_undefined(loc.credit_card_number.value),loc.set_error(_error,loc.credit_card_number,"Required"),_error=General.is_null_empty_undefined(loc.csc.value),loc.set_error(_error,loc.csc,"Required"),_error=General.is_null_empty_undefined(loc.cardholder_name.value),loc.set_error(_error,loc.cardholder_name,"Required"),_error=General.is_null_empty_undefined(loc.link.value),loc.set_error(_error,loc.link,"Required"),!(0<loc.$form.find("input.error").length)},function(_obj){Form_Handling_Base.call(this,_obj),General.is_null_empty_undefined(_obj.username)?this.username=new Value_Text:this.username=new Value_Text({id:_obj.username,value:_obj.$form.find("#"+_obj.username).val(),text:_obj.$form.find("#"+_obj.username).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.password)?this.password=new Value_Text:this.password=new Value_Text({id:_obj.password,value:_obj.$form.find("#"+_obj.password).val(),text:_obj.$form.find("#"+_obj.password).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.return_url)?this.return_url=new Value_Text:this.return_url=new Value_Text({id:_obj.return_url,value:_obj.$form.find("#"+_obj.return_url).val(),text:""})}),User_Cred_Signup=(User_Cred_Base.inherits(Form_Handling_Base),function(_obj){User_Cred_Base.call(this,_obj),General.is_null_empty_undefined(_obj.confirm_password)?this.confirm_password=new Value_Text:this.confirm_password=new Value_Text({id:_obj.confirm_password,value:_obj.$form.find("#"+_obj.confirm_password).val(),text:_obj.$form.find("#"+_obj.confirm_password).prev().find("em").attr("data-default-text")}),General.is_null_empty_undefined(_obj.oauth_object_id
1)?this.oauth_object_id=new Value_Text:this.oauth_object_id=new Value_Text({id:_obj.oauth_object_id,value:_obj.$form.find("#"+_obj.oauth_object_id).val(),text:""}),General.is_null_empty_undefined(_obj.oauth_provider)?this.oauth_provider=new Value_Text:this.oauth_provider=new Value_Text({id:_obj.oauth_provider,value:_obj.$form.find("#"+_obj.oauth_provider).val(),text:""}),General.is_null_empty_undefined(_obj.time_offset_in_ms)?this.time_offset_in_ms=new Value_Text:this.time_offset_in_ms=new Value_Text({id:_obj.time_offset_in_ms,value:_obj.$form.find("#"+_obj.time_offset_in_ms).val(),text:""}),General.is_null_empty_undefined(_obj.source)?this.source=new Value_Text:this.source=new Value_Text({id:_obj.source,value:_obj.$form.find("#"+_obj.source).val(),text:""})}),User_Cred_Login=(User_Cred_Signup.inherits(User_Cred_Base),User_Cred_Signup.fn.get_prop_name=function(_prop,loc){return"user_name"==_prop?loc.username:"user_email"==_prop&&loc.email},User_Cred_Signup.fn.get_params=function(){var loc=this;return{"user.name":loc.username.value,"user.password":loc.password.value,"user.email":loc.email.value,confirm_password:loc.confirm_password.value,new_password:loc.password.value,return_url:loc.return_url.value,"oauth.object_id":loc.oauth_object_id.value,"oauth.provider":loc.oauth_provider.value,time_offset_in_ms:loc.time_offset_in_ms.value,source:loc.source.value,return_via_json:!0}},User_Cred_Signup.fn.validate=function(){var loc=this,_error=(_error=General.is_null_empty_undefined(loc.password.value),loc.set_error(_error,loc.password,"Please enter a password"),_error=loc.password.value!=loc.confirm_password.value,loc.set_error(_error,loc.confirm_password,"Passwords do not match"),_error=!loc.email.value.is_valid_email(),loc.set_error(_error,loc.email,"Please enter a valid email"),General.is_null_empty_undefined(loc.username.value)?(_error=General.is_null_empty_undefined(loc.username.value),loc.set_error(_error,loc.username,"Please enter a username")):(_error=!new RegExp("^[-a-zA-Z0-9_]+$").test(loc.username.value),loc.set_error(_error,loc.username,"Only A - Z, 0 - 9, _ or - are allowed")),loc.$form.attr("id"));return!(0<$(_error+" input.error").length)},function(_obj){User_Cred_Base.call(this,_obj),General.is_null_empty_undefined(_obj.operational_values)?this.operational_values=new Value_Text:this.operational_values=new Value_Text({id:_obj.operational_values,value:_obj.$form.find("#"+_obj.operational_values).val(),text:""})}),Channel=(User_Cred_Login.inherits(User_Cred_Base),User_Cred_Login.fn.get_params=function(){return{"user.name":this.username.value,"user.password":this.password.value,operational_values:this.operational_values.value,return_url:this.return_url.value,return_via_json:!0}},User_Cred_Login.fn.has_operational_values=function(){return!General.is_null_empty_undefined(this.operational_values.value)},User_Cred_Login.fn.validate=function(){var loc=this,_error=General.is_null_empty_undefined(loc.password.value),_error=(loc.set_error(_error,loc.password,"Please enter a password"),_error=!loc.email.value.is_valid_email(),loc.set_error(_error,loc.email,"Please enter a valid email"),_error=General.is_null_empty_undefined(loc.username.value),loc.set_error(_error,loc.username,"Please enter a username"),loc.$form.attr("id"));return!(0<$(_error+" input.error").length)},function(_obj){Object_Base.call(this,_obj),this.id=General.is_null_empty_undefined(_obj)?0:_obj.id,this.name=General.is_null_empty_undefined(_obj)?"":_obj.name,this.status=General.is_null_empty_undefined(_obj)?"":_obj.status,this.is_featured=!General.is_null_empty_undefined(_obj)&&_obj.is_featured,this.is_must_read=!General.is_null_empty_undefined(_obj)&&_obj.is_must_read,this.can_user_manage_channel=!General.is_null_empty_undefined(_obj)&&_obj.can_user_manage_channel}),Image_Selection_Grid=(Channel.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.$this=_obj.$this,this.gallery_selected=new Mouse_Selection_Collection,this.shell_obj=_obj.shell_obj,this.cmd_pressed=!1,this.shift_pressed=!1}),Gallery_Sort_Data=(Image_Selection_Grid.inherits(Object_Base),function(_obj){this.filename=_obj.filename,this.html=_obj.html,this.image_id=_obj.image_id}),Gallery_Base=function(_obj){this.$this=_obj.$this,this.gallery_selected=new Mouse_Selection_Collection,this.shell_obj=_obj.shell_obj,this.cmd_pressed=!1,this.shift_pressed=!1,this.update_url_on=!!General.is_null_empty_undefined(_obj.update_url_on)||_obj.update_url_on},Gallery_Edit=(Gallery_Base.prototype={constructor:Gallery_Base,set_selected:function(){this.$this.find("ul li").removeClass("selected");for(var k=0;k<this.gallery_selected.members.length;k++){var $elem=$(this.$this.find("ul li").get(this.gallery_selected.members[k].value));$elem.hasClass("selected")||$elem.addClass("selected")}this.current_img_id=this.$this.find(".selected").attr("data-gallery-img-id")},update_url:function(loc){}
1,set_slide:function($this,first_set){var animate_to_current=new String,animate_prev_next=new String;$this.hasClass("next")?animate_to_current="from_next":$this.hasClass("prev")&&(animate_to_current="from_prev"),first_set||(animate_prev_next="prev_next_fade"),this.$this.find("ul li").removeClass("prev next curr from_prev from_next prev_next_fade"),$this.addClass("curr "+animate_to_current).prev().addClass("prev "+animate_prev_next).end().next().addClass("next "+animate_prev_next),$this.parent().css({height:$this.find(".slide_wrapper").outerHeight()+"px"}),this.update_url_on&&this.update_url(this)},init:function(){var loc=this;$(".gallery_wrapper").live({keydown:function(e){1==loc.gallery_selected.members.length&&e.which!=KEYS.left_arrow&&e.which!=KEYS.up_arrow&&e.which!=KEYS.right_arrow&&(e.which,KEYS.down_arrow)}}),loc.ext_init()}},function(_obj){Gallery_Base.call(this,_obj),this.slideshow_id=_obj.slideshow_id,this.number_images_to_upload=0,this.number_images_uploaded=0,this.image_limit=General.is_null_empty_undefined(_obj.image_limit)?1e6:_obj.image_limit,this.allow_sort_on_file_name=this.shell_obj.data.post_type!=POST_TYPES.GIFT_GUIDE&&this.shell_obj.data.post_type!=POST_TYPES.AWARDS,this.is_empty=1==this.$this.find("ul.slideshow_ul li").length,this.disable_multi_select=!General.is_null_empty_undefined(_obj.disable_multi_select)&&_obj.disable_multi_select,this.current_img_id=null}),Gallery_Public=(Gallery_Edit.inherits(Gallery_Base),Gallery_Edit.fn.create_gallery_item=function(_obj){var _html=new String,extra_wrap_open_for_relative_positioning=this.shell_obj.data.post_type==POST_TYPES.GIFT_GUIDE?"<div class='relative_wrap move'>":"",extra_wrap_close_for_relative_positioning=this.shell_obj.data.post_type==POST_TYPES.GIFT_GUIDE?"</div>":"";return _html+=String.format("<li data-gallery-img-id='{0}'>{1}<img class='thumb move' data-gallery-thumbnail-id='{2}' src='{3}' />",_obj.file_id,extra_wrap_open_for_relative_positioning,_obj.thumb_id,_obj.thumb_src),0<$("#is_circle_edit").length&&(_html+="<div class='image_info_notify_menu'><span class='has_title'>T</span><span class='has_caption'>C</span><span class='has_credit'>Cr</span></div>"),_html=(_html+="<div class='slide_wrapper'>")+String.format("<img data-gallery-img-id='{0}' data-gallery-img-width='{1}' data-gallery-img-height='{2}' src='{3}' />",_obj.file_id,_obj.file_width,_obj.file_height,_obj.img_src),this.shell_obj.data.post_type==POST_TYPES.GIFT_GUIDE?_html+="<span class='title public_hide'></span><span class='description public_hide'></span><span class='link public_hide'></span><span class='price public_hide'>0</span><span class='currency_abbreviation public_hide'></span>":(this.$this.hasClass("gallery_zone")&&(_html=(_html+=String.format("<span class='credit public_hide'>{0}</span>",Post_Base.defaults.text.credit))+String.format("<span class='title public_hide'>{0}</span>",Post_Base.defaults.text.gallery_image_title)),_html+=String.format("<span class='caption public_hide'>{0}</span>",Post_Base.defaults.text.caption)),_html+="</div>",this.shell_obj.data.post_type==POST_TYPES.GIFT_GUIDE&&(_html+="<div class='replace_gift_guide_image_wrap'><input class='replace_gift_guide_image' type='file' name='fileData' multiple='false' accept='image/*' /></div>"),_html+=String.format("{0}</li>",extra_wrap_close_for_relative_positioning)},Gallery_Edit.fn.can_add_more_images=function(loc){return!!General.is_null_empty_undefined(loc.image_limit)||($(".gallery_zone > ul > li").length-1+loc.number_images_to_upload<=loc.image_limit?(loc.number_images_to_upload!=loc.image_limit&&$(".gallery_zone > ul > li").length-1+loc.number_images_to_upload!=loc.image_limit||$(".gallery_zone > ul > li.add_new").addClass("hide"),!0):($(".gallery_zone > ul > li.add_new").addClass("hide"),!1))},Gallery_Edit.fn.sort_gallery_images=function(loc){for(var li_array=new Array,_add_new=new String,temp_li_array=(loc.$this.find("ul.slideshow_ul li").each(function(index,val){var _visible;$(this).hasClass("add_new")?(_visible=$(this).hasClass("hide")?"hide":"",_add_new=String.format("<li class='add_new {0}'>{1}</li>",_visible,$(this).html())):(_visible=$(this).find(".slide_wrapper img").attr("src").split("/").pop().split("."),li_array.push(new Gallery_Sort_Data({filename:_visible[0],html:String.format("<li data-gallery-img-id='{0}'>{1}</li>",$(this).attr("data-gallery-img-id"),$(this).html()),image_id:$(this).attr("data-gallery-img-id")})))}),li_array.sort(function(a,b){a=a.filename.toUpperCase(),b=b.filename.toUpperCase();
1return a<b?-1:b<a?1:0})),_html=new String,new_sort_order=[],k=0;k<temp_li_array.length;k++)_html+=temp_li_array[k].html,new_sort_order.push(temp_li_array[k].image_id);loc.$this.find("ul").empty(),$(_html+_add_new).appendTo(loc.$this.find("ul")),loc.is_empty=!1,$.post(GLOBALS.ROOT_PATH+"account/slideshow_reorder",{post_id:loc.shell_obj.data.post_id,slideshow_id:loc.slideshow_id,new_order:new_sort_order.toString()},function(){printf("slide order saved")},"json"),loading.remove()},Gallery_Edit.fn.make_upload=function(){var loc=this,_params=($(loc.parent).attr("data-slideshow-id"),{post_id:loc.shell_obj.data.post_id,slideshow_id:loc.slideshow_id,slideshow_maximum_files:loc.image_limit,use_filename:loc.allow_sort_on_file_name,post_type:loc.shell_obj.data.post_type});loc.$this.find("ul li input.add_gallery_img").fileupload({dataType:"json",formData:_params,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){printf(loc.$this.find("ul li input.add_gallery_img").val(),"val from input field image"),General.is_null_empty_undefined(loc.$this.find("ul li input.add_gallery_img").val())||(0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,printf(loc.can_add_more_images(loc),"can add more?"),loc.can_add_more_images(loc)?data.submit():loading.remove())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var _html;loc.number_images_uploaded++,data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?(_html=new String,_html+=loc.create_gallery_item({img_src:data.image.url,thumb_src:data.image.thumbnail.url,file_id:data.image.id,file_width:data.image.width,file_height:data.image.height,thumb_id:data.image.thumbnail.id}),$(_html).insertBefore(loc.$this.find("ul li.add_new")),loc.$this.find("ul li input.add_gallery_img").val("")):alert(data.text),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loc.is_empty||loc.allow_sort_on_file_name&&confirm("Your images have been uploaded! \nWould you like to sort these images and the rest of your current gallery by filename?")?loc.sort_gallery_images(loc):loading.remove()),1<loc.$this.find("ul li").length&&loc.$this.find("ul").removeClass("empty_gallery")}})},Gallery_Edit.fn.update_gallery=function(_obj){var loc=_obj.gallery_class;loc.number_images_uploaded=0;for(var k=loc.number_images_to_upload=0;k<loc.gallery_selected.members.length;k++){var _set_caption,_set_title,_set_credit,$elem=$(loc.$this.find("ul li").get(loc.gallery_selected.members[k].value));"remove"==_obj.action&&$elem.addClass("boonch"),"update"==_obj.action&&(_set_caption=(General.is_null_empty_undefined(_obj.caption)?Post_Base.defaults.text:_obj).caption,_set_title=General.is_null_empty_undefined(_obj.title)?Post_Base.defaults.text.gallery_image_title:_obj.title,_set_credit=(General.is_null_empty_undefined(_obj.credit)?Post_Base.defaults.text:_obj).credit,_obj.multi_edit_mode?(General.is_null_empty_undefined(_obj.title,Post_Base.defaults.text.gallery_image_title)||$elem.find(".title").html(_set_title),General.is_null_empty_undefined(_obj.caption,Post_Base.defaults.text.caption)||$elem.find(".caption").html(_set_caption),General.is_null_empty_undefined(_obj.credit,Post_Base.defaults.text.credit)||$elem.find(".credit").html(_set_credit)):$elem.find(".caption").html(_set_caption).end().find(".credit").html(_set_credit).end().find(".title").html(_set_title),0<$("#is_circle_edit").length)&&(General.is_null_empty_undefined(_obj.caption)||Post_Base.defaults.is_default_text(_obj.caption)?_obj.multi_edit_mode||$elem.find(".image_info_notify_menu .has_caption").removeClass("active"):$elem.find(".image_info_notify_menu .has_caption").removeClass("active").addClass("active"),General.is_null_empty_undefined(_obj.title)||Post_Base.defaults.is_default_text(_obj.title)?_obj.multi_edit_mode||$elem.find(".image_info_notify_menu .has_title").removeClass("active"):$elem.find(".image_info_notify_menu .has_title").removeClass("active").addClass("active"),General.is_null_empty_undefined(_obj.credit)||Post_Base.defaults.is_default_text(_obj.credit)?_obj.multi_edit_mode||$elem.find(".
1image_info_notify_menu .has_credit").removeClass("active"):$elem.find(".image_info_notify_menu .has_credit").removeClass("active").addClass("active")),"update_gift_guide_item"==_obj.action&&$elem.find(".description").html(_obj.description).end().find(".link").html(_obj.link).end().find(".title").html(_obj.title).end().find(".price").html(_obj.price).end().find(".currency_abbreviation").html(_obj.currency_abbreviation)}0<loc.$this.find("ul li.boonch").length&&(loc.$this.find("ul li.boonch").remove(),1==loc.$this.find("ul li").length&&loc.$this.find("ul").addClass("empty_gallery"),1==loc.$this.find("ul li.next").length?loc.set_slide(loc.$this.find("ul li.next"),!1):loc.set_slide(loc.$this.find("ul li.prev"),!1))},Gallery_Edit.fn.ext_init=function(){var loc=this,options=($(".gallery_image_menu div").live({mouseup:function(e){e.stopPropagation();var menu_coords,menu_inst,$this=$(e.target),e="img"!=$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():"",_selection=Selection.get_selection_info();""==_selection.content||Selection.is_caret()||_selection.content==Text_Menu.previous_selection||!$(this).hasClass("caption")&&!$(this).hasClass("credit")?(null!=(menu_inst=loc.shell_obj.get_menu_instance(Menu_Use_Text_Menu))&&menu_inst.close_menu(),Text_Menu.previous_selection=""):(Text_Menu.previous_selection=_selection.content,"post"!=$(e).attr("id")&&(menu_inst=Selection.get_selection_dimensions(),menu_coords=new Coordinates,$this=17<menu_inst.height?$this.width()/2+$this.offset().left:menu_inst.width/2+_selection.top_left.x,menu_coords.set_property("x",$this),menu_coords.set_property("y",_selection.top_left.y+$(document).scrollTop()),menu_inst=new Array,$(this).hasClass("caption")?menu_inst=["bold","link"]:$(this).hasClass("credit")&&(menu_inst=["italic","link"]),$this=new Menu_Use_Text_Menu({actions:menu_inst,coords:menu_coords,parent:$(_selection.parent),focus_node:e,appendTo_id:"body"}),loc.shell_obj.add_menu($this),$this.render()))}}),loc.$this.delegate("ul li",{click:function(e){var $this=$(this);$this.parent().parent().hasClass("slide")&&loc.set_slide($this,!1),$this.hasClass("add_new")&&loc.make_upload()}}),$(window).bind({keydown:function(e){KEYS.ctrl_cmd(e)&&(loc.cmd_pressed=!0),KEYS.shift(e)&&(loc.shift_pressed=!0)},keyup:function(e){KEYS.ctrl_cmd(e)&&(loc.cmd_pressed=!1),KEYS.shift(e)&&(loc.shift_pressed=!1)}}),{cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight",scroll:!1,update:function(event,ui){loc.shell_obj.close_all_other_menus();var new_sort_order=$(this).sortable("toArray",{attribute:"data-gallery-img-id"}).toString();loc.gallery_selected.reset(),loc.set_selected(),$.post(GLOBALS.ROOT_PATH+"account/slideshow_reorder",{post_id:loc.shell_obj.data.post_id,slideshow_id:loc.slideshow_id,new_order:new_sort_order},function(){printf("slide order saved")},"json")}});$(".grid ul").sortable(options),loc.$this.delegate("ul li",{click:function(e){var menu_coords,input_mode,edit_gift_guide_image_menu,$this=$(this),this_index=$(this).index(),this_data_id=$(this).find(".slide_wrapper img").attr("data-gallery-img-id"),remove_list=new Array;if(loc.disable_multi_select)loc.gallery_selected.add({type:"normal",value:this_index,id:this_data_id});else{if(loc.cmd_pressed)loc.gallery_selected.add({type:"cmd",value:this_index,id:this_data_id});else if(loc.shift_pressed&&!loc.cmd_pressed){var last_selected=loc.gallery_selected.members[loc.gallery_selected.members.length-1].value;if(this_index<loc.gallery_selected.pivot_point){loc.gallery_selected.set_direction("backwards");for(var k=1;k<=last_selected-this_index;k++){var _current_value=last_selected-k,new_id=$($this.parent().find("li").get(_current_value)).attr("data-gallery-img-id");loc.gallery_selected.add({type:"shift",value:_current_value,id:new_id})}for(k=0;k<loc.gallery_selected.members.length;k++)"shift"==(member=loc.gallery_selected.members[k]).type&&(member.value>loc.gallery_selected.pivot_point||member.value<this_index)&&remove_list.push(member.value)}else if(this_index>loc.gallery_selected.pivot_point){loc.gallery_selected.set_direction("forwards");for(k=1;k<=this_index-last_selected;k++){_current_value=last_selected+k,new_id=$($this.parent().find("li").get(_current_value)).attr("data-gallery-img-id");loc.gallery_selected.add({type:"shift",value:_current_value,id:new_id})}for(var member,k=0;k<loc.gallery_selected.members.length;k++)"shift"==(member=loc.gallery_selected.members[k]).type&&(member.value<loc.gallery_selected.pivot_point||member.value>this_index)&&remove_list.push(member.value)}else this_index==loc.gallery_selected.pivot_point&&loc.gallery_selected.add({type:"normal",value:this_index,id:this_data_id})}else loc.gallery_selected.add({type:"normal",value:this_index,id:this_data_id});loc.gallery_selected.remove_many_by_value(remove_list)}loc.set_selected(),($this=$(this)).hasClass("add_new")||((menu_coords=new Coordinates).set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()),menu_coords.set_property("y",$this.offset().top),"award_post"==loc.shell_obj.shell_type&&menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()),(loc.$this.hasClass("gift_guide_collection")?(edit_gift_guide_image_menu=new Gift_Guide_Image_Menu({actions:["title","link","description","price","currency_abbreviation","replace_image","apply","remove"],coords:menu_coords,parent:$this.parent(),appendTo_id:"body",update_gallery_func:loc.update_gallery,gallery_class:loc,description:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".description").html():"",link:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".link").html():"",title:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".title").html():"",price:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".price").html():"",currency_abbreviation:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".currency_abbreviation").html():"",image_id:this_data_id,image_ids:loc.gallery_selected.get_ids_as_csv_from_selected(),shell_obj:loc.shell_obj,slideshow_id:loc.slideshow_id,post_type:loc.shell_obj.data.post_type}),loc.shell_obj.add_menu(edit_gift_guide_image_menu),edit_gift_guide_image_menu):(edit_gift_guide_image_menu=[],edit_gift_guide_image_menu=loc.$this.hasClass("gallery_zone")?"virtual_student_project_post"==loc.shell_obj.shell_type?["t
1itle","caption","apply","remove"]:["title","caption","credit","apply","remove"]:["caption","apply","remove"],input_mode=Gallery_Image_Menu.input_mode.wysiwyg,"virtual_student_project_post"==loc.shell_obj.shell_type&&(input_mode=Gallery_Image_Menu.input_mode.wysiwyg),edit_gift_guide_image_menu=new Gallery_Image_Menu({actions:edit_gift_guide_image_menu,coords:menu_coords,parent:$this.parent(),appendTo_id:"body",update_gallery_func:loc.update_gallery,gallery_class:loc,caption:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".caption").html():"",credit:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".credit").html():"",title:1==loc.gallery_selected.members.length?$(loc.$this.find("ul li").get(loc.gallery_selected.members[0].value)).find(".title").html():"",image_id:this_data_id,image_ids:loc.gallery_selected.get_ids_as_csv_from_selected(),shell_obj:loc.shell_obj,slideshow_id:loc.slideshow_id,input_mode:input_mode}),loc.shell_obj.add_menu(edit_gift_guide_image_menu),edit_gift_guide_image_menu)).render())},mousedown:function(e){e.stopPropagation()}})},function(_obj){Gallery_Base.call(this,_obj),this.ad_container_id="ad_frame_wrapper"}),Google_Map_It=(Gallery_Public.inherits(Gallery_Base),Gallery_Public.fn.update_gallery=function(_obj){for(var loc=_obj.gallery_class,k=0;k<loc.gallery_selected.members.length;k++){var $elem=$(loc.$this.find("ul li").get(loc.gallery_selected.members[k].value));"remove"==_obj.action&&$elem.addClass("boonch"),"update"==_obj.action&&$elem.find(".caption").html(_obj.caption).end().find(".credit").html(_obj.credit).end().find(".title").html(_obj.title)}0<loc.$this.find("ul li.boonch").length&&(loc.$this.find("ul li.boonch").remove(),1==loc.$this.find("ul li.next").length?loc.set_slide(loc.$this.find("ul li.next"),!1):loc.set_slide(loc.$this.find("ul li.prev"),!1))},Gallery_Public.fn.load_ad=function(){ga("send","pageview",{hitCallback:function(){}});var image_id=this.$this.find("ul li.curr").attr("data-gallery-img-id");$.post(GLOBALS.WEB_ROOT_PATH.append("home/increment_gallery_image_view"),{image_id:image_id},function(data){})},Gallery_Public.fn.update_url=function(loc){window.location.hash=String.format("image={0}",loc.$this.find("ul li.curr").index()+1)},Gallery_Public.fn.select_from_grid=function($this,loc){$this=$this.parent().parent();$this.removeClass("grid"),$this.addClass("slide"),1==loc.gallery_selected.members.length?loc.set_slide($($this.find("ul li").get(loc.gallery_selected.members[0].value)),!0):1<loc.gallery_selected.members.length?loc.set_slide($($this.find("ul li").get(loc.gallery_selected.pivot_point)),!0):loc.set_slide($($this.find("ul li").get(0)),!0)},Gallery_Public.fn.ext_init=function(){var hash_list,loc=this;printf(loc.$this),loc.$this.delegate("ul.slideshow_ul li",{click:function(e){e.stopPropagation();var this_index,this_data_id,e=$(this);$(this).parent().parent().hasClass("slide")&&!$(this).hasClass("curr")?(loc.set_slide(e,!1),loc.load_ad()):$(this).parent().parent().hasClass("grid")&&($("#core77").addClass("gallery_fullscreen"),$(".gallery_zone").addClass("black"),$("#ad_frame_wrapper").removeClass("hide"),this_index=$(this).index(),this_data_id=$(this).attr("data-gallery-img-id"),loc.gallery_selected.add({type:"normal",value:this_index,id:this_data_id}),loc.set_selected(),loc.select_from_grid(e,loc))}}),Hash_Key_Value_List.key_values_exist()&&(hash_list=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(hash_list.image)||(0<(hash_list=parseInt(hash_list.image))&&hash_list<=loc.$this.find("ul.slideshow_ul li").length?$(loc.$this.find("ul.slideshow_ul li").get(hash_list-1)).click():message_slider("The image does not exist in this collection",!0))),$("body").live({keydown:function(e){$("#core77").hasClass("gallery_fullscreen")&&(e.which==KEYS.left_arrow?$("li.prev").trigger("click"):e.which!=KEYS.up_arrow&&(e.which==KEYS.right_arrow?$("li.next").trigger("click"):e.which!=KEYS.down_arrow&&e.which==KEYS.escape&&$(".gallery_zone").trigger("click")))}})},function(_obj){this.style=General.is_null_empty_undefined(_obj.style)?null:_obj.style,this.id=_obj.id,this.map,this.timeout_recenter,this.marker,this.center=new google.maps.LatLng(_obj.latitude,_obj.longitude),this.zoom=General.is_null_empty_undefined(_obj.zoom)?15:_obj.zoom,this.recenter=!!General.is_null_empty_undefined(_obj.recenter)||_obj.recenter,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?null:_obj.shell_obj,this.marker_path="M16,2C7.715,2,1,8.715,1,17c0,15,15,33,15,33s15-18,15-33C31,8.715,24.284,2,16,2z M16,26c-4.971,0-9-4.03-9-9 c0-4.971,4.029-9,9-9s9,4.029,9,9C25,21.97,20.971,26,16,26z",this.custom_marker=General.is_null_empty_undefined(_obj.custom_marker)?null:_obj.custom_marker,this.custom_marker_active=General.is_null_empty_undefined(_obj.custom_marker_active)?null:_obj.custom_marker_active,this.draw_list=General.is_null_empty_undefined(_obj.draw_list)?null:_obj.draw_list,this.map_control_location=General.is_null_empty_undefined(_obj.map_control_location)?"RIGHT_TOP":_obj.map_control_location,this.bounce_timeout,this.marker_fill_color=General.is_null_empty_undefined(_obj.marker_fill_color)?"#ffa19f":_obj.marker_fill_color,this.marker_stroke_color=General.is_null_empty_undefined(_obj.marker_stroke_color)?"#B63749":_obj.marker_stroke_color,this.marker_scale=General.is_null_empty_undefined(_obj.marker_scale)?1:_obj.marker_scale,this.marker_custom}),Multi_Marker_Map_It=(Google_Map_It.prototype={constructor:Google_Map_It,bounce_marker:function(_time,_marker){clearTimeout(this.bounce_timeout),(_marker=null!=_marker?_marker:this.marker).setAnimation(google.maps.Animation.BOUNCE),this.bounce_timeout=setTimeout(function(){_marker.setAnimation(null)},_time)},pan_zoom_map_to:function(_obj){this.map.setZoom(_obj.zoom),this.map.panTo(new google.maps.LatLng(_obj.latitude,_obj.longitude))},base_setup:function(loc){var isDraggable=480<$(window).width(),isDraggable={zoom:loc.zoom,scrollwheel:!1,draggable:isDraggable,center:loc.center,minZoom:2,mapTypeId:google.maps.MapTypeId.ROADMAP,styles:loc.style,disableDefaultUI:!0,streetViewControl:!0,streetViewControlOptions:{position:google.maps.ControlPosition[loc.map_control_location]},zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL,position:google.maps.ControlPosition[loc.map_control_location]},panControlOptions:{position:google.maps.ControlPosition.RIGHT_CENTER}};return loc.map=new google.maps.Map($("#"+loc.id).get(0),isDraggable),loc.map.get("streetView").setOptions({panControlOptions:{position:google.maps.ControlPosition[loc.map_control_location]},zoomControlOptions:{position:google.maps.ControlPosition[loc.map_control_location]},addressControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM}}),isDraggable},setup:function(loc){loc.base_setup(loc);loc.marker_custom={path:loc.marker_path,fillColor:loc.marker_fill_color,fillOpacity:.9,anchor:new google.maps.Point(17,52),scale:loc.marker_scale,strokeColor:loc.marker_stroke_color,strokeWeight:2},loc.marker=new google.maps.Marker({position:loc.map.getCenter(),icon:loc.marker_custom,map:loc.map,title:"Click to zoom"}),loc.recenter&&google.maps.event.addListener(loc.map,"center_changed",function(){clearTimeout(loc.timeout_recenter),loc.timeout_recenter=setTimeout(function(){loc.map.panTo(loc.marker.getPosition())},2e3)})},init:function(){this.setup(this)}},function(_obj){Google_Map_It.call(this,_obj),this.marker_reference_id=_obj.marker_reference_id,this.marker_secondary_id=General.is_null_empty_undefined(_obj.marker_secondary_id)?null:_obj.marker_secondary_id,this.marker_click_callback_name=_obj.marker_click_callback_name,this.color_by_type=General.is_null_empty_undefined(_obj.color_by_type)?null:_obj.color_by_type,this.shape_by_type=General.is_null_empty_undefined(_obj.shape_by_type)?null:_obj.shape_by_type,this.add_click_listener=!!General.is_null_empty_undefined(_obj.add_click_listener)||_obj.add_click_listener}),Google_API_Base=(Multi_Marker_Map_It.inherits(Google_Map_It),Multi_Marker_Map_It.fn.clear_markers_set_new=function(shell_obj,old_list,reset_center){General.is_null_empty_undefined(reset_center)&&(reset_center=!1),this.map.setZoom(this.zoom),reset_center&&this.map.panTo(this.center),this.shell_obj=shell_obj;for(var k=0;k<old_list.length;k++)null!=old_list[k].marker&&old_list[k].marker.setMap(null);this.set_markers(this)},Multi_Marker_Map_It.fn.set_markers=function(_loc){var marker,prev_marker,loc=_loc,marker_custom=null,marker_custom_active=null;null!=loc.custom_marker&&(marker_custom={path:loc.custom_marker.path,fillColor:loc.custom_marker.fill_color,fillOpacity:loc.custom_marker.opacity,anchor:new google.maps.Point(loc.custom_marker.anchor.x,loc.custom_marker.anchor.y),scale:loc.custom_marker.scale,strokeColor:loc.custom_marker.stroke_color,strokeWeight:loc.custom_marker.stroke_weight}),null!=loc.custom_marker_active&&(marker_custom_active={path:loc.custom_marker_active.path,fillColor:loc.custom_marker_active.fill_color,fillOpacity:loc.custom_marker_active.opacity,anchor:new google.maps.Point(loc.custom_marker_active.anchor.x,loc.custom_marker_active.anchor.y),scale:loc.custom_marker_active.scale,strokeColor:loc.custom_marker_active.stroke_color,strokeWeight:loc.custom_marker.stroke_weight}),$.each(loc.shell_obj[loc.draw_list],function(index,val){var this_obj=this;null!=loc.color_by_type&&General.is_valid_callback(loc.color_by_type)&&(marker_custom.fillColor=loc.color_by_type(this_obj)),null!=loc.shape_by_type&&General.is_valid_callback(loc.shape_by_type)&&(marker_custom.path=loc.shape_by_type(this_obj)),General.is_null_empty_undefined(this_obj.custom_marker)&&(marker_custom.path=this_obj.custom_marker_path),marker=new google.maps.Marker({position:new google.maps.LatLng(this_obj.address.latitude,this_obj.address.longitude),icon:marker_custom,map:loc.map,reference_id:this_obj[loc.marker_reference_id],secondary_id:this_obj[loc.marker_secondary_id]}),this_obj.marker=marker,loc.add_click_listener&&google.maps.event.addListener(marker,"click",(marker=>function(){General.is_null_empty_undefined(prev_marker)||(null!=loc.color_by_type&&General.is_valid_callback(loc.color_by_type)&&(marker_custom.fillColor=loc.color_by_type(prev_marker)),null!=loc.shape_by_type&&General.is_valid_callback(loc.shape_by_type)&&(marker_custom.path=loc.shape_by_type(prev_marker)),prev_marker.setIcon(marker_custom),prev_marker.setZIndex(google.maps.Marker.MAX_ZINDEX-10),prev_marker.setAnimation(null)),null!=loc.shape_by_type&&General.is_valid_callback(loc.shape_by_type)&&(marker_custom_active.path=loc.shape_by_type(marker)),marker.setIcon(marker_custom_active),marker.setZIndex(google.maps.Marker.MAX_ZINDEX+1),loc.map.setZoom(16),loc.shell_obj[loc.marker_click_callback_name](this_obj,loc.shell_obj,loc),loc.bounce_marker(5e3,marker),loc.map.panTo(marker.position),prev_marker=marker})(marker))})},Multi_Marker_Map_It.fn.get_closest_markers=function(this_obj,markers,loc,max_number_of_matches,max_distance_allowed){for(var lat=this_obj.address.latitude,lng=this_obj.address.longitude,distances=[],k=0;k<markers.length;k++){var mlat=parseFloat(markers[k].address.latitude),mlng=parseFloat(markers[k].address.longitude),mlat=rad(mlat-lat),mlng=rad(mlng-lng),mlat=Math.sin(mlat/2)*Math.sin(mlat/2)+Math.cos(rad(lat))*M
1ath.cos(rad(lat))*Math.sin(mlng/2)*Math.sin(mlng/2),mlng=3959*(2*Math.atan2(Math.sqrt(mlat),Math.sqrt(Math.abs(1-mlat))));distances.push({marker_index:k,school_id:markers[k].school_id,distance:parseFloat(mlng.toFixed(1))})}distances.sort(function(a,b){return a.distance-b.distance});var return_matches=new Array;max_number_of_matches=max_number_of_matches+1<distances.length?max_number_of_matches+1:distances.length;for(k=0;k<max_number_of_matches;k++)distances[k].distance<max_distance_allowed&&0<distances[k].distance&&return_matches.push(distances[k]);return return_matches},Multi_Marker_Map_It.fn.setup=function(loc){loc.base_setup(loc);loc.set_markers(loc)},function(_obj){General.is_null_empty_undefined(_obj)&&(_obj={input_id:null}),this.previous_location_string="",this.input_id=General.is_null_empty_undefined(_obj.input_id)?"#location":_obj.input_id,this.exclude_error_class=!General.is_null_empty_undefined(_obj.exclude_error_class)&&_obj.exclude_error_class}),Google_Location_Autocomplete=(Google_API_Base.prototype={constructor:Google_API_Base,reset_location:function(){$("#street_address_1").val(""),$("#city").val(""),$("#state_abbreviation").val(""),$("#country_abbreviation").val(""),$("#zip").val(0),$("#longitude").val(""),$("#latitude").val("")},location_fix:function(input_id,use_state_const){for(var city_array_google_fix=["Los Angeles","Edison","Beirut","Cairo","Amman","Hong Kong","Mikkeli","Lahti","Oulu","Helsinki","Kouvola","London"],k=0;k<city_array_google_fix.length;k++)new RegExp(city_array_google_fix[k].toLowerCase()).test($("#"+input_id).val().toLowerCase())&&$("#city").val(city_array_google_fix[k]);use_state_const&&null!=use_state_const&&""==$("#state_abbreviation").val()&&$("#state_abbreviation").val("CONST"),0==$("#zip").val()&&$("#zip").val("99999")},get_address_components:function(address_components){for(var street_address_1=new String,k=0;k<address_components.length;k++)for(var m=0;m<address_components[k].types.length;m++)"street_number"!=address_components[k].types[m]&&"route"!=address_components[k].types[m]||(street_address_1+=""==street_address_1?address_components[k].long_name+" ":address_components[k].long_name),"locality"==address_components[k].types[m]||"sublocality"==address_components[k].types[m]?$("#city").val(address_components[k].long_name):"administrative_area_level_1"==address_components[k].types[m]?$("#state_abbreviation").val(address_components[k].short_name):"postal_code"==address_components[k].types[m]?$("#zip").val(address_components[k].short_name):"country"==address_components[k].types[m]&&$("#country_abbreviation").val(address_components[k].short_name);$("#address_1").val(street_address_1),this.location_fix("location",!0)},set_lat_long:function(latlng){$("#longitude").val(latlng.lng()),$("#latitude").val(latlng.lat())},init:function(){var loc=this;$(loc.input_id).focus(function(){!$(this).hasClass("error")||loc.exclude_error_class||$(this).removeClass("error")}),google.maps.event.addDomListener(window,"load",function(){loc.setup(loc)}),$(loc.input_id).attr({placeholder:""})}},function(_obj){Google_API_Base.call(this,_obj)}),Google_Location_Geocode=(Google_Location_Autocomplete.inherits(Google_API_Base),Google_Location_Autocomplete.fn.setup=function(_loc){var loc=_loc,_loc=loc.input_id.replace("#",""),_loc=document.getElementById(_loc),autocomplete=new google.maps.places.Autocomplete(_loc,{types:["(regions)"]});google.maps.event.addListener(autocomplete,"place_changed",function(){loc.reset_location();var latlng,place=autocomplete.getPlace();place.address_components?(latlng=new google.maps.LatLng(place.geometry.location.lat(),place.geometry.location.lng()),(new google.maps.Geocoder).geocode({latLng:latlng},function(results,status){status==google.maps.GeocoderStatus.OK&&(status=results[0].address_components,loc.get_address_components(status),loc.set_lat_long(latlng))}),place=place.formatted_address.replace(/, USA$/,""),$(loc.input_id).val(place),$(loc.input_id).removeClass("error")):(message_slider("A valid location is required",!0),$(loc.input_id).addClass("error"))})},function(_obj){Google_API_Base.call(this,_obj)}),Google_Lat_long_Geocode=(Google_Location_Geocode.inherits(Google_API_Base),Google_Location_Geocode.fn.setup=function(_loc){var loc=_loc;$(loc.input_id).blur(function(){var $this=$(this);loc.previous_location_string!=$this.val()&&(new google.maps.Geocoder).geocode({address:$this.val()},function(results,status){var address_components;status==google.maps.GeocoderStatus.OK?(loc.reset_location(),address_components=results[0].address_components,loc.get_address_components(address_components),loc.set_lat_long(results[0].geometry.location),$this.val(results[0].formatted_address),loc.previous_location_string=results[0].formatted_address):status==google.maps.GeocoderStatus.ZERO_RESULTS&&(loc.reset_location(),loc.exclude_error_class||($this.addClass("error"),message_slider("A valid location is required",!0)))})})},function(_obj){Google_API_Base.call(this,_obj),this.latitude="",this.longitude=""}),Golden_layout_Member=(Google_Lat_long_Geocode.inherits(Google_API_Base),Google_Lat_long_Geocode.fn.set_lat_long=function(latlng,loc){loc.longitude=latlng.lng(),loc.latitude=latlng.lat()},Google_Lat_long_Geocode.fn.get_lat_long=function(_address_str,_callback){var loc=this;google.maps.event.addDomListener(window,"load",function(){(new google.maps.Geocoder).geocode({address:_address_str},function(results,status){if(status==google.maps.GeocoderStatus.OK)loc.set_lat_long(results[0].geometry.location,loc),_callback({latitude:loc.latitude,longitude:loc.longitude});else if(status==google.maps.GeocoderStatus.ZERO_RESULTS)return{latitude:loc.latitude,longitude:loc.longitude}})})},function(_class,_width){this.my_class=_class,this.width=_width}),Golden_Layout=function(_obj){this.container_id="#"+_obj.container_id,this.sidebar_column=_obj.sidebar_column,this.column_options=_obj.column_options,this.column_options_store=_obj.column_options,this.column_objects=new Array,this.used_column_options=new Array,this.full_layout_width,this.layout_header=General.is_null_empty_undefined(_obj.layout_header)?"":"#"+_obj.layout_header,this.resize_timer}
1,Slider_Indices=(Golden_Layout.prototype={constructor:Golden_Layout,get_col_options_width:function(){for(var _return=0,k=0;k<this.column_options.length;k++){$("<li id='temp_cont' class='"+this.column_options[k]+"'></li>").appendTo($(this.container_id));var _width=$("#temp_cont").outerWidth()+20;this.column_objects.push(new Golden_layout_Member(this.column_options[k],_width)),_return+=_width,$("#temp_cont").remove()}return _return},calculate_full_layout_width:function(){for(var result=-1,k=0;k<this.used_column_options.length;k++)for(var m=0;m<this.column_objects.length;m++)this.used_column_options[k]==this.column_objects[m].my_class&&(result+=this.column_objects[m].width);return result-20},create_row_columns:function(){var loc=this,col_options_total_width=loc.get_col_options_width();loc.column_objects.sort(function(a,b){return a.width-b.width});for(var usable_width=$("#core77").width()-$(loc.sidebar_column).outerWidth(),multiples_of_col=Math.floor(usable_width/col_options_total_width),multiples_remainder=usable_width%col_options_total_width,add_this_extra_bit_s=new Array;multiples_remainder>loc.column_objects[0].width;){for(var add_extra=-1,k=0;k<loc.column_objects.length;k++)loc.column_objects[k].width<multiples_remainder&&(add_extra=k);-1!=add_extra&&(add_this_extra_bit_s.push(add_extra),multiples_remainder-=loc.column_objects[add_extra].width)}for(k=0;k<multiples_of_col;k++)for(var m=0;m<loc.column_options.length;m++)loc.used_column_options.push(loc.column_options[m]);if(add_this_extra_bit_s!=[])for(k=0;k<add_this_extra_bit_s.length;k++)loc.used_column_options.push(loc.column_objects[add_this_extra_bit_s[k]].my_class);loc.full_layout_width=loc.calculate_full_layout_width()},re_init:function(){this.column_options=this.column_options_store,this.column_objects=new Array,this.used_column_options=new Array;for(var k=0;k<this.column_options.length;k++)$(this.container_id+" > li").removeClass(this.column_options[k])},run_layout:function(){var loc=this,row=($(loc.container_id).animate({opacity:0}
1,200),0<loc.column_objects.length&&loc.re_init(),loc.create_row_columns(),printf(loc.used_column_options,"loc.used_column_options"),1);$(loc.container_id+" > li").each(function(index,val){0==index&&$(this).addClass("row"+row),index%loc.used_column_options.length==0&&0!=index&&(loc.used_column_options.shuffle(),printf(loc.used_column_options,"loc.used_column_options"),row++,$(this).addClass("row"+row)),$(this).addClass(loc.used_column_options[index%loc.used_column_options.length])}),General.is_null_empty_undefined(loc.layout_header)||$(loc.layout_header).css({width:loc.full_layout_width}),$(loc.container_id).animate({opacity:1},200)},init:function(){var loc=this;loc.run_layout(),$(window).resize(function(){clearTimeout(loc.resize_timer),loc.resize_timer=setTimeout(function(){loc.run_layout()},200)})}},function(_obj){General.is_null_empty_undefined(_obj.set_current_to)?this.current_index=_obj.currently_current_index+1>_obj.max_index?0:_obj.currently_current_index+1:this.current_index=_obj.set_current_to,this.prev_index=0==this.current_index?_obj.max_index:this.current_index-1,this.next_index=this.current_index==_obj.max_index?0:this.current_index+1}),Base_Slider=function(_obj){this.is_autoplay=!General.is_null_empty_undefined(_obj.is_autoplay)&&_obj.is_autoplay,this.create_pagination_nodes=!General.is_null_empty_undefined(_obj.create_pagination_nodes)&&_obj.create_pagination_nodes,this.container_selector=_obj.container_selector,this.duration=General.is_null_empty_undefined(_obj.duration)?1e4:_obj.duration,this.use_prev_next_btn=!General.is_null_empty_undefined(_obj.use_prev_next_btn)&&_obj.use_prev_next_btn,this.class_list=new Array,this.direction,this.unique_id="#"+this.container_selector.replace(/\#/g,"").replace(/\./g,"").replace(/\s+/g,"_"),this.auto_play_timeout,this.pagination_image_type=General.is_null_empty_undefined(_obj.pagination_image_type)?"img":_obj.pagination_image_type,this.slide_number_to_query_string=!General.is_null_empty_undefined(_obj.slide_number_to_query_string)&&_obj.slide_number_to_query_string,this.query_string_variable_name=General.is_null_empty_undefined(_obj.query_string_variable_name)?"":_obj.query_string_variable_name,this.include_swipe=!!General.is_null_empty_undefined(_obj.include_swipe)||_obj.include_swipe},Featured_Slider=(Base_Slider.prototype={constructor:Base_Slider,create_pagination_ul:function(img_array,title_array){var loc=this,_html=new String;_html+="<ul class='dot_pager' id='"+loc.unique_id.replace("#","")+"_pagination' >";for(var indicies,k=0;k<$(loc.container_selector+" > li").length;k++){var this_title,background_img="";if(null!=img_array&&0<img_array.length)switch(loc.pagination_image_type){case"background":background_img=String.format("<li style='background-image: url({0})'>",img_array[k]);break;case"img":background_img=String.format("<li><img src='{0}'/>",img_array[k])}null!=title_array&&(this_title=0<title_array.length?String.format("<div><h1>{0}</h1></div>",title_array[k]):"",background_img=background_img.append(this_title)),_html+=String.format("{0}</li>",background_img)}_html+="</ul>",0==$(loc.unique_id+"_pagination").length&&($(_html).insertAfter($(loc.container_selector)),indicies=new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:$(loc.container_selector+" > li.curr").index()}),$($(loc.unique_id+"_pagination > li").get(indicies.current_index)).addClass("active"),$($(loc.unique_id+"_pagination > li").get(indicies.next_index)).addClass("active_next"),$($(loc.unique_id+"_pagination > li").get(indicies.prev_index)).addClass("active_prev"),$(loc.unique_id+"_pagination > li").live("click."+loc.unique_id.replace("#","")+"_pagination",function(e){var $this,current_index;$(this).hasClass("active")||($this=$(this),current_index=loc.get_index(),clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1,$(loc.container_selector).parent().find(".timer_progress").remove(),current_index=new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,currently_current_index:current_index,set_current_to:$this.index()}),loc.handle_li(current_index,loc))}))},get_index:function(){return $(this.container_selector+" > li.curr").index()},update_paginator:function(_index){$($(this.unique_id+"_pagination > li").get(_index)).trigger("click")},timer:function(loc){loc.is_autoplay&&(clearTimeout(loc.auto_play_timeout),loc.auto_play_timeout=setTimeout(function(){var currently_current_index=loc.get_index(),max_index=$(loc.container_selector+" > li").length-1,max_index=new Slider_Indices({max_index:max_index,currently_current_index:currently_current_index});loc.handle_li(max_index,loc),loc.timer(loc)},loc.duration))},handle_li:function(indicies,loc,transition_from){null!=transition_from&&$($(loc.container_selector).find(" > li").get(transition_from)).addClass("trans_from"),$(loc.container_selector).find(" > li").not(".trans_from").removeClass(),$(loc.unique_id+"_pagination > li").removeClass(),$($(loc.container_selector).find(" > li").get(indicies.current_index)).addClass("curr fade_in"),loc.adjust_image_proprties_of_slide($($(loc.container_selector).find(" > li").get(indicies.current_index)),loc),$($(loc.container_selector).find(" > li").get(indicies.next_index)).addClass("next"),$($(loc.container_selector).find(" > li").get(indicies.prev_index)).addClass("prev"),$($(loc.unique_id+"_pagination > li").get(indicies.current_index)).addClass("active"),$($(loc.unique_id+"_pagination > li").get(indicies.next_index)).addClass("active_next"),$($(loc.unique_id+"_pagination > li").get(indicies.prev_index)).addClass("active_prev");for(var k=indicies.next_index+1;k<$(loc.container_selector).find(" > li").length;k++)$($(loc.container_selector).find(" > li").get(k)).is(".curr, .prev, .next")||$($(loc.container_selector).find(" > li").get(k)).addClass("next_1");for(k=indicies.prev_index-1;0<=k;k--)$($(loc.container_selector).find(" >
1 li").get(k)).is(".curr, .prev, .next, .next_1")||$($(loc.container_selector).find(" > li").get(k)).addClass("prev_1");0==$(loc.container_selector).find(" > li.prev_1").length&&$($(loc.container_selector).find(" > li.next_1").get($(loc.container_selector).find(" > li.next_1").length-1)).removeClass("next_1").addClass("prev_1"),0==$(loc.container_selector).find(" > li.next_1").length&&$($(loc.container_selector).find(" > li.prev_1").get(0)).removeClass("prev_1").addClass("next_1"),null!=transition_from&&setTimeout(function(){$($(loc.container_selector).find(" > li").get(transition_from)).removeClass("trans_from curr fade_in")},1e3),loc.slide_number_to_query_string&&(indicies=parseInt(indicies.current_index)+1,indicies=String.format("{0}={1}",loc.query_string_variable_name,indicies),window.location.hash=indicies)},create_prev_next_btn:function(){var loc=this,_html=new String,slide_count=$(loc.container_selector).find(" > li").length,_html=(_html=(_html+="<div class='button_wrap'>")+String.format("<span data-direction='next' class='c77_icon next_slide {0}_prev_next'>,</span>",loc.unique_id.replace("#","")))+String.format("<span data-direction='prev' class='c77_icon prev_slide {0}_prev_next'>,</span>",loc.unique_id.replace("#",""))+"</div>";1<slide_count&&0==$(loc.unique_id.replace("#",".")+"_prev_next").length&&($(_html).insertAfter($(loc.container_selector)),$(loc.unique_id.replace("#",".")+"_prev_next").live("click."+loc.unique_id+"prev_next",function(e){clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1;var set_indicies,indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:$(loc.container_selector).find(" > li.curr").index()});"next"==$(this).attr("data-direction")?(set_indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:indicies.next_index}),loc.direction="next"):(set_indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:indicies.prev_index}),loc.direction="prev"),loc.handle_li(set_indicies,loc,indicies.current_index)}))},get_primary_indicies:function(){var key_vals,loc=this,current_slide=$(loc.container_selector+" > li.curr").index();return loc.slide_number_to_query_string&&Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){General.is_null_empty_undefined(val)||index!=loc.query_string_variable_name||(current_slide=parseInt(val)-1)})),new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:current_slide})},adjust_image_proprties_of_slide:function($curr,loc){},base_init:function(){var loc=this;$(loc.container_selector).parent().addClass("slider_base"),loc.include_swipe&&$(loc.container_selector).live({swipeRight:function(e){var indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:$(loc.container_selector).find(" > li.curr").index()}),set_indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:indicies.prev_index});loc.direction="prev",loc.handle_li(set_indicies,loc,indicies.current_index)},swipeLeft:function(e){var indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:$(loc.container_selector).find(" > li.curr").index()}),set_indicies=new Slider_Indices({max_index:$(loc.container_selector).find(" > li").length-1,set_current_to:indicies.next_index});loc.direction="next",loc.handle_li(set_indicies,loc,indicies.current_index)}})}},function(_obj){Base_Slider.call(this,_obj)}),Gift_Guide_Slider=(Featured_Slider.inherits(Base_Slider),Featured_Slider.fn.init=function(){var _image_pagination_src,_title_pagination_array,loc=this,indicies=(loc.base_init(),loc.is_autoplay&&(0==$(loc.container_selector).parent().find(".timer_progress").length&&$("
1<div class='timer_progress'></div>").insertAfter($(loc.container_selector)).animate({width:$(loc.container_selector).width()},loc.duration),loc.timer(loc)),loc.create_pagination_nodes&&(_image_pagination_src=new Array,_title_pagination_array=new Array,$(loc.container_selector+" > li").each(function(index,val){_image_pagination_src.push($(this).find("img").attr("src")),_title_pagination_array.push($(this).find("h1 a").html())}),loc.create_pagination_ul(_image_pagination_src,_title_pagination_array),loc.create_pagination_ul()),loc.use_prev_next_btn&&loc.create_prev_next_btn(),loc.get_primary_indicies());1<$(loc.container_selector+" > li").length&&loc.handle_li(indicies,loc),$(loc.container_selector+" > li").live("click.slider",function(index,val){var indicies;$(this).hasClass("curr")?loc.is_autoplay?($(loc.container_selector).parent().find(".timer_progress").stop(),$(loc.container_selector).parent().find(".timer_progress").animate({width:0},200),clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1):(loc.is_autoplay=!0,$(loc.container_selector).parent().find(".timer_progress").animate({width:$(loc.container_selector).width()},loc.duration),loc.timer(loc)):(clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1,$(loc.container_selector).parent().find(".timer_progress").remove(),indicies=new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:$(this).index()}),loc.handle_li(indicies,loc))})},function(_obj){Base_Slider.call(this,_obj)}),Timer_Slider=(Gift_Guide_Slider.inherits(Base_Slider),Gift_Guide_Slider.fn.adjust_image_proprties_of_slide=function($curr,loc){var viewport_width=$(loc.container_selector).width(),loc=$(loc.container_selector).height(),this_width=$curr.attr("data-gallery-img-width"),this_height=$curr.attr("data-gallery-img-height");this_width<viewport_width&&this_height<loc?$curr.css({"background-size":"inherit"}):$curr.css({"background-size":"contain"})},Gift_Guide_Slider.fn.init=function(){var _image_pagination_src,loc=this,indicies=(loc.base_init(),loc.is_autoplay&&(0==$(loc.container_selector).parent().find(".timer_progress").length&&$("
1<div class='timer_progress'></div>").insertAfter($(loc.container_selector)).animate({width:$(loc.container_selector).width()},loc.duration),loc.timer(loc)),loc.create_pagination_nodes&&(_image_pagination_src=new Array,$(loc.container_selector+" > li").each(function(index,val){_image_pagination_src.push($(this).find("img").attr("src"))}),loc.create_pagination_ul(_image_pagination_src),loc.create_pagination_ul()),loc.use_prev_next_btn&&loc.create_prev_next_btn(),loc.get_primary_indicies());1<$(loc.container_selector+" > li").length&&loc.handle_li(indicies,loc),$(loc.container_selector+" > li").live("click.slider",function(index,val){var indicies;$(this).hasClass("curr")?loc.is_autoplay?($(loc.container_selector).parent().find(".timer_progress").stop(),$(loc.container_selector).parent().find(".timer_progress").animate({width:0},200),clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1):(loc.is_autoplay=!0,$(loc.container_selector).parent().find(".timer_progress").animate({width:$(loc.container_selector).width()},loc.duration),loc.timer(loc)):(clearTimeout(loc.auto_play_timeout),loc.is_autoplay=!1,$(loc.container_selector).parent().find(".timer_progress").remove(),indicies=new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:$(this).index()}),loc.handle_li(indicies,loc))})},function(_obj){Base_Slider.call(this,_obj),this.is_autoplay=!0}),Timer_JOTD_Slider=(Timer_Slider.inherits(Base_Slider),Timer_Slider.fn.init=function(){var loc=this,indicies=(loc.base_init(),loc.create_pagination_ul(),loc.use_prev_next_btn&&loc.create_prev_next_btn(),new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:0}));loc.handle_li(indicies,loc),loc.is_autoplay&&loc.timer(loc)},function(_obj){Base_Slider.call(this,_obj),this.is_autoplay=!0}),Quick_Modal=(Timer_JOTD_Slider.inherits(Base_Slider),Timer_JOTD_Slider.fn.init=function(){var loc=this,_image_pagination_src=(loc.base_init(),new Array),indicies=($(loc.container_selector+" > li").each(function(index,val){_image_pagination_src.push($(this).find("img").attr("src"))}),loc.create_pagination_ul(_image_pagination_src),loc.use_prev_next_btn&&loc.create_prev_next_btn(),new Slider_Indices({max_index:$(loc.container_selector+" > li").length-1,set_current_to:0}));loc.handle_li(indicies,loc),loc.is_autoplay&&loc.timer(loc)},Modern_Radio_Button=function(_obj){Object_Base.call(this,_obj),this.hidden_input_id=_obj.hidden_input_id,this.radio_group_parent_id=_obj.radio_group_parent_id,this.radio_node_type=General.is_null_empty_undefined(_obj.radio_node_type)?"li":_obj.radio_node_type,this.radio_node_class=General.is_null_empty_undefined(_obj.radio_node_class)?"radio_btn":_obj.radio_node_class,this.stop_propagation_element_list=General.is_null_empty_undefined(_obj.stop_propagation_element_list)?[]:_obj.stop_propagation_element_list,this.callback_on_radio_select=General.is_null_empty_undefined(_obj.callback_on_radio_select)?function(){}:_obj.callback_on_radio_select,this.id=General.get_unique_id(),this.event_unique_name=String.format("modern_radio_{0}",this.id)},Modern_Radio_Button.inherits(Object_Base),Modern_Radio_Button.fn.destroy=function(){$(String.format("#{0} > {1}.{2}",this.radio_group_parent_id,this.radio_node_type,this.radio_node_class)).die(String.format("click.{0}",this.event_unique_name))},Modern_Radio_Button.fn.init=function(){var loc=this;if($(String.format("#{0} > {1}.{2}",loc.radio_group_parent_id,loc.radio_node_type,loc.radio_node_class)).live(String.format("click.{0}",loc.event_unique_name),function(e){var _value;$(this).hasClass("selected")||(_value=$(this).attr("data-value"),$(String.format("#{0} > {1}.{2}",loc.radio_group_parent_id,loc.radio_node_type,loc.radio_node_class)).removeClass("selected"),$(this).addClass("selected"),$(String.format("#{0}",loc.hidden_input_id)).val(_value).trigger("change"),loc.callback_on_radio_select(_value))}),0<loc.stop_propagation_element_list.length)for(var k=0;k<loc.stop_propagation_element_list.length;k++)$(String.format("#{0} > {1}.{2} {3}",loc.radio_group_parent_id,loc.radio_node_type,loc.radio_node_class,loc.stop_propagation_element_list[k])).live(String.format("click.{0}",loc.event_unique_name),function(e){e.stopPropagation()})},function(_obj){this.form_html="",this.form_id="",this.form_width=0,this.form_height=0,this.appendTo=General.is_null_empty_undefined(_obj.appendTo)?"core77":_obj.appendTo,this.attach_class=General.is_null_empty_undefined(_obj.attach_class)?"":_obj.attach_class,this.add_close_button=!General.is_null_empty_undefined(_obj.add_close_button),this.add_close_to_wrapper=!General.is_null_empty_undefined(_obj.add_close_to_wrapper),this.close_off=!General.is_null_empty_undefined(_obj.close_off)&&_obj.close_off,this.set_cookie_on_close=!General.is_null_empty_undefined(_obj.set_cookie_on_close)&&_obj.set_cookie_on_close,this.allow_draw=!0,this.new_animation=!!General.is_null_empty_undefined(_obj.new_animation)||_obj.new_animation,this.dark_overlay=!!General.is_null_empty_undefined(_obj.dark_overlay)||_obj.dark_overlay,this.force_fixed=!General.is_null_empty_undefined(_obj.force_fixed)&&_obj.force_fixed,this.force_absolute=!General.is_null_empty_undefined(_obj.force_absolute)&&_obj.force_absolute,this.cookie_info=General.is_null_empty_undefined(_obj.cookie_info)?null:_obj.cookie_info,this.draw_overlay_clbk=General.is_null_empty_undefined(_obj.draw_overlay_clbk)?function(){}:_obj.draw_overlay_clbk,this.close_clbk=General.is_null_empty_undefined(_obj.close_clbk)?function(){}:_obj.close_clbk,this.primary_close_clbk=General.is_null_empty_undefined(_obj.primary_close_clbk)?function(){}:_obj.primary_close_clbk,this.scroll_location=0,this.use_modern_centering=!General.is_null_empty_undefined(_obj.use_modern_centering)&&_obj.use_modern_centering,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?{}:_obj.shell_obj,this.is_open=!1,this.is_no_scroll=!!General.is_null_empty_undefined(_obj.is_no_scroll)||_obj.is_no_scroll,this.extra_overlay_class=General.is_null_empty_undefined(_obj.extra_overlay_class)?"":_obj.extra_overlay_class}),Image_Cropper=(Quick_Modal.prototype={constructor:Quick_Modal,set_content:function(_content){this.form_html=_content},set_form_to_wrap:function(form_id){this.form_id=form_id},set_scroll_location:function(_scroll){this.scroll_location=_scroll},set_form_width:function(_width){this.form_width=_width},set_form_height:function(_height){this.form_height=_height},set_attach_class:function(_class){this.attach_class=_class},set_cookie_info:function(_obj){this.cookie_info={},this.cookie_info.name=_obj.name,this.cookie_info.timeframe=_obj.timeframe},set_draw_overlay_and_close_clbk:function(_obj){this.draw_overlay_clbk=_obj.draw_overlay_clbk,this.close_clbk=_obj.close_clbk},remove_overlay:function(_keep_overlay){var loc=this;loc.is_open&&(loc.primary_close_clbk(),_keep_overlay=!General.is_null_empty_undefined(_keep_overlay)&&_keep_overlay,loc.add_close_button&&$(".quick_m_close").remove(),$(".quick_m_close a").die("click.quick_modal"),loc.close_off||$("#quick_m_overlay").die("click.quick_modal"),$("div#quick_m_content #send_data").unbind("click.quick_modal"),""!==loc.form_html?($("#quick_m_wrapper").remove(),_keep_overlay||$("#quick_m_overlay").remove(),this.form_html=""):($("div#quick_m_content").unwrap(),"quick_m_content"!=$("#"+loc.form_id).parent().attr("id")||_keep_overlay||$("#quick_m_overlay").remove(),"quick_m_content"==$("#"+loc.form_id).parent().attr("id")&&$("#"+loc.form_id).hide().unwrap(),this.form_id=""),this.form_width=0,this.form_height=0,$("body, html").removeClass("no_scroll"),loc.save_scroll_spot&&(document.body.scrollTop=document.documentElement.scrollTop=loc.scroll_location),loc.is_open=!1,loc.close_clbk())},draw_overlay:function(_draw_overlay){var keep_scroll_pos,overlay_color,loc=this,_draw_overlay=!!General.is_null_empty_undefined(_draw_overlay)||_draw_overlay;if(loc.set_cookie_on_close)for(var cookie_name_csv="",cookie_days="",cookie_days=null!==loc.cookie_info?(cookie_name_csv=loc.cookie_info.name,parseInt(loc.cookie_info.timeframe)):(cookie_name_csv=$(String.format("#{0}",loc.form_id)).attr("data-cookie-name"),parseInt($(String.format("#{0}
1",loc.form_id)).attr("data-cookie-timeframe"))),cookie_name_list=cookie_name_csv.split(","),k=0;k<cookie_name_list.length;k++)null!==Cookie.read(cookie_name_list[k])&&k<cookie_name_list.length-1?Cookie.erase(cookie_name_list[k]):null!==Cookie.read(cookie_name_list[k])?loc.allow_draw=!1:Cookie.create(cookie_name_list[k],!0,cookie_days);loc.allow_draw&&(loc.is_open=!0,cookie_name_csv=new String,keep_scroll_pos=$(window).scrollTop(),overlay_color=loc.dark_overlay?"dark_overlay":"light_overlay",cookie_name_csv+=String.format("<div id='quick_m_overlay' class='{0} {1}'></div>",overlay_color,loc.extra_overlay_class),_draw_overlay&&$(cookie_name_csv).appendTo($("#"+loc.appendTo)).addClass("fade_in"),""!=loc.form_html?(cookie_name_csv=(cookie_name_csv="<div id='quick_m_wrapper'><div id='quick_m_content'>")+this.form_html+"</div></div>",$(cookie_name_csv).appendTo($("#"+loc.appendTo))):($("#"+loc.form_id).show().wrap("<div id='quick_m_content' />"),$("div#quick_m_content").wrap("<div id='quick_m_wrapper' />")),$("div#quick_m_wrapper").addClass(loc.attach_class),loc.new_animation&&$("#quick_m_wrapper").addClass("pop_in"),loc.add_close_button&&(cookie_name_csv="<div class='quick_m_close auto_add'><a class='c77_icon' href='#'>r</a></div>",loc.add_close_to_wrapper?$(cookie_name_csv).prependTo($("div#quick_m_wrapper")):$(cookie_name_csv).prependTo($("div#quick_m_content"))),$("#quick_m_content input[type=text]").focus(),$("#quick_m_content textarea").focus(),loc.is_no_scroll&&$("body, html").addClass("no_scroll"),document.body.scrollTop=document.documentElement.scrollTop=keep_scroll_pos,overlay_color={set_height:0!=loc.form_height?loc.form_height:$("div#quick_m_content").outerHeight(),set_width:0!=loc.form_width?loc.form_width:$("div#quick_m_content").outerWidth(),set_left_margin:0!=loc.form_width?loc.form_width/2*-1:$("div#quick_m_content").outerWidth()/2*-1,set_top:0!=loc.form_height?($(window).outerHeight()-loc.form_height)/2:($(window).outerHeight()-$("div#quick_m_content").outerHeight())/2},loc.use_modern_centering||((overlay_color.set_width>$(window).width()||loc.force_fixed)&&(overlay_color.set_width=.9*$(window).width(),overlay_color.set_left_margin=.05*$(window).width(),overlay_color.set_top=.05*$(window).width(),document.getElementById("quick_m_content").style.width=overlay_color.set_width+"px",document.getElementById("quick_m_wrapper").style.left="0px",loc.force_fixed?document.getElementById("quick_m_wrapper").style.position="fixed":(document.getElementById("quick_m_wrapper").style.position="absolute",document.body.scrollTop=document.documentElement.scrollTop=0)),loc.force_absolute&&(document.getElementById("quick_m_wrapper").style.position="absolute",overlay_color.set_top=20),document.getElementById("quick_m_wrapper").style.top=overlay_color.set_top+"px",document.getElementById("quick_m_wrapper").style.width=overlay_color.set_width+"px",overlay_color.set_height=0!=loc.form_height?loc.form_height:$("div#quick_m_content").outerHeight(),document.getElementById("quick_m_wrapper").style.height=overlay_color.set_height+"px",document.getElementById("quick_m_wrapper").style.marginLeft=overlay_color.set_left_margin+"px"),$(".quick_m_close a").live("click.quick_modal",function(event){event.preventDefault(),loc.remove_overlay()}),loc.close_off||$("#quick_m_overlay").live("click.quick_modal",function(event){event.preventDefault(),loc.remove_overlay()}),$("#quick_m_wrapper").live("click.quick_modal",function(event){event.preventDefault(),loc.close_off||loc.remove_overlay()}),$("div#quick_m_content").live("click.quick_modal",function(event){event.stopPropagation()}),$("div#quick_m_content #send_data").bind("click.quick_modal",function(event){}),_draw_overlay)&&loc.draw_overlay_clbk(loc)}},function(_obj){Object_Base.call(this,_obj),this.post_id=General.is_null_empty_undefined(_obj.post_id)?null:_obj.post_id,this.image_crop_ref=_obj.image_crop_ref,this.crop_min_width=General.is_null_empty_undefined(_obj.crop_min_width)?1:_obj.crop_min_width,this.set_width=null!=_obj.set_width?_obj.set_width:1,this.ajax_url=null!=_obj.ajax_url?_obj.ajax_url:"",this.is_square=null!=_obj.is_square&&_obj.is_square,this.dynamic_resize=null!=_obj.dynamic_resize&&_obj.dynamic_resize,this.crop_size=null!=_obj.crop_size?_obj.crop_size:"",this.use_preview=null!=_obj.use_preview&&_obj.use_preview,this.img_parent_id=_obj.img_parent_id,this.is_circle_image=!General.is_null_empty_undefined(_obj.is_circle_image)&&_obj.is_circle_image,this.callback=General.is_null_empty_undefined(_obj.callback)?$.noop():_obj.callback,this.passed_obj=General.is_null_empty_undefined(_obj.passed_obj)?null:_obj.passed_obj,this.center_crop_rect_initially=!General.is_null_empty_undefined(_obj.center_crop_rect_initially)&&_obj.center_crop_rect_initially,this.preview_width=General.is_null_empty_undefined(_obj.preview_width)?300:_obj.preview_width,this.preview_height=General.is_null_empty_undefined(_obj.preview_height)?300:_obj.preview_height,this.success_message=General.is_null_empty_undefined(_obj.success_message)?"The image was successfully cropped":_obj.success_message,this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?null:_obj.profile_id}),Text_Counter=(Image_Cropper.inherits(Object_Base),Image_Cropper.fn.init=function(_obj){this.create_crop_overlay()},Image_Cropper.fn.draw_crop_overlay=function(){var extra_style,_html="<div id='s_overlay'></div>";return _html=(_html=(_html=(_html+=String.format("<div id='crop_wrap' class='{0}'>",this.crop_class))+"<div class='overlay_header'><div class='overlay_inner'><h3>Crop Image</h3><p>
1Select the area you want to crop</p>"+"<div id='btn_zone' class='right'>")+"<span class='sm_btn' id='crop_send'>Crop Image</span>"+"<div class='cancel'>Cancel</div>")+"</div></div></div>"+"<ul id='crop_ul'>",this.use_preview&&(extra_style=this.is_circle_image?"border-radius: 50%;":"",_html=(_html=(_html+="<li>")+String.format("<p>New Thumbnail</p><div id='preview_thumb' style='width:{0}px; height:{1}px; {2}'><img src=''/></div>",this.preview_width,this.preview_height,extra_style))+String.format("<p>Current Thumbnail</p><div id='current_thumb' style='width:{0}; height:{1}; {2}'><img style='width:{0}; height:{1}' src=''/></div>","300px","auto",extra_style)),_html=(_html=(_html=_html+"</li>"+"<li class='original_image'>")+"<div id='large_img'><img src=''/></div>"+"</li>")+"</ul>"+"</div>"},Image_Cropper.fn.get_crop_params=function(){var profile_id,_crop=this.image_crop_ref.crop_rectangle;return General.is_null_empty_undefined(this.post_id)?General.is_null_empty_undefined(this.profile_id)?_crop:(profile_id={profile_id:this.profile_id},$.extend(!0,profile_id,_crop)):(profile_id={post_id:this.post_id},$.extend(!0,profile_id,_crop))},Image_Cropper.fn.close_crop_overlay=function(){$("#s_overlay, #btn_zone .cancel").die("click.cropper"),$("#btn_zone #crop_send").die("click.cropper"),$("#crop_ul div#large_img img").imgAreaSelect({remove:!0}),$(".overlay_header").fadeOut(function(){$(".overlay_header").remove()}),$("ul#crop_ul").fadeOut(function(){$("ul#crop_ul").remove(),$(".imgareaselect-outer").remove(),$(".imgareaselect-selection").parent().remove(),$("div#s_overlay").fadeOut(function(){$("div#s_overlay").remove()})})},Image_Cropper.fn.update_crop_object=function(img,selection,loc){loc.image_crop_ref.crop_rectangle.set_property("x1",selection.x1),loc.image_crop_ref.crop_rectangle.set_property("y1",selection.y1),loc.image_crop_ref.crop_rectangle.set_property("x2",selection.x2),loc.image_crop_ref.crop_rectangle.set_property("y2",selection.y2)},Image_Cropper.fn.preview_function=function(img,selection,loc){var scaleX=loc.crop_size.width/(selection.width||1)*(loc.preview_width/loc.crop_size.width),loc=loc.crop_size.height/(selection.height||1)*(loc.preview_height/loc.crop_size.height);$("#crop_ul div#preview_thumb img").css({width:Math.round(scaleX*img.width)+"px",height:Math.round(loc*img.height)+"px",marginLeft:"-"+Math.round(scaleX*selection.x1)+"px",marginTop:"-"+Math.round(loc*selection.y1)+"px"})},Image_Cropper.fn.crop_send=function(_clbk){var loc=this;loading.create(),$.ajax({url:loc.ajax_url,data:loc.get_crop_params(),type:"POST",dataType:"json",success:function(data){loading.remove();data=General.parse_json_if_needed(data);General.status_ok(data.status)?(loc.thumbnail=data.image_info.image.thumbnail,$("#"+loc.img_parent_id+" img").attr({src:data.image_info.image.url,"data-image-id":data.image_info.image.id}).load(function(){General.is_valid_callback(loc.callback)&&(printf(data.image_info,"crop data.image_info"),printf(loc.passed_obj,"crop loc.passed_obj"),loc.callback(data.image_info,loc.passed_obj))}),loc.close_crop_overlay(),message_slider(loc.success_message),General.is_null_empty_undefined(loc.post_id)&&set_cookie_and_profile_page(data)):(message_slider(data.text,!0),loc.close_crop_overlay())},error:function(){loading.remove(),loc.close_crop_overlay(),message_slider("Please try again",!0)}})},Image_Cropper.fn.create_crop_overlay=function(_callback){var scaling,img_attr_obj,loc=this,dimen=new Dimensions,crop_rect=new Crop_Rectangle,img_measure=new Image;loc.dynamic_resize?(img_attr_obj={src:loc.image_crop_ref.crop_source_image.src,width:loc.set_width},scaling=loc.image_crop_ref.crop_source_image.width/loc.set_width):img_attr_obj={src:loc.image_crop_ref.crop_source_image.src},loc.crop_size.width,img_measure.onload=function(){dimen.set_property("width",this.width),dimen.set_property("height",this.height),crop_rect.set_property("x1",0),crop_rect.set_property("y1",0),loc.is_square?dimen.is_orientation("landscape")?(crop_rect.set_property("x2",this.height),crop_rect.set_property("y2",this.height)):(crop_rect.set_property("x2",this.width),crop_rect.set_property("y2",this.width)):dimen.is_orientation("landscape")?(crop_rect.set_property("x2",parseInt(loc.crop_size.width*dimen.height/loc.crop_size.height)),crop_rect.set_property("y2",dimen.height),loc.center_crop_rect_initially&&(half_difference=(dimen.width-crop_rect.x2)/2,crop_rect.set_property("x2",crop_rect.x2+half_difference),crop_rect.set_property("x1",half_difference))):(crop_rect.set_property("x2",dimen.width),crop_rect.set_property("y2",parseInt(loc.crop_size.height*dimen.width/loc.crop_size.width)),loc.center_crop_rect_initially&&(half_difference=(dimen.height-crop_rect.y2)/2,crop_rect.set_property("y2",crop_rect.y2+half_difference),crop_rect.set_property("y1",half_difference))),0<loc.image_crop_ref.crop_rectangle.x2?(crop_rect.set_property("x1",loc.image_crop_ref.crop_rectangle.x1),crop_rect.set_property("y1",loc.image_crop_ref.crop_rectangle.y1),crop_rect.set_property("x2",loc.image_crop_ref.crop_rectangle.x2),crop_rect.set_property("y2",loc.image_crop_ref.crop_rectangle.y2)):(loc.image_crop_ref.crop_rectangle.set_property("x1",crop_rect.x1),loc.image_crop_ref.crop_rectangle.set_property("y1",crop_rect.y1),loc.image_crop_ref.crop_rectangle.set_property("x2",crop_rect.x2),loc.image_crop_ref.crop_rectangle.set_property("y2",crop_rect.y2)),General.is_valid_callback(_callback)&&_callback();var half_difference=loc.draw_crop_overlay();$(half_difference).appendTo($("body")).addClass("fade_in").fadeIn(function(){loc.use_preview&&($("#crop_ul div#preview_thumb img").attr({src:loc.image_crop_ref.crop_source_image.src,width:loc.crop_size.width}),$("#crop_ul div#current_thumb img").attr({src:loc.image_crop_ref.src,width:loc.crop_size.width})),$("#crop_ul div#large_img img").attr(img_attr_obj).load(function(){var _sel_for_preview;loc.use_preview&&(_sel_for_preview={x1:crop_rect.x1,y1:crop_rect.y1,x2:crop_rect.x2,y2:crop_rect.y2,width:crop_rect.x2-crop_rect.x1,height:crop_rect.y2-crop_rect.y1},loc.preview_function(this,_sel_for_preview,loc)),$("#crop_ul div#large_img img").imgAreaSelect({aspectRatio:loc.crop_size.width/loc.crop_size.height+":1",minWidth:loc.crop_min_width,handles:!0,x1:crop_rect.x1,y1:crop_rect.y1,x2:crop_rect.x2,y2:crop_rect.y2,onSelectChange:loc.preview_function,onSelectEnd:loc.update_crop_object,passed_object:loc})})})},img_measure.src=loc.image_crop_ref.crop_source_image.src,$("#s_overlay, #btn_zone .cancel").live("click.cropper",function(e){loc.close_crop_overlay()}),$("#btn_zone #crop_send").live("click.cropper",function(e){e.preventDefault(),loc.crop_send(loc.callback)})},function(_obj){Object_Base.call(this,_obj),this.elem_id=_obj.elem_id,this.mode=General.is_null_empty_undefined(_obj.mode)?"word":_obj.mode,this.get_text_method=General.is_null_empty_undefined(_obj.get_text_method)?"val":_obj.get_text_method,this.max_count=_obj.max_count}),Comment_Data=(Text_Counter.inherits(Object_Base),Text_Counter.fn.init=function(){var loc=this;$("#"+loc.elem_id).bind("keyup.text_counter"+loc.elem_id,function(e){loc.get_count(loc)}),loc.create_count_zone(),loc.get_count(loc)},Text_Counter.fn.get_word_count=function(loc){loc=$("#"+loc.elem_id)[loc.get_text_method]().clean_white_space();return(Post_Base.defaults.is_default_text(loc)?"":loc).split(/\s/g).length},Text_Counter.fn.get_char_count=function(loc){return Post_Base.defaults.is_default_text($("#"+loc.elem_id)[loc.get_text_method]().clean_white_space())?0:$("#"+loc.elem_id)[loc.get_text_method]().length},Text_Counter.fn.get_remaining_word=function(_count,loc){loc="character"==loc.mode?"character":"word";return 1==_count||-1==_count?loc:loc+"s"},Text_Counter.fn.get_count=function(loc){var text_count="word"==loc.mode?loc.get_word_count(loc):loc.get_char_count(loc),text_count=loc.max_count-text_count,count_node=String.format("div#{0}_div",loc.elem_id),str_replace=(text_count<0?($(count_node).addClass("error_text"),$("#"+loc.elem_id).addClass("error")):($(count_node).removeClass("error_text"),$("#"+loc.elem_id).removeClass("error")),""),str_replace=0<text_count||text_count<0?String.format("<span>{0}</span> {1} remaining",text_count,loc.get_remaining_word(text_count,loc)):String.format("No {0} remaining",loc.get_remaining_word(text_count,loc));$(count_node).html(str_replace)},Text_Counter.fn.create_count_zone=function(){var _html=new String;_html+=String.format("<div class='textCounterBox no-interact' id='{0}_div'><span>{1}</span> {2}
1 remaining</div>",this.elem_id,this.max_count,this.get_remaining_word(this.max_count,this)),$(_html).insertAfter($("#"+this.elem_id))},function(_obj){Object_Base.call(this,_obj),this.id=General.is_null_empty_undefined(_obj.id)?0:_obj.id,this.number_up_votes=General.is_null_empty_undefined(_obj.number_up_votes)?0:_obj.number_up_votes,this.number_down_votes=General.is_null_empty_undefined(_obj.number_down_votes)?0:_obj.number_down_votes,this.inline_comment_marker=General.is_null_empty_undefined(_obj.inline_comment_marker)?0:_obj.inline_comment_marker,this.tier_number=_obj.tier_number,this.comment=General.is_null_empty_undefined(_obj.comment)?"":_obj.comment,this.user=new User({name:General.is_null_empty_undefined(_obj.name)?"":_obj.name,avatar:General.is_null_empty_undefined(_obj.avatar)?"":_obj.avatar,link:General.is_null_empty_undefined(_obj.link)?"":_obj.link}),this.date_relative=General.is_null_empty_undefined(_obj.date_relative)?"":_obj.date_relative,this.number_of_replies=General.is_null_empty_undefined(_obj.number_of_replies)?0:_obj.number_of_replies}),Inline_Comment_Collection_Data=(Comment_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.id=_obj.id,this.count=_obj.count,this.comments=_obj.comments}),Multi_Paginator_Shell=(Inline_Comment_Collection_Data.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.identifier=General.is_null_empty_undefined(_obj.identifier)?0:_obj.identifier,this.paginator=General.is_null_empty_undefined(_obj.paginator)?null:_obj.paginator,this.endpoint=General.is_null_empty_undefined(_obj.endpoint)?null:_obj.endpoint}),Paginator=(Multi_Paginator_Shell.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj),this.row_count=_obj.row_count,this.page_size=General.is_null_empty_undefined(_obj.page_size)?15:_obj.page_size,this.container_li=_obj.container_li,this.start_row,this.end_row,this.show_more=!1,this.starting_page_number=General.is_null_empty_undefined(_obj.starting_page_num)?1:parseInt(_obj.starting_page_num)-1,this.starting_page_number=this.starting_page_number<1?1:this.starting_page_number,this.container_id_to_append_show_more=General.is_null_empty_undefined(_obj.container_id_to_append_show_more)?"c77_content":_obj.container_id_to_append_show_more,this.is_secondary_data=!General.is_null_empty_undefined(_obj.is_secondary_data)&&_obj.is_secondary_data,this.uses_slick=!General.is_null_empty_undefined(_obj.uses_slick)&&_obj.uses_slick,this.container_unit=General.is_null_empty_undefined(_obj.container_unit)?"":_obj.container_unit,this.show_more_html=General.is_null_empty_undefined(_obj.show_more_html)?"<div data-show-more-dom='' class='trans_all' id='show_more'>Show More</div>":_obj.show_more_html,this.is_plog_page=!General.is_null_empty_undefined(_obj.is_plog_page)&&_obj.is_plog_page}),Hash_Key_Value_List=(Paginator.draw_show_more=function(loc){var _html=new String;_html+=loc.show_more_html,loc.end_row<loc.row_count&&$(_html).appendTo($(loc.container_id_to_append_show_more.prepend("#")))},Paginator.remove_show_more=function(){$("#show_more").remove()},Paginator.inherits(Object_Base),Paginator.fn.remove_show_more_specific=function(){$(this.container_id_to_append_show_more.prepend("#")).find("[data-show-more-dom]").remove()},Paginator.fn.has_run_dry=function(){return this.end_row-this.start_row<=0},Paginator.fn.get_actual_length_of_container_li=function(){if(this.uses_slick){for(var _current_total_on_page=0,k=0;k<$(this.container_unit).length;k++)_current_total_on_page+=parseInt($($(this.container_unit).get(k)).data("this-section-count"));return _current_total_on_page}return this.is_plog_page?$(this.container_li).length-$(this.container_li).parents(".data_add_zone").find(".exception_ad").length:$(this.container_li).length-$(".exception").length-$(".exception_ad").length-$(".placeholder_zone").length},Paginator.fn.calculate_valid_page_size=function(){FLEX_STOPS.get_stop().tracker,this.get_actual_length_of_container_li();this.set_property("page_size",35)},Paginator.fn.calc_start_end=function(reset_page_number){var loc=this,_start_row=(!General.is_null_empty_undefined(reset_page_number)&&reset_page_number?(loc.starting_page_number=1,loc.end_row=0):loc.end_row=loc.get_actual_length_of_container_li(),loc.end_row+1),_end_row=_start_row+loc.starting_page_number*loc.page_size-1;return reset_page_number||(_end_row=_end_row>loc.row_count-1?loc.row_count:_end_row),loc.set_property("start_row",_start_row),loc.set_property("end_row",_end_row),loc.show_more=loc.end_row<loc.row_count,loc.starting_page_number=1,loc.is_secondary_data||General.do_when(function(){return window.ga=General.is_null_empty_undefined(window.ga)?null:window.ga,!General.is_null_empty_undefined(ga)},function(){ga("send","pageview",{hitCallback:function(){printf("hit sent")}})},200),loc},Paginator.fn.init=function(){FLEX_STOPS.get_stop().tracker;var current_length=this.get_actual_length_of_container_li();this.end_row=current_length,this.is_secondary_data||(Paginator.remove_show_more(),this.end_row<this.row_count&&1==this.starting_page_number&&Paginator.draw_show_more(this))},Paginator.fn.reinit=function(_new_row_count){this.row_count=_new_row_count,this.init()},Paginator.fn.get_page_number=function(){return Math.floor(this.end_row/this.page_size)},function(_obj){Object_Base.call(this,_obj)}),Social_Widget_Count=(Hash_Key_Value_List.inherits(Object_Base),Hash_Key_Value_List.key_values_exist=function(){var result=!1,strippedUrl=document.location.toString().split("#");return result=1<strippedUrl.length&&!General.is_null_empty_undefined(strippedUrl[1].toString())?0<(strippedUrl=strippedUrl[1].toString().split("&")).length&&"_=_"!=strippedUrl:result},Hash_Key_Value_List.get_list=function(search_data_string){var _key_val_list=new Object,search_data_string=(search_data_string=null!=search_data_string?search_data_string:document.location.hash).replace("#","");if(!General.is_null_empty_undefined(search_data_string)){var queryStrings=search_data_string.toString().split("&");if(0<queryStrings.length)for(var k=0;k<queryStrings.length;k++){var queryString=queryStrings[k].toString().split("="),name=0<queryString.length?queryString[0]:"",queryString=1<queryString.length?queryString[1]:"";_key_val_list[name]=queryString}}return _key_val_list},(($,window)=>{function autocompleter_const(element,optns){var elem=new String,$elem=new String,$elem_id=new String,unique_wrapper_id=new String,current_node=-1,defaults={json_url:ne
1w String,min_chars:2,wrapper_class:"keywordSuggest",results_class:"results_autocompleter",json_param:new String,matching_obj:new String,matching_result_property:new String,extra_matching_result_property:new String,autocomplete_width:-1,jsonp:!1,make_title_case:!1,enter_submit:!1,function_to_call_on_enter:$.noop,reference_to_carry_forward:null,is_fixed_position:!1,show_selected_value_in_elem:!0},get_results=(this.init=function(){$elem=$(elem=element),$elem_id=$elem.attr("id"),$.extend(defaults,optns),$elem.attr("autocomplete","off"),unique_wrapper_id="w_"+$elem_id,$elem.bind("get_matching.autocompleter",function(event){get_results()}).bind("next.autocompleter",function(event){next_selection()}).bind("prev.autocompleter",function(event){prev_selection()}).bind("choose_selection_"+$elem_id+".autocompleter",function(event,_text,_id){choose_selection(_text,_id)}).bind("close_auto.autocompleter",function(event){close_auto()}).keypress(function(event){$(this);var keymap_up=38,keymap_down=40,keymap_enter=13;event.which!=keymap_up&&event.which!=keymap_down&&event.which!=keymap_enter||(event.which==keymap_up&&event.preventDefault(),event.which==keymap_down&&event.preventDefault(),event.which==keymap_enter&&event.preventDefault())}).keyup(function(event){var $elem=$(this),keymap_up=38,keymap_down=40,keymap_enter=13;event.which==keymap_up||event.which==keymap_down||event.which==keymap_enter?(event.which==keymap_up&&(event.preventDefault(),$elem.trigger("prev.autocompleter")),event.which==keymap_down&&(event.preventDefault(),$elem.trigger("next.autocompleter")),event.which==keymap_enter&&(event.preventDefault(),$("#"+unique_wrapper_id+" a").hasClass("selected")?(keymap_down=(keymap_up=$("#"+unique_wrapper_id+" a.selected")).text(),keymap_enter=keymap_up.attr("data-id"),$elem.trigger("choose_selection_"+$elem_id+".autocompleter",[keymap_down,keymap_enter])):$elem.trigger("close_auto.autocompleter"))):$elem.trigger("get_matching.autocompleter")}).focus(function(event){$(this).trigger("get_matching.autocompleter")}).blur(function(event){$(this).trigger("close_auto.autocompleter")}),$("#"+unique_wrapper_id+" a").live("click",function(e){e.preventDefault();var e=$(this),_text=e.text(),e=e.attr("data-id");$elem.trigger("choose_selection_"+$elem_id+".autocompleter",[_text,e])})},this.change_url=function(_url){defaults.json_url=_url},function(){var _param,text_field_input=$elem.val();text_field_input.length>=defaults.min_chars?((_param=new Object)[defaults.json_param]=text_field_input,$.ajax({type:"POST",url:defaults.json_url,data:_param,dataType:defaults.jsonp?"jsonp":"json",success:function(data){var newSet,tagSuggest,returned_matches,num_chars_entered,_html;0==data[defaults.matching_obj].length?close_auto():$elem.val().length==text_field_input.length&&(newSet=!1,0==$("#"+unique_wrapper_id).length&&((tagSuggest=document.createElement("div")).id=unique_wrapper_id,tagSuggest.className=defaults.wrapper_class,$("body").append(tagSuggest),tagSuggest={x:$elem.offset().left,y:$elem.offset().top},-1==defaults.autocomplete_width?$elem.width():defaults.autocomplete_width,$("#"+unique_wrapper_id).css({width:$elem.outerWidth()-22,position:defaults.is_fixed_position?"fixed":"absolute",top:defaults.is_fixed_position?tagSuggest.y+$elem.height()-$(window).scrollTop():tagSuggest.y+$elem.height(),left:tagSuggest.x,background:"#ffffff",border:"1px solid #cccccc","border-top":"1px solid #f0f0f0","z-index":"9999999999",padding:"5px 10px 10px 10px","border-radius":"0px 0px 3px 3px"}),newSet=!0),$("#"+unique_wrapper_id).html(""),current_node=-1,returned_matches=data[defaults.matching_obj],num_chars_entered=text_field_input.length,_html=new String,$.each(returned_matches,function(i){var match_list=""!=defaults.matching_result_property?returned_matches[i][defaults.matching_result_property]:returned_matches[i],regex_match=(defaults.make_title_case&&(match_list=titleCase(match_list)),new RegExp(text_field_input,"i")),regex_match=match_list.search(regex_match),match_list=(match_list=match_list.insert(regex_match,"<span>")).insert(regex_match+num_chars_entered+6,"</span>"),regex_match=""!=defaults.extra_matching_result_property?returned_matches[i][defaults.extra_matching_result_property]:"";_html+=String.format("<a href='#' data-id='{0}' title='' class='{1}'>{2}</a>",regex_match,defaults.results_class,match_list)}),$(_html).appendTo($("#"+unique_wrapper_id)),newSet)&&($("#"+unique_wrapper_id).hide().slideDown(),$("#"+unique_wrapper_id+" a").bind("click.selection_autocompleter",function(event){event.preventDefault();var event=unescape($(this).text()),_id=$(this).attr("data-id");$elem.trigger("choose_selection_"+$elem_id+".autocompleter",[event,_id]),null!=defaults.reference_to_carry_forward&&((event=$.Event("keyup")).which=13,event.keyCode=13,$(elem).trigger(event))}))}})):close_auto()}),close_auto=function(){$("#"+unique_wrapper_id).slideUp(function(){$("#"+unique_wrapper_id).remove(),current_node=-1})},titleCase=function(str,glue){return glue=glue||["of","for","and","the"],str.replace(/(\w)(\w*)/g,function(_,i,r){i=i.toUpperCase()+(null!=r?r:"");return glue.indexOf(i.toLowerCase())<0?i:i.toLowerCase()})},next_selection=function(){var count=-1,$current_s=($("#"+unique_wrapper_id+" a").each(function(index,val){count++}),current_node=current_node<count?current_node+1:count,$("#"+unique_wrapper_id+" a").removeClass("selected"),$($("#"+unique_wrapper_id+" a").get(current_node)));$elem.val($current_s.text()),$current_s.addClass("selected")},prev_selection=function(){current_node=current_node<=0?0:current_node-1,$("#"+unique_wrapper_id+" a").removeClass("selected");var $current_s=$($("#"+unique_wrapper_id+" a").get(current_node));$elem.val($current_s.text()),$current_s.addClass("selected")},format_autocomplete=function(str){var index=str.lastIndexOf("(");return str=-1<index?0<index?str.substring(0,index-1):str.substring(0,index):str},choose_selection=function($node,_id){$node=format_autocomplete($node);defaults.show_selected_value_in_elem?$elem.val($node):$elem.val(""),$("#"+unique_wrapper_id).remove(),defaults.enter_submit&&(null!=defaults.reference_to_carry_forward?defaults.function_to_call_on_enter(void 0,defaults.reference_to_carry_forward,$node,_id):defaults.function_to_call_on_enter())}}
1$.fn.autocompleter=function(options,params){return this.each(function(){var autocompleter_instance,$element=$(this);$element.data("autocompleter")?"change_url"==options&&$element.data("autocompleter").instance.change_url(params):((autocompleter_instance=new autocompleter_const(this,options)).init(),$element.data("autocompleter",{instance:autocompleter_instance,target:$(this)}))})}})(jQuery,window),(($,window)=>{var feature_supported_orientation_enabled="orientation"in window&&"onorientationchange"in window,feature_supported_touch_enabled="ontouchend"in document,touchStartEvent=(feature_supported_orientation_enabled&&$("html").addClass("yes_orientation"),feature_supported_touch_enabled&&$("html").addClass("yes_touch"),feature_supported_touch_enabled?"touchstart":"mousedown"),touchMoveEvent=feature_supported_touch_enabled?"touchmove":"mousemove",touchEndEvent=feature_supported_touch_enabled?"touchend":"mouseup";(feature_supported_orientation_enabled=jQuery.event.special).swipeLR={distance_x_min:20,duration_min:10,scroll_stop_tollerance:19,max_y_tollerance:30,setup:function(){var $this=jQuery(this),s_start=null,s_end=null;$this.bind(touchStartEvent,function(event){var data=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event,d=new Date;function touch_move_func(event){var data=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event,d=new Date;s_end={time:d.getTime(),location:[data.pageX,data.pageY]},Math.abs(s_end.location[0]-s_start.location[0])>$.event.special.swipeLR.scroll_stop_tollerance&&event.preventDefault()}s_start={time:d.getTime(),location:[data.pageX,data.pageY],origin:jQuery(event.target)},$this.bind(touchMoveEvent,touch_move_func).one(touchEndEvent,function(event){var x_distance,y_distance;$this.unbind(touchMoveEvent,touch_move_func),null!=s_start&&null!=s_end&&(x_distance=Math.abs(s_end.location[0]-s_start.location[0]),y_distance=Math.abs(s_end.location[1]-s_start.location[1]),s_end.time-s_start.time>jQuery.event.special.swipeLR.duration_min)&&x_distance>jQuery.event.special.swipeLR.distance_x_min&&y_distance<jQuery.event.special.swipeLR.max_y_tollerance&&s_start.origin.trigger("swipeLR").trigger(s_start.location>s_end.location?"swipeLeft":"swipeRight")})})}},feature_supported_orientation_enabled.tapIn={distance_x_max:5,distance_y_max:5,setup:function(){var $this=jQuery(this),s_end_loc=[0,0],_origin=null;$this.bind(touchStartEvent,function(event){var data=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event;function touch_move_func(event){event=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event;s_end_loc=[event.pageX,event.pageY]}data.pageX,_origin=jQuery(event.target),$this.bind(touchMoveEvent,touch_move_func).one(touchEndEvent,function(event){$this.unbind(touchMoveEvent,touch_move_func),event=event,0==s_end_loc[0]&&0==s_end_loc[1]&&(event.preventDefault(),_origin.trigger("tapIn").trigger("tap"))})})}},jQuery.each({swipeLeft:"swipeLR",swipeRight:"swipeLR",tap:"tapIn"},function(event,eventName){jQuery.event.special[event]={setup:function(){jQuery(this).bind(eventName,jQuery.noop)}}}),jQuery.mpg={shake:function(optns){var options=jQuery.extend({shake_gen:function(){},shake_ss:function(){},shake_ud:function(){},shake_fb:function(){},threshold:20,timeInterval:100},optns),start={x:0,y:0,z:0},end={x:0,y:0,z:0};window.addEventListener("devicemotion",function(event){start.x=event.accelerationIncludingGravity.x,start.y=event.accelerationIncludingGravity.y,start.z=event.accelerationIncludingGravity.z},!1),setInterval(function(){var difference_x=Math.abs(start.x-end.x),difference_y=Math.abs(start.y-end.y),difference_z=Math.abs(start.z-end.z);difference_x+difference_y+difference_z>options.threshold&&"function"==typeof options.shake_gen&&options.shake_gen.call(),difference_x>options.threshold&&difference_y<difference_x&&difference_z<difference_x?"function"==typeof options.shake_ss&&options.shake_ss.call():difference_y>options.threshold&&difference_x<difference_y&&difference_z<difference_y?"function"==typeof options.shake_ud&&options.shake_ud.call():difference_z>options.threshold&&difference_x<difference_z&&difference_y<difference_z&&"function"==typeof options.shake_fb&&options.shake_fb.call(),end.x=start.x,end.y=start.y,end.z=start.z},options.timeInterval)},removeShake:function(){window.removeEventListener("devicemotion",!1)},orientation:function(optns){var options=jQuery.extend({landscape:function(){},landscape_upsideDown:function(){},portrait:function(){},portrait_upsideDown:function(){}},optns);window.addEventListener("orientationchange",function(){switch(window.orientation){case 0:options.portrait.call();break;case 90:options.landscape.call();break;case 180:options.portrait_upsideDown.call();break;case-90:options.landscape_upsideDown.call()}},!1)},removeOrientation:function(){window.removeEventListener("orientationchange",!1)}}})(jQuery,window),function(_obj){General.is_null_empty_undefined(_obj)&&(_obj={url:null}),Object_Base.call(this,_obj),this.url=General.is_null_empty_undefined(_obj.url)?window.location:_obj.url,this.services_list=new Array;for(var k=0;k<_obj.url.length;k++)this.services_list.push({facebook:String.format("https://graph.facebook.com/?id={0}",this.url[k]),twitter:String.format("https://cdn.api.twitter.com/1/urls/count.json?url={0}",this.url[k]),linkedin:String.format("https://www.linkedin.com/countserv/count/share?url={0}&format=jsonp",this.url[k]),pinterest:String.format("https://api.pinterest.com/v1/urls/count.json?url={0}",this.url[k])});this.counts={facebook:0,twitter:0,linkedin:0,pinterest:0}}),Value_Type=(Social_Widget_Count.inherits(Object_Base),Social_Widget_Count.fn.ajax_call=function(_service,_callback,loc){for(var k=0;k<loc.url.length;k++)$.ajax({type:"GET",url:loc.services_list[k][_service],success:function(data){_callback(data)},dataType:"jsonp"})},Social_Widget_Count.fn.handle_zero_count=function(_count,$this,loc){0==_count?$this.parent().parent().addClass("hide_count"):$this.parent().parent().removeClass("hide_count")},Social_Widget_Count.fn.get_counts=function(_service){var $this,loc=this;""!=(_service=General.is_null_empty_undefined(_service)?"":_service)&&"facebook"!=_service||loc.ajax_call("facebook",function(data){General.is_null_empty_undefined(data.share)?(loc.counts.facebook=0,$this=$("li[data-service=facebook]").find(".share_count"),loc.handle_zero_count(loc.counts.facebook,$this,loc)):General.is_a_number(data.share.share_count)&&(loc.counts.facebook+=parseInt(data.share.share_count),data=loc.counts.facebook.thousand_to_k(),$this=$("li[data-service=facebook]").find(".share_count"),loc.handle_zero_count(loc.counts.facebook,$this,loc),$this.text(data.toString()))},loc),""!=_service&&"twitter"!=_service||(loc.counts.twitter=0,$this=$("li[data-service=twitter]").find(".share_count"),loc.handle_zero_count(loc.counts.twitter,$this,loc)),""!=_service&&"linkedin"!=_service||loc.ajax_call("linkedin",function(data){General.is_a_number(data.count)&&(loc.counts.linkedin+=parseInt(data.count),data=loc.counts.linkedin.thousand_to_k(),$this=$("li[data-service=linkedin]").find(".share_count"),loc.handle_zero_count(loc.counts.linkedin,$this,loc),$this.text(data.toString()))},loc),""!=_service&&"pinterest"!=_service||loc.ajax_call("pinterest",function(data){General.is_a_number(data.count)&&(loc.counts.pinterest+=p
1arseInt(data.count),data=loc.counts.pinterest.thousand_to_k(),$this=$("li[data-service=pinterest]").find(".share_count"),loc.handle_zero_count(loc.counts.pinterest,$this,loc),$this.text(data.toString()))},loc)},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["value","type","qs_exception","is_alias"])),this.value=General.is_null_empty_undefined(_obj.value)?"":_obj.value,this.type=General.is_null_empty_undefined(_obj.type)?"":_obj.type,this.qs_exception=General.is_null_empty_undefined(_obj.qs_exception)?"":_obj.qs_exception,this.is_alias=!General.is_null_empty_undefined(_obj.is_alias)&&_obj.is_alias,this.has_alias=!General.is_null_empty_undefined(_obj.has_alias)&&_obj.has_alias}),Create_Obj_From_Form_Nodes=(Value_Type.inherits(Object_Base),Value_Type.fn.is_add_to_query_string=function(_val){return!General.is_null_empty_undefined(_val)&&_val!=this.qs_exception&&!this.is_alias},Value_Type.fn.set_value_and_update_form=function(_val,form_id,_index,shell_obj){switch(this.value=_val,this.type){case"input[type=text]":$("#"+form_id).find(String.format("{0}[data-param-name={1}]",this.type,_index)).val(_val);break;case"select":$("#"+form_id).find("#"+_index).val(_val);break;case"span.checkbox":for(var split_val=_val.split(","),k=0;k<split_val.length;k++){var $this=$("#"+form_id).find(String.format("span[data-value={0}]",split_val[k])).parent();shell_obj.checkbox_handler($this)}break;case"div.addition_box":for(var _html=new String,split_val=_val.split(","),k=0;k<split_val.length;k++){var _text=$("#"+form_id).find(String.format("{0}[data-param-name={1}]",this.type,_index)).prev().find("select.addition_box_select").find(String.format("option[value={0}]",split_val[k])).text();_html+=shell_obj.create_addition_box_via_values(split_val[k],_text)}$(_html).appendTo($("#"+form_id).find(String.format("{0}[data-param-name={1}]",this.type,_index)))}},Value_Type.fn.set_value_and_update_filter_members=function(_val,member_css_class,_index,shell_obj,data_obj_name){var _alias;switch(data_obj_name=null!=data_obj_name?data_obj_name:"data",this.value=_val,this.type){case"select":$(String.format("select[data-param-name='{0}']",_index)).val(_val);break;case"ul_choice":$(String.format("ul[data-param-name='{0}'] li",_index)).removeClass("current"),$(String.format("ul[data-param-name='{0}'] li[data-value='{1}']",_index,_val)).addClass("current")}this.has_alias&&(_alias=_index.prepend("_"),shell_obj[data_obj_name][_alias].set_value_and_update_filter_members(_val,member_css_class,_alias))},function(_obj){Object_Base.call(this,_obj);var loc=this;if(this.form_id=_obj.form_id,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?null:_obj.shell_obj,$("#"+loc.form_id).find("input[type=text]").each(function(index,val){loc[$(this).attr("data-param-name")]=new Value_Type({value:$(this).val(),type:"input[type=text]",qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception")})}).end().find("select").each(function(index,val){loc[$(this).attr("data-param-name")]=new Value_Type({value:$(this).val(),type:"select",qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception")})}).end().find("span.checkbox").each(function(index,val){var this_val=$(this).hasClass("checked")?$(this).attr("data-value"):"",param_name=$(this).attr("data-param-name");null!=loc[param_name]?loc[param_name].value+=General.is_null_empty_undefined(loc[param_name].value)?this_val:String.format(",{0}",this_val):loc[param_name]=new Value_Type({value:this_val,type:"span.checkbox",qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception")})}).end().find("div.addition_box").each(function(index,val){loc[$(this).attr("data-param-name")]=new Value_Type({value:_obj.shell_obj.get_addition_box_nodes($(this)).toString(),type:"div.addition_box",qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception")})}).end().find(".ul_button_select li.active").each(function(index,val){loc[$(this).parent().attr("data-param-name")]=new Value_Type({value:$(this).attr("data-value"),type:".ul_button_select",qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception")})}),!General.is_null_empty_undefined(_obj.extra_properties))for(var k=0;k<_obj.extra_properties.length;k++)loc[_obj.extra_properties[k]]=new Value_Type,loc[_obj.extra_properties[k]].set_property("type","extra_property")}),Sidebar_Filters=(Create_Obj_From_Form_Nodes.inherits(Object_Base),Create_Obj_From_Form_Nodes.fn.get_new_values=function(_clbk){var new_val,loc=this,params_yo=new Object;return $.each(loc,function(index,val){if(loc[index].constructor==Value_Type){switch(loc[index].type){case"input[type=text]":case"select":new_val=$("#"+loc.form_id).find(String.format("{0}[data-param-name={1}]",loc[index].type,index)).val();break;case".ul_button_select":new_val=$("#"+loc.form_id).find(String.format("{0}[data-param-name={1}] li.active",loc[index].type,index)).attr("data-value");break;case"div.addition_box":new_val=loc.shell_obj.get_addition_box_nodes($(String.format("{0}[data-param-name={1}]",loc[index].type,index))).toString()}"extra_property"!=loc[index].type&&loc[index].set_property("value",new_val)}}),new_val={},$("#"+loc.form_id).find("span.checkbox").each(function(index,val){var this_val=$(this).hasClass("checked")?$(this).attr("data-value"):"",param_name=$(this).attr("data-param-name");null!=new_val[param_name]?General.is_null_empty_undefined(this_val)||(new_val[param_name]+=General.is_null_empty_undefined(new_val[param_name])?this_val:String.format(",{0}",this_val)):(new_val[param_name]=new String,new_val[param_name]+=this_val)}),$.each(new_val,function(index,val){loc[index].set_property("value",new_val[index])}
1),params_yo=General.is_valid_callback(_clbk)?_clbk(params_yo):params_yo},Create_Obj_From_Form_Nodes.fn.rewriteURL=function(){var loc=this,qs=new String;return loc.get_new_values(function(params_yo){return $.each(loc,function(index,val){var is_in_form,new_val;loc[index].constructor==Value_Type&&(is_in_form="extra_property"!=loc[index].type,new_val=loc[index].value,qs+=loc[index].is_add_to_query_string(new_val)?String.format("{0}{1}={2}",0<qs.length?"&":"",index,new_val):"",is_in_form)&&(params_yo[index]=new_val)}),General.is_null_empty_undefined(qs)?window.location.hash="_=_":window.location.hash=qs,params_yo})},function(_obj){Object_Base.call(this,_obj);var loc=this;if(this.member_css_class=_obj.member_css_class,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?null:_obj.shell_obj,$("."+loc.member_css_class).each(function(index,val){var _type=$(this).attr("data-type");switch(_type){case"select":var param_name=$(this).attr("data-param-name");loc[param_name]=new Value_Type({value:$(this).val(),type:_type,qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception"),is_alias:/^_/.test(param_name),has_alias:0<$(String.format(".{0}[data-param-name='_{1}']",loc.member_css_class,param_name)).length});break;case"ul_choice":param_name=$(this).attr("data-param-name");loc[param_name]=new Value_Type({value:$(this).find(".current").attr("data-value"),type:_type,qs_exception:General.is_null_empty_undefined($(this).attr("data-qs-exception"))?"":$(this).attr("data-qs-exception"),is_alias:/^_/.test(param_name),has_alias:0<$(String.format(".{0}[data-param-name='_{1}']",loc.member_css_class,param_name)).length})}}),!General.is_null_empty_undefined(_obj.extra_properties))for(var k=0;k<_obj.extra_properties.length;k++)loc[_obj.extra_properties[k]]=new Value_Type,loc[_obj.extra_properties[k]].set_property("type","extra_property")}),Tooltip=(Sidebar_Filters.inherits(Object_Base),Sidebar_Filters.fn.get_new_values=function(_clbk){var new_val,loc=this,params_yo=new Object;return $.each(loc,function(index,val){if(loc[index].constructor==Value_Type){switch(loc[index].type){case"select":new_val=$(String.format("{0}[data-param-name='{1}']",loc[index].type,index)).val();break;case"ul_choice":new_val=$(String.format("ul[data-param-name='{0}'] li.current",index)).attr("data-value")}"extra_property"!=loc[index].type&&loc[index].set_property("value",new_val)}}),params_yo=General.is_valid_callback(_clbk)?_clbk(params_yo):params_yo},Sidebar_Filters.fn.rewriteURL=function(){var loc=this,qs=new String;return loc.get_new_values(function(params_yo){return $.each(loc,function(index,val){var is_extra_property,new_val;loc[index].constructor==Value_Type&&(is_extra_property="extra_property"==loc[index].type,new_val=loc[index].value,qs+=loc[index].is_add_to_query_string(new_val)?String.format("{0}{1}={2}",0<qs.length?"&":"",index,new_val):"",is_extra_property||(params_yo[index]=new_val))}),General.is_null_empty_undefined(qs)?window.location.hash="_=_":window.location.hash=qs,params_yo})},function(_obj){Object_Base.call(this,_obj),this.is_show=!1,this.tool_timeout});function set_cookie_and_profile_page(data){var cookie_expiration_days=84;document.cookie="username="+data.cookie_name+"; expires=Thu, 01 Jan 1970 00:00:00 GMT",Cookie.create(data.cookie_name,data.cookie_value,cookie_expiration_days),$("#user_logged_in_menu img").attr("src",data.image_info.image.url)}Tooltip.inherits(Object_Base),Tooltip.fn.remove_tooltip=function(loc){clearTimeout(loc.tool_timeout),loc.is_show=!1,$("div#tooltiper").fadeOut()},Tooltip.fn.init=function(){var loc=this,dom_str=["a","li","span","em","strong","p","i","b","div","input","section"].join("[data-tooltip], ")+"[data-tooltip]";$(dom_str).live({mouseover:function(event){var new_x,mouse_coord={x:event.pageX+10,y:event.pageY-10},tooltip_html=$(this).attr("data-tooltip"),event=(General.is_null_empty_undefined($(this).attr("data-tooltip-class"))||String.format("class='{0}'",$(this).attr("data-tooltip-class")),tooltip_html+=General.is_null_empty_undefined($(this).attr("data-tooltip-img"))?"":String.format("<img src='{0}' />",$(this).attr("data-tooltip-img")),"quick"==$(this).attr("data-tooltip-timing")?300:800),$tool_tip=(0==$("div#tooltiper").length&&$("
1<div id='tooltiper'></div>").appendTo($("body")),$("div#tooltiper"));General.is_null_empty_undefined($(this).attr("data-tooltip-class"))?$tool_tip.removeClass():$tool_tip.addClass($(this).attr("data-tooltip-class")),mouse_coord.x+$("#tooltiper").width()>$(window).width()&&(new_x=$(window).width()-$("#tooltiper").width()-20,mouse_coord.x=new_x),loc.is_show||(loc.tool_timeout=setTimeout(function(){$tool_tip.html(tooltip_html).css({top:mouse_coord.y-$("div#tooltiper").height(),left:mouse_coord.x}).fadeIn(),loc.is_show=!0},event))},mouseout:function(event){loc.remove_tooltip(loc)},click:function(event){event.stopPropagation()}})};var Prompt_Box=function(_obj){var _html=new String;_html+=String.format("<div style='top:{0}px; left: {1}px;' class='prompt_box {2}'><label>{3}</label><input type='text' placeholder='{4}' /><em id='cancel' >Cancel</em><em id='confirm'>OK</em></div>",_obj.coords.y,_obj.coords.x,_obj.class_add,_obj.label_text,_obj.placeholder_text),$(_html).appendTo($("body")),$(".prompt_box").live("click.prompt_box",function(e){e.stopPropagation(),e.preventDefault()}),$(".prompt_box").live("mouseup.prompt_box",function(e){e.stopPropagation(),e.preventDefault()}),$(".prompt_box input").live("mousedown.prompt_box",function(e){e.stopPropagation(),Prompt_Box.saved_selection=Selection.save_selection()}),$(".prompt_box input").live("mouseup.prompt_box",function(e){e.stopPropagation(),e.preventDefault()}),$(".prompt_box input").live("keyup.prompt_box",function(e){e.stopPropagation(),e.preventDefault(),e.which==KEYS.enter&&Prompt_Box.confirm(_obj)}),$(".prompt_box em").live("click.prompt_box",function(e){e.stopPropagation(),"confirm"==$(this).attr("id")?Prompt_Box.confirm(_obj):"cancel"==$(this).attr("id")&&(Prompt_Box.remove(),_obj.menu_obj.close_menu())})},Credit_Cards=(Prompt_Box.remove=function(){$(".prompt_box em").die(".prompt_box"),$(".prompt_box").remove()},Prompt_Box.confirm=function(_obj){General.is_valid_callback(_obj.confirm)&&(Selection.restore_selection(Prompt_Box.saved_selection),Prompt_Box.saved_selection=new String,_obj.confirm(_obj.menu_obj,$(".prompt_box input[type=text]").val(),_obj.target),_obj.close_menu)&&_obj.menu_obj.close_menu(),Prompt_Box.remove()},function(_obj){Object_Base.call(this,_obj),this.cards=[{name:"visa",regex_full:/^4[0-9]{12}(?:[0-9]{3})?$/,regex_start:/^4/},{name:"master",regex_full:/^5[1-5][0-9]{14}$/,regex_start:/^5/},{name:"amex",regex_full:/^3[47][0-9]{13}$/,regex_start:/^3/}],this.container_id=General.is_null_empty_undefined(_obj.container_id)?"":String.format("#{0}",_obj.container_id)}),Select_Best_Image_Size=(Credit_Cards.inherits(Object_Base),Credit_Cards.fn.get_valid_card_type=function(_val){for(var _card_index={index:-1,is_valid:!1},k=0;k<this.cards.length;k++)this.cards[k].regex_start.test(_val)&&(_card_index.index=k),_card_index.is_valid||(_card_index.is_valid=this.cards[k].regex_full.test(_val));return _card_index},Credit_Cards.fn.init=function(){var loc=this;$(loc.container_id).live({keyup:function(){var _card_index,_val=$(this).val();0<_val.length&&_val.length<8?(_card_index=loc.get_valid_card_type(_val).index,$(loc.container_id).parent().find("ul > li").removeClass("selected"),$(loc.container_id).parent().find(String.format("ul > li.{0}",loc.cards[_card_index].name)).addClass("selected")):0==_val.length&&$(loc.container_id).parent().find("ul > li").removeClass("selected")},blur:function(){var _val=$(this).val();loc.get_valid_card_type(_val).is_valid||(0<_val.length&&alert("Please enter a valid Visa, Mastercard, or American Express."),$(loc.container_id).parent().find("ul > li").removeClass("selected"))}})},function(_obj){Object_Base.call(this,_obj),this.container_selector=_obj.container_selector,this.mode=_obj.mode}),Animation_Frame_Loop_Base=(Select_Best_Image_Size.inherits(Object_Base),Select_Best_Image_Size.fn.load_image=function($node){var img_ref=$(window).width()>GLOBALS.PAGE_WIDTH_BOUNDRY?$node.attr("data-large-image"):$node.attr("data-small-image");loading.create($node),General.image_loaded({new_img:img_ref,$node:$node,callback:function($node,new_img,$top_parent){$node.css({"background-image":String.format("url({0})",new_img)}),loading.remove($node)},$top_parent:""})},Select_Best_Image_Size.fn.init=function(loc){var loc=this,$node=$(loc.container_selector);"multi"==loc.mode?$(loc.container_selector).find("li").each(function(index,val){$node=$(this),General.is_null_empty_undefined($node.attr("data-large-image"))||loc.load_image($node)}):General.is_null_empty_undefined($node.attr("data-large-image"))||loc.load_image($node)},function(_obj){Object_Base.call(this,_obj),this.window_animation_frame=null,this.scroll_top=0,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?"":_obj.shell_obj}
1),Update_Section_Navigation_Scroll=(Animation_Frame_Loop_Base.inherits(Object_Base),Animation_Frame_Loop_Base.fn.ext_init=function(loc){},Animation_Frame_Loop_Base.fn.init=function(){var loc=this;loc.update_page(loc),window.addEventListener("blur",function(){window.cancelAnimationFrame(loc.window_animation_frame),printf("cancelled")},!1),window.addEventListener("focus",function(){loc.update_page(loc),printf("go go go")},!1),loc.ext_init(loc)},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.sections=_obj.section_ids,this.from=General.is_null_empty_undefined(_obj.from)?"bottom":_obj.from,this.$navigation_wrap=_obj.$navigation_wrap,this.navigation_node_name=General.is_null_empty_undefined(_obj.navigation_node_name)?"li":_obj.navigation_node_name,this.remove_active_classes=_obj.remove_active_classes}),Update_Background_Image_Scroll=(Update_Section_Navigation_Scroll.inherits(Animation_Frame_Loop_Base),Update_Section_Navigation_Scroll.fn.calculate_start_point=function(loc,elem_top){var _offset;switch(loc.from){case"top":_offset=0;break;case"middle":_offset=$(window).height()/2;break;case"bottom":_offset=$(window).height()}return elem_top-_offset},Update_Section_Navigation_Scroll.fn.update_page=function(loc){if(loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop(),loc.scroll_top<=loc.calculate_start_point(loc,0))loc.remove_active_classes();else{for(var _match,k=0;k<loc.sections.length;k++){var $curr=$(String.format("#{0}",loc.sections[k]));0<$curr.length&&loc.scroll_top>loc.calculate_start_point(loc,$curr.offset().top)&&(_match=k)}loc.remove_active_classes(),loc.$navigation_wrap.find(String.format("{0}[data-goto={1}]",loc.navigation_node_name,loc.sections[_match])).addClass("active")}},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.selector=_obj.selector,this.background_paths=General.is_null_empty_undefined(_obj.background_paths)?"":_obj.background_paths,this.background_images_max_image=General.is_null_empty_undefined(_obj.background_images_max_image)?1:_obj.background_images_max_image,this.image_type=General.is_null_empty_undefined(_obj.image_type)?".jpg":_obj.image_type}),Parallax_Scroll=(Update_Background_Image_Scroll.inherits(Animation_Frame_Loop_Base),Update_Background_Image_Scroll.fn.get_background_image_number=function(loc){var segment=$(loc.selector).height()/loc.background_images_max_image,loc=loc.scroll_top-$(loc.selector).offset().top;return 0==Math.ceil(loc/segment)?1:Math.ceil(loc/segment)},Update_Background_Image_Scroll.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)});var old_scroll_top=loc.scroll_top;loc.scroll_top=$(window).scrollTop(),old_scroll_top!=loc.scroll_top&&(printf(old_scroll_top=(old_scroll_top=loc.get_background_image_number(loc))>loc.background_images_max_image?loc.background_images_max_image:old_scroll_top),old_scroll_top=String.format("url({0}{1}{2})",loc.background_paths,old_scroll_top,loc.image_type),$(loc.selector).css("background-image")!=old_scroll_top)&&$(loc.selector).css({"background-image":old_scroll_top})},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.relative_scroll_top=0,this.current_keyframe=-1,this.keyframes=_obj.keyframes,this.easing_function=General.is_null_empty_undefined(_obj.easing_function)?"easeInOutQuad":_obj.easing_function}),Lazy_Load_Images_AF=(Parallax_Scroll.inherits(Animation_Frame_Loop_Base),Parallax_Scroll.fn.get_offset=function(index){var _offset=this.keyframes[index].wrapper.offset().top;return null!=this.keyframes[index].from_bottom?_offset=this.keyframes[index].wrapper.offset().top-$(window).height():null!=this.keyframes[index].from_middle&&(_offset=this.keyframes[index].wrapper.offset().top-$(window).height()/2),_offset},Parallax_Scroll.fn.get_default_property_value=function(property){switch(property){case"translateX":case"translateY":return 0;case"scale":return 1;case"rotate":return 0;case"opacity":return 1;default:return null}},Parallax_Scroll.fn.set_scroll_tops=function(){var _offset;this.scroll_top=$(window).scrollTop(),General.is_null_empty_undefined(this.keyframes[this.current_keyframe])?this.relative_scroll_top=this.scroll_top:(_offset=this.get_offset(this.current_keyframe),this.relative_scroll_top=Math.abs(_offset-this.scroll_top))},Parallax_Scroll.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.set_scroll_tops(),(0<loc.scroll_top&&loc.scroll_top<=$("body").height()-$(window).height()||0==loc.scroll_top)&&(loc.animate_elements(),loc.set_keyframe())},Parallax_Scroll.fn.set_keyframe=function(){var _offset=this.get_offset(0);if(this.scroll_top>=_offset){for(var is_found=!1,k=0;k<this.keyframes.length;k++)_offset=this.get_offset(k),this.scroll_top>_offset&&(this.current_keyframe=k,is_found=!0);is_found||(this.current_keyframe=-1)}else this.current_keyframe=-1},Parallax_Scroll.fn.animate_elements=function(){var loc=this;if(General.is_null_empty_undefined(loc.keyframes[loc.current_keyframe]))for(k=0;k<loc.keyframes.length;k++)for(var _set_translateZ,_set_scale,_set_rotate,_set_translateX,_set_translateY,m=0;m<loc.keyframes[k].animations.length;m++)null!=(animation=loc.keyframes[k].animations[m])&&(_set_translateX=null!=animation.translateX?animation.translateX[0]:0,_set_translateY=null!=animation.translateY?animation.translateY[0]:0,_set_translateZ=null!=animation.translateZ?animation.translateZ[0]:0,_set_scale=null!=animation.scale?animation.scale[0]:1,_set_rotate=null!=animation.rotate?animation.rotate[0]:0,_set_translateX=String.format("translate3d({0}px, {1}px, {2}px) scale({3}) rotate({4}deg)",_set_translateX,_set_translateY,_set_translateZ,_set_scale,_set_rotate),_set_translateY=null!=animation.opacity?animation.opacity[0]:1,null!=animation.not_default||animation.not_default||$(animation.selector).css({"-webkit-transform":_set_translateX,"-o-transform":_set_translateX,"-moz-transform":_set_translateX,transform:_set_translateX,opacity:_set_translateY}));else for(var animation,translateY,translateX,scale,rotate,opacity,k=0;k<loc.keyframes[loc.current_keyframe].animations.length;k++)animation=loc.keyframes[loc.current_keyframe].animations[k],translateY=loc.calc_prop_value(animation,"translateY"),translateX=loc.calc_prop_value(animation,"translateX"),scale=loc.calc_prop_value(animation,"scale"),rotate=loc.calc_prop_value(animation,"rotate"),opacity=loc.calc_prop_value(animation,"opacity"),$(animation.selector).css({"-webkit-transform":String.format("translate3d({0}px, {1}px, 0) scale({2}) rotate({3}deg)",translateX,translateY,scale,rotate),"-o-transform":String.format("translate3d({0}px, {1}px, 0) scale({2}) rotate({3}deg)",translateX,translateY,scale,rotate),"-moz-transform":String.format("translate3d({0}px, {1}px, 0) scale({2}) rotate({3}deg)",translateX,translateY,scale,rotate),transform:String.format("translate3d({0}px, {1}px, 0) scale({2}) rotate({3}deg)",translateX,translateY,scale,rotate),opacity:opacity})},Parallax_Scroll.fn.calc_prop_value=function(animation,property){var value,animation=animation[property];return animation?(value=Math[this.easing_function](this.relative_scroll_top,animation[0],animation[1]-animation[0],this.keyframes[this.current_keyframe].duration),value=Math.round(1e3*value)/1e3,this.relative_scroll_top>=this.keyframes[this.current_keyframe].duration&&(value=animation[1])):value=this.get_default_property_value(property),value},function(_obj){General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["callback"])),Animation_Frame_Loop_Base.call(this,_obj),this.callback=General.is_null_empty_undefined(_obj.callback)?function(){}:_obj.callback,this.unloaded_selector_in_frame=General.is_null_empty_undefined(_obj.unloaded_selector_in_frame)?"":_obj.unloaded_selector_in_frame,this.selector_in_frame=General.is_null_empty_undefined(_obj.selector_in_frame)?"":_obj.selector_in_frame,this.last_scroll_top=0,this.already_called_for_ids=[],this.shell_base=_obj.shell_base,this.viewports_look_ahead=2.5}),Peeking_Fixed_Nav=(Lazy_Load_Images_AF.inherits(Animation_Frame_Loop_Base),Lazy_L
1oad_Images_AF.fn.check_if_in_frame=function($el,scroll_top,viewport_height,loc){return $el.offset().top>scroll_top&&$el.offset().top<scroll_top+viewport_height*loc.viewports_look_ahead},Lazy_Load_Images_AF.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.last_scroll_top=loc.scroll_top,loc.scroll_top=$(window).scrollTop();for(var viewport_height=$(window).height(),$unit="",k=$(loc.selector_in_frame).length-1;0<=k;k--)loc.check_if_in_frame($($(loc.selector_in_frame).get(k)),loc.scroll_top,viewport_height,loc)&&($unit=$($(loc.selector_in_frame).get(k)));General.is_null_empty_undefined($unit)||loc.callback($unit,loc.shell_base)},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.previous_scroll_point=0,this.id_list_to_hide_show_on_scroll=General.is_null_empty_undefined(_obj.id_list_to_hide_show_on_scroll)?["#head"]:_obj.id_list_to_hide_show_on_scroll,this.fixed_nav_is_showing=!1,this.buffer_scroll_up=30,this.down_count=0,this.up_count=0,this.callback_on_update=General.is_null_empty_undefined(_obj.callback_on_update)?function(){}:_obj.callback_on_update,this.hide_away_at_height_modifier=General.is_null_empty_undefined(_obj.hide_away_at_height_modifier)?1:_obj.hide_away_at_height_modifier}),Scroll_Peek_With_Cookie=(Peeking_Fixed_Nav.inherits(Animation_Frame_Loop_Base),Peeking_Fixed_Nav.fn.update_page=function(loc){if(loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop(),loc.down_count>$(window).height()*loc.hide_away_at_height_modifier&&!loc.fixed_nav_is_showing){for(var k=0;k<loc.id_list_to_hide_show_on_scroll.length;k++)$(loc.id_list_to_hide_show_on_scroll[k]).addClass("hide_away");loc.callback_on_update(),loc.fixed_nav_is_showing=!0}else if(loc.up_count>loc.buffer_scroll_up&&loc.fixed_nav_is_showing){for(k=0;k<loc.id_list_to_hide_show_on_scroll.length;k++)$(loc.id_list_to_hide_show_on_scroll[k]).removeClass("hide_away");loc.fixed_nav_is_showing=!1}loc.previous_scroll_point<loc.scroll_top?(loc.down_count+=loc.scroll_top-loc.previous_scroll_point,loc.up_count=0):loc.scroll_top<loc.previous_scroll_point&&(loc.down_count=0,loc.up_count+=loc.previous_scroll_point-loc.scroll_top),loc.previous_scroll_point=loc.scroll_top},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.previous_scroll_point=0,this.unit_id=General.is_null_empty_undefined(_obj.unit_id)?"":_obj.unit_id,this.unit_is_showing=!1,this.buffer_scroll_up=30,this.down_count=0,this.up_count=0,this.callback_on_update=General.is_null_empty_undefined(_obj.callback_on_update)?function(){}:_obj.callback_on_update,this.hide_away_at_height_modifier=General.is_null_empty_undefined(_obj.hide_away_at_height_modifier)?1:_obj.hide_away_at_height_modifier,this.cookie_name=General.is_null_empty_undefined(_obj.cookie_name)?"":_obj.cookie_name,this.longframe_cookie=General.is_null_empty_undefined(_obj.longframe_cookie)?"":_obj.longframe_cookie,this.close_button_id=General.is_null_empty_undefined(_obj.close_button_id)?"":_obj.close_button_id,this.trigger_point=General.is_null_empty_undefined(_obj.trigger_point)?300:_obj.trigger_point}),Mouse_Interact_SVG_Animate=(Scroll_Peek_With_Cookie.inherits(Animation_Frame_Loop_Base),Scroll_Peek_With_Cookie.fn.update_page=function(loc){null==Cookie.read(loc.cookie_name)&&null==Cookie.read(loc.longframe_cookie)?(loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop(),loc.scroll_top>loc.trigger_point?($(String.format("#{0}",loc.unit_id)).addClass("show_now"),loc.callback_on_update(),loc.unit_is_showing=!0):($(String.format("#{0}",loc.unit_id)).removeClass("show_now"),loc.unit_is_showing=!1)):$(String.format("#{0}",loc.unit_id)).addClass("cookie_close")},Scroll_Peek_With_Cookie.fn.ext_init=function(loc){$(String.format("#{0}",loc.close_button_id)).live("click",function(e){Cookie.create("snlbp","y",14),$(String.format("#{0}",loc.unit_id)).addClass("cookie_close")})},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.svg_selection_class=_obj.svg_selection_class,this.svg_boundry_list=[],this.mouse_coords=new Coordinates,this.container_id=_obj.container_id,this.start_time_list={},this.max_duration=_obj.max_duration,this.min_duration=_obj.min_duration,this.previous_coords={},this.mouse_interact_timer={},this.restricted_area_timer={},this.freeze_mouse_interaction_time=2,this.keep_away_from_restricted_area=!General.is_null_empty_undefined(_obj.keep_away_from_restricted_area)&&_obj.keep_away_from_restricted_area,this.restricted_area_dimensions=General.is_null_empty_undefined(_obj.restricted_area_dimensions)?null:_obj.restricted_area_dimensions}),Sidebar_Follow_Change_Out=(Mouse_Interact_SVG_Animate.inherits(Animation_Frame_Loop_Base),Mouse_Interact_SVG_Animate.fn.ext_init=function(loc){$("body").mousemove(function(e){loc.mouse_coords.set({x:e.clientX,y:e.clientY})})},Mouse_Interact_SVG_Animate.fn.get_line_XY_at_percent=function(start,end,percent){var dx=end.x-start.x,end=end.y-start.y,_new_coords=new Coordinates;
1return _new_coords.set({x:start.x+dx*percent,y:start.y+end*percent}),_new_coords},Mouse_Interact_SVG_Animate.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)});$(loc.svg_selection_class.prepend(".")).each(function(index,val){var keep_out_points_x2,keep_out_points_y2,_current_id=$(this).attr("id"),_path_dimension=(General.is_null_empty_undefined(loc.start_time_list[_current_id])&&(loc.start_time_list[_current_id]=new Date),new Dimensions({width:parseInt(this.getAttributeNS(null,"data-width")),height:parseInt(this.getAttributeNS(null,"data-height"))})),start_point=new Coordinates({x:parseInt(this.getAttributeNS(null,"data-start-x")),y:parseInt(this.getAttributeNS(null,"data-start-y"))}),end_point=new Coordinates({x:parseInt(this.getAttributeNS(null,"data-end-x")),y:parseInt(this.getAttributeNS(null,"data-end-y"))}),_duration=parseInt(this.getAttributeNS(null,"data-duration")),window_width=$(window).width(),window_height=$(window).height(),_now=new Date,elapsed_sec=(_now.getTime()-loc.start_time_list[_current_id])/1e3,animate_to=loc.get_line_XY_at_percent(start_point,end_point,elapsed_sec/_duration),start_point={top:(General.is_null_empty_undefined(loc.previous_coords[_current_id])?start_point:loc.previous_coords[_current_id]).y,left:(General.is_null_empty_undefined(loc.previous_coords[_current_id])?start_point:loc.previous_coords[_current_id]).x},start_point={x1:start_point.left,x2:start_point.left+_path_dimension.width,y1:start_point.top,y2:start_point.top+_path_dimension.height},is_mouse_interact=!1,is_restricted_area=!1;loc.mouse_coords.x>=start_point.x1&&loc.mouse_coords.y>=start_point.y1&&loc.mouse_coords.x<=start_point.x2&&loc.mouse_coords.y<=start_point.y2&&(General.is_null_empty_undefined(loc.mouse_interact_timer[_current_id])?(is_mouse_interact=!0,loc.mouse_interact_timer[_current_id]=new Date):(_now.getTime()-loc.mouse_interact_timer[_current_id].getTime())/1e3>=loc.freeze_mouse_interaction_time&&(is_mouse_interact=!0,loc.mouse_interact_timer[_current_id]=null)),loc.keep_away_from_restricted_area&&(window_height=(window_width=new Dimensions({width:window_width*loc.restricted_area_dimensions.width,height:window_height*loc.restricted_area_dimensions.height})).width/2,keep_out_points_x2=window_width.width+window_width.width/2,keep_out_points_y2=window_width.height+(window_width=window_width.height/2),window_height<=start_point.x2&&start_point.x2<=keep_out_points_x2&&window_width<=start_point.y2&&start_point.y2<=keep_out_points_y2||window_height<=start_point.x2&&start_point.x2<=keep_out_points_x2&&window_width<=start_point.y1&&start_point.y1<=keep_out_points_y2||window_height<=start_point.x1&&start_point.x1<=keep_out_points_x2&&window_width<=start_point.y2&&start_point.y2<=keep_out_points_y2||window_height<=start_point.x1&&start_point.x1<=keep_out_points_x2&&window_width<=start_point.y1&&start_point.y1<=keep_out_points_y2)&&(General.is_null_empty_undefined(loc.restricted_area_timer[_current_id])?(is_restricted_area=!0,loc.restricted_area_timer[_current_id]=new Date):(_now.getTime()-loc.restricted_area_timer[_current_id].getTime())/1e3>=loc.freeze_mouse_interaction_time&&(is_restricted_area=!0,loc.restricted_area_timer[_current_id]=null)),(_duration<=elapsed_sec||is_mouse_interact||is_restricted_area)&&(window_height="from_left",is_mouse_interact||is_restricted_area?window_height=String.format("from_in_place*{0}",$(_current_id.prepend("#")).attr("data-from")):start_point.x1>=$(window).width()-50?window_height="from_right":start_point.y1>=$(window).height()-50?window_height="from_bottom":start_point.x1<=50?window_height="from_left":start_point.y1<=50&&(window_height="from_top"),_duration=is_mouse_interact?Math.floor(General.randomBase(loc.min_duration/4,loc.max_duration/4)):Math.floor(General.randomBase(loc.min_duration,loc.max_duration)),loc.start_time_list[_current_id]=new Date,loc.previous_coords[_current_id]=null,keep_out_points_x2=(_now.getTime()-loc.start_time_list[_current_id])/1e3/_duration,end_point=(window_width=General.generate_random_XY_off_screen(start_point,window_height,_path_dimension)).end_point,animate_to=loc.get_line_XY_at_percent(window_width.start_point,end_point,keep_out_points_x2),$(this).css({top:String.format("{0}px",start_point.y1),left:String.format("{0}px",start_point.x1)}).attr({"data-start-x":start_point.x1,"data-start-y":start_point.y1,"data-end-x":end_point.x,"data-end-y":end_point.y,"data-duration":_duration,"data-from":window_width.from})),$(this).css({"-webkit-transform":String.format("translate3d({0}px, {1}px, 0) ",animate_to.x,animate_to.y),"-moz-transform":String.format("translate3d({0}px, {1}px, 0) ",animate_to.x,animate_to.y),"-ms-transform":String.format("translate3d({0}px, {1}px, 0) ",animate_to.x,animate_to.y),transform:String.format("translate3d({0}px, {1}px, 0) ",animate_to.x,animate_to.y)}),isIE()&&$(this).attr({transform:String.format("translate({0} {1})",animate_to.x,animate_to.y)}),loc.previous_coords[_current_id]=animate_to})},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.sections=_obj.section_ids,this.from=General.is_null_empty_undefined(_obj.from)?"top":_obj.from,this.$sidebar=_obj.$sidebar,this.sidebar_unit_node_name=General.is_null_empty_undefined(_obj.sidebar_unit_node_name)?"li":_obj.sidebar_unit_node_name,this.remove_active_classes=_obj.remove_active_classes,this.mode=General.is_null_empty_undefined(_obj.mode)?"scroll":_obj.mode,this.update_on_count=General.is_null_empty_undefined(_obj.update_on_count)?6:_obj.update_on_count,this.update_on_scroll=General.is_null_empty_undefined(_obj.update_on_scroll)?1200:_obj.update_on_scroll,this.marker=0,this.current_amount_passed=0,this.sidebar_units=[],this.start_point="",this.max_units=this.$sidebar.find(this.sidebar_unit_node_name).length,this.dd_ad_changed=!0,this.dfp_ad_changed=!0,this.enable_loop=!General.is_null_empty_undefined(_obj.enable_loop)&&_obj.enable_loop}),Follow_Scroll_Unit=(Sidebar_Follow_Change_Out.inherits(Animation_Frame_Loop_Base),Sidebar_Follow_Change_Out.fn.calculate_start_point=function(loc,elem_top){var _offset;switch(loc.from){case"top":_offset=loc.$sidebar.offset().top;break;case"middle":_offset=$(window).height()/2;break;case"bottom":_offset=$(window).height()}return elem_top-_offset},Sidebar_Follow_Change_Out.fn.repopulate_ad=function(loc){var _current_unit_type=loc.$sidebar.find(String.format("{0}.active",loc.sidebar_unit_node_name)).attr("data-unit-type");switch($(loc.$sidebar.find(loc.sidebar_unit_node_name).get(loc.marker)).hasClass("starting")&&(loc.dd_ad_changed=!0),_current_unit_type){case"dd-ad":loc.dfp_ad_changed=!1,loc.dd_ad_changed||(loc.shell_obj.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.tile),loc.dd_ad_changed=!0);break;case"dfp-ad":if(loc.dd_ad_changed=!1,!loc.dfp_ad_changed)try{var this_ad_slot=$(".sidebar_induced_ad").attr("id");General.do_when(function(){return window.googletag&&googletag.apiReady},function(){googletag.cmd.push(function(){googletag.pubads().refresh(this_ad_slot)}),loc.dfp_ad_changed=!0},300)}catch(e){}break;default:loc.dd_ad_changed=!1,loc.dfp_ad_changed=!1}},Sidebar_Follow_Change_Out.fn.update_page=function(loc){if(loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop(),loc.marker=Math.floor(loc.scroll_top/loc.update_on_scroll),loc.enable_loop&&loc.marker>=loc.max_units&&(loc.marker=loc.marker%loc.max_units),loc.scroll_top<=loc.$sidebar.offset().top)loc.repopulate_ad(loc),loc.$sidebar.find(loc.sidebar_unit_node_name).removeClass("active past_active starting"),$(loc.$sidebar.find(loc.sidebar_unit_node_name).get(loc.marker)).addClass("starting");else if(loc.marker>=loc.max_units)printf("end of the line for sidebar");else{loc.repopulate_ad(loc),loc.$sidebar.find(loc.sidebar_unit_node_name).removeClass("active past_active starting");for(var k=0;k<loc.marker;k++)$(loc.$sidebar.find(loc.sidebar_unit_node_name).get(k)).addClass("past_active");$(loc.$sidebar.find(loc.sidebar_unit_node_name).get(loc.marker)).addClass("active")}},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.$unit=_obj.$unit,this.from=General.is_null_empty_undefined(_obj.from)?"top":_obj.from,this.original_offset_top=General.is_null_empty_undefined(_obj.original_offset_top)?130:_obj.original_offset_top,this.callback=General.is_null_empty_undefined(_obj.callback)?null:_obj.callback}
1),List_Auto_Scroll_Load=(Follow_Scroll_Unit.inherits(Animation_Frame_Loop_Base),Follow_Scroll_Unit.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),!loc.$unit.hasClass("active")&&loc.$unit.offset().top>loc.original_offset_top&&(loc.original_offset_top=loc.$unit.offset().top),loc.scroll_top=$(window).scrollTop(),loc.scroll_top<=loc.original_offset_top?(loc.$unit.removeClass("active"),loc.callback(!1)):(loc.$unit.addClass("active"),loc.callback(!0))},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.shell_base=_obj.shell_base,this.show_more_id=String.format("#{0}",_obj.show_more_id),this.show_more_clbk=_obj.show_more_clbk,this.offset=General.is_null_empty_undefined(_obj.offset)?-10:_obj.offset,this.is_loading_results=!General.is_null_empty_undefined(_obj.is_loading_results)&&_obj.is_loading_results,this.from=General.is_null_empty_undefined(_obj.from)?"bottom":_obj.from}),Full_Screen_Slide_With_Scroll_Feedback=(List_Auto_Scroll_Load.inherits(Animation_Frame_Loop_Base),List_Auto_Scroll_Load.fn.calculate_start_point=function(loc,elem_top){var _offset;switch(loc.from){case"top":_offset=0;break;case"middle":_offset=$(window).height()/2;break;case"bottom":_offset=$(window).height()}return elem_top-_offset},List_Auto_Scroll_Load.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop(),!loc.is_loading_results&&0<$(loc.show_more_id).length&&loc.scroll_top+loc.offset>=loc.calculate_start_point(loc,$(loc.show_more_id).offset().top)&&loc.show_more_clbk(loc)},function(_obj){Animation_Frame_Loop_Base.call(this,_obj),this.from=General.is_null_empty_undefined(_obj.from)?"top":_obj.from,this.$wrapper=_obj.$wrapper,this.slide_unit_node_name=General.is_null_empty_undefined(_obj.sidebar_unit_node_name)?"> div.slide":_obj.sidebar_unit_node_name,this.remove_active_classes=General.is_null_empty_undefined(_obj.remove_active_classes)?[]:_obj.remove_active_classes,this.mode=General.is_null_empty_undefined(_obj.mode)?"scroll":_obj.mode,this.update_on_count=General.is_null_empty_undefined(_obj.update_on_count)?6:_obj.update_on_count,this.update_on_scroll=General.is_null_empty_undefined(_obj.update_on_scroll)?1200:_obj.update_on_scroll,this.update_on_touchmove=General.is_null_empty_undefined(_obj.update_on_touchmove)?200:_obj.update_on_touchmove,this.marker=0,this.current_amount_passed=0,this.slide_units=[],this.start_point="",this.max_units=this.$wrapper.find(this.slide_unit_node_name).length,this.paused=!1,this.pause_on_slide_time=General.is_null_empty_undefined(_obj.pause_on_slide_time)?3e3:_obj.pause_on_slide_time,this.enable_loop=!General.is_null_empty_undefined(_obj.enable_loop)&&_obj.enable_loop,this.global_update_on_movement="",this.global_delta_movement=0,this.touch_start_obj=null,this.touch_end_obj=null}),Handle_Article_Loading_Scroll=(Full_Screen_Slide_With_Scroll_Feedback.inherits(Animation_Frame_Loop_Base),Full_Screen_Slide_With_Scroll_Feedback.fn.ext_init=function(loc){var $this;loc.enable_loop&&loc.$wrapper.addClass("is_loop"),loc.global_update_on_movement=General.is_mobile_device()?loc.update_on_touchmove:loc.update_on_scroll,General.is_mobile_device()?($this=$("body")).bind("touchstart",function(event){function touch_move_func(event){var event=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event,d=new Date;loc.touch_end_obj={time:d.getTime(),location:[event.pageX,event.pageY]}}var data,d;loc.paused||(data=event.originalEvent.touches?event.originalEvent.targetTouches[0]:event,d=new Date,loc.touch_start_obj={time:d.getTime(),location:[data.pageX,data.pageY],origin:jQuery(event.target)},$this.bind("touchmove",touch_move_func).one("touchend",function(event){$this.unbind("touchmove",touch_move_func),null!=loc.touch_start_obj&&null!=loc.touch_end_obj&&(loc.global_delta_movement-=loc.touch_end_obj.location[1]-loc.touch_start_obj.location[1],printf(loc.global_delta_movement),printf(loc.max_units),loc.global_delta_movement>loc.max_units*loc.global_update_on_movement?loc.global_delta_movement=loc.enable_loop?0:loc.max_units*loc.global_update_on_movement:loc.global_delta_movement<0&&(loc.global_delta_movement=loc.enable_loop?loc.max_units*loc.global_update_on_movement:0))}))}):document.addEventListener("wheel",function(e){return loc.paused||(loc.global_delta_movement+=parseInt(e.deltaY),loc.global_delta_movement>loc.max_units*loc.global_update_on_movement?loc.global_delta_movement=loc.enable_loop?0:loc.max_units*loc.global_update_on_movement:loc.global_delta_movement<0&&(loc.global_delta_movement=loc.enable_loop?loc.max_units*loc.global_update_on_movement:0)),!1},!0)},Full_Screen_Slide_With_Scroll_Feedback.fn.calculate_start_point=function(loc,elem_top){var _offset;switch(loc.from){case"top":_offset=loc.$sidebar.offset().top;break;case"middle":_offset=$(window).height()/2;break;case"bottom":_offset=$(window).height()}return elem_top-_offset},Full_Screen_Slide_With_Scroll_Feedback.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=0,printf(loc.global_delta_movement);var last_marker=loc.marker;if(loc.marker=Math.floor(loc.global_delta_movement/loc.global_update_on_movement),loc.marker>loc.max_units-1?loc.marker=loc.enable_loop?0:loc.max_units-1:loc.marker<0&&(loc.marker=loc.enable_loop?loc.max_units-1:0),loc.marker!=last_marker){loc.paused=!0,setTimeout(function(){loc.paused=!1},loc.pause_on_slide_time),loc.$wrapper.find(loc.slide_unit_node_name).removeClass("active past_active starting");for(var k=0;k<loc.marker;k++)$(loc.$wrapper.find(loc.slide_unit_node_name).get(k)).addClass("past_active");$(loc.$wrapper.find(loc.slide_unit_node_name).get(loc.marker)).addClass("active"),last_marker==loc.max_units-1&&0==loc.marker&&($(loc.$wrapper.find(loc.slide_unit_node_name).get(last_marker)).addClass("past_active"),setTimeout(function(){$(loc.$wrapper.find(loc.slide_unit_node_name).get(last_marker)).removeClass("past_active")},1e3))}var set_width_progress=100*(loc.global_delta_movement%loc.global_update_on_movement)/loc.global_update_on_movement;$(".filler").css({width:String.format("{0}%",set_width_progress)})},function(_obj){Animation_Frame_Loop_Base.call(this,_obj)}),Abstract_Node_Base=(Handle_Article_Loading_Scroll.inherits(Animation_Frame_Loop_Base),Handle_Article_Loading_Scroll.fn.update_page=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.update_page(loc)}),loc.scroll_top=$(window).scrollTop()},function(_obj){Object_Base.call(this,_obj),this.html=General.is_null_empty_undefined(_obj.html)?"":_obj.html,this.preview_text=General.is_null_empty_undefined(_obj.preview_text)?"":_obj.preview_text}),Media_Node=(Abstract_Node_Base.inherits(Object_Base),function(_obj){Abstract_Node_Base.call(this,_obj),this.style_class=General.is_null_empty_undefined(_obj.style_class)?"":_obj.style_class}),Image_Node=(Media_Node.inherits(Abstract_Node_Base),function(_obj){Media_Node.call(this,_obj),this.src=General.is_null_empty_undefined(_obj.src)?"":_obj.src,this.name="image"}),Embed_Node=(Image_Node.inherits(Media_Node),function(_obj){Media_Node.call(this,_obj),this.tag=General.is_null_empty_undefined(_obj.tag)?"":_obj.tag,this.name="embed",this.twitter_embed=General.is_null_empty_undefined(_obj.twitter_embed)?"":_obj.twitter_embed}
1),Award_Winners_Node=(Embed_Node.inherits(Media_Node),function(_obj){Media_Node.call(this,_obj),this.name="award_winners",this.categories=General.is_null_empty_undefined(_obj.categories)?"":_obj.categories}),Block_Text_Node=(Award_Winners_Node.inherits(Media_Node),function(_obj){Abstract_Node_Base.call(this,_obj)}),H1_Node=(Block_Text_Node.inherits(Abstract_Node_Base),function(_obj){Block_Text_Node.call(this,_obj),this.name="h1"}),H2_Node=(H1_Node.inherits(Block_Text_Node),function(_obj){Block_Text_Node.call(this,_obj),this.name="h2"}),P_Node=(H2_Node.inherits(Block_Text_Node),function(_obj){Block_Text_Node.call(this,_obj),this.ic_marker=General.is_null_empty_undefined(_obj.ic_marker)?"":_obj.ic_marker,this.id=General.is_null_empty_undefined(_obj.id)?"":_obj.id,this.name="paragraph"}),Blockquote_Node=(P_Node.inherits(Block_Text_Node),function(_obj){Block_Text_Node.call(this,_obj),this.style_class=General.is_null_empty_undefined(_obj.style_class)?"":_obj.style_class,this.name="blockquote"}),Adjust_Layout=(Blockquote_Node.inherits(Block_Text_Node),function(_obj){Object_Base.call(this,_obj),this.container_id=_obj.container_id,this.node_list=new Array,this.new_sort_order}),Dom_Tags=(Adjust_Layout.inherits(Object_Base),Adjust_Layout.fn.remove_adjust_layout=function(){$("#quick_m_overlay").remove(),$("#adjust_layout").remove(),$("#set_new_layout").die("click.adjust_layout"),$("#adjust_layout .cancel, #quick_m_overlay").die("click.adjust_layout"),$("#zoom_in, #zoom_out").die("click.adjust_layout")},Adjust_Layout.fn.undo=function(){var prev_html=$("#previous_layout").html(),redo_html=($("#previous_layout").remove(),$("#post").html()),redo_html=($(String.format("<div id='previous_layout' class='hide'>{0}</div>",redo_html)).appendTo($("body")),$("#post").empty(),$(prev_html).appendTo($("#post")),"Redo Changes"==$("#undo_adjust_layout").text()?"Undo Changes":"Redo Changes");$("#undo_adjust_layout").removeClass("hide").text(redo_html)},Adjust_Layout.fn.set_new_layout=function(loc){for(var prev_html=$("#post").html(),_html=($("#previous_layout").remove(),$(String.format("<div id='previous_layout' class='hide'>{0}</div>",prev_html)).appendTo($("body")),$("#post").empty(),new String),k=0;k<loc.new_sort_order.length;k++){var item=loc.node_list[loc.new_sort_order[k]];switch(item.name){case"paragraph":var _id=General.is_null_empty_undefined(item.id)?"":"id="+item.id;_html+=String.format("<p data-ic-marker='{0}' {1}>{2}</p>",item.ic_marker,_id,item.html);break;case"blockquote":_html+=String.format("<blockquote class='{0}'>{1}</blockquote>",item.style_class,item.html);break;case"h1":_html+=String.format("<h1>{0}</h1>",item.html);break;case"h2":_html+=String.format("<h2>{0}</h2>",item.html);break;case"image":_html+=String.format("<div class='{0}' contenteditable='false'>{1}</div>",item.style_class,item.html);break;case"embed":var _id=General.is_null_empty_undefined(item.twitter_embed)?"":String.format("data-twitter-embed='{0}'",item.twitter_embed),embed_html=General.is_null_empty_undefined(item.twitter_embed)?item.html:item.twitter_embed;_html+=String.format("<div class='{0}' {1} contenteditable='false'>{2}</div>",item.style_class,_id,embed_html);break;case"award_winners":_html+=String.format("<div data-categories='{0}' class='{1}' contenteditable='false'>{2}</div>",item.categories,item.style_class,item.html)}k!=loc.new_sort_order.length-1||"image"!=item.name&&"embed"!=item.name||(_html+="<p class='at_end'><br/></p>")}$(_html).appendTo($("#post")),twttr.widgets.load(),loading.remove(),loc.remove_adjust_layout(),$("#undo_adjust_layout").removeClass("hide").text("Undo Changes")},Adjust_Layout.fn.draw_adjust_layout=function(){var loc=this,_html=new String,options=(_html+="<div id='quick_m_overlay'></div>",$(_html).appendTo($("body")).addClass("fade_in"),_html=(_html=(_html=(_html="<div id='adjust_layout' class='large' data-zoom-level='large'>")+"<div class='overlay_header'><div class='overlay_inner'><h3>Adjust Layout</h3><p>Drag and drop to arrange</p>"+"<div id='btn_zone' class='right'>")+"<span class='sm_btn' id='set_new_layout'>Set new layout</span>
1"+"<div class='cancel'>Cancel</div>")+"</div></div></div>"+"<ul>",$.each(loc.node_list,function(index,val){switch(this.name){case"blockquote":var _preview_text=General.is_null_empty_undefined(this.style_class)?this.preview_text:String.format("<div>{0}</div>",this.preview_text);_html+=String.format("<li class='{0} {1}' data-sort-id='{2}'><span class='move'>{3}</span></li>",this.name,this.style_class,index,_preview_text);break;case"paragraph":case"h1":case"h2":_html+=String.format("<li class='{0}' data-sort-id='{1}'><span class='move'>{2}</span></li>",this.name,index,this.preview_text);break;case"image":_html+=String.format("<li class='{0}' data-sort-id='{1}'><span class='move'><div class='img_wrapper'><img src='{2}'/></div></span></li>",this.name,index,this.src);break;case"embed":var _preview=General.is_null_empty_undefined(this.twitter_embed)?this.tag:String.format("<div class='twitter_wrapper'><span class='c77_icon'>m</span>{0}</div>",General.sanitize_html_out(this.twitter_embed));_html+=String.format("<li class='{0}' data-sort-id='{1}'><span class='move'><div class='embed_wrapper'>{2}</div></span></li>",this.name,index,_preview);break;case"award_winners":_preview=String.format("Award winners from: {0}",this.preview_text.replace(/_n_/gi,"_&amp;_").replace(/_/gi," ").replace(/,/gi,", "));_html+=String.format("<li class='{0}' data-sort-id='{1}'><span class='move'>{2}</span></li>",this.name,index,_preview)}}),_html+="</ul></div>",$(_html).appendTo($("body")).addClass("fade_in"),{cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight",scroll:!1,update:function(event,ui){loc.new_sort_order=$(this).sortable("toArray",{attribute:"data-sort-id"})}});$("#adjust_layout ul").sortable(options),$("#adjust_layout ul").disableSelection(),$("#set_new_layout").live("click.adjust_layout",function(e){loc.set_new_layout(loc)}),$("#adjust_layout .cancel, #quick_m_overlay").live("click.adjust_layout",function(){loc.remove_adjust_layout()}),$("#zoom_in, #zoom_out").live("click.adjust_layout",function(event){var $this=$(this),zoom_level=($("#zoom_in, #zoom_out").removeClass("at_end"),["small","medium","large"]),_curr_size_index=zoom_level.indexOf($("#adjust_layout").attr("data-zoom-level"));"zoom_in"==$this.attr("id")?_curr_size_index=zoom_level.length-1<_curr_size_index+1?zoom_level.length-1:_curr_size_index+1:"zoom_out"==$this.attr("id")&&(_curr_size_index=_curr_size_index-1<0?0:_curr_size_index-1),$("#adjust_layout").removeClass(zoom_level.join(" ")).addClass(zoom_level[_curr_size_index]).attr({"data-zoom-level":zoom_level[_curr_size_index]}),0==_curr_size_index&&$("#zoom_out").addClass("at_end"),_curr_size_index==zoom_level.length-1&&$("#zoom_in").addClass("at_end")})},Adjust_Layout.fn.abstract_dom=function(){var loc=this;loc.node_list=[],$(String.format("#{0} > *",loc.container_id)).each(function(index,val){var $this=$(this);switch($this.context.nodeName.toString().toLowerCase()){case"p":$this.hasClass("at_end")||loc.node_list.push(new P_Node({html:$this.html(),preview_text:$this.text().char_trunc(80,!0),ic_marker:$this.attr("data-ic-marker"),id:$this.attr("id")}));break;case"h1":loc.node_list.push(new H1_Node({html:$this.html(),preview_text:$this.text()}));break;case"h2":loc.node_list.push(new H2_Node({html:$this.html(),preview_text:$this.text()}));break;case"blockquote":loc.node_list.push(new Blockquote_Node({html:$this.html(),preview_text:$this.text().char_trunc(60,!0),style_class:$this.attr("class")}));break;case"div":var _categories,_category_names;$this.hasClass("large")?0:$this.hasClass("small")&&0,$this.hasClass("img_wrapper")?loc.node_list.push(new Image_Node({src:$this.find("img").attr("src"),style_class:$this.attr("class"),html:$this.html()})):$this.hasClass("embed_wrapper")?loc.node_list.push(new Embed_Node({tag:$this.html(),style_class:$this.attr("class"),html:$this.html(),twitter_embed:null!=$this.attr("data-twitter-embed")?$this.attr("data-twitter-embed"):""})):$this.hasClass("award_winners_wrapper")&&(_categories=$this.attr("data-categories").replace(/\s/gi,"").split(","),_category_names=[],$.each(_categories,function(index,val){_category_names.push(AWARD_CATEGORIES_SERVICE.name_for(parseInt(this)))}
1),loc.node_list.push(new Award_Winners_Node({style_class:$this.attr("class"),html:$this.html(),categories:$this.attr("data-categories"),preview_text:_category_names.toString()})))}}),printf(loc.node_list),loc.draw_adjust_layout()},Adjust_Layout.fn.init=function(){this.abstract_dom()},function(_obj){Object_Base.call(this,_obj),this.position=_obj.position,this.value=_obj.value,this.length=this.value.length}),Cursor_Position_In_Html=function(start_position,end_position,original_text_block){Cursor_Position_In_Html.regex_html(original_text_block);return{start:void 0,end:void 0}},Undo_Object=(Cursor_Position_In_Html.regex_html=function(original_text_block){for(var arr=new Array,reg_html=/(<\/?(a|b|i).*?>)|(&.*?;)/gi;item=reg_html.exec(original_text_block);){var item=new Dom_Tags({position:item.index,value:item[0]});arr.push(item)}return arr},function(_obj){Object_Base.call(this,_obj),this.html=_obj.html,this.selection=_obj.saved_selection}),Undo_Manager=(Undo_Object.inherits(Object_Base),Undo_Object.fn.is_valid=function(){return!0},function(_obj){Object_Base.call(this,_obj),this.levels_of_undo=General.is_null_empty_undefined(_obj.levels_of_undo)?20:_obj.levels_of_undo,this.queue=new Array,this.container_ids=General.is_null_empty_undefined(_obj.container_ids)?["core77"]:_obj.container_ids,this.marker=0,this.frequency=General.is_null_empty_undefined(_obj.frequency)?300:_obj.frequency,this.timeout,this.init(),this.selection_type=General.is_null_empty_undefined(_obj.selection_type)?"":_obj.selection_type,this.is_paused=!1}),SVG_Path=(Undo_Manager.inherits(Object_Base),Undo_Manager.fn.is_member_of_undo_zone=function(focus_node,loc){for(var is_member=[],k=0;k<loc.container_ids.length;k++){var member=!1;(0<$(focus_node).parents(loc.container_ids[k].prepend("#")).length||$(focus_node).attr("id")==loc.container_ids[k])&&(member=!0),is_member[k]=member}return is_member.contains(!0)},Undo_Manager.fn.get_html_from_container_ids=function(loc){for(var loc=this,containers_html=[],k=0;k<loc.container_ids.length;k++){var _html=(_html=$(String.format("#{0}",loc.container_ids[k])).html()).replace(/<(span contenteditable=["|']false).*?<\/(span)>/gi,"");containers_html.push(_html)}return containers_html},Undo_Manager.fn.is_valid_add=function(containers_html){for(var is_unique=[],k=0;k<containers_html.length;k++){var unique=!0,existing_queue_point=this.queue[this.marker].html[k].clean_leading_space().replace(/<(\/?span).*?>/gi,""),this_potential_queue_addition=containers_html[k].clean_leading_space().replace(/<(\/?span).*?>/gi,"");is_unique[k]=unique=this_potential_queue_addition==existing_queue_point?!1:unique}return is_unique.contains(!0)},Undo_Manager.fn.add=function(){var saved_selection,containers_html,this_undo,loc=this;loc.is_paused||(saved_selection="",containers_html=loc.get_html_from_container_ids(loc),null!=loc.queue[loc.marker]?loc.is_valid_add(containers_html)&&(saved_selection="non_rangy"==loc.selection_type?Selection.get_start_end_offset():Selection.rangy_saveSelection(),containers_html=loc.get_html_from_container_ids(loc),loc.marker!=loc.queue.length-1&&(loc.queue=loc.queue.slice(0,loc.marker+1)),loc.queue.length>loc.levels_of_undo&&loc.queue.shift(),(this_undo=new Undo_Object({html:containers_html,saved_selection:saved_selection})).is_valid())&&(printf(loc,"UNDO_MANAGER_ADD_after_segment"),loc.queue.push(this_undo),loc.marker=loc.queue.length-1):(this_undo=new Undo_Object({html:containers_html})).is_valid()&&(printf(loc,"UNDO_MANAGER_ADD"),loc.queue.push(this_undo),loc.marker=loc.queue.length-1))},Undo_Manager.fn.undo=function(loc){if(0<loc.queue.length){window.cancelAnimationFrame(loc.timeout),loc.timeout=null,loc.marker=0<=loc.marker-1?loc.marker-1:0;for(var k=0;k<loc.container_ids.length;k++)$(String.format("#{0}",loc.container_ids[k])).html(loc.queue[loc.marker].html[k]),Post_Base.resolve_twitter_embed(!0);"non_rangy"==loc.selection_type?Selection.restore_selection_new(loc.queue[loc.marker].selection):Selection.rangy_restoreSelection(loc.queue[loc.marker].selection),0==loc.marker&&message_slider("You cannot undo any more")}},Undo_Manager.fn.redo=function(loc){if(0<loc.queue.length){window.cancelAnimationFrame(loc.timeout),loc.timeout=null,loc.marker=loc.marker+1<=loc.queue.length-1?loc.marker+1:loc.queue.length-1;for(var k=0;k<loc.container_ids.length;k++)$(String.format("#{0}",loc.container_ids[k])).html(loc.queue[loc.marker].html[k]),Post_Base.resolve_twitter_embed(!0);"non_rangy"==loc.selection_type?Selection.restore_selection_new(loc.queue[loc.marker].selection):Selection.rangy_restoreSelection(loc.queue[loc.marker].selection),loc.marker==loc.queue.length-1&&message_slider("You cannot redo any more")}},Undo_Manager.fn.init=function(){var loc=this;loc.add(),loc.timeout=window.requestAnimationFrame(function(){loc.init()})},function(_obj){Object_Base.call(this,_obj),this.path=_obj.path,this.name=General.is_null_empty_undefined(_obj.name)?General.get_unique_id:_obj.name}),SVG_List_Creator=(SVG_Path.inherits(Object_Base),function(_obj){Object_Base.call(this,_obj);this.paths=[],this.max_duration=_obj.max_duration,this.min_duration=_obj.min_duration,this.container_id=General.is_null_empty_undefined(_obj.container_id)?"core77":_obj.container_id,this.max_duplicates_allowed_on_screen=General.is_null_empty_undefined(_obj.max_duplicates_allowed_on_screen)?2:_obj.max_duplicates_allowed_on_screen,this.number_of_svg_paths=General.is_null_empty_undefined(_obj.number_of_svg_paths)?8:_obj.number_of_svg_paths,this.number_of_patterns=General.is_null_empty_undefined(_obj.number_of_patterns)?8:_obj.number_of_patterns,this.pattern_list=[];for(var k=0;k<=this.number_of_patterns;k++)this.pattern_list.push(k+1);this.pattern_list=this.pattern_list.shuffle()}),Blog_Post_From_Award_Post_Creator=(SVG_List_Creator.inherits(Object_Base),SVG_List_Creator.fn.add_path=function(name,id,current_pattern){var svg_container=document.getElementById("svg_layer_inner"),g=document.createElementNS("http://www.w3.org/2000/svg","g"),use=document.createElementNS("http://www.w3.org/2000/svg","use"),animateTransform=(String.format("translate({0} {1}), scale({2})",0,0,1),document.createElementNS("http://www.w3.org/2000/svg","animateTransform")),animateTransform=(animateTransform.setAttribute("attributeName","transform"),animateTransform.setAttribute("type","translate"),new Dimensions({width:$("#"+id).attr("width"),height:$("#"+id).attr("height")})),_from=General.from_side_list[Math.floor(General.randomBase(0,4))],start_end=General.generate_random_XY_off_screen(null,_from,animateTransform),end_point=start_end.end_point,start_end=start_end.start_point,_style_block="",_style_block=(_style_block=(_style_block+=String.format("top: {0}px; ",start_end.y))+String.format("left: {0}px; ",start_end.x))+String.format("opacity: 1;",General.randomBase(.7,.9));use.setAttributeNS(null,"class","marble_float"),use.setAttributeNS(null,"id",String.format("u_{0}",name)),use.setAttributeNS(null,"data-width",animateTransform.width),use.setAttributeNS(null,"data-height",animateTransform.height),use.setAttributeNS(null,"data-start-y",start_end.y),use.setAttributeNS(null,"data-start-x",start_end.x),use.setAttributeNS(null,"data-end-y",end_point.y),use.setAttributeNS(null,"data-end-x",end_point.x),use.setAttributeNS(null,"data-from",_from),use.setAttributeNS(null,"data-duration",Math.floor(General.randomBase(this.max_duration,this.max_duration))),use.setAttribute("fill",String.format("url(#img_{0})",this.pattern_list[current_pattern])),use.setAttribute("preserveAspectRatio","xMinYMin meet"),use.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",String.format("#{0}",id)),use.setAttribute("style",_style_block),g.appendChild(use),svg_container.appendChild(g)},SVG_List_Creator.fn.get_list=function(){for(var current_pattern=1,k=1;k<this.number_of_svg_paths+1;k++)this.add_path(String.format("path_{0}",k),String.format("path_{0}",k),current_pattern),current_pattern+1>this.number_of_patterns?current_pattern=1:current_pattern++;return[]},function(_obj){Object_Base.call(this,_obj)}),Coroflot_Util=(Blog_Post_From_Award_Post_Creator.inherits(Object_Base),Blog_Post_From_Award_Post_Creator.fn.init=function(){var _html="",award_post_generate=(_html+"<div class='generic_message'><h3>Auto generate a blog post from an award honoree.</h3>"+"<p id='err_mess' class='hide'></p>"+"<div style='margin-top: 30px;'>"+"<p><label>Award Post ID</label><input type='text' id='award_id' value='' /></p>"+"<p><label>Award Post URL</label><input type='text' id='award_url' value='' /></p>"+"<ul class='modal_bottom'><li class=''><a class='btn' id='generate_from_ap' href='#'>Get Award Post</a></li></ul></div></div>",new Quick_Modal({appendTo:"core77"}));award_post_generate.set_form_width(600),award_post_generate.set_content("<div class='generic_message'><h3>Auto generate a blog post from an award honoree.</h3><p id='err_mess' class='hide'></p><div style='margin-top: 30px;'><p><label>Award Post ID</label><input type='text' id='award_id' value='' /></p><p><label>Award Post URL</label><input type='text' id='award_url' value='' /></p><ul class='modal_bottom'><li class=''><a class='btn' id='generate_from_ap' href='#'>Get Award Post</a></li></ul></div></div>"),award_post_generate.draw_overlay(),$("#generate_from_ap").live("click",function(){var _award_url=$("#award_url").val();$.post("/account/get_award_post_for_auto_blog_post",{award_post_id:$("#award_id").val()},function(data){if(General.status_ok(data.status)){award_post_generate.remove_overlay(),_ap_html=(_ap_html=(_ap_html=(_ap_html=(_ap_html="")+String.format("<p><i>
1{0}.</i></p>",data.data.admin_notes)+"<div contenteditable='false' class='img_wrapper clear_both'>")+String.format("<img src='{0}'>",data.data.lead_image_for_sharing_url))+"<span id='476244_2278' contenteditable='true' class='caption public_hide'>This is for temp use only. Please download the image and re-upload it into the thumbnail space on the left. After you have completed that, please remove this image. Thanks.</span>"+"</div>")+(General.is_null_empty_undefined(data.data.overview)?"":data.data.overview);for(var k=0;k<data.data.slideshow_images.length;k++){var _ap_html,_caption_content,this_img=data.data.slideshow_images[k];General.is_null_empty_undefined(this_img.url)||(_ap_html=(_ap_html+="<div contenteditable='false' class='img_wrapper clear_both'>")+String.format("<img data-image-width='{0}' data-image-height='{1}' data-image-id='zz' src='{2}'>",this_img.width,this_img.height,this_img.url),_caption_content=General.is_null_empty_undefined(this_img.title)?"":this_img.title+" - ",_caption_content=(_caption_content+=General.is_null_empty_undefined(this_img.caption)?"":this_img.caption)+(General.is_null_empty_undefined(this_img.credit)?"":" photo credit: "+this_img.credit),General.is_null_empty_undefined(_caption_content)?_ap_html+="<span id='476244_2278' contenteditable='true' class='caption public_hide'>Enter a caption (optional)</span>":_ap_html+=String.format("<span id='476244_2278' contenteditable='true' class='caption'>{0}</span>",_caption_content),_ap_html+="</div>")}_ap_html=(_ap_html+=General.is_null_empty_undefined(data.data.details)?"":data.data.details)+String.format("<div data-split-it data-canonical_link_url={0} data-split-it-again style='display: none;'><div>",_award_url),$("#post").html(_ap_html),$("#post_title").text("Award Spotlight: "+data.data.title),$("#subtitle").text(String.format("by {0} for {1}",data.data.designer_name,data.data.project_for))}else $("#err_mess").removeClass("hide"),$("#err_mess").text(data.text)})})},function(_obj){Object_Base.call(this,_obj)}),Multi_Element=(Coroflot_Util.inherits(Object_Base),Coroflot_Util.handle_hot_percentages_draw=function(_maximum_score){_maximum_score=parseFloat(_maximum_score),$(".coroflot_trending_block .item > .percent_hot_wrap").each(function(index,val){var cumulativePercent=0,svgEl=$(this).find("svg"),_score=parseFloat($(this).attr("data-popular-score-fragment")),_percent_hot=General.linear_convert({current_number:_score,max_scaled_number:40,max_current_number:_maximum_score}),_score=(_percent_hot+=30,General.linear_convert({current_number:_score,max_scaled_number:20,max_current_number:_maximum_score})),_score=Math.round(_score+77),_score=($(this).find(".nums").text(_score),_percent_hot/=100,General.getCoordinatesForPercent(0)),cumulativePercent=General.getCoordinatesForPercent(cumulativePercent+=_percent_hot),_percent_hot=.5<_percent_hot?1:0,_score=[String.format("M {0} {1}",_score.x,_score.y),String.format("A 1 1 0 {0} 1 {1} {2}",_percent_hot,cumulativePercent.x,cumulativePercent.y),"L 0 0"].join(" "),_percent_hot=document.createElementNS("http://www.w3.org/2000/svg","path");_percent_hot.setAttribute("d",_score),_percent_hot.setAttribute("fill","#ff5400"),svgEl.get(0).appendChild(_percent_hot)})},function(_obj){this.use_hidden_field_csv_for_list=!General.is_null_empty_undefined(_obj.use_hidden_field_csv_for_list)&&_obj.use_hidden_field_csv_for_list,this.char_for_remove_icon=General.is_null_empty_undefined(_obj.char_for_remove_icon)?"r":_obj.char_for_remove_icon,this.char_for_edit_icon=General.is_null_empty_undefined(_obj.char_for_edit_icon)?"w":_obj.char_for_edit_icon,this.allow_sortable=!General.is_null_empty_undefined(_obj.allow_sortable)&&_obj.allow_sortable,this.allow_edit=!General.is_null_empty_undefined(_obj.allow_edit)&&_obj.allow_edit,this.exception_text=General.is_null_empty_undefined(_obj.exception_text)?"":_obj.exception_text,this.option_exception_function=!General.is_null_empty_undefined(_obj.option_exception_function)&&General.is_valid_callback(_obj.option_exception_function)?_obj.option_exception_function:function(){},this.autocomplete_source_lists=General.is_null_empty_undefined(_obj.autocomplete_source_lists)?{}:_obj.autocomplete_source_lists,this.clbk_post_add_item=General.is_null_empty_undefined(_obj.clbk_post_add_item)?function(){}:_obj.clbk_post_add_item,this.allow_genesis=!General.is_null_empty_undefined(_obj.allow_genesis)&&_obj.allow_genesis,this.genesis_callback=General.is_null_empty_undefined(_obj.genesis_callback)?function(){}:_obj.genesis_callback,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?{}:_obj.shell_obj}),Image_Upload_Count_Queues=(Multi_Element.prototype={constructor:Multi_Element,create_addition_box_via_values:function(loc,_val,_text,_exception,custom_class){var _editable_option,loc=this;return custom_class=null!=custom_class?custom_class:"",_text==_exception?String.format("<span class='no_icon custom_class' data-id='{0}'>{1}</span>",_val,_text):(_exception=loc.allow_sortable?"move":"",_editable_option=loc.allow_edit?String.format("<em data-button='edit' class='edit'>{0}</em>",loc.char_for_edit_icon):"",String.format("<span class='{0}' data-id='{1}'><i class='{2}'>{3}</i><em data-button='remove' class='remove'>{4}</em>{5}</span>",custom_class,_val,_exception,_text,loc.char_for_remove_icon,_editable_option))},display_to_user_over_limit_allowed:function(_max_count,_property_name){alert(String.format("{0} has a max limit of {1} entries",_property_name,_max_count))},add_addition_box_node_via_select:function(loc,$this,set_additions,_node,_max_count,_min_count,_property_name){var _val=$this.val(),_text=$this.find("option[value="+_val+"]").text(),_html=loc.create_addition_box_via_values(loc,_val,_text),current_count=set_additions.length;""!=_text&&!set_additions.contains(_val)&&""!=_val&&current_count<_max_count&&$(_html).appendTo(_node),current_count==_max_count&&loc.display_to_user_over_limit_allowed(_max_count,_property_name),$this.val("")},add_addition_box_node_via_input:function(loc,$this,set_additions,_node,_max_count,_min_count,_property_name,mode,edit_obj){var _val=$this.val(),is_valid=!0,_text=("url"!==$this.attr("data-field-utility")||(_val=General.resolve_url(_val)).is_valid_URL()||(alert("Please enter a valid URL"),is_valid=!1),_val),_html=loc.create_addition_box_via_values(loc,_val,_text),current_count=set_additions.length;"add"==mode?(""!=_text&&!set_additions.contains(_val)&&""!=_val&&current_count<_max_count&&is_valid&&$(_html).appendTo(_node),current_count==_max_count&&loc.display_to_user_over_limit_allowed(_max_count,_property_name),is_valid&&$this.val("")):"edit"==mode&&("prependTo"==edit_obj.type||"appendTo"==edit_obj.type?$(_html)[edit_obj.type](_node):"insertAfter"==edit_obj.type&&$(_html)[edit_obj.type](edit_obj.$prev_sibling_node),$this.parent().find(".addition_box_input_add_btn").text("Add").removeClass("update"),$this.val(""))},get_addition_box_nodes:function(_node){var _additions=new Array;return General.is_null_empty_undefined(_node.find("span"))||_node.find("span").each(function(index,val){_additions.push($(this).attr("data-id"))}),_additions},handle_data_nodes_to_hidden_field_csv_value:function(loc,_addition_box,$this,delimiter){delimiter=General.is_null_empty_undefined(delimiter)?",":delimiter;loc.use_hidden_field_csv_for_list&&(loc=loc.get_addition_box_nodes(_addition_box),$this.parent().find(".list_as_csv").val(loc.join(unescape(delimiter))).trigger("change"))},addition_box_input_action:function(loc,$this,mode,edit_obj){"add"!=mode&&"edit"==mode&&edit_obj.$edit_node.remove();var delimiter=General.is_null_empty_undefined($this.attr("data-delimiter"))?",":$this.attr("data-delimiter"),_max_count=parseInt($this.parent().parent().attr("data-max-node-count")),_min_count=parseInt($this.parent().parent().attr("data-min-node-count")),_property_name=$this.parent().parent().attr("data-property-name"),_addition_box=$this.parent().next(),set_nodes=loc.get_addition_box_nodes(_addition_box);loc.add_addition_box_node_via_input(loc,$this,set_nodes,_addition_box,_max_count,_min_count,_property_name,mode,edit_obj),loc.handle_data_nodes_to_hidden_field_csv_value(loc,_addition_box,$this,delimiter)},init:function(){var loc=this;$(".addition_box_select").live("change",function(){var delimiter,_max_count,_min_count,_property_name,_addition_box,set_nodes,$this=$(this);$this.hasClass("no_wipe")||(delimiter=General.is_null_empty_undefined($this.attr("data-delimiter"))?",":$this.attr("data-delimiter"),_max_count=parseInt($this.parent().parent().attr("data-max-node-count")),_min_count=parseInt($this.parent().parent().attr("data-min-node-count")),_property_name=$this.parent().parent().attr("data-property-name"),_addition_box=$this.parent().next(),set_nodes=loc.get_addition_box_nodes(_addition_box),$this.val()==loc.exception_text?loc.option_exception_function($this):(loc.add_addition_box_node_via_select(loc,$this,set_nodes,_addition_box,_max_count,_min_count,_property_name),loc.handle_data_nodes_to_hidden_field_csv_value(loc,_addition_box,$this,delimiter)))}),$(".addition_box_input_add_btn").live("click",function(){var $edit_node,edit_obj,$this;$(this).hasClass("update")?(edit_obj={type:"",$prev_sibling_node:"",$edit_node:$edit_node=($this=$(this).parent().find(".addition_box_input")).parent().next().find(".in_edit")},0==$edit_node.prev().length?edit_obj.type="prependTo":0==$edit_node.next().length?edit_obj.type="appendTo":(edit_obj.type="insertAfter",edit_obj.$prev_sibling_node=$edit_node.prev()),loc.addition_box_input_action(loc,$this,"edit",edit_obj)):($this=$(this).parent().find(".addition_box_input"),loc.addition_box_input_action(loc,$this,"add"))}),$(".addition_box span em.remove").live("click",function(e){var $this_node=$(this).parent(),_addition_box=$this_node.parent(),_delimiter=$this_
1node.parent().prev().find(".addition_box_handle_modifier").attr("data-delimiter"),$this_input_handle=_addition_box.prev().find(".addition_box_handle_modifier");0==$this_input_handle.length&&($this_input_handle=_addition_box.prev().find(".addition_box_select")),$this_node.remove(),loc.handle_data_nodes_to_hidden_field_csv_value(loc,_addition_box,$this_input_handle,_delimiter)}),$(".addition_box span em.edit").live("click",function(e){var $this_node=$(this).parent(),_val=$this_node.attr("data-id"),_addition_box=$this_node.parent(),$this_input_handle=_addition_box.prev().find(".addition_box_handle_modifier"),_addition_box=_addition_box.prev().find(".addition_box_input_add_btn");$this_node.addClass("in_edit"),$this_input_handle.val(_val),_addition_box.text("Update").addClass("update")}),$(".addition_box_input").keyup(function(e){e.which==KEYS.enter&&$(this).parent().find(".addition_box_input_add_btn").trigger("click")}),$(".addition_box_input_autocomplete_source").live("keyup",function(e){var $this=$(this),_current_text=$this.val(),use_list=$this.attr("data-autocomplete-source-list"),_max_count=General.is_null_empty_undefined($this.attr("data-max-count-autocomplete-list"))?10:parseInt($this.attr("data-max-count-autocomplete-list")),_class_selector_ac=String.format("{0}_autocomplete_wrap",use_list);if(e.which==KEYS.down_arrow||e.which==KEYS.up_arrow){var match_count=$(String.format(".{0} > span",_class_selector_ac)).length,current_node=0<$(String.format(".{0} > span.selected",_class_selector_ac)).length?$(String.format(".{0} > span.selected",_class_selector_ac)).index():-1,new_node="";e.which==KEYS.down_arrow?new_node=current_node+1<match_count?current_node+1:match_count-1:e.which==KEYS.up_arrow&&(new_node=0<=current_node-1?current_node-1:0),$(String.format(".{0} > span",_class_selector_ac)).removeClass("selected"),$($(String.format(".{0} > span",_class_selector_ac)).get(new_node)).addClass("selected")}else if(e.which==KEYS.enter||e.which==KEYS.escape)e.which==KEYS.enter?0<$(String.format(".{0} > span.selected",_class_selector_ac)).length?$(String.format(".{0} > span.selected",_class_selector_ac)).trigger("click"):loc.allow_genesis&&($this.val(""),General.is_null_empty_undefined(_current_text)||(match_count=_current_text.remove_all_non_numbers_letters_spaces(),confirm(String.format('Are you sure you would like to add the Channel/Tag "{0}". Please note this can not be undone. You will be able to remove the channel from this post, but it will remain in the system as a valid option. If you are confused please ask someone prior to adding this.',match_count))&&loc.genesis_callback(match_count,$this,loc))):(e.which,KEYS.escape),$(String.format(".{0}",_class_selector_ac)).remove();else if(2<=_current_text.length){if($(String.format(".{0}",_class_selector_ac)).remove(),!General.is_null_empty_undefined(_current_text)){for(var _match_count=0,_html=String.format("<div class='{0} addition_box_autocomplete_wrap'>",_class_selector_ac),_str_test=String.format("^{0}",_current_text),k=0;k<loc.autocomplete_source_lists[use_list].length;k++){var num_chars_entered,regex_match,filtered_resp,item=loc.autocomplete_source_lists[use_list][k];if(new RegExp(_str_test,"gi").test(item.name)&&(num_chars_entered=_current_text.length,regex_match=new RegExp(_current_text,"i"),regex_match=item.name.search(regex_match),filtered_resp=(filtered_resp=item.name.insert(regex_match,"<strong>")).insert(regex_match+num_chars_entered+8,"</strong>"),_html+=String.format("<span class='{0}' data-id='{1}'>{2}</span>",loc.autocomplete_list_class,item.id,filtered_resp),_match_count++),_max_count<=_match_count)break}_html+="</div>",$(_html).insertAfter($this)}}else $(String.format(".{0}",_class_selector_ac)).remove()}),$(".channel_list_autocomplete_wrap  span").live("click",function(e){var $this=$(this),_val=$this.attr("data-id"),_text=$this.text(),_addition_box=$this.parent().parent().next(),set_additions=loc.get_addition_box_nodes(_addition_box),_html=loc.create_addition_box_via_values(loc,_val,_text),current_count=set_additions.length,_max_count=parseInt($this.parent().parent().parent().attr("data-max-node-count")),_property_name=$this.parent().parent().parent().attr("data-property-name"),delimiter=General.is_null_empty_undefined($this.attr("data-delimiter"))?",":$this.attr("data-delimiter");""!=_text&&!set_additions.contains(_val)&&""!=_val&&current_count<_max_count&&$(_html).appendTo(_addition_box),current_count==_max_count&&loc.display_to_user_over_limit_allowed(_max_count,_property_name),loc.handle_data_nodes_to_hidden_field_csv_value(loc,_addition_box,$this.parent(),delimiter),$this.parent().parent().find(".addition_box_input_autocomplete_source").val(""),$this.parent().remove()})}},function(_obj){Object_Base.call(this,_obj),this.to_upload=0,this.is_uploaded=0,this.upload_failed=0}),History_State=(Image_Upload_Count_Queues.inherits(Object_Base),Image_Upload_Count_Queues.fn.reset=function(){this.to_upload=0,this.is_uploaded=0,this.upload_failed=0},Image_Upload_Count_Queues.fn.is_start=function(){return 0==this.to_upload},Image_Upload_Count_Queues.fn.is_end=function(){return this.to_upload==this.is_uploaded},Image_Upload_Count_Queues.fn.uploaded=function(){this.is_uploaded++},Image_Upload_Count_Queues.fn.added=function(){this.to_upload++},Image_Upload_Count_Queues.fn.failed=function(){this.upload_failed++},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["id","page","user_id","extra_ids_obj","title","update_url","section"])),this.id=General.is_null_empty_undefined(_obj.id)?0:_obj.id,this.page=General.is_null_empty_undefined(_obj.page)?"":_obj.page,this.user_id=General.is_null_empty_undefined(_obj.user_id
1)?0:_obj.user_id,this.extra_ids_obj=General.is_null_empty_undefined(_obj.extra_ids_obj)?{}:_obj.extra_ids_obj,this.title=General.is_null_empty_undefined(_obj.title)?"":_obj.title,this.update_url=General.is_null_empty_undefined(_obj.update_url)?"":_obj.update_url,this.section=General.is_null_empty_undefined(_obj.section)?"":_obj.section}),URL_Via_History_API=function(_obj){Object_Base.call(_obj,this),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["use_google_analytics_page_update"])),this.use_google_analytics_page_update=!General.is_null_empty_undefined(_obj.use_google_analytics_page_update)&&_obj.use_google_analytics_page_update},Google_Ad_Induction=(URL_Via_History_API.inherits(Object_Base),URL_Via_History_API.fn.update_history_state=function(state_obj,_callback){history.pushState(state_obj,state_obj.title,state_obj.update_url),document.title=state_obj.title,ga("set","page",location.pathname),ga("send","pageview"),General.is_valid_callback(_callback)&&_callback()},URL_Via_History_API.fn.init=function(){},function(){}),Meta_Data_Set=(Google_Ad_Induction.ad_types={leaderboard:1,three_hundo_by:2,high_impact:3,fluid_adsense:4,c77_sidebar_300x600:5,c77_passback_ad:6,c77_induction_in_article_unit:7,c77_skybox_images:8,c77_skybox_logos:9,c77_sponsor_full_sidebar_300x600:10,evergreen_300_600_2:11,evergreen_300_600_3:12,special_300_600:13},Google_Ad_Induction.create_ad_slot=function(_obj){General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["type","unique_number","unique_ad_slot_id"]));var created_zone="",mapping="";switch(_obj.type){case Google_Ad_Induction.ad_types.leaderboard:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_leaderboard_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){mapping=googletag.sizeMapping().addSize([1350,200],[970,90]).addSize([1125,200],[728,90]).addSize([901,200],[320,50]).addSize([730,200],[728,90]).addSize([0,0],[320,50]).build(),GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/c77_adsense_leaderboard_post_skybox_backfill",[[320,50],[970,90],[728,90]],created_zone).defineSizeMapping(mapping),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices(),googletag.display(created_zone)});break;case Google_Ad_Induction.ad_types.three_hundo_by:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_three_hundo_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){mapping=googletag.sizeMapping().addSize([0,0],[[300,250],[300,600]]).build(),GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/C77-Blog-Permalinks-ATF-RightSide-MedRect-300x250",[[300,250],[300,600]],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices(),googletag.display(created_zone)});break;case Google_Ad_Induction.ad_types.high_impact:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_highimpact_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){var mapping_high_impact=googletag.sizeMapping().addSize([1260,0],["fluid",[970,250]]).addSize([969,0],["fluid",[728,90]]).addSize([727,0],["fluid",[300,250]]).build();GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/C77-High-Impact-2",["fluid",[970,250],[728,90],[300,250]],created_zone).defineSizeMapping(mapping_high_impact),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.fluid_adsense:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/C77_Induction_Adsense",[300,250],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.c77_sidebar_300x600:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/100557188/ca-pub-2224625513254808-tag/core77",[300,600],created_zone),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.c77_passback_ad:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/100557188/ca-pub-2224625513254808-tag/core77",[300,250],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices(),googletag.display(created_zone)});break;case Google_Ad_Induction.ad_types.c77_induction_in_article_unit:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_in_article_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/Adsense_induction_in_article",["fluid"],created_zone),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.c77_skybox_images:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("skybox_image_zone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/skybox_ad_unit_image",["fluid"],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.c77_skybox_logos:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("skybox_logo_zone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/skybox_ad_unit_logo",["fluid"],created_zone),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.c77_sponsor_full_sidebar_300x600:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("full_sponsor_zone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/300x600_sidebar_full_sponsor_unit",[300,600],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.evergreen_300_600_2:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/100557188/ca-pub-2224625513254808-tag/core77-b",[300,600],created_zone),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.evergreen_300_600_3:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_adsense_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/100557188/ca-pub-2224625513254808-tag/core77-c",[300,600],created_zone),GOOG
1LE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()});break;case Google_Ad_Induction.ad_types.special_300_600:created_zone=General.is_null_empty_undefined(_obj.unique_ad_slot_id)?String.format("induced_special_adzone_{0}",_obj.unique_number):_obj.unique_ad_slot_id,googletag.cmd.push(function(){GOOGLE_AD_ZONES[created_zone]=googletag.defineSlot("/3452054/300x600_special_ad_unit",[300,600],created_zone),GOOGLE_AD_ZONES[created_zone].addService(googletag.pubads()),GOOGLE_AD_ZONES[created_zone].setCollapseEmptyDiv(!0),googletag.display(created_zone),googletag.enableServices()})}return created_zone},Google_Ad_Induction.init_ad_slot=function(created_zone){setTimeout(function(){try{googletag.cmd.push(function(){googletag.display(created_zone)})}catch(e){printf(e,"error from ad induce")}},500)},function(_obj){Object_Base.call(_obj,this),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["id","title","description","url","image"])),this.id=General.is_null_empty_undefined(_obj.id)?0:_obj.id,this.title=General.is_null_empty_undefined(_obj.title)?"":_obj.title,this.description=General.is_null_empty_undefined(_obj.description)?"":_obj.description,this.url=General.is_null_empty_undefined(_obj.url)?"":_obj.url,this.image=General.is_null_empty_undefined(_obj.image)?"":_obj.image,this.title=General.is_null_empty_undefined(_obj.title)?"":_obj.title}),Intersection_Observer_Custom=(Meta_Data_Set.inherits(Object_Base),function(_obj){this.class_add_name=General.is_null_empty_undefined(_obj.class_add_name)?"is_visible":_obj.class_add_name,this.selector_to_handle=General.is_null_empty_undefined(_obj.selector_to_handle)?"":_obj.selector_to_handle,this.options=General.is_null_empty_undefined(_obj.options)?{rootMargin:"0px",threshold:.35}:_obj.options,this.observer="",this.$sections=""}),Keep_Set_Scroll_Position=(Intersection_Observer_Custom.inherits(Object_Base),Intersection_Observer_Custom.fn.callback=function(entries){printf(this,"loc from within observer"),$.each(entries,function(index,val){.35<=this.intersectionRatio?this.target.classList.add("is_visible"):this.target.classList.remove("is_visible")})},Intersection_Observer_Custom.fn.re_init=function(){this.observer.disconnect(),this.init()},Intersection_Observer_Custom.fn.init=function(){var loc=this;"IntersectionObserver"in window?(loc.$sections=$(loc.selector_to_handle),loc.observer=new IntersectionObserver(loc.callback,loc.options),loc.$sections.each(function(index,val){loc.observer.observe($(this).get(0))})):$(loc.selector_to_handle).addClass("is_visible")},function(_obj){this.keep=0}),Webinar_Registrant=(Keep_Set_Scroll_Position.inherits(Object_Base),Keep_Set_Scroll_Position.fn.set_keep=function(_keep){this.keep=null!=_keep?_keep:$(window).scrollTop()},Keep_Set_Scroll_Position.fn.set_scroll_from_keep=function(_offset){null==_offset&&(_offset=0),document.body.scrollTop=document.documentElement.scrollTop=this.keep+_offset},function(_obj){Object_Base.call(_obj,this),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["first_name","last_name","email","confirm_email","organization","job_title"])),this.first_name=General.is_null_empty_undefined(_obj.first_name)?"":_obj.first_name,this.last_name=General.is_null_empty_undefined(_obj.last_name)?"":_obj.last_name,this.email=General.is_null_empty_undefined(_obj.email)?"":_obj.email,this.confirm_email=General.is_null_empty_undefined(_obj.confirm_email)?"":_obj.confirm_email,this.organization=General.is_null_empty_undefined(_obj.organization)?"":_obj.organization,this.job_title=General.is_null_empty_undefined(_obj.job_title)?"":_obj.job_title,this.webinar_is_open=!General.is_null_empty_undefined(_obj.webinar_is_open)&&_obj.webinar_is_open}),Event_Registrant=(Webinar_Registrant.inherits(Object_Base),Webinar_Registrant.fn.get_params=function(){return{first_name:this.first_name,last_name:this.last_name,email:this.email,org:this.organization,job_title:this.job_title,webinar_is_open:this.webinar_is_open}},Webinar_Registrant.fn.is_validate=function(prop_arr){var loc=this,result={is_valid:!0,not_val
1id:[]};return loc.confirm_email!==loc.email&&(result.is_valid=!1,result.not_valid.push("confirm_email")),null!=prop_arr?$.each(loc,function(index,val){prop_arr.includes(index)&&("user_email"===index&&!val.is_valid_email()||General.is_null_empty_undefined(val))&&(result.is_valid=!1,result.not_valid.push(index))}):$.each(loc,function(index,val){General.is_class_property(loc[index])&&("email"===index&&!val.is_valid_email()||General.is_null_empty_undefined(val))&&(result.is_valid=!1,result.not_valid.push(index))}),result},function(_obj){Object_Base.call(_obj,this),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["first_name","last_name","email","company_name","job_title","event_name"])),this.first_name=General.is_null_empty_undefined(_obj.first_name)?"":_obj.first_name,this.last_name=General.is_null_empty_undefined(_obj.last_name)?"":_obj.last_name,this.email=General.is_null_empty_undefined(_obj.email)?"":_obj.email,this.company_name=General.is_null_empty_undefined(_obj.company_name)?"":_obj.company_name,this.job_title=General.is_null_empty_undefined(_obj.job_title)?"":_obj.job_title,this.event_name=General.is_null_empty_undefined(_obj.event_name)?"":_obj.event_name}),Form_Member=(Event_Registrant.inherits(Object_Base),Event_Registrant.fn.get_params=function(){return{first_name:this.first_name,last_name:this.last_name,email:this.email,company_name:this.company_name,job_title:this.job_title,event_name:this.event_name}},Event_Registrant.fn.is_validate=function(prop_arr){var loc=this,result={is_valid:!0,not_valid:[]};return null!=prop_arr?$.each(loc,function(index,val){prop_arr.includes(index)&&("user_email"===index&&!val.is_valid_email()||General.is_null_empty_undefined(val))&&(result.is_valid=!1,result.not_valid.push(index))}):$.each(loc,function(index,val){General.is_class_property(loc[index])&&("email"===index&&!val.is_valid_email()||General.is_null_empty_undefined(val))&&(result.is_valid=!1,result.not_valid.push(index))}),result},function(_obj){this.key=_obj.key,this.type=null==_obj.type?"":_obj.type,this.data=null==_obj.data?"":_obj.data,this.has_error=!1,this.error_message=null==_obj.error_message?"":_obj.error_message,this.default_helper_text=null==_obj.default_helper_text?"":_obj.default_helper_text,this.placeholder=null==_obj.placeholder?"":_obj.placeholder,this.send=_obj.send,this.ajax_url=new String,this.group=new String,this.is_group=!1,this.ajax_param_order=new Array,this.ajax_param_names=new Array,this.use_ajax_param_names=!1,this.is_required=_obj.is_required,this.wait_for_all_to_populate=!1,this.group_leader=_obj.group_leader}),Form_Member_Collection=(Form_Member.prototype={constructor:Form_Member,set_data:function(_data){this.data=_data},set_type:function(_type){this.type=_type},set_error_message:function(_error_message){this.error_message=_error_message},set_default_helper_text:function(_text){this.default_helper_text=_text},set_ajax_url:function(_url){this.ajax_url=_url},set_group:function(_group){this.group=_group},set_is_group:function(){this.is_group=!0},set_ajax_param_order:function(_array){this.ajax_param_order=_array},set_use_ajax_param_names:function(){this.use_ajax_param_names=!0},set_ajax_param_names:function(_array){this.ajax_param_names=_array},set_wait_for_all_to_populate:function(){this.wait_for_all_to_populate=!0}},function(_obj){General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["shell_obj"])),this.members=new Array,this.valid_elements=["input[type=text]","input[type=checkbox]","input[type=hidden]","textarea","select","input[type=radio]"],this.form_selector=new String,this.shell_obj=General.is_null_empty_undefined(_obj.shell_obj)?{}:_obj.shell_obj,this.use_simple_error_message=!General.is_null_empty_undefined(_obj.use_simple_error_message)&&_obj.use_simple_error_message}),Profile_Addition_Units_Base=(Form_Member_Collection.prototype={constructor:Form_Member_Collection,get_index_from_key:function(_key){for(var _index=-1,k=0;k<this.members.length;k++)this.members[k].key==_key&&(_index=k);return _index},add_ajax_url_from_keys:function(_key_array,_url,_group,_wait_to_send){for(var k=0;k<this.members.length;k++)for(var m=0;m<_key_array.length;m++)_key_array[m]==this.members[k].key&&(1<_key_array.length&&(this.members[k].set_group(_group),this.members[k].set_is_group(),null!=_wait_to_send)&&_wait_to_send&&this.members[k].set_wait_for_all_to_populate(),this.members[k].set_ajax_param_order(_key_array),this.members[k].set_ajax_url(_url))},add_ajax_param_names:function(_key_array,_param_array){for(var k=0;k<this.members.length;k++)for(var m=0;m<_key_array.length;m++)_key_array[m]==this.members[k].key&&(this.members[k].set_ajax_param_names(_param_array),this.members[k].set_use_ajax_param_names())},add_group_from_key_array:function(_key_array,_group){for(var k=0;k<this.members.length;k++)for(var m=0;m<_key_array.length;m++)_key_array[m]==this.members[k].key&&(this.members[k].set_group(_group),this.members[k].set_is_group(),this.members[k].set_ajax_param_order(_key_array))},add:function(_key,_type,_send_bool,_is_required,_placeholder,_default_helper_text,_group_leader){this.members.push(new Form_Member({key:_key,type:_type,send:_send_bool,is_required:_is_required,placeholder:_placeholder,default_helper_text:_default_helper_text,group_leader:_group_leader}))},init:function(_id,_parent){var loc=this;_parent=null==_parent?"":_parent+" ",loc.form_selector=_parent+" form#"+_id,$.each(loc.valid_elements,function(index,val){var current_elem=this;$(_parent+"form#"+_id+" "+current_elem).each(function(index,val){var $this=$(this),_type=current_elem.toString(),_default_helper_text=new String;switch(_type){case"input[type=text]":case"textarea":_default_helper_text=$this.prev().find("em").text();break;case"select":_default_helper_text=$this.parent().parent().parent().prev().find("em").text()}var _type=!$(this).hasClass("ignore_element"),_is_required="true"==$(this).attr("data-required"),_placeholder=($(this).attr("data-allow-empty-string"),$(this).attr("placeholder")),_group_leader="true"==$(this).attr("data-group-leader");loc.add($(this).attr("id"),current_elem.toString(),_type,_is_required,_placeholder,_default_helper_text,_group_leader)})}),printf(loc.members,"this.init")},completed_required:function(){for(var required_member_indicies=new Array,count=0,k=0;k<this.members.length;k++)this.members[k].is_required&&required_member_indicies.push(k);for(k=0;k<required_member_indicies.length;k++)""==this.members[k].data&&0==this.members[k].data?this.send_data_field(this.members[k].key):count++;return count>=required_member_indicies.length},handle_required:function(node,type){},get_group_leader:function(_index,_group){for(var _group_leader=-1,k=0;k<this.members.length;k++)this.members[k].group==_group&&this.members[k].group_leader&&(_group_leader=k);return _group_leader},add_errors:function(err_obj){for(var loc=this,k=0;k<loc.members.length;k++)$.each(err_obj,function(index,value){if(loc.members[k].key==this.key){if(printf(this,"error"),loc.use_simple_error_message&&(this.message="Required"),"specialty_1"==loc.members[k].group||"specialty_2"
1==loc.members[k].group||"specialty_3"==loc.members[k].group)for(var m=0;m<loc.members.length;m++)"specialty_1"!=loc.members[m].group&&"specialty_2"!=loc.members[m].group&&"specialty_3"!=loc.members[m].group||loc.members[m].set_error_message(this.message);loc.members[k].is_group,loc.members[k].set_error_message(this.message)}});printf(loc.members,"this.add_errors"),loc.adjust_dom_for_errors()},remove_errors:function(params){printf(params,"params_remove_errors");var loc=this;$.each(params,function(index,value){index=loc.get_index_from_key(index);if("specialty_1"==loc.members[index].group||"specialty_2"==loc.members[index].group||"specialty_3"==loc.members[index].group)for(var m=0;m<loc.members.length;m++)"specialty_1"!=loc.members[m].group&&"specialty_2"!=loc.members[m].group&&"specialty_3"!=loc.members[m].group||loc.members[m].set_error_message("");else if("location"==loc.members[index].group)for(m=0;m<loc.members.length;m++)"location"==loc.members[m].group&&loc.members[m].set_error_message("");else loc.members[index].set_error_message("")}),loc.adjust_dom_for_errors()},adjust_dom_for_errors:function(){for(var loc=this,k=0;k<loc.members.length;k++){var $key=$("#"+loc.members[k].key);switch(loc.members[k].type){case"input[type=text]":""!=loc.members[k].error_message?($key.addClass("error"),$key.prev().find("em").addClass("error").text(loc.members[k].error_message)):($key.removeClass("error"),$key.prev().find("em").removeClass("error").text(loc.members[k].default_helper_text));break;case"input[type=checkbox]":case"input[type=hidden]":break;case"textarea":""!=loc.members[k].error_message?($key.addClass("error"),$key.prev().find("em").addClass("error").text(loc.members[k].error_message)):($key.removeClass("error"),$key.prev().find("em").removeClass("error").text(loc.members[k].default_helper_text));break;case"select":""!=loc.members[k].error_message?($key.parent().addClass("error"),$key.parent().parent().parent().prev().find("em").addClass("error").text(loc.members[k].error_message)):($key.parent().removeClass("error"),$key.parent().parent().parent().prev().find("em").removeClass("error").text(loc.members[k].default_helper_text))}}},set_data_from_form:function(){for(var loc=this,k=0;k<loc.members.length;k++)if(""!=loc.members[k].key){var $key=""!=loc.form_selector?$(loc.form_selector+" #"+loc.members[k].key):$("#"+loc.members[k].key),this_val=$key.val();switch("true"==$key.attr("data-required")&&loc.handle_required($key,loc.members[k].type),loc.members[k].type){case"input[type=text]":var force_string=!General.is_null_empty_undefined($key.attr("data-force-string")),force_string=/^\d+$/.test(this_val)&&!force_string?parseInt(this_val):this_val.toString();loc.members[k].set_data(force_string);break;case"input[type=checkbox]":force_string=$key.is(":checked")?"true":"false";loc.members[k].set_data(force_string);break;case"input[type=hidden]":force_string=/^\d+$/.test(this_val)?parseInt(this_val):this_val;null!=$key.attr("data-force-string")&&(force_string=this_val),loc.members[k].set_data(force_string);break;case"textarea":loc.members[k].set_data(this_val);break;case"select":case"input[type=radio]":force_string=/^\d+$/.test(this_val)?parseInt(this_val):this_val;loc.members[k].set_data(force_string)}}},send_data_field:function(_key,_callback){var loc=this,_index=loc.get_index_from_key(_key);if(printf(_index,"_index"),loc.set_data_from_form(),!loc.is_ready_to_send(loc.members[_index].ajax_param_order))return"not ready";var params=loc.json_param_multi(_index).toSend,param_keys=loc.json_param_multi(_index).keys;printf(loc.members[_index].ajax_url,"ajax url"),$.ajax({url:loc.members[_index].ajax_url,data:params,type:"POST",dataType:"json",success:function(data){"ok"==data.status||1==data.status?(loc.remove_errors(param_keys),null!=_callback&&($.extend(data,{single:loc.members[_index].data,multi:params,shell_obj:loc.shell_obj}),_callback(data))):loc.add_errors(JSON.parse(data.errors))}})},is_ready_to_send:function(_key_array){var count=0;if(1<_key_array.length)for(var m=0;m<_key_array.length;m++)for(var k=0;k<this.members.length;k++)_key_array[m]!=this.members[k].key||this.members[k].wait_for_all_to_populate&&(""==this.members[k].data&&0==this.members[k].data||count++,"true"!=$("#"+this.members[k].key).attr("data-allow-empty-string"))||count++;else count++;return _key_array.length<=count},json_param_multi:function(_index){for(var loc=this,_key_array=(loc.set_data_from_form(),loc.members[_index].ajax_param_order),use_param_array=loc.members[_index].use_ajax_param_names,send_obj={toSend:new Object,keys:new Object},m=0;m<_key_array.length;m++)for(var k=0;k<loc.members.length;k++)_key_array[m]==loc.members[k].key&&loc.members[k].send&&(printf(loc.members[k].placeholder,"placeholder"),printf(loc.members[k].data,"data"),use_param_array?send_obj.toSend[loc.members[_index].ajax_param_names[m]]=loc.members[k].data!==loc.members[k].placeholder?loc.members[k].data:"":send_obj.toSend[_key_array[m]]=loc.members[k].data!==loc.members[k].placeholder?loc.members[k].data:"",send_obj.keys[_key_array[m]]=loc.members[k].data!==loc.members[k].placeholder?loc.members[k].data:"");return printf(send_obj,"json_param_multi"),send_obj},json_param:function(){this.set_data_from_form(),printf(this.members,"this.set_data");for(var send_obj=new Object,k=0;k<this.members.length;k++)this.members[k].send&&(send_obj[this.members[k].key]=this.members[k].data);return printf(send_obj,"json_send obj"),send_obj}},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null(["wrap_modal_ref","add_to_dom"])),this.form_collection=new Form_Member_Collection({use_simple_error_message:!0}),this.wrap_modal_ref=General.is_null_empty_undefined(_obj.wrap_modal_ref)?{}:_obj.wrap_modal_ref,this.save_callback=General.is_null_empty_undefined(_obj.save_callback)?function(){}:_obj.save_callback,this.add_to_dom=!!General.is_null_empty_undefined(_obj.add_to_dom)||_obj.add_to_dom}),Profile_Link_Unit=(Profile_Addition_Units_Base.inherits(Object_Base),Profile_Addition_Units_Base.fn.destroy=function(){$("#save_btn").die("click"),$("#location").die("focus"),$("li.checkbox_wrap").die("click")},Profile_Addition_Units_Base.fn.draw_and_destroy=function(loc,_data){loc.add_to_dom&&(_data=unescape(_data),$(String.format("div.addition_units.{0} .unit_saved_container",loc.wrapper_class)).empty(),$(_data).appendTo($(String.format("div.addition_units.{0} .unit_saved_container",loc.wrapper_class)))),loc.save_callback(),loc.wrap_modal_ref.remove_overlay(),loc.destroy()},function(_obj){Profile_Addition_Units_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null([""])),this.wrapper_class="profile_links"}),Profile_Inquiry_Unit=(Profile_Link_Unit.inherits(Profile_Addition_Units_Base),Profile_Link_Unit.fn.init=function(){var loc=this;loc.form_collection.init("add_edit_link"),$("#save_btn").live("click",function(event){event.preventDefault(),loading.create(),$("div#load_action").addClass("loading"),$.post("/account/profile_link_update",loc.form_collection.json_param(),function(data){loading.remove(),General.status_ok(data.status)?loc.draw_and_destroy(loc,data.data):($("div#load_action").removeClass("loading"),loc.form_collection.add_errors(eval(data.errors)))})}),$("[data-input-profile-url]").live({focus:function(e){},keyup:function(e){var _val=(_val=$(this).val()).replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace(/\s\s*/,"").replace(/&(nbsp);/g,"").replace(/\s/g,"");$(this).val(_val),0<_val.length&&(/(youtube)/gi.test(_val)?$("#add_edit_link #link_type option[value=6]").attr("selected","selected"):/(facebook)/gi.test(_val)?$("#add_edit_link #link_type option[value=3]").attr("selected","selected"):/(twitter)/gi.test(_val)?$("#add_edit_link #link_type option[value=4]").attr("selected","selected"):/(instagram)/gi.test(_val)&&$("#add_edit_link #link_type option[value=5]").attr("selected","selected"))},blur:function(e){},paste:function(e){$(e.target).keyup()}})},function(_obj){Profile_Addition_Units_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null([""])),this.wrapper_class="profile_inquiries"}),Profile_Award_Press_Unit=(Profile_Inquiry_Unit.inherits(Profile_Addition_Units_Base),Profile_Inquiry_Unit.fn.init=function(){var loc=this;loc.form_collection.init("add_edit_inquiry"),$("#save_btn").live("click",function(event){event.preventDefault(),loading.create(),$("div#load_action").addClass("loading"),$.post("/account/profile_inquiry_update",loc.form_collection.json_param(),function(data){loading.remove(),General.status_ok(data.status)?loc.draw_and_destroy(loc,data.data):($("div#load_action").removeClass("loading"),loc.form_collection.add_errors(eval(data.errors)))})})},function(_obj){Profile_Addition_Units_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null([""])),this.wrapper_class="profile_awards_press"}),Profile_Location_Unit=(Profile_Award_Press_Unit.inherits(Profile_Addition_Units_Base),Profile_Award_Press_Unit.fn.init=function(){var loc=this;loc.form_collection.init("add_edit_award_press"),$("#save_btn").live("click",function(event){event.preventDefault(),loading.create(),$("div#load_action").addClass("loading"),$.post("/account/profile_award_press_update",loc.form_collection.json_param(),function(data){loading.remove(),General.status_ok(data.status)?loc.draw_and_destroy(loc,data.data):($("div#load_action").removeClass("loading"),loc.form_collection.add_errors(eval(data.errors)))})})},function(_obj){Profile_Addition_Units_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&(_obj=Object_Base.initialize_obj_properties_to_null([""])),this.wrapper_class="profile_locations"}),Shuttle_Slider=(Profile_Location_Unit.inherits(Profile_Addition_Units_Base),Profile_Location_Unit.fn.init=function(){var loc=this;loc.form_collection.init("add_edit_location"),$("#save_btn").live("click",function(event){event.preventDefault(),loading.create(),$("div#load_action").addClass("loading"),$.post("/account/profile_location_update",loc.form_collection.json_param(),function(data){loading.remove(),General.status_ok(data.status)?loc.draw_and_destroy(loc,data.data):($("div#load_action").removeClass("loading"),loc.form_collection.add_errors(eval(data.errors)))})})},function(_obj){Object_Base.call(this,_obj),General.is_null_empty_undefined(_obj)&&Object_Base.initialize_obj_properties_to_null([""])}),Shell_Base=(Shuttle_Slider.inherits(Object_Base),Shuttle_Slider.fn.next=function($scroller,$this,item_width,is_revolve){$scroller.get(0).scrollLeft<$scroller.get(0).scrollWidth-$scroller.width()?($scroller.get(0).scrollBy({left:item_width,top:0,behavior:"smooth"}),$this.parent().find("[data-shuttle-dir]").removeClass("no-use")):is_revolve?$scroller.get(0).scrollBy({left:-$scroller.get(0).scrollWidth,top:0,behavior:"smooth"}):$this.addClass("no-use")},Shuttle_Slider.fn.prev=function($scroller,$this,item_width,is_revolve){0!=$scroller.get(0).scrollLeft?($scroller.get(0).scrollBy({left:-item_width,top:0,behavior:"smooth"}),$this.parent().find("[data-shuttle-dir]").removeClass("no-use")):is_revolve?$scroller.get(0).scrollBy({left:$scroller.get(0).scrollWidth,top:0,behavior:"smooth"}):$this.addClass("no-use")},Shuttle_Slider.fn.lock=function(loc,e,$this){$this.attr({"data-last-x":loc.unify(e).clientX}),printf("got to lock")},Shuttle_Slider.fn.move=function(loc,e,$this){printf("got to move");var last_x=$this.attr("data-last-x"),is_revolve=$this.data("revolve"),$scroller=$this.find("[data-shuttle-results]"),item_width=$this.find(".item").get(0).clientWidth,e=loc.unify(e).clientX;printf(e,"current_x--"),printf(last_x,"last_x--"),last_x<e?loc.prev($scroller,$this,item_width,is_revolve):e<last_x&&loc.next($scroller,$this,item_width,is_revolve)},Shuttle_Slider.fn.unify=function(e){return e.changedTouches?e.changedTouches[0]:e},Shuttle_Slider.fn.init=function(){var loc=this;$("span[data-shuttle-dir]").live("click",function(e){var $this=$(this),shuttle_dir=$this.attr("data-shuttle-dir"),item_width=$this.parent().find(".item").get(0).clientWidth,$scroller=$this.parent().find("[data-shuttle-results]"),is_revolve=$this.parent().data("revolve");"prev"===shuttle_dir?loc.prev($scroller,$this,item_width,is_revolve):"next"===shuttle_dir&&loc.next($scroller,$this,item_width,is_revolve)}),$("div[data-shuttle]").live("mousedown",function(e){var $this=$(this);loc.lock(loc,e,$this)}),$("div[data-shuttle]").live("touchstart",function(e){var $this=$(this);loc.lock(loc,e,$this)}),$("div[data-shuttle]").live("mouseup",function(e){var $this=$(this);loc.move(loc,e,$this)}),$("div[data-shuttle]").live("touchend",function(e){var $this=$(this);loc.move(loc,e,$this)})},function(_obj){this.menus=new Array,this.container_id=_obj.container_id,this.googletag_timeout,this.window_width=$(window).width(),this.global_cursor=null,this.GA4_analytics_id="",this.GA4_pass_events=[]}),Post_Base=(Shell_Base.core77_dd_footer_callback=function(data){data=data.core77_footer_doc;var _html=new String;if($("#footer_main_firm a").attr({href:data.main_firm.url}),$("#footer_main_firm .img_wrapper img").attr({src:data.main_firm.image}),$("#footer_main_firm .post_info_wrap h4 a").text(data.main_firm.firm_name).attr({href:data.main_firm.url}),$("#footer_main_firm .post_info_wrap .author_info").text(data.main_firm.location),0<data.main_firm.clients_list.client.length){for(var _html="<strong>Top Clients: </strong>",k=0;k<data.main_firm.clients_list.client.length;k++)_html+=data.main_firm.clients_list.client[k].name.replace(/\s^|\s$/,""),k<data.main_firm.clients_list.client.length-1&&(_html+=", ");$("#footer_main_firm .post_info_wrap p").html(_html)}_html=new String;for(k=0;k<data.firms.firm.length;k++)_html+=String.format("<li><a href='{0}'><img src='{1}'/></a></li>",data.firms.firm[k].url,data.firms.firm[k].logo);$("#dd_ad_footer .other_dd_companies ul").empty(),$(_html).appendTo($("#dd_ad_footer .other_dd_companies ul"))},Shell_Base.designdirectory_callback=function(data){if(data=data.core77_home_doc,$("#dd_ad .img_wrapper a").attr({href:data.main_firm.url}),$("#dd_ad .img_wrapper img").attr({src:data.main_firm.image}),$("#dd_ad .post_info_wrap h1 a").text(data.main_firm.firm_name).attr({href:data.main_firm.url}),$("#dd_ad .post_info_wrap .author_info").text(data.main_firm.location),0<data.main_firm.clients_list.client.length){for(var _html="<strong>Top Clients: </strong>",k=0;k<data.main_firm.clients_list.client.length;k++)_html+=data.main_firm.clients_list.client[k].name.replace(/\s^|\s$/,""),k<data.main_firm.clients_list.client.length-1&&(_html+=", ");$("#dd_ad .post_info_wrap p").html(_html)}},Shell_Base.core77_dd_design_firms_callback=function(data){for(var _html="<ul>",k=0;k<data.length;
1k++)"Vadan"!=data[k].firm_name&&(_html=(_html=(_html=_html+String.format("<li><a href='{0}'><div class='img_wrapper'><img src='{1}' /></div>",data[k].redirect_url,data[k].image_url)+"<div class='company_info'>")+String.format("<span class='firm_name'>{0}</span>",data[k].firm_name))+String.format("<span class='firm_location'>{0}</span>",data[k].location)+"</div></a></li>");_html+="</ul>",$("#pp_firm_wrap").empty(),$(_html).appendTo($("#pp_firm_wrap"))},Shell_Base.create_block_browser=function(){var _html=new String;return _html+"<div id='block_overlay_content_wrapper' style='top: 315px; height: 292px; width: 500px; margin-left: -250px;'>"+"<div id='block_content'>"+"<h3>Stop right there</h3>"+"<p>This site uses some browser features not available in all browsers. Creating and editing posts requires you to be using the most recent version of any of the three browsers below, click one of the links to download the most recent version.</p>"+"<ul class='browser_types'>"+"<li><a href='https://www.google.com/chrome/browser/' target='_blank'>"+"<span class='c77_icon chrome'>6</span><em>Google Chrome</em></a></li>"+"<li><a href='http://support.apple.com/downloads/#safari' target='_blank'>"+"<span class='c77_icon safari'>0</span><em>Safari</em></a></li>"+"<li><a href='https://www.mozilla.org/en-US/firefox/new/' target='_blank'>"+"<span class='c77_icon firefox'>7</span><em>Mozilla Firefox</em></a></li></ul></div></div>"+"<div id='block_overlay' class='fade_in'></div>"},Shell_Base.proceed_log_out=function(){GLOBALS.IS_LOGGED_IN=!1,GLOBALS.USER_SESSION="",$("#is_logged_in").val(!1).trigger("change");$("#secondary_nav #user_logged_in_menu").parent();Cookie.erase(GLOBALS.SESSION_COOKIE_NAME),Cookie.erase(GLOBALS.COOKIE_CODEX_NAME),window.location=GLOBALS.WEB_ROOT_PATH,loading.create()},Shell_Base.prototype={constructor:Shell_Base,add_menu:function(menu){var loc=this,menu_inst=(loc.is_menu_type(menu,Menu_Use_Text_Menu)&&loc.has_menu_type(Gallery_Image_Menu.constructor)?null!=(menu_inst=loc.get_menu_instance(Menu_Use_Text_Menu))&&menu_inst.close_menu():loc.is_menu_type(menu,Time_Menu)&&loc.has_menu_type(Schedule_Post_Menu.constructor)?null!=(menu_inst=loc.get_menu_instance(Time_Menu))&&menu_inst.close_menu():loc.close_all_other_menus(),loc.has_menu_type(menu.constructor));-1<menu_inst?loc.menus[menu_inst]=menu:loc.menus.push(menu)},has_menu_type:function(_type){for(var menu_index=-1,k=0;k<this.menus.length;k++)this.menus[k]instanceof _type&&(menu_index=k);return menu_index},is_menu_type:function(member,_type){return member instanceof _type},get_menu_instance:function(_type){_type=this.has_menu_type(_type);return-1<_type?this.menus[_type]:null},close_all_other_menus:function(_obj){null==(_obj=null==_obj?{}:_obj).ignore_types&&(_obj.ignore_types=[""]);null!=Shell_Base.tooltip&&Shell_Base.tooltip.remove_tooltip(Shell_Base.tooltip);for(var k=0;k<this.menus.length;k++)_obj.ignore_types.includes(this.menus[k].menu_type)||this.menus[k].close_menu()},close_specific_menu:function(_menu){null!=Shell_Base.tooltip&&Shell_Base.tooltip.remove_tooltip(Shell_Base.tooltip);_menu=this.get_menu_instance(_menu);null!=_menu&&_menu.close_menu()},create_addition_box_via_values:function(_val,_text,_exception,custom_class){return custom_class=null!=custom_class?custom_class:"",_text==_exception?String.format("<span class='no_icon custom_class' data-id='{0}'>{1}</span>",_val,_text):String.format("<span class='{0}' data-id='{1}'>{2}<em data-button='remove' class='remove'>r</em></span>",custom_class,_val,_text)},add_addition_box_node_via_select:function(loc,$this,set_additions,_node){var _val=$this.val(),_text=$this.find("option[value="+_val+"]").text(),loc=loc.create_addition_box_via_values(_val,_text);""==_text||set_additions.contains(_val)||""==_val||$(loc).appendTo(_node),$this.val("")},get_addition_box_nodes:function(_node){var _additions=new Array;return General.is_null_empty_undefined(_node.find("span"))||_node.find("span").each(function(index,val){_additions.push($(this).attr("data-id"))}),_additions},checkbox_handler:function($this,on_func,off_func){$this.find("span").hasClass("unchecked")?($this.find("span").removeClass("unchecked").addClass("checked"),General.is_valid_callback(on_func)&&on_func($this)):($this.find("span").removeClass("checked").addClass("unchecked"),General.is_valid_callback(off_func)&&off_func($this))},get_checkbox_checked_as_array:function($node){var _additions=new Array;return $node.each(function(index,val){$(this).find("span.checkbox").hasClass("checked")&&_additions.push($(this).attr("data-id"))}),_additions},google_ad_resizer:function(){},fix_type_face_numbers:function(){},shell_base_init:function(){},set_user_session:function(){GLOBALS.USER_SESSION=new User({name:GLOBALS.IS_LOGGED_IN?$("#session_name").val():"",avatar:GLOBALS.IS_LOGGED_IN?$("#session_avatar").val():"",link:GLOBALS.IS_LOGGED_IN?$("#session_link").val():"",id:GLOBALS.IS_LOGGED_IN?$("#session_id").val():""})},user_object_xref_success_clbk:function(data,_obj,loc){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider(_obj.success_message),_obj.$this.hasClass("already_taken")?_obj.$this.removeClass("already_taken"):_obj.$this.addClass("already_taken"),null!=_obj.override_text&&_obj.override_text||_obj.$this.text(_obj.action_taken_text)):message_slider(data.text,!0)},user_object_xref_add:function(_obj,loc){var _post_user_id=General.is_null_empty_undefined(_obj.post_user_id
1)?0:_obj.post_user_id;if(null!=_obj.object_id2&&_obj.object_type!=USER_OBJECT_XREF_TYPES.award_post_vote)$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"home/user_object_xref_add",data:{object_id:_obj.object_id,object_id2:_obj.object_id2,object_type:_obj.object_type,post_user_id:_post_user_id},dataType:"json",success:function(data){General.is_valid_callback(_obj.success_callback)&&_obj.success_callback()}});else if(_obj.$this.hasClass("already_taken"))_obj.$this.hasClass("already_taken")&&(_obj.object_type,USER_OBJECT_XREF_TYPES.award_post_vote);else if(GLOBALS.IS_LOGGED_IN)Cookie.erase("operational_values"),$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"home/user_object_xref_add",data:{object_id:_obj.object_id,object_id2:_obj.object_id2,object_type:_obj.object_type,post_user_id:_post_user_id},dataType:"json",success:function(data){Cookie.erase("operational_values"),loc.user_object_xref_success_clbk(data,_obj,loc),null!=_obj.extra_callback&&General.is_valid_callback(_obj.extra_callback)&&(_obj.object_type==USER_OBJECT_XREF_TYPES.gift_guide_vote?(data=General.parse_json_if_needed(data),_obj.extra_callback(data)):_obj.extra_callback(_obj.object_id))}});else{$("#operational_values").val(String.format("object_id={0}&object_id2={1}&object_type={2}",_obj.object_id,_obj.object_id2,_obj.object_type)),$("#signup #return_url").val(window.location),Cookie.create("operational_values",escape(String.format("return_url={0}&object_id={1}&object_id2={2}&object_type={3}",window.location,_obj.object_id,_obj.object_id2,_obj.object_type)),.5),printf(unescape(Cookie.read("operational_values")));var _header_join="",_message_join="",_header_sign_in="",_message_sign_in="";switch(_obj.object_type){case USER_OBJECT_XREF_TYPES.channel_subscribes:_message_join="To subscribe to a channel please create a Core77 Account",_header_sign_in=_header_join="Welcome",_message_sign_in="To subscribe to a channel please Sign In";break;case USER_OBJECT_XREF_TYPES.user_subscribes:_message_join="To follow an author please create a Core77 Account",_header_sign_in=_header_join="Welcome",_message_sign_in="To follow an author please Sign In";break;case USER_OBJECT_XREF_TYPES.post_recommends:_message_join="To favorite a post please create a Core77 Account",_header_sign_in=_header_join="Welcome",_message_sign_in="To favorite a post please Sign In";break;case USER_OBJECT_XREF_TYPES.design_event_save:_message_join="To save an event please create a Core77 Account",_header_sign_in=_header_join="Welcome",_message_sign_in="To save an event please Sign In";break;case USER_OBJECT_XREF_TYPES.award_post_vote:_message_join="To cast your vote please create a Core77 Account",_header_sign_in=_header_join="Welcome",_message_sign_in="To cast your vote please Sign In";break;case USER_OBJECT_XREF_TYPES.gift_guide_vote:_header_join="Join Now",_message_join="Don’t have a Core77 account yet? Don’t worry, it’s easy",_header_sign_in="Sign In",_message_sign_in="Oops : You have to sign into your Core77 account before voting"}$("#trigger_login_form").attr({"data-overlay-header-join":_header_join,"data-overlay-message-join":_message_join,"data-overlay-header-sign-in":_header_sign_in,"data-overlay-message-sign-in":_message_sign_in}),$("#trigger_login_form").trigger("click")}},design_directory_ad:function(_placement){_placement==DESIGN_DIRECTORY_AD_PLACEMENT.footer?$.ajax({url:"https://fp.coroflot.com/core77_footer_ad_jsonp.json?callbackname=Shell_Base.core77_dd_footer_callback",dataType:"jsonp",success:function(data){}}):_placement==DESIGN_DIRECTORY_AD_PLACEMENT.design_firms?$.ajax({url:"https://fp.coroflot.com/core77_firms?callbackname=Shell_Base.core77_dd_design_firms_callback",dataType:"jsonp",success:function(data){}}):_placement==DESIGN_DIRECTORY_AD_PLACEMENT.tile&&$.ajax({url:"https://fp.coroflot.com/core77_prime_ad.json?callback=?",dataType:"jsonp",success:function(data){}})},lucky_orange:function(loc){window.__wtw_lucky_site_id=36321;var lucky_orange_src=("https:"==document.location.protocol?"//ssl":"//cdn")+".luckyorange.com/w.js";General.load_js_css(lucky_orange_src,"js",function(){},loc)},skimlinks:function(loc){$("#core77").hasClass("publish")||General.load_js_css("//s.skimresources.com/js/112637X1571157.skimlinks.js","js",function(){},loc)},google_analytics_ga4:function(loc,_callback){var analytics_src=String.format("//www.googletagmanager.com/gtag/js?i
1d={0}",loc.GA4_analytics_id);General.load_js_css(analytics_src,"js",function(){if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},gtag("js",new Date),gtag("config",loc.GA4_analytics_id),0<loc.GA4_pass_events.length)for(var k=0;k<loc.GA4_pass_events.length;k++)gtag(loc.GA4_pass_events[k]);$("#core77").hasClass("award_success_payment")&&_callback()})},golden_layout_flex:function(_clbk,induce_ad){induce_ad=!!General.is_null_empty_undefined(induce_ad)||induce_ad,$(window).resize(function(){})},proceed:function(_obj,loc){GLOBALS.IS_LOGGED_IN=!0,GLOBALS.USER_SESSION=_obj.user,GLOBALS.PROFILE_COMPLETE=_obj.user.profile_complete,$("#is_logged_in").val(!0).trigger("change"),$("#operational_values").val("");$("#secondary_nav #login_modal").parent().empty().html(String.format("<a id='user_logged_in_menu' href='{1}'><img src='{2}' /></a>",GLOBALS.ROOT_PATH.append("home/logout"),GLOBALS.PUBLISH_ROOT_PATH.append("account/"),_obj.user.avatar)),$("#user_logged_in_menu img").attr({src:_obj.user.avatar}),$("#secondary_nav").addClass("logged_in");var cookie_expiration_days=84,remain_logged_in=!General.is_null_empty_undefined(_obj.remain_logged_in)&&_obj.remain_logged_in,remain_logged_in=(Cookie.create(_obj.cookie_name,_obj.cookie_val,cookie_expiration_days=remain_logged_in?cookie_expiration_days:84),Cookie.create(GLOBALS.COOKIE_CODEX_NAME,_obj.codex_cookie_val,cookie_expiration_days),General.is_null_empty_undefined(_obj.return_url)?"":_obj.return_url);General.is_null_empty_undefined(remain_logged_in)?(null!=loc.log_in_modal&&loc.log_in_modal.remove_overlay(),loading.remove()):window.location=remain_logged_in},chartbeat:function(_obj){function loadChartbeat(){window._sf_endpt=(new Date).getTime();var e=document.createElement("script");e.setAttribute("language","javascript"),e.setAttribute("type","text/javascript"),e.setAttribute("src","//static.chartbeat.com/js/chartbeat.js"),document.body.appendChild(e)}var oldonload;window._sf_async_config={},window._sf_async_config.uid=48419,window._sf_async_config.domain="core77.com",window._sf_async_config.useCanonical=!0,window._sf_async_config.sections=_obj.categories,window._sf_async_config.authors=_obj.authors,window.onload="function"!=typeof(oldonload=window.onload)?loadChartbeat:function(){oldonload(),loadChartbeat()}},get_posts_callback:function(loc,data,results,page_load_get_more){if(data=General.parse_json_if_needed(data),General.status_ok(data.status)){loading.remove(),loading.remove($("#main_wrapper .flex_col"));var data=unescape(data.text),_html="",section_count=1,_html_list=new Array;if(page_load_get_more){for(var list_li=data.split("</li>"),section_count=Math.ceil((list_li.length-1)/loc.paginator.page_size),k=0;k<section_count;k++){var end_num=loc.paginator.page_size<list_li.length?loc.paginator.page_size:list_li.length,end_num=list_li.splice(0,end_num).join("</li>");/<li/.test(end_num)&&_html_list.push(end_num)}Paginator.remove_show_more()}else _html_list.push(data);for(k=0;k<section_count;k++){new String;for(var _custom_page_topper_ad_pages=AD_ZONES.specific_zones,m=0;m<_custom_page_topper_ad_pages.length;m++)$("#core77").hasClass(_custom_page_topper_ad_pages[m])&&_custom_page_topper_ad_pages[m];var _page_number=(General.is_null_empty_undefined(loc.param_data)?loc:loc.param_data).page_number,_page_number=(_html=(_html+="<section class='section_wrap post_list'><ul class='golden_layout'>")+_html_list[k]+"</ul></section>",String.format("{0}_{1}",General.get_unique_id(),_page_number));$("#core77").hasClass("plog")||(_html=(_html+="<div class='leaderboard_ad'>")+String.format("<div class='ad_wrap' data-ad-type='1' id='{0}'></div>",_page_number)+"</div>"),$(_html).appendTo($("#main_wrapper .flex_col"));_page_number=Google_Ad_Induction.create_ad_slot({type:Google_Ad_Induction.ad_types.leaderboard,unique_ad_slot_id:_page_number});googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot(_page_number)}loc.golden_layout_flex(),loc.auto_scroll_load.is_loading_results=!1,results.show_more&&Paginator.draw_show_more(loc.paginator)}},make_reply_comment:function($this,loc){var menu_coords=new Coordinates,$elem=$this.parent().parent().parent().next(),_post_id=$this.parent().data("this-post-id"),_author_id=$this.parent().data("this-author-id"),$elem=(menu_
1coords.set_property("x",$elem.offset().left+$elem.width()/2),menu_coords.set_property("y",$elem.offset().top+$elem.height()),["add_image","add_embed","submit_comment","close_reply"]),$elem=(General.is_browser_block()&&($elem=["add_embed","submit_comment","close_reply"]),"resource_post_public"==loc.shell_type&&($elem=["submit_comment","close_reply"]),new Reply_Comment_Menu({actions:$elem,shell_obj:loc,coords:menu_coords,parent:$this.parent(),appendTo_id:"body",reply_to_id:$this.parent().parent().parent().parent().attr("data-c-id"),reply_to_name:$this.parent().parent().parent().find(".comment_from").find("a").text(),tier_to_be:"user_comments"==$this.parent().parent().parent().parent().parent().attr("id")?2:3,permalink_post_id:_post_id,permalink_author_id:_author_id,is_resource_post_reply:"resource_post_public"==loc.shell_type}));loc.add_menu($elem),$elem.render()},get_comment_info:function(_id){return new Comment_Data({id:_id,number_up_votes:"",number_down_votes:"",inline_comment_marker:"",tier_number:"",comment:""})},handle_comment_show_preference:function(){$(".comment_trigger_block").live("click",function(e){$(this).parent().parent().next().find(".make_a_comment_now").trigger("click")})},include_commenting_functionality:function(comment_context){var loc=this;$("div.reply a").live("click",function(event){event.preventDefault();event=$(this);GLOBALS.IS_LOGGED_IN?loc.make_reply_comment(event,loc):$("#comment_zone #login_modal").trigger("click",[event.parent()])}),$("div.voting a").live("click",function(event){event.preventDefault();var upvote,$this=$(this);GLOBALS.IS_LOGGED_IN?(event=$this.parent().parent().parent().parent().attr("data-c-id"),upvote=!!$this.parent().hasClass("up_vote"),$.ajax({type:"POST",url:GLOBALS.ROOT_PATH.append("home/comment_vote"),data:{post_id:loc.data.post_id,comment_id:event,upvote:upvote},dataType:"json",success:function(data){var vote_count;data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=new String,upvote?(data=General.success_text.comment_up_vote,vote_count=$this.find(".vote_count").text(),vote_count=General.is_null_empty_undefined(vote_count)?0:parseInt(vote_count),$this.find(".vote_count").text(vote_count+1)):(data=General.success_text.comment_down_vote,vote_count=parseInt($this.parent().attr("data-dv")),$this.parent().attr({"data-dv":vote_count})),message_slider(data))}})):$("#comment_zone #login_modal").trigger("click",[$this.parent()])}),$(".report_spam").live("click",function(event){var comment_id,$this=$(this);GLOBALS.IS_LOGGED_IN?(comment_id=(null!=$this.parent().attr("data-c-id")?$this:$this.parent()).parent().attr("data-c-id"),$.ajax({type:"POST",url:GLOBALS.ROOT_PATH.append("home/comment_report_as_spam"),data:{post_id:loc.data.post_id,comment_id:comment_id},dataType:"json",success:function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(new String,$this.parent().parent().hide(),message_slider(General.success_text.comment_reported_as_spam))}})):$("#comment_zone #login_modal").trigger("click",[$this])}),$(".make_a_comment_now").live("click",function(event){var _post_id,_actions,comment_m,_selector,$this=$(this);"Hide your thoughts"===$this.text()?(loc.close_all_other_menus(),$this.text("Share your thoughts"),$this.removeClass("dimmer")):($(".make_a_comment_now").text("Share your thoughts").removeClass("dimmer"),$this.text("Hide your thoughts").addClass("dimmer"),loc.close_all_other_menus(),_post_id=$this.data("this-post-id"),$this=$this.data("this-author-id"),_actions=["add_image","add_embed","submit_comment"],General.is_browser_block()&&(_actions=["add_embed","submit_comment"]),comment_m=new Comment_Menu({actions:_actions,shell_obj:loc,permalink_post_id:_post_id,permalink_author_id:$this,parent:$(".comment_menu"),tier_to_be:1,appendTo_id:"comment_zone"}),loc.add_menu(comment_m),_selector=String.format(".postlet_list li[data-post-id={0}]",_post_id),"permalink"===comment_context&&(_selector=String.format(".article_page_wrap[data-post-id={0}]",_post_id)),comment_m.render(_selector),$("#is_logged_in").change(function(){$(".comment_menu").remove(),comment_m.render(_selector)}))})},paste_handler:function(_focus_node,use_br,_section_name){}
1,integration_webinar_form_handler:function(){0<$("#integration_form").length&&(Google_Recaptcha.setup_v3(),$("#webinar_integration_wrap input[type=text]").live("focus",function(e){$(this).removeClass("error")}),$("#integration_form #submit_integration_info").live("click",function(e){loading.create();var $form=$(this).parents("form"),registrant=new Webinar_Registrant({first_name:$form.find("#first_name").val(),last_name:$form.find("#last_name").val(),email:$form.find("#email").val(),confirm_email:$form.find("#confirm_email").val(),organization:$form.find("#organization").val(),job_title:$form.find("#job_title").val(),webinar_is_open:$form.find("#webinar_is_open").val()}),_integration_id=$form.data("integration-id"),validate=registrant.is_validate();validate.is_valid?$.post("/home/integration_id_registration",{integration_id:_integration_id,registrant:registrant.get_params()},function(data){var login_link_with_return_url,_html;data=General.parse_json_if_needed(data),General.status_ok(data.status)?(loading.remove(),$form.find(".form_wrap").addClass("hide"),_html=General.is_null_empty_undefined(data.data.topic)?(login_link_with_return_url=$("#lil").val(),$("#integration_form #head_to_b_hide").addClass("hide"),_html="",(_html+=String.format('<div class="header_type">Success! You are now registered under the email {0}!</div>',registrant.email))+String.format('<p><a href="{0}">Log in now</a> to view this content.</p>',login_link_with_return_url)):(_html="",(_html+=String.format('<div class="header_type">Success! You are now registered for {0}</div>',data.data.topic))+String.format('<p>Here is your link to join the event <a href="{0}" target="_blank">{1}</a>.</p>',data.data.join_url,data.data.topic)),$(_html).insertAfter($form.find(".form_wrap"))):(alert(data.text),loading.remove())}):(loading.remove(),validate.not_valid.includes("first_name")&&$form.find("#first_name").addClass("error"),validate.not_valid.includes("last_name")&&$form.find("#last_name").addClass("error"),validate.not_valid.includes("email")&&$form.find("#email").addClass("error"),validate.not_valid.includes("confirm_email")&&$form.find("#confirm_email").addClass("error"),validate.not_valid.includes("job_title")&&$form.find("#job_title").addClass("error"),validate.not_valid.includes("organization")&&$form.find("#organization").addClass("error"))}))}},function(_obj){Shell_Base.call(this,_obj),this.enter_keep=new Array,this.soft_enter_keep=new Array,this.soft_enter_br_class="",this.original_paste_container=new String,this.offset_position_selection=new String,this.paste_timeout,this.undo_manager=null,this.is_pasted=!1,this.stop_propagation_on_mouseup_post=!1,this.reinit_twitter_embed_on_paste=!1}),Post_Edit=(Post_Base.inherits(Shell_Base),Post_Base.defaults={text:{caption:"Enter a caption (optional)",title:"Enter a title",project_title:"Enter your project title here",student_project_title:"Enter your student project title here",design_event_title:"Enter your design event title here",gift_guide_title:"Your ultimate title",gallery_image_title:"Enter a title (optional)",credit:"Enter photo credit (optional)",empty_post:"Start your post here, add images embed videos and format your text all in place...",empty_project_post:"Start your project description here...",empty_design_event_post:"Add details about your event here. You can include images, links and embedded videos.",empty_postlet_post:"Add your Postlet body text, 200 characters or less...",comment:"Share your thoughts",link:"Link URL",designer_name:"Designer/Firm",student_designer_name:"Your name",for_school:"School name",for_professional:"Client name",subtitle:"Enter a subtitle in 160 characters or less (optional)",details:"In 1500 or less words please describe the details of your project...",overview:"In 500 or less words please describe the Overview/Summary of your project...",team_credits:"Please list the name and title of each person who contributed to this project...",default_get_started:"Start typing here..."},is_default_text:function(_text,optional_node){var _defaults=this.text,is_default=!1;return $.each(_defaults,function(index,val){(val=General.is_null_empty_undefined(optional_node)?val:String.format("<{0}>{1}</{0}>",optional_node,val))==_text&&(is_default=!0)}),is_default}},Post_Base.resolve_twitter_embed=function(_reload){0<$("[data-twitter-embed]").length&&($("[data-twitter-embed]").each(function(index,val){$(this).empty();var embed_text=unescape($(this).attr("data-twitter-embed"));$(embed_text).prependTo($(this))}),null!=_reload)&&1==_reload&&twttr.widgets.load()},Post_Base.resolve_pinterest_embed=function(_reload){0<$("[data-pinterest-embed]").length&&$("[data-pinterest-embed]").each(function(index,val){$(this).empty();var embed_text=unescape($(this).attr("data-pinterest-embed"));$(embed_text).prependTo($(this))})},Post_Base.fn.paste_handler=function(_focus_node,use_br,_section_name,force_plain_text){null==force_plain_text&&(force_plain_text=!1);var loc=this;General.is_null_empty_undefined(loc.undo_manager)||(loc.undo_manager.is_paused=!0),use_br=!(null==use_br||!use_br)&&use_br,$("<div id='paste_bin' contenteditable='true'></div>").appendTo($("body"));for($(_focus_node).get(0).innerText!=Post_Base.defaults.text.empty_post&&$(_focus_node).get(0).innerText!=Post_Base.defaults.text.details&&$(_focus_node).get(0).innerText!=Post_Base.defaults.text.overview?!1!==(force_plain_text=Selection.insert_dom_node_at_range("split","segment_paste_split",_focus_node))&&(_focus_node=force_plain_text):$(".rangySelectionBoundary").remove(),$(_focus_node).find(".rangySelectionBoundary").remove(),loc.original_paste_container=$(_focus_node);loc.original_paste_container&&General.is_inline_level_node({exact_to_check:loc.original_paste_container[0].nodeName});)loc.original_paste_container=loc.original_paste_container.parent();0<loc.original_paste_container.find("span").length&&loc.original_paste_container.find("span").not(".no-interact, .rangySelectionBoundary").contents().unwrap(),loc.offset_position_selection=Selection.get_start_end_offset(),loc.offset_position_selection.is_cursor||(document.execCommand("Delete"),loc.offset_position_selection=Selection.get_start_end_offset(),_focus_node=loc.offset_position_selection.focus_node,loc.original_paste_container=$(_focus_node)),use_br=use_br||"a"==loc.offset_position_selection.node||"b"==loc.offset_position_selection.node||"i"==loc.offset_position_selection.node;$("#paste_bin").focus(),loc.paste_timeout=setTimeout(function(){try{clearTimeout(loc.paste_timeout);var _html=new String,pasting_image_and_caption=!1,pre_html_filtered=($("#paste_bin .add_module").remove(),$("#paste_bin").html()),paste_contents=(pre_html_filtered=(pre_html_filtered=(pre_html_filtered=pre_html_filtered.replace(/<!.*?(--)?>/gi," ").replace(/<style>[\s\S]*?<\/style>/gi," ").replace(/<xml>[\s\S]*?<\/xml>/gi," ")).replace(/<(\/?span).*?>
1/gi,"").replace(/<\/?o:p>/gi,"").replace(/<p>&nbsp;<\/p>/gi,"")).replace(/style=".*?"/gi,"").replace(/dir="ltr"/gi,""),pre_html_filtered=(pre_html_filtered=(pre_html_filtered="post_title"===$(_focus_node).attr("id")?pre_html_filtered.replace(/<br.*?>/gi,"").replace(/<b.*?>/gi,"").replace(/<\/b.*?>/gi,""):pre_html_filtered).replace(/<br.*?>/gi,"<br/>")).replace(/<meta.*?>/gi,""),"subtitle"===$(_focus_node).attr("id")&&(pre_html_filtered=pre_html_filtered.replace(/<br.*?>/gi,"").replace(/<b.*?>/gi,"").replace(/<\/b.*?>/gi,""),$("#paste_bin").html(pre_html_filtered),pre_html_filtered=$("#paste_bin").text()),$("#paste_bin").html(pre_html_filtered),$("#paste_bin *").each(function(index,val){switch($(this).removeAttr("style"),$(this).context.nodeName.toString().toLowerCase()){case"blockquote":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":use_br&&$(this).contents().unwrap(),$(this).removeAttr("class");break;case"b":case"i":$(this).removeAttr("class");break;case"a":var href=$(this).attr("href");$(this).contents().unwrap().wrap("<a />").parent().attr({href:href}),$(this).removeAttr("class");break;case"img":/s3files\.core77\.com/.test($(this).attr("src"))||$(this).remove(),$(this).removeAttr("class");break;case"em":$(this).hasClass("caption")||$(this).contents().unwrap();break;case"iframe":break;case"div":$(this).hasClass("embed_wrapper custom_embed")?$(this).remove():$(this).contents().unwrap();break;default:$(this).contents().unwrap()}}),$("#paste_bin").html().replace(/<p>&nbsp;<\/p>/gi,"").replace(/&nbsp;/gi," "));paste_contents=(paste_contents=paste_contents.replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/(data-).*?=("|').*?("|')/gi,"").replace(/(&lt;)(a).*?(href=)("|')/gi,'<a target="_blank" href="').replace(/("|')\s?(&gt;)/gi,'">').replace(/(&lt;)\/(a)(&gt;)/gi,"</a>").replace(/&lt;(h1)&gt;/gi,"<h1>").replace(/&lt;\/(h1)&gt;/gi,"</h1>").replace(/&lt;(h(2|3|4|5|6))&gt;/gi,"<h2>").replace(/&lt;\/(h(2|3|4|5|6))&gt;/gi,"</h2>").replace(/&lt;(blockquote)&gt;/gi,"<blockquote>").replace(/&lt;\/(blockquote)&gt;/gi,"</blockquote>")).replace(/<br></gi,"<").replace(/><br>/gi,">").replace(/^<br>/,"").replace(/<p><\/p>/gi,"").replace(/\s+/gi," ").replace(/<br>$/,""),paste_contents=(paste_contents=use_br?paste_contents.replace(/<\/?(h1|h2|h3|h4|h5|h6|blockquote|p).*?>/gi," "):paste_contents).replace(/\"/g,"_%22_");for(var reg_html=/<[^(\/(a|b|i|iframe|div|)].*?>/,paste_contents_array_temp=paste_contents.split(reg_html),paste_contents_array=[],k=0;k<paste_contents_array_temp.length;k++)""!=paste_contents_array_temp[k].clean_white_space()&&paste_contents_array.push(paste_contents_array_temp[k]);for(var reg_html_start=/<\/[^(a|b|i|em|iframe|)].*?>/,k=0;k<paste_contents_array.length;k++){var maybe_split,segment_item=reg_html_start.exec(paste_contents_array[k]);General.is_null_empty_undefined(segment_item)||(made_start_tag_from_end_tag=segment_item[0].replace("</","<"),-1!=paste_contents_array[k].indexOf(made_start_tag_from_end_tag.replace(">",""))||/(div contenteditable=_%22_false_%22_ class=_%22_embed_wrapper)/.test(paste_contents_array[k])||(1<(maybe_split=paste_contents_array[k].split(segment_item)).length&&""!=maybe_split[1].clean_white_space()?(maybe_split[1]=maybe_split[1].prepend(made_start_tag_from_end_tag).append(segment_item),paste_contents_array[k]=String.format("{0}{1}",maybe_split[0].append(segment_item),maybe_split[1])):paste_contents_array[k]=paste_contents_array[k].prepend(made_start_tag_from_end_tag)),0==k&&(paste_contents_array[k]=paste_contents_array[k].replace(/<[^\/][^(a|b|i|em)]*?>/,"")))}var _remove_tag,split_current_contents,_node_of_original_container,made_start_tag_from_end_tag,current_contents=Post_Base.defaults.is_default_text(loc.original_paste_container.text().replace(/p$/,""))?"":loc.original_paste_container.html().replace(/<(span).*?(contenteditable="false).*?<\/(span)>/gi,"").replace(/&nbsp;/gi," ").replace(/\s+/gi," "),before_cursor_original_content_slice=(!Post_Base.defaults.is_default_text(current_contents)&&"<br>"!=current_contents&&" "!=current_contents||(current_contents="",_remove_tag=reg_html_start.exec(paste_contents_array[0]),paste_contents_array[0]=paste_contents_array[0].replace(_remove_tag,"")),General.is_null_empty_undefined(current_contents)||(paste_contents_array[0]=paste_contents_array[0].replace(reg_html,"").replace(reg_html_start,"").replace(/<[^\/(a|b|i|em|iframe)].*?>/gi,"")),/<img/.test(paste_contents_array[0])&&(paste_contents_array.splice(0,0,""),1==paste_contents_array.length)&&(pasting_image_and_caption=!0),paste_contents_array[0]),after_cursor_original_content_slice="<em id='current_position_cursor'></em>",new_contents=(General.is_null_empty_undefined(current_contents)||(split_current_contents=current_contents.split(/\<split\/? class=\"segment_paste_split\"><\/split>/gi),before_cursor_original_content_slice=before_cursor_original_content_slice.prepend(split_current_contents[0]),after_cursor_original_content_slice=after_cursor_original_content_slice.append(split_current_contents[1])),before_cursor_original_content_slice),_last_member=(1==paste_contents_array.length?new_contents+=after_cursor_original_content_slice.replace(/p$/,""):(_node_of_original_container=loc.original_paste_container.context.localNode,General.is_null_empty_undefined(_node_of_original_container),new_contents+=String.format("</{0}>",loc.original_paste_container.context.localNode)),new_contents=new_contents.replace(/<(\/?span).*?>/gi,"").replace(/^\s\s*/,"").replace(/_%22_/g,'"'),loc.original_paste_container.html(new_contents),loc.original_paste_container.next().text().replace(/\s/gi,""),paste_contents_array[paste_contents_array.length-1]),split_last_member=_last_member.split(/<\/[^(a|b|i|em|iframe)].*?>/);if(General.is_null_empty_undefined(split_last_member[1])||(segment_item=(reg_html=/<[^\/(a|b|i|em|iframe)].*?>/).exec(split_last_member[0]),General.is_null_empty_undefined(segment_item)||(made_start_tag_from_end_tag=segment_item[0].replace("<","</")),paste_contents_array[paste_contents_array.length-1]=String.format("{0}{1}",split_last_member[0],made_start_tag_from_end_tag),paste_contents_array.push(String.format("<p>{0}</p>{1}",split_last_member[1],General.make_empty_p_tag_with_br_and_id()))),1<paste_contents_array.length){var _after_segment_new_id,_new_html,$insert_after_node=loc.original_paste_container;if(use_br){for(k=1;k<paste_contents_array.length;k++)""!=paste_contents_array[k]&&(_html+=String.format("<br>{0}",paste_contents_array[k]));$insert_after_node.get(0).innerHTML+=_html}else for(var _unique_node_id,k=1;k<paste_contents_array.length;k++)""==paste_contents_array[k]||/<script/.test(paste_contents_array[k])||
1(_unique_node_id=General.get_unique_id(),_html=paste_contents_array[k].clean_white_space().replace(/_%22_/g,'"').replace("<p><p>","<p>"),/^<(p)/.test(_html)&&0,/^<(p|blockquote|h2|h1)/.test(_html)||(""!=(_html=_html.replace(/<\/(p|blockquote|h2|h1)>/,"").replace("<p>p</p>","")).replace("<br>","").replace("<br/>","").clean_white_space()?(_html=String.format("<p>{0}</p>",_html),0):_html=""),""!=_html&&($(_html).insertAfter($insert_after_node).attr({id:_unique_node_id}),$insert_after_node=$("#"+_unique_node_id)),k==paste_contents_array.length-1&&/<img/.test(paste_contents_array[k])&&(pasting_image_and_caption=!0));$insert_after_node.text().length,0==$("p.at_end").length&&(_insert_at_end="<p class='at_end'><br></p>",$(_insert_at_end).appendTo($insert_after_node.parent())),pasting_image_and_caption?(_after_segment_new_id=General.get_unique_id(),_new_html=String.format("<p id='{0}'>{1}</p>",_after_segment_new_id,after_cursor_original_content_slice.replace(/p$/,"")),$(_new_html).insertAfter($insert_after_node),$insert_after_node=$("#"+_after_segment_new_id)):$insert_after_node.get(0).innerHTML+=after_cursor_original_content_slice.replace(/p$/,"");for(var generated_id="";generated_id=General.get_unique_id(),$(String.format("#{0}",_unique_node_id)).attr({id:generated_id}),0<$(String.format("#post [id={0}]",_unique_node_id)).length;);}$("#paste_bin").html(""),$("#paste_bin").remove(),null==($insert_after_node=General.is_null_empty_undefined(generated_id)?$insert_after_node:$(String.format("#{0}",generated_id)))&&($insert_after_node=loc.original_paste_container,loc.offset_position_selection.end,paste_contents_array[paste_contents_array.length-1].length),null!=$insert_after_node?setTimeout(function(){var el=$("#current_position_cursor").get(0).nextSibling,range=(General.is_null_empty_undefined(el)&&($("#current_position_cursor").after(document.createTextNode(" ")),el=$("#current_position_cursor").get(0).nextSibling),rangy.createRange()),sel=(range.selectNodeContents(el),rangy.getSelection());sel.setSingleRange(range),sel.collapse(el,0),$("#current_position_cursor").remove(),loc.undo_manager.is_paused=!1},300):loc.undo_manager.is_paused=!1,null!=_section_name&&($(String.format("#{0} > *",_section_name)).each(function(index,val){var $this=$(this);$this.hasClass("at_end")||$this.text().clean_white_space()}),$(String.format("#{0}",_section_name)).trigger("keyup")),loc.reinit_twitter_embed_on_paste&&(loc.reinit_twitter_embed_on_paste=!1,Post_Base.resolve_twitter_embed(!0))}catch(e){$("#paste_bin").html(""),$("#paste_bin").remove(),Selection.rangy_select_all_text({actual_element:loc.original_paste_container.get(0),is_default:!0}),loc.undo_manager.is_paused=!1}},200)},Post_Base.fn.base_init=function(){var loc=this;loc.shell_base_init(),$(".section_wrap").live({mousedown:function(e){loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]})}}),$("#post").live({mouseup:function(e){"img"==e.target.localName&&$(e.target).hasClass("move")||$(e.target).hasClass("replace_gift_guide_image_wrap")||e.stopPropagation(),loc.post_mouseup_handler(e,loc,this)},keydown:function(e){loc.post_keydown_handler(e,loc,this)}}),$("#post .img_wrapper img, #post .gallery_wrapper").live("mousedown",function(e){e.preventDefault(),Selection.clear_selection(),$(".rangySelectionBoundary").remove(),loc.close_all_other_menus()}),$("#post p, #post h1, #post h2, #post blockquote").live("mousedown",function(e){Selection.clear_selection(),$(".rangySelectionBoundary").remove(),loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]})}),$(".text_menu li, .text_menu_public li, .menu_use_text_menu li").live("mousedown",function(e){($(e.target).parent().parent().hasClass("text_menu")||$(e.target).parent().hasClass("text_menu"))&&e.preventDefault(),($(e.target).parent().parent().hasClass("text_menu_public")||$(e.target).parent().hasClass("text_menu_public"))&&e.preventDefault(),($(e.target).parent().parent().hasClass("menu_use_text_menu")||$(e.target).parent().hasClass("menu_use_text_menu"))&&e.preventDefault()}),$(".edit_module_prop").live("click",function(e){loc.create_edit_module_prop_menu(e,loc,this)}),$(".edit_module_prop").live("mousedown",function(e){e.stopPropagation()}),Post_Base.resolve_twitter_embed(),Post_Base.resolve_pinterest_embed(),$("em small").parent().remove()},function(_obj){Post_Base.call(this,_obj),this.custom_paste=!0,this.collaborators=new Array,this.auto_save_interval=3e4,this.img_caption_timeout,this.lead_image_menu,this.image_collection_limit=null,this.disable_multi_select=null,this.title_selector="h1#post_title",this.save_body_text=!0,this.save_rss_version=!0;var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,lead_image_data=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Post_Data(p_data,lead_image_data),this.default_save_post_name="post_saved",this.error_list={},this.sending_count=0,this.post_has_changed=!1,this.auto_save_timeout,this.pause_save=!1,this.undo_manager=null,this.is_new=!1,this.allow_select_all=!1,this.allow_tab_in_post=!1,this.allow_infinite_returns_in_post=!1,this.allow_delete_div_containers_on_backspace_delete=!1,this.select_all_keydown_engaged=!1,General.is_null_empty_undefined(_obj.is_new)||(this.is_new="true"==_obj.is_new.toString().toLowerCase()),this.preview_tile_modal="",this.preview_post_modal="",this.use_extra_span_boonch_in_mouseup=!1,this.channel_selection_module=null,this.channel_list=General.is_null_empty_undefined(_obj.channel_list)?{}:_obj.channel_list,this.image_queues=new Image_Upload_Count_Queues,this.is_text_area_body=!1,this.is_text_input_title=!1,this.link_rel_type="",this.custom_delete=!1}),Blog_Post=(Post_Edit.inherits(Post_Base),Post_Edit.fn.convert_create_to_edit=function(_id,remove_all_query_string_params){remove_all_query_string_params=null!=remove_all_query_string_params&&remove_all_query_string_params;var _current_url=window.location.toString();_current_url.includes("post_id=")||(printf(_current_url),_current_url=_current_url.replace("create","edit"),remove_all_query_string_params=(_current_url=(_current_url=remove_all_query_string_params?_current_url.split("?")[0]:_current_url).includes("#")?_current_url.split("#")[0]:_current_url).includes("?")?"&":"?",_current_url=String.format("{0}{1}post_id={2}",_current_url,remove_all_query_string_params,_id),remove_all_query_string_params=new History_State({id:0,page:"",user_id:0,project_id:0,title:"",update_url:_current_url}),history.pushState(remove_all_query_string_params,"",_current_url))},Post_Edit.fn.get_undo_manager_object=function(){return new Undo_Manager({levels_of_undo:1e3,container_ids:["post"],frequency:500})},Post_Edit.check_for_span_and_boonch_it=function(_focus_node,loc){var $parent_node;return"span"!=_focus_node.nodeName.toString().toLowerCase()||$(_focus_node).hasClass("caption")||($parent_node=$(_focus_node).parent(),Post_Edit.remove_spans_induced_by_browser($(_focus_node).parent(),loc),_focus_node=$parent_node[0]),_focus_node},Post_Edit.remove_spans_induced_by_browser=function($this,loc){var _new_id=General.get_unique_id(),curr_id=$this.attr("id"),_new_id_2=(1<$(String.format("#post [id={0}
1]",curr_id)).length&&($this.attr({id:_new_id,"data-ic-marker":_new_id.append("_t3")}),$this=$(String.format("#{0}",_new_id)),curr_id=_new_id),General.get_unique_id()),curr_id_marker_id=$this.attr("data-ic-marker"),curr_id_marker_id=(1<$(String.format("#post [data-ic-marker={0}]",curr_id_marker_id)).length&&$this.attr({"data-ic-marker":_new_id_2.append("_t3")}),General.is_null_empty_undefined(curr_id)&&(curr_id=_new_id),Selection.get_start_end_offset());General.is_null_empty_undefined(curr_id_marker_id)||(loc.global_cursor=curr_id_marker_id),$this.find("span").not(".no-interact, .rangySelectionBoundary").contents().unwrap(),curr_id==$(curr_id_marker_id.focus_node).attr("id")&&Selection.restore_selection_new(loc.global_cursor)},Post_Edit.fn.get_html_and_images=function(){var _html,_images,loc=this,regulate_text_version=($(String.format("<div id='{0}' style='display:none; position: fixed; left: -5000px; top: 0;' >{1}</div>","extract_html",$(loc.container_id).html())).appendTo($("body")),$(String.format("div#{0} hgroup#post_header","extract_html")).remove(),$(String.format("div#{0} span.add_module","extract_html")).remove(),$(String.format("div#{0} .no-interact","extract_html")).remove(),$(String.format("div#{0} #collab_btn","extract_html")).remove(),$(String.format("div#{0} .caption","extract_html")).each(function(index,val){"true"==$(this).attr("contenteditable")&&$(this).attr({contenteditable:!1}),Post_Base.defaults.is_default_text($(this).text().clean_white_space())||$(this).removeClass("public_hide")}),$(String.format("div#{0} a","extract_html")).each(function(index,val){$(this).attr({rel:loc.link_rel_type})}),$(String.format("div#{0}","extract_html")).find("iframe.twitter-tweet").remove(),_images=loc.get_all_images("#extract_html"),$(String.format("div#{0} .gallery_zone","extract_html")).remove(),_html=$(String.format("div#{0}","extract_html")).html().replace(/&#65279;/g,""),$("div#extract_html .public_hide").remove(),$("div#extract_html").html()),reg_space_p=new RegExp("</p>","g"),regulate_text_version=regulate_text_version.replace(reg_space_p," </p>");return $(String.format("<div id='quick_dump_content'>{0}</div>",regulate_text_version)).appendTo($("body")),_body_text_ver=$("div#quick_dump_content").text(),$("div#quick_dump_content").remove(),$("div#extract_html").remove(),{html:_html,images:_images,body_text_version:_body_text_ver}},Post_Edit.fn.get_all_images=function(_zone){var _imgs=new Array;return $(_zone+" img").each(function(index,val){var _src=$(this).attr("src"),_file_id=$(this).attr("data-image-id"),_width=parseInt($(this).attr("data-image-width")),_height=parseInt($(this).attr("data-image-height")),_width=new Dimensions({width:_width,height:_height});_imgs.push(new Image_Base({src:_src,file_id:_file_id,dimension:_width}))}),_imgs},Post_Edit.fn.save_callback_default=function(_text,loc,alert_even_on_no_change){General.do_when(function(){return 0==loc.sending_count},function(){message_slider.close();var error_stack,has_errors=!1;$.each(loc.error_list,function(index,val){null!=val&&(has_errors=!0)}),has_errors?(error_stack=[],$.each(loc.error_list,function(index,val){null!=val&&error_stack.push(val)}),message_slider(error_stack,!0)):loc.post_has_changed?message_slider(_text):alert_even_on_no_change&&message_slider("There are no new changes to save")},200)},Post_Edit.fn.set_attributes_json_callback=function(data,loc,_key){data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?(null!=loc.error_list&&null!=loc.error_list[_key]&&(loc.error_list[_key]=void 0),loc.post_has_changed=!0):loc.error_list[_key]=data.text,loc.sending_count--},Post_Edit.fn.get_compare_data_obj=function(){return new Post_Data},Post_Edit.fn.get_text_menu_actions=function(_focus_node){_focus_node="post_title"==$(_focus_node).attr("id")?["italic"]:"subtitle"==$(_focus_node).attr("id")?[]:"blockquote"==$(_focus_node).context.nodeName.toString().toLowerCase()?["bold","link","h1","h2","quote","p"]:"h1"==$(_focus_node).context.nodeName.toString().toLowerCase()||"h2"==$(_focus_node).context.nodeName.toString().toLowerCase()?["italic","link","h1","h2","quote","p"]:$(_focu
1s_node).hasClass("caption")||$(_focus_node).hasClass("credit")?["bold","italic","link","p"]:["bold","italic","strike_through","link","h1","h2","quote","p"];return _focus_node},Post_Edit.fn.set_post_attributes=function(){var loc=this,imgs_and_html=(loc.sending_count=0,loc.post_has_changed=!1,loc.get_html_and_images()),com_data_obj=loc.get_compare_data_obj();loc.is_text_input_title||("h1#post_title"==loc.title_selector?com_data_obj.title=$(loc.title_selector).html().replace(/<br\/?>/gi,"").replace(/<(\/?span).*?>/gi,"").replace(/<(\/?p).*?>/gi,"").replace(/<(\/?div).*?>/gi,""):com_data_obj.title=$(loc.title_selector).text().clean_white_space()),com_data_obj.excerpt=$("#excerpt").val(),com_data_obj.channels=loc.get_addition_box_nodes($("#channel_box")),loc.is_text_area_body||(loc.save_body_text?com_data_obj.body_text=imgs_and_html.html.replace(/^\s+/,""):com_data_obj.body_text=""),loc.save_rss_version?com_data_obj.rss_version=loc.generate_rss_version(loc,imgs_and_html.html.replace(/^\s+/,"")):com_data_obj.rss_version="",com_data_obj.images=imgs_and_html.images,com_data_obj.social_excerpt=$("#social_excerpt").val(),loc.is_text_input_title||(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),(com_data_obj.excerpt!=loc.data.excerpt&&0<$("#excerpt").length||null!=loc.error_list.excerpt)&&(loc.data.excerpt=com_data_obj.excerpt,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_excerpt_update",{post_id:loc.data.post_id,excerpt:loc.data.excerpt},function(data){loc.set_attributes_json_callback(data,loc,"excerpt")},"json")),com_data_obj.channels.join(",")==loc.data.channels.join(",")&&null==loc.error_list.channels||(loc.data.channels=com_data_obj.channels,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_channel_update",{post_id:loc.data.post_id,channel_ids:loc.data.channels.join(",")},function(data){loc.set_attributes_json_callback(data,loc,"channels")},"json")),loc.is_text_area_body||(com_data_obj.body_text==loc.data.body_text||Post_Base.defaults.is_default_text(imgs_and_html.body_text_version.clean_white_space()))&&null==loc.error_list.body_text||Post_Base.defaults.is_default_text(loc.data.body_text)||(loc.data.body_text=com_data_obj.body_text.replace(/&#65279;/g,""),loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_body_text_update",{post_id:loc.data.post_id,body_text:loc.data.body_text.toString(),body_text_version:imgs_and_html.body_text_version.clean_white_space()},function(data){loc.set_attributes_json_callback(data,loc,"body_text")},"json")),com_data_obj.social_excerpt==loc.data.social_excerpt&&null==loc.error_list.social_excerpt||(loc.data.social_excerpt=com_data_obj.social_excerpt,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_social_excerpt_update",{post_id:loc.data.post_id,social_excerpt:loc.data.social_excerpt},function(data){loc.set_attributes_json_callback(data,loc,"body_text")},"json")),com_data_obj.rss_version==loc.data.rss_version&&null==loc.error_list.rss_version||(loc.data.rss_version=com_data_obj.rss_version,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_rss_version_update",{post_id:loc.data.post_id,rss_version:loc.data.rss_version},function(data){loc.set_attributes_json_callback(data,loc,"rss_version")},"json")),0<$("#subtitle").length&&(com_data_obj.subtitle=$("#subtitle").html().clean_white_space().char_trunc(160,!1),Post_Base.defaults.is_default_text(com_data_obj.subtitle)&&(com_data_obj.subtitle=""),(com_data_obj.subtitle==loc.data.subtitle||Post_Base.defaults.is_default_text(com_data_obj.subtitle))&&null==loc.error_list.subtitle||(loc.data.subtitle=com_data_obj.subtitle,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_subtitle_update",{post_id:loc.data.post_id,subtitle:loc.data.subtitle},function(data){loc.set_attributes_json_callback(data,loc,"subtitle")},"json"))),0<$("#integration_id").length&&(com_data_obj.integration_id=$("#integration_id").val().clean_white_space(),com_data_obj.integration_id=com_data_obj.integration_id.replace(/\s/g,""),com_data_obj.integration_id==loc.data.integration_id&&null==loc.error_list.integration_id||(loc.data.integration_id=com_data_obj.integration_id,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_integration_id_update",{post_id:loc.data.post_id,integration_id:loc.data.integration_id},function(data){loc.set_attributes_json_callback(data,loc,"integration_id")},"json"))),0<$("#integration_id_content_require_registration_lock").length&&(com_data_obj.integration_id_content_require_registration_lock="checked"===$("#integration_id_content_require_registration_lock").attr("checked"),com_data_obj.integration_id_content_require_registration_lock==loc.data.integration_id_content_require_registration_lock&&null==loc.error_list.integration_id_content_require_registration_lock||(loc.data.integration_id_content_require_registration_lock=com_data_obj.integration_id_content_require_registration_lock,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_integration_id_content_require_registration_lock_update",{post_id:loc.data.post_id,integration_id_content_require_registration_lock:loc.data.integration_id_content_require_registration_lock},function(data){loc.set_attributes_json_callback(data,loc,"integration_id_content_require_registration_lock")},"json"))),0<$("#webinar_episode_title").length&&(com_data_obj.webinar_episode_title=$
1("#webinar_episode_title").val(),com_data_obj.webinar_episode_title==loc.data.webinar_episode_title&&null==loc.error_list.webinar_episode_title||(loc.data.webinar_episode_title=com_data_obj.webinar_episode_title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_webinar_episode_title_update",{post_id:loc.data.post_id,webinar_episode_title:loc.data.webinar_episode_title},function(data){loc.set_attributes_json_callback(data,loc,"webinar_episode_title")},"json"))),loc.ext_set_post_attributes(com_data_obj,loc)},Post_Edit.fn.generate_rss_version=function(loc){return""},Post_Edit.fn.is_auto_savable=function(loc){return loc.data.user_id==parseInt(GLOBALS.USER_SESSION.id)&&!loc.is_published&&!loc.pause_save},Post_Edit.fn.save_from_button=function(_clbk){var no_follow,loc=this;$(".rangySelectionBoundary").remove(),$("#core77").hasClass("gift_guide")||($("#post p").each(function(index,val){var $elem=$(this);General.is_null_empty_undefined($elem.attr("data-ic-marker"))&&!Post_Base.defaults.is_default_text($elem.text())&&$elem.attr({"data-ic-marker":General.get_unique_id()}),Post_Edit.remove_spans_induced_by_browser($elem,loc)}),$("#post blockquote").each(function(index,val){Post_Edit.remove_spans_induced_by_browser($(this),loc)}),$("#post h1").each(function(index,val){Post_Edit.remove_spans_induced_by_browser($(this),loc)}),$("#post h2").each(function(index,val){Post_Edit.remove_spans_induced_by_browser($(this),loc)}),no_follow=new RegExp("nofollow","gi"),$("#post .caption a").each(function(index,val){no_follow.test($(this).attr("rel"))||$(this).attr({rel:"nofollow"}),$(this).attr({target:"_blank"})})),loc.save(_clbk)},Post_Edit.fn.save=function(_clbk){var loc=this;$(".rangySelectionBoundary").remove(),loc.set_post_attributes(),printf(loc.data,"save_data"),General.is_valid_callback(_clbk)&&_clbk(),loc.is_auto_savable(loc)&&(clearTimeout(loc.auto_save_timeout),loc.auto_save_timeout=setTimeout(function(){loc.auto_save()},loc.auto_save_interval))},Post_Edit.fn.auto_save=function(){var loc=this;loc.is_auto_savable(loc)&&(printf("auto-saving.........."),loc.save(function(){loc.save_callback_default(General.success_text.post_auto_saved,loc,!1)}),loc.auto_save_timeout=setTimeout(function(){loc.auto_save()},loc.auto_save_interval))},Post_Edit.fn.populate_collaborators=function(){this.collaborators=[{name:"Jonny Marcone",handle:"destroyerofworlds",avatar_url:"/images/mockup_images/ava1.png",can_write:!0},{name:"Emily Dangelo",handle:"golden_lady",avatar_url:"/images/mockup_images/ava2.png",can_write:!1}]},Post_Edit.fn.post_mouseup_handler=function(e,loc,element){var menu_coords,current_line_height,clean_text,context_sensitive_action,$this=$(e.target),img_menu_mode="img"===$(e.target).context.nodeName.toString().toLowerCase(),_focus_node="img"!==$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():e.target;loc.enter_keep=new Array,loc.soft_enter_keep=new Array,$(e.target).hasClass("no-interact")||0!==$(e.target).parents(".no-interact").length?(loc.close_all_other_menus(),loc.undo_manager.is_paused=!1):(e=Selection.get_selection_info(),clean_text=$(_focus_node).text().replace(/p$/,"").clean_white_space(),Post_Base.defaults.is_default_text(clean_text)?$this.hasClass("caption")||clean_text===Post_Base.defaults.text.caption||(clean_text=$this.attr("id"),General.is_null_empty_undefined(clean_text)&&(clean_text=General.get_unique_id(),$this.attr({id:clean_text})),Selection.rangy_select_all_text({id:$this.attr("id"),is_default:!0})):""!==e.content&&!Selection.is_caret()&&e.content!==Text_Menu.previous_selection||img_menu_mode?(Text_Menu.previous_selection=e.content,"post"!=$(_focus_node).attr("id")&&(clean_text=Selection.get_selection_dimensions(),menu_coords=new Coordinates,current_line_height=parseInt($(_focus_node).css("line-height").replace("px","")),current_line_height=clean_text.height>current_line_height?$this.width()/2+$this.offset().left:clean_text.width/2+e.top_left.x,menu_coords.set_property("x",current_line_height),menu_coords.set_property("y",e.top_left.y+$(document).scrollTop()),img_menu_mode?(menu_coords=new Coordinates,current_line_height=$this.width()/2+$this.offset().left,menu_coords.set_property("x",current_line_height),menu_coords.set_property("y",$this.offset().top+$this.outerHeight()),clean_text=new Inline_Image_Menu({actions:context_sensitive_action=["add_caption"],coords:menu_coords,parent:$(_focus_node),focus_node:_focu
1s_node,appendTo_id:"body",shell_obj:loc}),"blog_post"!=loc.shell_type&&"sponsored_blog_post"!=loc.shell_type&&"gallery_post"!=loc.shell_type||$(_focus_node).hasClass("thumb")||(loc.add_menu(clean_text),clean_text.render())):(context_sensitive_action=loc.get_text_menu_actions(_focus_node),img_menu_mode=new Text_Menu({actions:context_sensitive_action,coords:menu_coords,parent:$(e.parent),focus_node:_focus_node,appendTo_id:"body"}),loc.add_menu(img_menu_mode),img_menu_mode.render()))):(loc.close_all_other_menus(),loc.undo_manager.is_paused=!1,Text_Menu.previous_selection=new String))},Post_Edit.fn.create_image_menu_class=function(menu_coords,$this,loc){return new Image_Menu({actions:["small_left","medium","large","remove"],coords:menu_coords,parent:$this.parent(),shell_obj:loc,appendTo_id:"body"})},Post_Edit.fn.create_edit_module_prop_menu=function(e,loc,element){var this_menu,element=$(element),menu_coords=(Selection.clear_selection(),new Coordinates);menu_coords.set_property("x",element.offset().left),menu_coords.set_property("y",element.offset().top),element.parent().hasClass("img_wrapper")?this_menu=loc.create_image_menu_class(menu_coords,element,loc):element.parent().hasClass("portal_wrapper")?this_menu=new Portal_Menu({actions:["small_left","medium","large","white","gray","black","remove"],coords:menu_coords,parent:element.parent(),appendTo_id:"body"}):element.parent().hasClass("embed_wrapper")?this_menu=new Embed_Menu({actions:["small_left","medium","large","remove"],coords:menu_coords,parent:element.parent(),appendTo_id:"body"}):element.parent().hasClass("award_winners_wrapper")?this_menu=new Award_Category_Insert_Menu({actions:["remove"],coords:menu_coords,parent:element.parent(),appendTo_id:"body"}):element.parent().hasClass("gallery_zone")?this_menu=new Gallery_Menu_Edit({actions:["grid","slide"],coords:menu_coords,parent:element.parent(),appendTo_id:"body",shell_obj:loc,slideshow_id:element.parent().attr("data-slideshow-id")}):element.parent().hasClass("gallery_wrapper")&&(this_menu=new Gallery_Menu_Edit({actions:["grid","slide","white","gray","black","remove"],coords:menu_coords,parent:element.parent(),appendTo_id:"body",shell_obj:loc,slideshow_id:element.parent().attr("data-slideshow-id")})),loc.add_menu(this_menu),this_menu.render()},Post_Edit.fn.create_gallery_zone=function(){var this_gallery;0<$(".gallery_zone").length&&((this_gallery=new Gallery_Edit({$this:$(".gallery_zone"),shell_obj:this,slideshow_id:this.data.slideshow_id,image_limit:this.image_collection_limit,disable_multi_select:this.disable_multi_select,context:this.context})).init(),$(".gallery_zone").data("instance",this_gallery))},Post_Edit.fn.post_keyup_handler=function(e,loc){var $_this,sel,curr_id,_new_id,_event_fake,_focus_node=Selection.get_focus_node();e.which==KEYS.enter?(KEYS.soft_return(e)&&e.preventDefault(),$_this=$(_focus_node),_new_id=General.get_unique_id(),curr_id=$_this.attr("id"),1<$(String.format("#post [id={0}]",curr_id)).length&&($_this.attr({id:_new_id}),$_this=$(String.format("#{0}",_new_id)),curr_id=_new_id),"div"==($_this=$(_focus_node)[0].nodeName.toString().toLowerCase())&&(loc.undo_manager.is_paused=!0,_new_id=General.replace_node_with_new_node_type($(_focus_node),"","p"),curr_id=$("#"+_new_id).get(0),(_new_id=rangy.createRange()).selectNodeContents(curr_id),(sel=rangy.getSelection()).setSingleRange(_new_id),sel.collapse(curr_id,0),loc.undo_manager.is_paused=!1),"div"==$_this||"blockquote"==$_this?(loc.undo_manager.is_paused=!0,_new_id=Selection.get_start_end_offset(),Selection.is_start_end(_new_id.focus_node),curr_id=$(_focus_node).text(),_new_id.end==curr_id.length&&0==_new_id.end&&((sel=$(_focus_node)).wrap("<p/>"),curr_id=sel.context.parentElement,_new_id=General.get_unique_id(),$(curr_id).attr({id:_new_id}),sel.contents().unwrap(),$(sel.context.parentElement).unwrap(),Selection.restore_selection_new({focus_node:document.getElementById(_new_id),text_start:0,text_end:0}),loc.undo_manager.is_paused=!1)):"p"==$_this&&$(_focus_node).attr("data-ic-marker")==$(_focus_node).prev().attr("data-ic-marker")&&$(_focus_node).attr({"data-ic-marker":General.get_unique_id()}),"<br/>
1"!=$(_focus_node).next().html()&&$(_focus_node).next().html(),"span"!=_focus_node.nodeName.toString().toLowerCase()||$(_focus_node).hasClass("caption")||$(_focus_node).parent()[0]):loc.select_all_keydown_engaged?loc.allow_select_all?((_event_fake={}).target=_focus_node,loc.post_mouseup_handler(_event_fake,loc,_focus_node),loc.select_all_keydown_engaged=!1):e.preventDefault():KEYS.arrow_select(e)&&((_event_fake={}).target=_focus_node,loc.post_mouseup_handler(_event_fake,loc,_focus_node))},Post_Edit.fn.undo_redo_keydown_handler=function(e,loc){var _focus_node=Selection.get_focus_node();Selection.is_start_end(_focus_node);KEYS.valid_keyset_for_undo_start(e)&&null==loc.undo_manager.timeout&&(printf("auto-saving _begin again.........."),loc.pause_save=!1,loc.undo_manager.init()),KEYS.undo(e)?(printf("auto-saving-paused.........."),loc.pause_save=!0,loc.undo_manager.undo(loc.undo_manager)):KEYS.redo(e)?loc.undo_manager.redo(loc.undo_manager):KEYS.paste(e)&&loc.custom_paste&&($(_focus_node).parent().hasClass("caption")||$(_focus_node).hasClass("caption")?loc.paste_handler(_focus_node,!0,"",e):"details"==$(_focus_node).attr("id")?loc.paste_handler(_focus_node,!1,"details",e):"overview"==$(_focus_node).attr("id")?loc.paste_handler(_focus_node,!1,"overview",e):"post"==$(_focus_node).parents("section").attr("id")?loc.paste_handler(_focus_node,!1,"post",e):"details"==$(_focus_node).parents("section").attr("id")||"overview"==$(_focus_node).parents("section").attr("id")?loc.paste_handler(_focus_node,!1,$(_focus_node).parents("section").attr("id"),e):loc.paste_handler(_focus_node,!0,"",e))},Post_Edit.fn.post_keydown_handler=function(e,loc){KEYS.undo(e)||KEYS.undo(e)||printf("undo manager un-paused");var _focus_node=Selection.get_focus_node(),start_end=Selection.is_start_end(_focus_node);if($(_focus_node).find(".add_module").remove(),KEYS.valid_keyset_for_undo_start(e)&&null==loc.undo_manager.timeout&&(printf("auto-saving _begin again.........."),loc.pause_save=!1,loc.undo_manager.init()),null==$(_focus_node).attr("id")&&$(_focus_node).attr({id:General.get_unique_id()}),$($(_focus_node).get(0)).hasClass("at_end")&&$($(_focus_node).get(0)).removeClass("at_end"),e.which==KEYS.enter){if($(".add_module").remove(),KEYS.soft_return(e))loc.soft_enter_keep.push(1),loc.soft_enter_keep.length<=1||1<loc.soft_enter_keep.length&&e.preventDefault();else{if(loc.enter_keep.push(1),loc.soft_enter_keep=new Array,$(_focus_node).hasClass("caption")){loc.undo_manager.is_paused=!0,Selection.insert_dom_node_at_range("br","soft_return_to_full"),General.is_inline_level_node({jquery_element:$(_focus_node)})&&(_focus_node=$(_focus_node).parent()[0]);var current_html_in_this=$(_focus_node).html(),_original_parent_id=$(_focus_node).attr("id"),_split_html=($(_focus_node).context.localName,current_html_in_this.split(/\<br\/? class=\"soft_return_to_full\">/gi)),new_html=(_split_html[0]+="</em>",_split_html[1]=_split_html[1].replace("</em>",""),""),_last_new_id="";if(2==_split_html.length)for(var k=0;k<_split_html.length;k++){var clean_contents=General.remove_rangy_node_and_clean_out_anomaly(_split_html[k]);General.is_null_empty_undefined(clean_contents)&&(_split_html[k]="<br>"),0==k?($(_focus_node).empty(),$(_focus_node).html(_split_html[k].clean_white_space())):(_split_html[1]=_split_html[1].replace("\t",""),_split_html[1]=_split_html[1].replace("\n",""),_split_html[1]=_split_html[1].clean_white_space(),_last_new_id=General.get_unique_id(),new_html=String.format('<p id="{0}">{1}</p>',_last_new_id,_split_html[1]))}$(new_html).insertAfter($(_focus_node)),setTimeout(function(){1<$("#"+_last_new_id).length&&$($("#"+_last_new_id).get(1)).remove(),""==$($("#"+_original_parent_id).get(0)).html().replace("<br>","").replace("<br/>","").clean_white_space()&&$($("#"+_original_parent_id).get(0)).remove(),Selection.rangy_select_all_text({id:_last_new_id,is_default:!1}),loc.undo_manager.is_paused=!1},0)}var current_html_in_this=Selection.get_start_end_offset(),start_end=Selection.is_start_end(current_html_in_this.focus_node);"div"!=$(_focus_node)[0].nodeName.toString().toLowerCase()||$("#core77").hasClass("gift_guide")||(!1!==(current_html_in_this=Selection.insert_dom_node_at_range("split","segment_split",_focus_node))&&(_focus_node=current_html_in_this),current_html_in_this=$(_focu
1s_node).html().split(/\<split\/? class=\"segment_split\"><\/split>/gi),$(_focus_node).html(current_html_in_this[0]))}0<$(_focus_node).parents("#post_header").length&&(KEYS.soft_return(e)||e.preventDefault()),1!=loc.enter_keep.length&&2<loc.enter_keep.length&&(loc.allow_infinite_returns_in_post||e.preventDefault())}else if(e.which==KEYS.del||e.which==KEYS.backspace){loc.enter_keep=new Array,loc.soft_enter_keep=new Array;var current_html_in_this=null!=$(_focus_node).prev()[0]?$(_focus_node).prev()[0].nodeName.toString().toLowerCase():"",$prev_node=(null!=$(_focus_node).next()[0]&&$(_focus_node).next()[0].nodeName.toString().toLowerCase(),"span"!=_focus_node.nodeName.toString().toLowerCase()||$(_focus_node).hasClass("caption")||(_focus_node=$(_focus_node).parent()[0],current_html_in_this=null!=$(_focus_node).prev()[0]?$(_focus_node).prev()[0].nodeName.toString().toLowerCase():"",null!=$(_focus_node).next()[0]&&$(_focus_node).next()[0].nodeName.toString().toLowerCase()),General.is_inline_level_node({jquery_element:$(_focus_node)})&&""==current_html_in_this&&(_focus_node=$(_focus_node).parent()[0],current_html_in_this=null!=$(_focus_node).prev()[0]?$(_focus_node).prev()[0].nodeName.toString().toLowerCase():"",null!=$(_focus_node).next()[0]&&$(_focus_node).next()[0].nodeName.toString().toLowerCase()),null!=$(_focus_node).prev()[0]?$(_focus_node).prev()[0]:""),$next_node=null!=$(_focus_node).next()[0]?$(_focus_node).next()[0]:"";if(""!=$next_node){for(var $next_node_temp=$($next_node);$next_node_temp&&General.is_null_empty_undefined($next_node_temp.html());)$next_node_temp.addClass("slated_for_auto_removal"),$next_node_temp=$next_node_temp.next();$(".slated_for_auto_removal").remove(),null!=$(_focus_node).next()[0]&&$(_focus_node).next()[0]}"c77_content"==$(_focus_node).parent().attr("id")?e.preventDefault():0<$(e.target).parents("#post_header").length?(!start_end.atStart||start_end.atEnd||Selection.is_range()||e.preventDefault(),(0==$($(_focus_node).get(0)).text().length||start_end.atStart&&start_end.atEnd)&&(e.preventDefault(),$($(_focus_node)[0]).text(Post_Base.defaults.text[$(_focus_node).attr("data-dt-name")]),Selection.select_all_text($(_focus_node)[0]))):"team_credits"==$(e.target).attr("id")||"overview"==$(e.target).attr("id")||"details"==$(e.target).attr("id")?(!start_end.atStart||start_end.atEnd||null!=$($(_focus_node)[0]).prev()||Selection.is_range()||e.preventDefault(),(1==$($(_focus_node).get(0)).text().length||start_end.atStart&&start_end.atEnd)&&1==$($(_focus_node)[0]).parent().children().length&&(e.preventDefault(),$next_node=(General.is_null_empty_undefined($(e.target).attr("data-dt-name"))?$(e.target).parent():$(e.target)).attr("data-dt-name"),$($(_focus_node)[0]).text(Post_Base.defaults.text[$next_node]),Selection.select_all_text($(_focus_node)[0]))):"caption"==$(_focus_node)[0].className||"caption public_hide"==$(_focus_node)[0].className?(start_end.atStart&&!start_end.atEnd&&Selection.is_range(),1!=$($(_focus_node).get(0)).text().length&&start_end.atStart&&start_end.atEnd):""==current_html_in_this&&start_end.atStart||"hgroup"==current_html_in_this&&start_end.atStart?($next_node=Selection.get_actual_focus_node_rare_usage(),Selection.is_range()?document.execCommand("Delete"):null!=$next_node.previousElementSibling?$next_node.previousElementSibling.localName:"br"==$next_node.localName?$($next_node).remove():e.preventDefault()):"div"==current_html_in_this&&start_end.atStart?Selection.is_range()||(loc.allow_delete_div_containers_on_backspace_delete?$prev_node.remove():e.preventDefault()):Selection.is_range()||start_end.atStart&&$(_focus_node).context.nodeName.toString().toLowerCase()!=current_html_in_this&&(loc.undo_manager.is_paused=!0,($next_node=$(_focus_node)).wrap(String.format("<{0}/>",current_html_in_this)),$prev_node=$next_node.context.parentElement,$next_node.contents().unwrap(),$($next_node.context.parentElement).unwrap(),Selection.set_selection_range($prev_node,0,0),loc.undo_manager.is_paused=!1)}else KEYS.all(e)?loc.allow_select_all?(loc.select_all_keydown_engaged=!0,setTimeout(function(){$(_focus_node).trigger("keyup")},300)):e.preventDefault():e.which==KEYS.tab?loc.allow_tab_in_post&&(e.preventDefault(),document.execCommand("insertHTML",!1,"&#009")):KEYS.arrow_select(e)||(KEYS.undo(e)?loc.undo_manager.is_member_of_undo_zone(_focus_node,loc.undo_manager)?(e.preventDefault(),printf("undo manager paused"),loc.pause_save=!0,printf("auto-saving-paused.........."),loc.undo_manager.undo(loc.undo_manager)):printf("nope undo"):KEYS.redo(e)?loc.undo_manager.is_member_of_undo_zone(_focus_node,loc.undo_manager)?(e.preventDefault(),printf("undo manager paused"),loc.undo_manager.redo(loc.undo_manager)):printf("nope redo"):KEYS.paste(e)?loc.custom_paste&&($(_focus_node).parent().hasClass("caption")||$(_focus_node).hasClass("caption")?loc.paste_handler(_focus_node,!0):"details"==$(_focu
1s_node).attr("id")?loc.paste_handler(_focus_node,!1,"details"):"overview"==$(_focus_node).attr("id")?loc.paste_handler(_focus_node,!1,"overview"):"post"==$(_focus_node).parents("section").attr("id")?loc.paste_handler(_focus_node,!1,"post"):"details"==$(_focus_node).parents("section").attr("id")||"overview"==$(_focus_node).parents("section").attr("id")?loc.paste_handler(_focus_node,!1,$(_focus_node).parents("section").attr("id")):"subtitle"==$(_focus_node).attr("id")?loc.paste_handler(_focus_node,!1,"",!0):"post"==$(_focus_node).attr("id")?(start_end=Selection.get_all_selected_nodes(),loc.paste_handler(start_end[0],!1)):loc.paste_handler(_focus_node,!0)):(loc.enter_keep=new Array,printf(e.which,"key hit"),KEYS.shift(e)||KEYS.soft_return(e)||(loc.soft_enter_keep=new Array)));printf(loc.soft_enter_keep,"soft_enter_keep"),loc.post_keydown_handler_ext(e,loc)},Post_Edit.fn.post_keydown_handler_ext=function(e,loc){},Post_Edit.fn.add_module_zone=function(e,loc,element){var range,$this=$(element);$this.hasClass(".portal_wrapper")&&$("<span contenteditable='false' class='add_module portal_top no-interact'>p</span>").prependTo($this),"post_header"==$this.parent().attr("id")||$this.parents("div").hasClass("not_editable")||(document.createRange?((range=document.createRange()).selectNodeContents(element),range.getBoundingClientRect&&(element=range.getBoundingClientRect())&&(range=$this.css("marginLeft"),range=parseInt(range.replace(" px","")),element=element.left-range-$this.parent().offset().left,"div"==$this.context.nodeName.toString().toLowerCase()&&(element=5),$(String.format("<span contenteditable='false' class='add_module no-interact' style='left: {0}px;'>p</span>",element)).appendTo($this))):""==$this.html().clean_white_space()&&$("<span contenteditable='false' class='add_module no-interact'>p</span>").appendTo($this))},Post_Edit.fn.remove_module_zone=function(e,loc,element){$(element).find("span.add_module").remove()},Post_Edit.fn.add_edit_properties_zone=function(e,loc,element){$(element);$("<span contenteditable='false' class='edit_module_prop no-interact'>h</span>").prependTo($(element))},Post_Edit.fn.remove_edit_properties_zone=function(e,loc,element){$(element).find("span.edit_module_prop").remove()},Post_Edit.fn.add_module_menu=function(e,loc,element,module_array){var element=$(element),menu_coords=(loc.undo_manager.is_paused=!0,new Coordinates),module_array=(menu_coords.set_property("x",element.offset().left),menu_coords.set_property("y",element.offset().top),new Module_Menu({actions:module_array,coords:menu_coords,parent:element.parent(),appendTo_id:"body",shell_obj:loc,prepend_module_contents:!!element.hasClass("portal_top"),at_end:null==$(element.parent()[0]).next()[0]}));loc.add_menu(module_array),module_array.render()},Post_Edit.fn.set_new_author=function(placeholder_arg,loc,_text,_id){$("#user_id_change").val(_id)},Post_Edit.fn.change_user=function(loc){$.post(GLOBALS.ROOT_PATH+"account/post_change_ownership",{post_id:loc.data.post_id,new_user_id:$("#user_id_change").val()},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?message_slider(General.success_text.changed_user):message_slider(data.message,!0)},"json")},Post_Edit.fn.draw_post_submit_overlay=function(_type){window.location="/account/posts"},Post_Edit.fn.check_for_completeness=function(_obj){this.data.is_valid()?General.is_valid_callback(_obj.is_complete)&&_obj.is_complete():General.is_valid_callback(_obj.not_complete)&&_obj.not_complete()},Post_Edit.fn.publish_pipeline_function=function(loc){},Post_Edit.fn.init=function(){var loc=this;loc.base_init(),General.is_browser_block()&&$(Shell_Base.create_block_browser()).appendTo("#core77"),$("#post").live({keyup:function(e){loc.post_keyup_handler(e,loc,this)}}),$("#subtitle").live({mouseup:function(e){loc.post_mouseup_handler(e,loc,this)},keydown:function(e){loc.post_keydown_handler(e,loc,this)}}),$("#post .caption").each(function(index,val){"false"==$(this).attr("contenteditable")&&$(this).attr({contenteditable:!0})}),$("#post .img_wrapper, #post .embed_wrapper, #post .portal_wrapper, #post .gallery_wrapper").live({mouseenter:function(e){$(this).parents("div").hasClass("not_editable")||$(this).hasClass("not_editable")||loc.add_edit_properties_zone(e,loc,this)},mouseleave:function(e){loc.remove_edit_properties_zone(e,loc,this)}}),$("body").live("keydown",function(e){KEYS.save(e)&&(e.preventDefault(),loc.save(function(){loc.save_callback_default(General.success_text[loc.default_save_post_name],loc,!0)})),KEYS.undo(e)||KEYS.redo(e)}),$("#collab_btn").click(function(){var $this=$(this),menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.offset().left),menu_coords.set_property("y",$this.offset().top),new Collaboration_Menu({members:loc.collaborators,coords:menu_coords,parent:$this.parent(),appendTo_id:"body"}));loc.add_menu(menu_coords),menu_coords.render()}),printf(loc.channel_list),loc.channel_selection_module=new Multi_Element({shell_obj:loc,autocomplete_source_lists:{channel_list:loc.channel_list},allow_genesis:!0,use_hidden_field_csv_for_list:!0,genesis_callback:function(text,$this,loc){var _addition_box=$this.parent().next(),$this={id:"",channel_id:0,name:text,de
1scription:"",url_name:text.convert_string_to_url(),template:"",user_ids_accessible:[],is_a_user_interest:!1,is_restricted:!1,is_public:!0,user_ids_for_manage:"81",can_be_submitted_to:!0};$.post("/account/channel_update",$this,function(data){if(General.status_ok(data.status)){for(var channel_exists_in_current_list=!1,k=0;k<loc.autocomplete_source_lists.channel_list.length;k++)loc.autocomplete_source_lists.channel_list[k].id==data.data.channel_id&&(channel_exists_in_current_list=!0);channel_exists_in_current_list||(loc.autocomplete_source_lists.channel_list.push({id:data.data.channel_id,channel_id:0,name:text}),loc.shell_obj.channel_list.push({id:data.data.channel_id,channel_id:0,name:text}));var _html=loc.create_addition_box_via_values(loc,data.data.channel_id,text);$(_html).appendTo(_addition_box)}})}}),loc.channel_selection_module.init(),$("#channel_box span em.accepted").live("click",function(e){alert("You can not modify this channel selection because it is currently pending publication")}),$("*[data-tooltip]").click(function(e){e.stopPropagation()}),$("#post_title").live({mouseup:function(e){loc.post_mouseup_handler(e,loc,this)},keydown:function(e){loc.post_keydown_handler(e,loc,this)}}),$("span.caption").live("keyup",function(){var img_id,$this=$(this);General.is_null_empty_undefined($this.text(),Post_Base.defaults.text.caption)?$this.hasClass("public_hide")||$this.addClass("public_hide"):$this.removeClass("public_hide"),$this.parent().hasClass("img_wrapper")&&(clearTimeout(loc.img_caption_timeout),img_id=$this.parent().find("img").attr("data-image-id"),loc.img_caption_timeout=setTimeout(function(){var new_caption=$this.html();new_caption!=Post_Base.defaults.text.caption&&$.post(GLOBALS.ROOT_PATH+"account/image_caption_update",{post_id:loc.data.post_id,image_id:img_id,caption:new_caption},function(){},"json")},1500))}),$(".gallery_image_menu").live({mouseup:function(e){var menu_inst=loc.get_menu_instance(Menu_Use_Text_Menu);null!=menu_inst&&menu_inst.close_menu()}}),$("body").live("keyup",function(e){var _focus_node=Selection.get_focus_node();e.which==KEYS.tab&&(printf(_focus_node,"focus_node"),e=$(_focus_node).text().clean_white_space(),Post_Base.defaults.is_default_text(e))&&Selection.select_all_text($(_focus_node)[0])});for(var word_count,_text_count,_char_count,k=0;k<$(".gallery_wrapper").length;k++){var _slideshow_id,$this_gal=$($(".gallery_wrapper").get(k));$this_gal.hasClass("gallery_zone")||(_slideshow_id=$this_gal.attr("data-slideshow-id"),(_slideshow_id=new Gallery_Edit({$this:$this_gal,shell_obj:loc,slideshow_id:_slideshow_id})).init(),$this_gal.data("instance",_slideshow_id))}0<$("#excerpt").length&&(_text_count=new Text_Counter({elem_id:"excerpt",mode:"word",max_count:word_count=50})).init(),$("#generate_excerpt").click(function(e){var com_data_obj=loc.get_compare_data_obj(),imgs_and_html=loc.get_html_and_images();com_data_obj.excerpt=imgs_and_html.body_text_version.replace(/^\s+/,"").replace(/\s+$/,"").word_trunc(word_count),Post_Base.defaults.is_default_text(com_data_obj.excerpt.clean_white_space())||$("#excerpt").val(com_data_obj.excerpt),_text_count.get_count(_text_count)}),0<$("#social_excerpt").length&&(_char_count=new Text_Counter({elem_id:"social_excerpt",mode:"character",max_count:100})).init(),$("#generate_social").click(function(e){var _title=$("h1#post_title").text();Post_Base.defaults.is_default_text(_title.clean_white_space())||$("#social_excerpt").val(_title),_char_count.get_count(_char_count)}),setTimeout(function(){loc.auto_save()},loc.auto_save_interval),$("#save_btn").click(function(e){e.preventDefault(),loc.save_from_button(function(){loc.save_callback_default(General.success_text.post_saved,loc,!0)})}),loc.custom_delete||$("#delete_post").click(function(e){confirm("You are about to delete this post and all of its contents. This can't be undone, are you sure you wish do delete?")&&(loading.create(),$.post(GLOBALS.ROOT_PATH+"account/post_delete",{post_id:loc.data.post_id},function(data){General.status_ok(data.status,loc)&&(window.location="/account/posts")},"json"))}),$("#confirm_publish_post").live("click",function(e){e.preventDefault();var _confirm_text=0<$("#is_circle_of_trust").length?'By clicking "OK" you agree to submit this to Core77 editors. If you do not wish it to be published at this time please add "[DO NOT PUBLISH]" to the front of the title.':'By clicking "OK" you agree to submit this to Core77 and you will no longer be able to edit this post.',param={post_id:loc.data.post_id};loc.save_from_button(function(){loc.check_for_completeness({is_complete:function(){var _html,project_requests;GLOBALS.PROFILE_COMPLETE?(loading.create(),loc.publish_pipeline_function(loc),confirm(_confirm_text)?$.ajax({type:"POST",url:"/account/post_publish",data:param,dataType:"json",success:function(data){loading.remove(),data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?loc.draw_post_submit_overlay():message_slider(data.text,!0)}}):loading.remove()):(_html="",_html=(_html+="<div class='generic_message'><h3>Your profile is not complete</h3><p>We require only a few pieces of information in your profile before you can submit a post. Your work here is already saved and after completing your profile you can return to 
1submit this post.</p><ul class='modal_bottom'><li class=''>")+String.format("<a class='btn' href='{0}'>Complete your profile now</a></li></ul></div>",GLOBALS.PUBLISH_ROOT_PATH+"account/edit-profile"),(project_requests=new Quick_Modal({appendTo:"core77"})).set_form_width(600),project_requests.set_content(_html),project_requests.draw_overlay())},not_complete:function(){}})})}),$("input#add_spotlight_image").fileupload({dataType:"json",formData:{post_id:loc.data.post_id},pasteZone:null,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_spotlight_image",add:function(e,data){null==data.files[0].name||loc.is_pasted?loc.is_pasted=!1:(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){data=General.parse_json_if_needed(data.result),General.wrap_and_reset_form($("input#add_spotlight_image")),General.status_ok(data.status,loc)?(0==$("#spotlight_img_li img").length&&$("<img id='large_spotlight' src='' />").insertAfter($("#spotlight_img_li label")),$("#large_spotlight").attr({src:data.image_info.image.url}),$("#add_spotlight_image_wrapper").hasClass("has_content")||$("#add_spotlight_image_wrapper").addClass("has_content")):message_slider(data.text,!0),loading.remove()}}),$("input#add_title_image").fileupload({dataType:"json",formData:{post_id:loc.data.post_id},pasteZone:null,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_title_image",add:function(e,data){null==data.files[0].name||loc.is_pasted?loc.is_pasted=!1:(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){data=General.parse_json_if_needed(data.result),General.wrap_and_reset_form($("input#add_title_image")),General.status_ok(data.status,loc)?(message_slider(General.success_text.title_image_uploaded),$("#title_media_display_zone .img_wrapper").removeClass("hide").find("img").attr({src:data.image_info.image.url}),$("#title_video_embed_btn_wrap").hasClass("hide")||$("#title_video_embed_btn_wrap").addClass("hide"),$("#title_img_btn").html($("#title_img_btn").html().replace("Add","Change")),$("#remove_title_img_btn").hasClass("hide")&&$("#remove_title_img_btn").removeClass("hide")):message_slider(data.text,!0),loading.remove()}}),$("#remove_title_video_embed_btn").live("click",function(e){$.post("/account/title_video_embed_update",{post_id:loc.data.post_id,title_video_embed:""},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?(message_slider(General.success_text.title_video_embed_removed),$("#title_media_display_zone .embed_wrapper").addClass("hide").html(""),$("#title_image_btn_wrap").hasClass("hide")&&$("#title_image_btn_wrap").removeClass("hide"),$("#title_video_embed_btn").html($("#title_video_embed_btn").html().replace("Change","Add")),$("#remove_title_video_embed_btn").addClass("hide")):message_slider(data.text,!0),loading.remove()})}),$("#title_video_embed_btn_wrap").live("click",function(e){var is_twitter,is_instagram,_embed_to_save,entry=prompt("Enter video embed code");entry&&(_embed_to_save="",new String,is_twitter=/twitter\.com/.test(entry),is_instagram=/instagram\.com/.test(entry),is_twitter||is_instagram?alert("This embed type is not supported for the Title Video Embed"):(_embed_to_save=/vimeo\.com/.test(entry)?entry.split("<p")[0]:entry,$.post("/account/title_video_embed_update",{post_id:loc.data.post_id,title_video_embed:_embed_to_save},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?(message_slider(General.success_text.title_video_embed_uploaded),$("#title_media_display_zone .embed_wrapper").removeClass("hide").html(_embed_to_save),$("#title_image_btn_wrap").hasClass("hide")||$("#title_image_btn_wrap").addClass("hide"),$("#title_video_embed_btn").html($("#title_video_embed_btn").html().replace("Add","Change")),$("#remove_title_video_embed_btn").hasClass("hide")&&$("#remove_title_video_embed_btn").removeClass("hide")):message_slider(data.text,!0),loading.remove()})))}),$("input#add_spotlight_image").bind("fileuploadpaste",function(e,data){loc.is_pasted=!0}),$("input#add_title_image").bind("fileuploadpaste",function(e,data){loc.is_pasted=!0}),loc.lead_image_menu=new Lead_Image_Menu({actions:["upload","crop","choose_prev","choose_next","choose_image","cancel_choose_image"],shell_obj:loc,lead_image_src:loc.data.lead_image.src,set_width:300,set_height:300}),loc.lead_image_menu.init(),$("#lead_image_wrap div[data-button=upload]").click(function(event){loc.lead_image_menu.make_upload(null,loc.lead_image_menu)}),0<$("#change_user").length&&($("#change_user input").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.set_new_author,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!1,enter_submit:!0,show_selected_value_in_elem:!0}),$("#change_user span.btn").click(function(){loc.change_user(loc)}),$("#change_user span.sm_btn").click(function(){loc.change_user(loc)})),$(".publish_action").live("click",function(event){window.location=String.format("/account/manage-posts#keyword={0}
1&number_of_days=0&status=0&channel_id=0&role=0",loc.data.title)}),$("#remove_title_img_btn").click(function(e){loading.create(),$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/title_image_delete"),{post_id:loc.data.post_id},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?(message_slider(General.success_text.title_image_removed),$("#title_media_display_zone .img_wrapper").addClass("hide").find("img").attr({src:""}),$("#title_img_btn").html($("#title_img_btn").html().replace("Change","Add")),$("#title_video_embed_btn_wrap").removeClass("hide"),$("#remove_title_img_btn").addClass("hide")):message_slider(data.text,!0),loading.remove()},"json")}),0<$("#make_spotlight_from_title").length&&$("#make_spotlight_from_title").live("click",function(e){loading.create(),$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/spotlight_image_generate_from_title_image"),{post_id:loc.data.post_id},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?(message_slider(General.success_text.spotlight_created_from_title_image),0==$("#spotlight_img_li img").length&&$("
1<img id='large_spotlight' src='' />").insertAfter($("#spotlight_img_li label")),$("#large_spotlight").attr({src:data.image_info.image.url}),$("#add_spotlight_image_wrapper").hasClass("has_content")||$("#add_spotlight_image_wrapper").addClass("has_content")):message_slider(data.text,!0),loading.remove()},"json")}),$(document.body).bind("dragover",function(e){return e.preventDefault(),!1}),$(document.body).bind("drop",function(e){return e.preventDefault(),!1}),loc.preview_tile_modal=new Quick_Modal({appendTo:"core77",attach_class:"preview_tile_wrap"}),$("#preview_tile").live("click",function(e){var _html="",_cover_img_ref=$("#lead_image_wrap .img_wrapper img").attr("src"),_title=$("#post_title").html(),_subtitle=$("#subtitle").html()!=Post_Base.defaults.text.subtitle?$("#subtitle").html():"",_channel_one="",_author=$("#preview_author_name").val(),_cover_img_ref=($("#excerpt").val(),$("#channel_box span").each(function(index,val){var $_this=$(this);$_this.hasClass("system_channel")||""!=_channel_one||($(String.format("<div id='temp_harvest_channel'>{0}</div>",$_this.html())).appendTo($("#core77")),$("#temp_harvest_channel em").remove(),_channel_one=$("#temp_harvest_channel").text(),$("#temp_harvest_channel").remove())}),_channel_one=""==_channel_one?"Home Page":_channel_one,_html=(_html=(_html=_html+"<ul class='golden_layout'><li class='blog mod_2_r col_300 tall'><div class=''><div class='img_wrapper'>"+"<a data-info-to-pass='0' href='#' target='_self'>")+String.format("<img src='{0}'>",_cover_img_ref)+"<div class='meta_wrapper'></div></a></div>")+String.format("<div class='post_info_wrap'><div class='posted_channels'><a href='#'>{0}</a></div>",_channel_one)+"<div class='subsection'>",""),_cover_img_ref=("job_of_the_day_post"==loc.shell_type?_cover_img_ref="<a href='#' class='design_job_flag'>Design Job</a>":"sponsored_tile_post"==loc.shell_type&&("core77_archives"==$("#hint").val()?_cover_img_ref="<span class='core77_archives'>Core77 Archives</span>":"firm_project"==$("#hint").val()&&(_cover_img_ref="<a href='#' class='user_submitted_flag'>Firm Project</a>")),0<$("#preview_is_sponsored").length&&(_cover_img_ref="<span class='sponsored_flag'>Sponsored Post</span>"),_html=(_html+=String.format("{0}</div>",_cover_img_ref))+String.format("<h1><a data-info-to-pass='0' href='#' target='_self'>{0}</a></h1>",_title),General.is_null_empty_undefined(_subtitle,Post_Base.defaults.text.subtitle)||(_html+=String.format("<h2>{0}</h2>",_subtitle)),$("#preview_publication_date").val()),_title=new Date,_cover_img_ref=_cover_img_ref.includes("0001")?_title.ToMonthDayAndYearIfNotCurrent()+" (Pending)":_cover_img_ref,_html=_html+String.format("<h3 class='author_info'>By <a href='#r'>{0}</a> - <span class='date_published'> {1} <em class='new_flag'>New</em></span> </h3>",_author,_cover_img_ref)+"</div></div></li></ul>";loc.preview_tile_modal.remove_overlay(),loc.preview_tile_modal.set_form_width(1e3),loc.preview_tile_modal.set_content(_html),loc.preview_tile_modal.draw_overlay()}),loc.ext_init()},function(_obj){Post_Edit.call(this,_obj),this.shell_type="blog_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,lead_image_data=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Blog_Post_Data(p_data,lead_image_data),this.adjust_layout_store=new Adjust_Layout({container_id:"post"}),this.save_rss_version=!1,this.auto_from_award_post=!General.is_null_empty_undefined(_obj.auto_from_award_post)&&_obj.auto_from_award_post,this.allow_select_all=!0,this.allow_tab_in_post=!0,this.allow_infinite_returns_in_post=!0,this.allow_delete_div_containers_on_backspace_delete=!0,this.use_extra_span_boonch_in_mouseup=!1,this.stop_propagation_on_mouseup_post=!0}),Coroflot_Blog_Post=(Blog_Post.inherits(Post_Edit),Blog_Post.fn.ext_init=function(){var loc=this;General.do_when(function(){return"<p>Start your post here, add images embed videos and format your text all in place...</p>"!=$("#post").html().clean_white_space()},function(){loc.undo_manager=loc.get_undo_manager_object()},20),$("#post p, #post .img_wrapper, #post blockquote, #post .portal_wrapper, #post .embed_wrapper, #post h1, #post h2, #post hgroup, #post .gallery_wrapper, #post .award_winners_wrapper").live({mouseenter:function(e){General.remove_rangy_node_and_clean_out_anomaly($(this).html());loc.add_module_zone(e,loc,this)},mouseleave:function(e){loc.remove_module_zone(e,loc,this)}}),$("#core77").live("mouseup",function(e){var focus_node=Selection.get_focus_node();printf(focus_node),0<$(focus_node).parents("#post").length&&$(focus_node).trigger("mouseup")}),$("#post .award_winners_wrapper").live({mouseenter:function(e){loc.add_edit_properties_zone(e,loc,this)},mouseleave:function(e){loc.remove_edit_properties_zone(e,loc,this)}}),$(".add_module").live("click",function(e){var _actions_module=["add_image","add_embed"],valid_users=(0<$("#post_image_bin ul li").length&&_actions_module.push("image_bin"),[183,182,33852,26577,208,34251,4,66098,34481,187011,200286,33050]);General.functionality_for_specific_users(valid_users)&&(_actions_module.push("add_formatted_c77da"),_actions_module.push("add_special_link_image")),valid_users.push(81),General.functionality_for_specific_users(valid_users)&&_actions_module.push("add_external_mp4"),loc.add_module_menu(e,loc,this,_actions_module)}),$("#make_adjust_layout").click(function(){loc.adjust_layout_store.init(
1)}),$("#undo_adjust_layout").click(function(){loc.adjust_layout_store.undo()}),loc.auto_from_award_post&&(new Blog_Post_From_Award_Post_Creator).init(),$("#change_user input[type=text]").live("click",function(e){$(this).focus(),$(this).blur(),$(this).focus()}),loc.ext_ext_init()},Blog_Post.fn.ext_ext_init=function(loc){},Blog_Post.fn.get_compare_data_obj=function(){return new Blog_Post_Data},Blog_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){},Blog_Post.fn.post_keydown_handler_ext=function(e,loc){var _focus_node=Selection.get_focus_node();Selection.is_start_end(_focus_node);KEYS.blockquote(e)?$("ul.text_menu li[data-button=quote]").trigger("click"):KEYS.bold(e)?(e.preventDefault(),$("ul.text_menu li[data-button=bold]").trigger("click")):KEYS.strikethrough(e)?(e.preventDefault(),$("ul.text_menu li[data-button=strike_through]").trigger("click")):KEYS.italic(e)?(e.preventDefault(),$("ul.text_menu li[data-button=italic]").trigger("click")):KEYS.link(e)&&(e.preventDefault(),$("ul.text_menu li[data-button=link]").trigger("click"))},function(_obj){Blog_Post.call(this,_obj),this.shell_type="coroflot_blog_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Coroflot_Blog_Post_Data(p_data,_obj)}),Sponsored_Blog_Post=(Coroflot_Blog_Post.inherits(Blog_Post),Coroflot_Blog_Post.fn.get_compare_data_obj=function(){return new Coroflot_Blog_Post_Data},Coroflot_Blog_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc,_loc=(com_data_obj.tags=loc.get_addition_box_nodes($("#coroflot_blog_category_box")),General.is_null_empty_undefined(loc.data.tags)?"":loc.data.tags);com_data_obj.tags.join(",")==_loc&&null==loc.error_list.tags||(loc.data.tags=com_data_obj.tags,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/coroflot_blog_post_tags_update",{post_id:loc.data.post_id,tags:loc.data.tags.join(",")},function(data){loc.set_attributes_json_callback(data,loc,"tags")},"json")),com_data_obj.old_url_name=$("#old_url_name").val(),com_data_obj.old_url_name==loc.data.old_url_name&&null==loc.error_list.old_url_name||(loc.data.old_url_name=com_data_obj.old_url_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/coroflot_blog_post_old_url_name_update",{post_id:loc.data.post_id,old_url_name:loc.data.old_url_name},function(data){loc.set_attributes_json_callback(data,loc,"old_url_name")},"json"))},Coroflot_Blog_Post.fn.ext_ext_init=function(){var loc=this;$("input#add_coroflot_blog_post_listing_image").fileupload({dataType:"json",formData:{post_id:loc.data.post_id},pasteZone:null,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_coroflot_listing_image",add:function(e,data){null==data.files[0].name||loc.is_pasted?loc.is_pasted=!1:(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){data=General.parse_json_if_needed(data.result),General.wrap_and_reset_form($("input#add_coroflot_blog_post_listing_image")),General.status_ok(data.status,loc)?(0==$("#coroflot_blog_post_listing_img_li img").length&&$("
1<img id='coroflot_blog_post_listing_image' src='' />").insertAfter($("#coroflot_blog_post_listing_img_li label")),$("#coroflot_blog_post_listing_image").attr({src:data.data.url}),$("#add_coroflot_blog_post_listing_image").hasClass("has_content")||$("#add_coroflot_blog_post_listing_image").addClass("has_content")):message_slider(data.text,!0),loading.remove()}}),$("input#add_coroflot_blog_post_listing_image").bind("fileuploadpaste",function(e,data){loc.is_pasted=!0}),$(".addition_box_select.no_wipe").live("change",function(){$(this).val();var _addition_box=$(this).parent().next(),set_channels=loc.get_addition_box_nodes(_addition_box);loc.add_addition_box_node_via_select(loc,$(this),set_channels,_addition_box)}),$(".addition_box .remove").live("click",function(e){$(this).parent().remove()})},function(_obj){Blog_Post.call(this,_obj),this.shell_type="sponsored_blog_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Sponsored_Blog_Post_Data(p_data,_obj),this.link_rel_type="sponsored"}),Gallery_Post=(Sponsored_Blog_Post.inherits(Blog_Post),Sponsored_Blog_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc,_loc=(com_data_obj.sponsor_name=$("#sponsor_name").val(),General.is_null_empty_undefined(loc.data.sponsor_name)?"":loc.data.sponsor_name),_loc=(com_data_obj.sponsor_name==_loc&&null==loc.error_list.sponsor_name||(loc.data.sponsor_name=com_data_obj.sponsor_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/sponsored_blog_post_sponsor_name_update",{post_id:loc.data.post_id,sponsor_name:loc.data.sponsor_name},function(data){loc.set_attributes_json_callback(data,loc,"sponsor_name")},"json")),com_data_obj.sponsor_details=$("#sponsor_details").val(),General.is_null_empty_undefined(loc.data.sponsor_details)?"":loc.data.sponsor_details),_loc=(com_data_obj.sponsor_details==_loc&&null==loc.error_list.sponsor_details||(loc.data.sponsor_details=com_data_obj.sponsor_details,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/sponsored_blog_post_sponsor_details_update",{post_id:loc.data.post_id,sponsor_details:loc.data.sponsor_details},function(data){loc.set_attributes_json_callback(data,loc,"sponsor_details")},"json")),com_data_obj.sponsor_link=$("#sponsor_link").val(),General.is_null_empty_undefined(loc.data.sponsor_link)?"":loc.data.sponsor_link);com_data_obj.sponsor_link==_loc&&null==loc.error_list.sponsor_link||(loc.data.sponsor_link=com_data_obj.sponsor_link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/sponsored_blog_post_sponsor_link_update",{post_id:loc.data.post_id,sponsor_link:loc.data.sponsor_link},function(data){loc.set_attributes_json_callback(data,loc,"sponsor_link")},"json"))},function(_obj){Post_Edit.call(this,_obj),this.shell_type="gallery_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Gallery_Post_Data(p_data,_obj)}),Calendar_Post=(Gallery_Post.inherits(Post_Edit),Gallery_Post.fn.create_image_menu_class=function(menu_coords,$this,loc){return new Image_Menu({actions:["small_left","medium","large","remove"],coords:menu_coords,parent:$this.parent(),shell_obj:loc,appendTo_id:"body"})},Gallery_Post.fn.ext_init=function(){var loc=this;General.do_when(function(){return"<p>Start your post here, add images embed videos and format your text all in place...</p>"!=$("#post").html().clean_white_space()},function(){loc.undo_manager=loc.get_undo_manager_object()},20),loc.create_gallery_zone(),(new Google_Location_Geocode).init(),$("#post p, #post .img_wrapper, #post blockquote, #post .portal_wrapper, #post .embed_wrapper, #post h1, #post h2, #post .gallery_wrapper").live({mouseenter:function(e){loc.add_module_zone(e,loc,this)},mouseleave:function(e){loc.remove_module_zone(e,loc,this)}}),$(".add_module").live("click",function(e){loc.add_module_menu(e,loc,this,["add_image","add_embed"])}),$(".gallery_image_menu").live({mouseup:function(e){var menu_inst=loc.get_menu_instance(Menu_Use_Text_Menu);null!=menu_inst&&menu_inst.close_menu()}}),$(".replace_gallery_image").live("click",function(){var $this=$(this),_image_id=$this.attr("data-gallery-img-id"),_gallery_id=$this.attr("data-sli
1deshow-id");$this.find(".replace_this_gallery_img").fileupload({dataType:"json",formData:{post_id:loc.data.post_id,existing_image_id:_image_id,use_filename:!0,slideshow_id:_gallery_id,post_type:loc.post_type},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){loading.create(),data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){loading.remove(),data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?($(String.format("li[data-gallery-img-id={0}] img.thumb",data.image.id)).attr({src:data.image.thumbnail.url,"data-gallery-thumbnail-id":data.image.thumbnail.id}),$(String.format("li[data-gallery-img-id={0}] .slide_wrapper img",data.image.id)).attr({src:data.image.url,"data-gallery-img-width":data.image.width,"data-gallery-img-height":data.image.height}),$(this).val("")):alert(data.text)}})})},Gallery_Post.fn.get_compare_data_obj=function(){return new Gallery_Post_Data},Gallery_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.address.set_property("id",$("#address_id").val()),com_data_obj.address.set_property("address_1",$("#address_1").val()),com_data_obj.address.set_property("city",$("#city").val()),com_data_obj.address.set_property("state_abbreviation",$("#state_abbreviation").val()),com_data_obj.address.set_property("country_abbreviation",$("#country_abbreviation").val()),com_data_obj.address.set_property("zip",$("#zip").val()),com_data_obj.address.set_property("latitude",$("#latitude").val()),com_data_obj.address.set_property("longitude",$("#longitude").val()),com_data_obj.address.set_property("location_string",$("#location").val()),com_data_obj.address.full_location==loc.data.address.full_location&&null==loc.error_list.location||(loc.data.address.set_property("id",com_data_obj.address.id),loc.data.address.set_property("address_1",com_data_obj.address.address_1),loc.data.address.set_property("city",com_data_obj.address.city),loc.data.address.set_property("state_abbreviation",com_data_obj.address.state_abbreviation),loc.data.address.set_property("country_abbreviation",com_data_obj.address.country_abbreviation),loc.data.address.set_property("zip",com_data_obj.address.zip),loc.data.address.set_property("latitude",com_data_obj.address.latitude),loc.data.address.set_property("longitude",com_data_obj.address.longitude),loc.data.address.set_property("location_string",com_data_obj.address.location_string),loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/gallery_post_location_update",{post_id:loc.data.post_id,id:loc.data.address.id,address1:loc.data.address.address_1,city:loc.data.address.city,state_abbreviation:loc.data.address.state_abbreviation,country_abbreviation:loc.data.address.country_abbreviation,zip:loc.data.address.zip,latitude:loc.data.address.latitude,longitude:loc.data.address.longitude,location_string:loc.data.address.location_string},function(data){loc.set_attributes_json_callback(data,loc,"location")},"json"))},Gallery_Post.fn.generate_rss_version=function(loc,body_html){for(var _html="",k=(_html+=body_html,0);k<10;k++){var _img_str,_credit_str,_title_str,$li=$($(".gallery_zone > ul.slideshow_ul > li").get(k));0<$li.length&&!$li.hasClass("add_new")&&(_img_str=String.format("<img src='{0}' />",$li.find(".slide_wrapper img").attr("src")),_credit_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .credit").html().clean_white_space())?"":String.format("<div class='credit'>Photo credit: {0}</div>",$li.find(".slide_wrapper .credit").html()),_title_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .title").html().clean_white_space())?"":String.format("<div class='title'>{0}</div>",$li.find(".slide_wrapper .title").html()),$li=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .caption").html().clean_white_space())?"":String.format("<div class='caption'>{0}</div>",$li.find(".slide_wrapper .caption").html()),_html+=String.format("<div class='img_wrapper'>{0}{1}{2}{3}</div>",_img_str,_title_str,$li,_credit_str))}return printf(_html,"rss_version gallery"),_html},function(_obj){Post_Edit.call(this,_obj),this.shell_type="calendar_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Calendar_Post_Data(p_data,_obj),this.save_rss_version=!1}),New_York_Design_Event_Post=(Calendar_Post.inherits(Post_Edit),Calendar_Post.fn.get_text_menu_actions=function(_focus_node){_focus_node="h1"==$(_focu
1s_node).context.nodeName.toString().toLowerCase()||"h2"==$(_focus_node).context.nodeName.toString().toLowerCase()?["italic","link","h1","h2"]:$(_focus_node).hasClass("caption")||$(_focus_node).hasClass("credit")?["bold","italic","link"]:["bold","italic","link","h1","h2"];return _focus_node},Calendar_Post.fn.ext_init=function(){var loc=this;General.do_when(function(){return"<p>Start your post here, add images embed videos and format your text all in place...</p>"!=$("#post").html().clean_white_space()},function(){loc.undo_manager=loc.get_undo_manager_object()},20),(new Google_Location_Geocode).init(),$("#post p, #post .img_wrapper, #post blockquote, #post .portal_wrapper, #post .embed_wrapper, #post h1, #post h2, #post hgroup, #post .gallery_wrapper").live({mouseenter:function(e){loc.add_module_zone(e,loc,this)},mouseleave:function(e){loc.remove_module_zone(e,loc,this)}}),$(".add_module").live("click",function(e){loc.add_module_menu(e,loc,this,["add_image","add_embed"])}),$("#start_time, #end_time").focus(function(e){e.stopPropagation();var e=$(this),menu_coords=(Selection.clear_selection(),new Coordinates),menu_coords=(menu_coords.set_property("x",e.offset().left),menu_coords.set_property("y",e.offset().top),new Time_Menu({actions:["hour","minutes","meridiem"],coords:menu_coords,appendTo_id:"body",shell_obj:loc,parent:e,minute_inc_dec_amount:15}));loc.add_menu(menu_coords),menu_coords.render()}),$("#start_date").change(function(e){var _start_date=new Date($("#start_date").val());new Date($("#end_date").val())<_start_date&&$("#end_date").val($("#start_date").val())}),$(".dp_icon").click(function(){$(this).parent().parent().next().focus()}),$(".datepicker").datepicker(),null!=loc.ext_ext_init&&loc.ext_ext_init()},Calendar_Post.fn.get_compare_data_obj=function(){return new Calendar_Post_Data},Calendar_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.event_type=$("#calendar_post_event_type").val(),com_data_obj.event_link=$("#event_link").val(),com_data_obj.start_date=$("#start_date").val(),com_data_obj.start_time=$("#start_time").val(),com_data_obj.end_date=$("#end_date").val(),com_data_obj.end_time=$("#end_time").val(),com_data_obj.address.set_property("id",$("#address_id").val()),com_data_obj.address.set_property("address_1",$("#address_1").val()),com_data_obj.address.set_property("city",$("#city").val()),com_data_obj.address.set_property("state_abbreviation",$("#state_abbreviation").val()),com_data_obj.address.set_property("country_abbreviation",$("#country_abbreviation").val()),com_data_obj.address.set_property("zip",$("#zip").val()),com_data_obj.address.set_property("latitude",$("#latitude").val()),com_data_obj.address.set_property("longitude",$("#longitude").val()),com_data_obj.address.set_property("location_string",$("#location").val()),com_data_obj.venue_name=$("#venue_name").val(),com_data_obj.event_type==loc.data.event_type&&null==loc.error_list.event_type||(loc.data.event_type=com_data_obj.event_type,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_event_type_update",{post_id:loc.data.post_id,event_type:loc.data.event_type},function(data){loc.set_attributes_json_callback(data,loc,"event_type")},"json")),com_data_obj.event_link==loc.data.event_link&&null==loc.error_list.event_link||(loc.data.event_link=com_data_obj.event_link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_event_link_update",{post_id:loc.data.post_id,event_link:loc.data.event_link},function(data){loc.set_attributes_json_callback(data,loc,"event_link")},"json")),com_data_obj.start_date==loc.data.start_date&&null==loc.error_list.start_date||(loc.data.start_date=com_data_obj.start_date,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_start_date_update",{post_id:loc.data.post_id,start_date:loc.data.start_date},function(data){loc.set_attributes_json_callback(data,loc,"start_date")},"json")),com_data_obj.start_time==loc.data.start_time&&null==loc.error_list.start_time||(loc.data.start_time=com_data_obj.start_time,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_start_time_update",{post_id:loc.data.post_id,start_time:loc.data.start_time},function(data){loc.set_attributes_json_callback(data,loc,"start_time")},"json")),com_data_obj.end_date==loc.data.end_date&&null==loc.error_list.end_date||(loc.data.end_date=com_data_obj.end_date,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_end_date_update",{post_id:loc.data.post_id,end_date:loc.data.end_date},function(data){loc.set_attributes_json_callback(data,loc,"end_date")},"json")),com_data_obj.end_time==loc.data.end_time&&null==loc.error_list.end_time||(loc.data.end_time=com_data_obj.end_time,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_end_time_update",{post_id:loc.data.post_id,end_time:loc.data.end_time},function(data){loc.set_attributes_json_callback(data,loc,"end_time")},"json")),com_data_obj.address.full_location==loc.data.address.full_location&&null==loc.error_list.location||(loc.data.address.set_property("id",com_data_obj.address.id),loc.data.address.set_property("address_1",com_data_obj.address.address_1),loc.data.address.set_property("city",com_data_obj.address.city),loc.data.address.set_property("state_abbreviation",com_data_obj.address.state_abbreviation),loc.data.address.set_property("country_abbreviation",com_data_obj.address.country_abbreviation),loc.data.address.set_property("zip",com_data_obj.address.zip),loc.data.address.set_property("latitude",com_data_obj.address.latitude),loc.data.address.set_property("longitude",com_data_obj.address.longitude),loc.data.address.set_property("location_string",com_data_obj.address.location_string),loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_location_update",{post_id:loc.data.post_id,id:loc.data.address.id,address1:loc.data.address.address_1,city:loc.data.address.city,state_abbreviation:loc.data.address.state_abbreviation,country_abbreviation:loc.data.address.country_abbreviation,zip:loc.data.address.zip,latitude:loc.data.address.latitude,longitude:loc.data.address.longitude,location_string:loc.data.address.location_string},function(data){loc.set_attributes_json_callback(data,loc,"location")},"json")),com_data_obj.venue_name==loc.data.venue_name&&null==loc.error_list.venue_name||(loc.data.venue_name=com_data_obj.venue_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_venue_name_update",{post_id:loc.data.post_id,venue_name:loc.data.venue_name},function(data){loc.set_attributes_json_callback(data,loc,"venue_name")},"json")),null!=loc.ext_ext_set_post_attributes&&loc.ext_ext_set_post_attributes(com_data_obj,loc)},function(_obj){Calendar_Post.call(this,_obj),this.shell_type="new_york_design_event";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Design_Event_Post_Data(p_data,_obj),this.save_rss_version=!1}),Gift_Guide_Post=(New_York_Design_Event_Post.inherits(Calendar_Post),New_York_Design_Event_Post.fn.get_compare_data_obj=function(){return new Design_Event_Post_Data},New_York_Design_Event_Post.fn.draw_post_submit_overlay=function(_type){var _html="",project_requests=(_html=(_html=(_html=(_html+="<div class='generic_message'><h3>Thank You</h3>")+String.format("<p>Your {0} has been successfully submitted to our editors for review.</p>","Design Event"))+String.format("<ul class='modal_bottom'><li class='left'><a class='btn' href='{0}'>Create another post</a></li>",GLOBALS.PUBLISH_ROOT_PATH.append("account/posts")))+String.format("<li><a class='btn secondary_action' href='{0}'>Browse Core77</a></li></ul></div>",GLOBALS.WEB_ROOT_PATH),new Quick_Modal({appendTo:"core77",close_off:!0}));project_requests.set_form_width(600),project_requests.set_content(_html),project_requests.draw_overlay()},New_York_Design_Event_Post.fn.ext_ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.neighborhood=$("#neighborhood").val(),com_data_obj.neighborhood==loc.data.neighborhood&&null==loc.error_list.neighborhood||(loc.data.neighborhood=com_data_obj.neighborhood,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/calendar_post_neighbourhood_update",{post_id:loc.data.post_id,neighbourhood:loc.data.neighborhood},function(data){loc.set_attributes_json_callback(data,loc,"neighborhood")},"json"))},New_York_Design_Event_Post.fn.ext_ext_init=function(){var event_requests;this.is_new&&((event_requests=new Quick_Modal({appendTo:"core77"})).set_form_width(600),event_requests.set_content("<div class='generic_message'><h3>Thanks for your interest in sharing your event with the Core77 audience</h3><p>Use this form to send your New York Design Event information to our editors for review. Listings will be published in our desktop and mobile apps, and included in a printed map distributed at points throughout New York City.</p><p>Our editors review every listing that is submitted on a daily basis and publish selected entries on an ongoing basis.</p><ul class='modal_bottom'><li class='quick_m_close'><a class='btn' href='#'>Continue</a></li></ul></div>"),event_requests.draw_overlay())},function(_obj){Post_Edit.call(this,_obj);this.custom_paste=!1,this.shell_type="gift_guide_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,lead_image_data=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Gift_Guide_Post_Data(p_data,lead_image_data),this.image_collection_limit=5,this.disable_multi_select=!0,this.title_selector="h1.gift_guide_title span.multi_line",this.save_body_text=!1,this.save_rss_version=!1,this.allow_select_all=!0,this.avatar_image=new Avatar_Image({src:_obj.avatar_info.image.url,file_id:_obj.avatar_info.image.id,dimension:new Dimensions({width:_obj.avatar_info.image.width,height:_obj.avatar_info.image.height}),crop_rectangle:new Crop_Rectangle({x1:_obj.avatar_info.crop.x1,x2:_obj.avatar_info.crop.x2,y1:_obj.avatar_info.crop.y1,y2:_obj.avatar_info.crop.y2}),crop_source_image:new Image_Base({src:_obj.avatar_info.source.url,file_id:_obj.avatar_info.source.id,dimension:new Dimensions({width:_obj.avatar_info.source.width,height:_obj.avatar_info.source.height})}),shell_obj:this})}),Sponsored_Tile_Post=(Gift_Guide_Post.inherits(Post_Edit),Gift_Guide_Post.fn.get_compare_data_obj=function(){return new Gift_Guide_Post_Data},Gift_Guide_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;0<$("#gift_guide_tag_box").length&&(com_data_obj.keywords=loc.get_addition_box_nodes($("#gift_guide_tag_box")).toString().replace(/_/gi," "),com_data_obj.keywords==loc.data.keywords&&null==loc.error_list.keywords||(loc.data.keywords=com_data_obj.keywords,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/gift_guide_post_keywords_update",{post_id:loc.data.post_id,keywords:loc.data.keywords},function(data){loc.set_attributes_json_callback(data,loc,"keywords")},"json")))},Gift_Guide_Post.fn.get_undo_manager_object=function(_obj){return null},Gift_Guide_Post.fn.post_mouseup_handler=function(){},Gift_Guide_Post.fn.get_profile_fields=function(){return{return_via_json:!0,context:"gift_guide","user_profile.first_name":$("#user_profile_first_name").val(),"user_profile.last_name":$("#user_profile_last_name").val(),"user_profile.handle":$("#user_profile_handle").val(),"user_profile.user_title":$("#user_profile_job_title").val(),"user_profile.company_name":$("#user_profile_company_name").val(),"user_profile.external_link_1":$("#user_profile_external_link_1").val(),"user_profile.external_link_2":$("#user_profile_external_link_2").val(),"user_profile.external_link_3":$("#user_profile_external_link_3").val(),"user_profile.location.location_string":$("#location").val(),"user_profile.location.address1":$("#address_1").val(),"user_profile.location.city":$("#city").val(),"user_profile.location.zip":$("#zip").val(),"user_profile.location.state_abbreviation":$("#state_abbreviation").val(),"user_profile.location.country_abbreviation":$("#country_abbreviation").val(),"user_profile.location.latitude":$("#latitude").val(),"user_profile.location.longitude":$("#longitude").val()}},Gift_Guide_Post.fn.draw_post_submit_overlay=function(_type){var _html="",project_requests=(_html=(_html=(_html=_html+"<div class='generic_message'><h3>Sweet! You did it. Thanks for submitting your ultimate gift guide.</h3>"+"<p>Our editors review and publish selected entries on an ongoing basis. Once your gift guide goes live, you'll receive a congratulations email from us. Then it'll be time to rack up the votes! Remind your friends to show you some love—they can bring you closer to winning one of our exciting prizes by voting for your guide.</p>")+String.format("<ul class='modal_bottom'><li class='left'><a class='btn' href='{0}'>Create another gift guide</a></li>",GLOBALS.PUBLISH_ROOT_PATH.append("account/create-gift-guide-post")))+String.format("<li><a class='btn secondary_action' href='{0}'>Browse Core77</a></li></ul></div>",GLOBALS.WEB_ROOT_PATH),new Quick_Modal({appendTo:"core77",close_off:!0}));project_requests.set_form_width(600),project_requests.set_content(_html),project_requests.draw_overlay()},Gift_Guide_Post.fn.publish_pipeline_function=function(loc){$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/gift_guide_generate_lead_image"),{post_id:loc.data.post_id},function(){})},Gift_Guide_Post.fn.ext_init=function(){var loc=this;loc.create_gallery_zone(),new Avatar_Image_Menu({actions:["upload","crop"],shell_obj:loc.avatar_image}).init();var event_requests;new Google_Location_Geocode({exclude_error_class:!0}).init();new Text_Counter({elem_id:"textarea_title",mode:"character",max_count:75}).init(),loc.is_new&&((event_requests=new Quick_Modal({appendTo:"core77"})).set_form_width(600),event_requests.set_content("<div class='generic_message'><h3>Let's get started</h3><p>Submit a themed gift guide to this year’s Core77 Ultimate Gift Guide competition. The theme is up to you, it can be simple, it can be complex, it can be specific or broad. Themes that have won prizes in the past are usually entertaining and are well supported by their individual gift items. Visuals are also key, this is a design site after all.</p><ul class='modal_bottom'><li class='quick_m_close'><a class='btn' href='#'>Continue</a></li></ul></div>"),event_requests.draw_overlay()),$("#display_gift_guide_title h1").click(function(e){$("#edit_gift_guide_title").removeClass("hide"),$("#display_gift_guide_title").addClass("hide");
1var curr_title=$("#display_gift_guide_title h1 span.multi_line").text().clean_white_space();("your ultimate title"!==curr_title.toLowerCase()?$("#edit_gift_guide_title textarea").val(curr_title):$("#edit_gift_guide_title textarea").val("")).focus()}),$("#edit_gift_guide_title .apply_this").click(function(e){var new_title=$("#edit_gift_guide_title textarea").val();General.is_null_empty_undefined(new_title)||$("#display_gift_guide_title h1 span.multi_line").text(new_title),$("#edit_gift_guide_title").addClass("hide"),$("#display_gift_guide_title").removeClass("hide"),loc.save()}),$("#display_profile.editable").click(function(e){$("#edit_profile_section").removeClass("hide"),$("#post_content_wrap").addClass("hide"),$("#submit_section").addClass("hide")}),$("#submit_profile").click(function(e){e.preventDefault(),0==$("#user_profile .error").length&&(loading.create(),e=loc.get_profile_fields(),$.ajax({type:"POST",url:"/account/edit-profile",data:e,dataType:"json",success:function(data){loading.remove();data=General.parse_json_if_needed(data);if(General.status_ok(data.status)){loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:"",remain_logged_in:!0,user:new User({name:String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()),avatar:$("#avatar_wrapper img").attr("src"),link:String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),$("#user_profile_handle").val()),profile_complete:!General.is_null_empty_undefined($("#user_profile_first_name").val())&&!General.is_null_empty_undefined($("#user_profile_last_name").val())&&!General.is_null_empty_undefined($("#user_profile_handle").val())})},loc),$("#display_profile #user_name").text(String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()));
1var _title_company,user_title=$("#user_profile_job_title").val(),user_company=$("#user_profile_company_name").val();General.is_null_empty_undefined(user_title)&&General.is_null_empty_undefined(user_company)||(_title_company="",General.is_null_empty_undefined(user_title)||(_title_company+=user_title),General.is_null_empty_undefined(user_company))||(General.is_null_empty_undefined(user_title)||(_title_company+=", "),_title_company+=user_company),0<$(".title_company").length?$(".title_company").text(_title_company):(_title_company=String.format("<div class='title_company'>{0}</div>",_title_company),$(_title_company).insertBefore($("#user_location"))),$("#display_profile #user_location").text(String.format("{0}",$("#location").val())),$("#display_profile img").attr({src:$("#avatar_wrapper img").attr("src")});for(var k=1;k<4;k++){var external_link_this=$(String.format("#user_profile_external_link_{0}",k)).val();0<$(String.format("#link_{0}",k)).length?General.is_null_empty_undefined(external_link_this)?$(String.format("#link_{0}",k)).remove():$(String.format("#link_{0}",k)).find("a").attr({href:external_link_this.add_protocol_to_link_if_needed()}).text(external_link_this.user_external_link_as_icon()):(external_link_this=String.format("<li id='link_{0}'><a href='{1}' class='c77_icon' target='_blank' rel='nofollow'>{2}</a></li>",k,external_link_this.add_protocol_to_link_if_needed(),external_link_this.user_external_link_as_icon()),$(external_link_this).appendTo($(".author_links")))}$("#edit_profile_section").addClass("hide"),$("#post_content_wrap").removeClass("hide"),$("#submit_section").removeClass("hide")}else $.each(data.errors,function(index,val){var $selector=0<$(String.format("input[name='{0}']",this.key)).length?$(String.format("input[name='{0}']",this.key)):$(String.format("textarea[name='{0}']",this.key));(/(location)/.test(this.key)?$("#location").addClass("error").prev().find("em").text("Please enter a valid location"):$selector.addClass("error").prev().find("em").text(this.message)).addClass("error")})}}))}),$("#view_preview").click(function(e){e.preventDefault();var _link=$(this).attr("href");loc.save(function(){window.open(_link,"_blank")})})},Gift_Guide_Post.fn.generate_rss_version=function(loc){return""},function(_obj){Post_Edit.call(this,_obj),this.shell_type="sponsored_tile_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Sponsored_Tile_Post_Data(p_data,_obj)}),Postlet_Post=(Sponsored_Tile_Post.inherits(Post_Edit),Sponsored_Tile_Post.fn.ext_init=function(){$("#sponsor_link").blur(function(e){var _entered_url=$(this).val();/bit.ly/.test(_entered_url)||General.is_null_empty_undefined(_entered_url)||alert("It is strongly recommended that you use a bit.ly link here, so the stats can be tracked.")})},Sponsored_Tile_Post.fn.get_compare_data_obj=function(){return new Sponsored_Tile_Post_Data},Sponsored_Tile_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.link=$("#sponsor_link").val(),com_data_obj.hint=$("#hint").val(),com_data_obj.link==loc.data.link&&null==loc.error_list.sponsor_link||(loc.data.link=com_data_obj.link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/sponsored_tile_post_link_update",{post_id:loc.data.post_id,link:loc.data.link},function(data){loc.set_attributes_json_callback(data,loc,"sponsor_link")},"json")),com_data_obj.hint==loc.data.hint&&null==loc.error_list.hint||(loc.data.hint=com_data_obj.hint,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/sponsored_tile_post_hint_update",{post_id:loc.data.post_id,hint:loc.data.hint},function(data){loc.set_attributes_json_callback(data,loc,"hint")},"json"))},Sponsored_Tile_Post.fn.generate_rss_version=function(loc){var _html="";return General.is_null_empty_undefined($("#lead_image_wrap .img_wrapper img").attr("src"))||(_html+=String.format("<img src='{0}' />",$("#lead_image_wrap .img_wrapper img").attr("src"))),printf(_html+=String.format("<p>{0}</p>
1",$("#excerpt").val()),"rss_version sponsored tile"),_html},function(_obj){Post_Edit.call(this,_obj),this.shell_type="postlet_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Postlet_Post_Data(p_data,_obj),this.body_text_count,this.source_link_modal="",this.is_text_area_body=!0,this.is_text_input_title=!0}),Resource_Post=(Postlet_Post.inherits(Post_Edit),Postlet_Post.fn.fetch_meta_information=function(_entered_url,loc){$.post(GLOBALS.ROOT_PATH+"account/postlet_post_get_meta_information_from_source_link",{source_link:_entered_url,post_id:loc.data.post_id},function(data){var lead_image_menu;General.status_ok(data.status)&&(printf(data.data),$("#source_link").val()!=_entered_url&&($("#source_link").val(_entered_url),loc.data.source_link=_entered_url),$("#source_name").val()!=data.data.meta_info.site_name&&$("#source_name").val(data.data.meta_info.site_name),data=data.data.lead_image.image_info,$("#lead_image_wrap img").attr({src:data.image.url}),$("#add_lead_image_wrapper").hasClass("has_content")||$("#add_lead_image_wrapper").addClass("has_content"),$("#add_lead_image_wrapper").find("span").text("Change Thumbnail"),(lead_image_menu=new Lead_Image_Menu({shell_obj:loc})).set_lead_image_properties(data,lead_image_menu),message_slider(General.success_text.lead_image_upload),""!=loc.source_link_modal)&&loc.source_link_modal.remove_overlay()});Rebrandly.get_shortened_link(!0,_entered_url,function(_short_link){_short_link=General.resolve_url(_short_link,!0);$("#source_link_shortened").val(_short_link),$("#source_link_shortened_display").text(_short_link)})},Postlet_Post.fn.ext_init=function(){var _html,loc=this;loc.is_new&&(_html="",_html=(_html+="<div class='generic_message'><h3>Start a Postlet</h3><p>Enter the source link for the curated link you wish to create the post for. The link will be used to auto generate the thumbnail image from the source material. You will be able to change the image later and edit until your heart is content.</p><div id='form_wrap'><label for='get_meta_info'>Source Link<em></em></label><input type='text' id='source_link_start' value='' />")+String.format("<ul class=''><li><a id='fetch_meta_info' class='btn' href='#'>Get Started</a></li></ul></div></div>",""),loc.source_link_modal=new Quick_Modal({appendTo:"core77"}),loc.source_link_modal.set_form_width(600),loc.source_link_modal.set_content(_html),loc.source_link_modal.draw_overlay(),$("#source_link_start").live("click.get_meta_info",function(event){$("#source_link_start").removeClass("error").prev().find("em").text("").removeClass("error")})),$("#fetch_meta_info").live("click",function(e){e.preventDefault(),$("#source_link").val($("#source_link_start").val()),loc.fetch_meta_information($("#source_link_start").val(),loc)}),$("#source_link").blur(function(e){var _entered_url=$(this).val();_entered_url!=loc.data.source_link&&loc.fetch_meta_information(_entered_url,loc)});loc.body_text_count=new Text_Counter({elem_id:"post_textarea",mode:"character",get_text_method:"val",max_count:300}),loc.body_text_count.init(),$(".postlet_contents_choice li").live("click",function(e){var $this=$(this),_choice=$this.data("choice"),_type=$this.data("type-id");$this.hasClass("active")||($(".postlet_contents_choice li").removeClass("active"),$this.addClass("active"),$("#postlet_type").val(_type),"text"===_choice?($("#post_textarea").removeClass("hide"),$("#post_textarea_div").removeClass("hide"),$(".media_wrap").addClass("hide")):"media"===_choice&&($("#post_textarea").addClass("hide"),$("#post_textarea_div").addClass("hide"),$(".media_wrap").removeClass("hide")))})},Postlet_Post.fn.get_compare_data_obj=function(){return new Postlet_Post_Data},Postlet_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.title=$("#post_title_input").val(),com_data_obj.body_text=$("#post_textarea").val(),com_data_obj.source_link=$("#source_link").val(),com_data_obj.source_name=$("#source_name").val(),com_data_obj.postlet_type=$("#postlet_type").val(),com_data_obj.source_link_shortened=$("#source_link_shortened").val(),(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),com_data_obj.body_text==loc.data.body_text&&null==loc.error_list.body_text||Post_Base.defaults.is_default_text(loc.data.body_text)||(loc.data.body_text=com_data_obj.body_text,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_body_text_update",{post_id:loc.data.post_id,body_text:loc.data.body_text.toString(),body_text_version:""},function(data){loc.set_attributes_json_callback(data,loc,"body_text")},"json")),com_data_obj.source_link==loc.data.source_link&&null==loc.error_list.source_link||(loc.data.source_link=com_data_obj.source_link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/postlet_post_source_link_update",{post_id:loc.data.post_id,source_link:loc.data.source_link},function(data){loc.set_attributes_json_callback(data,loc,"source_link")},"json")),com_data_obj.source_link_shortened==loc.data.source_link_shortened&&null==loc.error_list.source_link_shortened||(loc.data.source_link_shortened=com_data_obj.source_link_shortened,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/postlet_post_source_link_shortened_update",{post_id:loc.data.post_id,source_link_shortened:loc.data.source_link_shortened},function(data){loc.set_attributes_json_callback(data,loc,"source_link_shortened")},"json")),com_data_obj.postlet_type==loc.data.postlet_type&&null==loc.error_list.postlet_type||(loc.data.postlet_type=com_data_obj.postlet_type,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/postlet_post_type_update",{post_id:loc.data.post_id,postlet_type:loc.data.postlet_type},function(data){loc.set_attributes_json_callback(data,loc,"postlet_type")},"json")),com_data_obj.source_name==loc.data.source_name&&null==loc.error_list.source_name||(loc.data.source_name=com_data_obj.source_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/postlet_post_source_name_update",{post_id:loc.data.post_id,source_name:loc.data.source_name},function(data){loc.set_attributes_json_callback(data,loc,"source_name")},"json"))},Postlet_Post.fn.generate_rss_version=function(loc){return""},function(_obj){Post_Edit.call(this,_obj),this.shell_type="resource_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Resource_Post_Data(p_data,_obj),this.body_text_count,this.source_link_modal="",this.is_text_area_body=!0,this.is_text_input_title=!0,this.min_width=400,this.min_height=400}),Product_Tile_Post=(Resource_Post.inherits(Post_Edit),Resource_Post.fn.scrape_for_images=function(_entered_url,loc){loading.create(),$.post(GLOBALS.ROOT_PATH+"account/url_data_scrape",{web_url:_entered_url,min_width:loc.min_width,min_height:loc.min_height},function(data){if(General.status_ok(data.status)){if(loading.remove(),printf(data.data),loc.source_link_modal.remove_overlay(),0<data.data.images.length){$("header").addClass("hide"),$("footer").addClass("hide");for(var _html=(_html="<div class='bgd_select'>")+"<div class='confirm_selection_wrap'><div class='header_type'>Select an image from below to use as the thumbnail</div> <span class='btn' id='select_thumbnail_from_scrape'>Complete</span></div>"+"<ul class='return_img_selection_list'>",k=0;k<data.data.images.length;k++)_html+=String.format("<li data-img-ref='{0}' style='background-image: url({0})'></li>",data.data.images[k]);_html+="</ul></div>",$("#draw_image_selections").empty(),$(_html).appendTo($("#draw_image_selections"))}var _scrape_title=General.is_null_empty_undefined(data.data.meta_data.title)?data.data.name:data.data.meta_data.title;General.is_null_empty_undefined(_scrape_title)||$("#post_title_input").val(_scrape_title),General.is_null_empty_undefined(data.data.meta_data.description)||$("#post_textarea").val(data.data.meta_data.description)}else loading.remove(),loc.source_link_modal.remove_overlay();$("#resource_url").val(_entered_url)})},Resource_Post.fn.ext_init=function(){var _html,loc=this;loc.is_new&&(_html="",_html=(_html+="<div class='generic_message'><h3 class='large_header_type'>A Quick Start!</h3><p class='bold'>Our system will <span style='text-decoration: underline;'>try to</span> grab an image and text for you enter your items web address here:</p><div id='form_wrap'><label for='get_meta_info'>Start by adding the URL of the item:<em></em></label><input type='text' id='source_link_start' value='' />")+String.format("<ul class=''><li style='display: inline-block;'><a id='fetch_meta_info' class='btn' href='#'>Get Started</a></li><li class='quick_m_close' style='display: inline-block; padding-left: 30px;'><a id='' class='' href='#'>
1Skip this step</a></li></ul></div></div>",""),loc.source_link_modal=new Quick_Modal({appendTo:"core77"}),loc.source_link_modal.set_form_width(600),loc.source_link_modal.set_content(_html),loc.source_link_modal.draw_overlay(),$("#source_link_start").live("click.get_meta_info",function(event){$("#source_link_start").removeClass("error").prev().find("em").text("").removeClass("error")}),loc.convert_create_to_edit(loc.data.post_id,!0)),$("#fetch_meta_info").live("click",function(e){e.preventDefault();e=General.resolve_url($("#source_link_start").val());$("#source_link").val(e),loc.scrape_for_images(e,loc)}),$("#source_link").blur(function(e){var _entered_url=$(this).val();_entered_url!=loc.data.source_link&&loc.scrape_for_images(_entered_url,loc)});loc.body_text_count=new Text_Counter({elem_id:"post_textarea",mode:"character",get_text_method:"val",max_count:1e3}),loc.body_text_count.init(),$("#select_thumbnail_from_scrape").live("click",function(e){var _img_ref_to_upload=$(".return_img_selection_list li.selected").data("img-ref");null!=_img_ref_to_upload&&$.post(GLOBALS.ROOT_PATH.append("account/resource_post_upload_image_from_scrape"),{image_ref:_img_ref_to_upload,post_id:loc.data.post_id},function(data){var lead_image_menu;General.status_ok(data.status)&&(printf(data.data),data=data.data.lead_image.image_info,$("#lead_image_wrap img").attr({src:data.image.url}),$("#add_lead_image_wrapper").hasClass("has_content")||$("#add_lead_image_wrapper").addClass("has_content"),$("#add_lead_image_wrapper").find("span").text("Change Thumbnail"),(lead_image_menu=new Lead_Image_Menu({shell_obj:loc})).set_lead_image_properties(data,lead_image_menu),message_slider(General.success_text.lead_image_upload),$("#draw_image_selections").empty(),$("header").removeClass("hide"),$("footer").removeClass("hide"))})}),$(".return_img_selection_list li").live("click",function(e){$(this).hasClass("selected")?$(this).removeClass("selected"):($(".return_img_selection_list li").removeClass("selected"),$(this).addClass("selected"))})},Resource_Post.fn.get_compare_data_obj=function(){return new Postlet_Post_Data},Resource_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.title=$("#post_title_input").val(),com_data_obj.body_text=$("#post_textarea").val(),com_data_obj.details=$("#post_textarea").val(),com_data_obj.price=$("#price").val(),com_data_obj.currency_abbreviation=$("#currency_abbreviation").val(),com_data_obj.resource_type=$("#resource_type").val(),com_data_obj.url=$("#resource_url").val(),com_data_obj.urls=$("#urls_csv").val(),(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),com_data_obj.body_text==loc.data.body_text&&null==loc.error_list.body_text||Post_Base.defaults.is_default_text(loc.data.body_text)||(loc.data.body_text=com_data_obj.body_text,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_body_text_update",{post_id:loc.data.post_id,body_text:loc.data.body_text.toString(),body_text_version:""},function(data){loc.set_attributes_json_callback(data,loc,"body_text")},"json")),com_data_obj.details==loc.data.details&&null==loc.error_list.details||Post_Base.defaults.is_default_text(loc.data.details)||(loc.data.details=com_data_obj.details,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/resource_post_details_update",{post_id:loc.data.post_id,details:loc.data.details.toString()},function(data){loc.set_attributes_json_callback(data,loc,"details")},"json")),0<$("#price").length&&(com_data_obj.price==loc.data.price&&null==loc.error_list.price&&com_data_obj.currency_abbreviation==loc.data.currency_abbreviation&&null==loc.error_list.currency_abbreviation||(loc.data.price=com_data_obj.price,loc.data.currency_abbreviation=com_data_obj.currency_abbreviation,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/resource_post_price_update",{post_id:loc.data.post_id,price:loc.data.price,currency_abbreviation:loc.data.currency_abbreviation},function(data){loc.set_attributes_json_callback(data,loc,"price"),loc.set_attributes_json_callback(data,loc,"currency_abbreviation")},"json"))),com_data_obj.resource_type==loc.data.resource_type&&null==loc.error_list.resource_type||(loc.data.resource_type=com_data_obj.resource_type,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/resource_post_type_update",{post_id:loc.data.post_id,resource_type:loc.data.resource_type},function(data){loc.set_attributes_json_callback(data,loc,"resource_type")},"json")),com_data_obj.url==loc.data.url&&null==loc.error_list.url||(loc.data.url=com_data_obj.url,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/resource_post_url_update",{post_id:loc.data.post_id,url:loc.data.url},function(data){loc.set_attributes_json_callback(data,loc,"url")},"json"))},Resource_Post.fn.generate_rss_version=function(loc){return""},function(_obj){Post_Edit.call(this,_obj),this.shell_type="product_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Product_Tile_Post_Data(p_data,_obj)}),Job_Of_The_Day_Post=(Product_Tile_Post.inherits(Post_Edit),Product_Tile_Post.fn.ext_init=function(){$("#sponsor_link").blur(function(e){var _entered_url=$(this).val();/bit.ly/.test(_entered_url)||General.is_null_empty_undefined(_entered_url)||alert("It is strongly recommended that you use a bit.ly link here, so the stats can be tracked.")})},Product_Tile_Post.fn.get_compare_data_obj=function(){return new Product_Tile_Post_Data},Product_Tile_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.link=$("#sponsor_link").val(),com_data_obj.price=$("#product_price").val(),com_data_obj.category=$("#product_category").val(),com_data_obj.category==loc.data.category&&null==loc.error_list.category||(loc.data.category=com_data_obj.category,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/product_post_category_update",{post_id:loc.data.post_id,category:loc.data.category},function(data){loc.set_attributes_json_callback(data,loc,"category")},"json"));com_data_obj.price==loc.data.price&&null==loc.error_list.price||(loc.data.price=com_data_obj.price,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/product_post_price_update",{post_id:loc.data.post_id,price:loc.data.price},function(data){loc.set_attributes_json_callback(data,loc,"price")},"json")),com_data_obj.link==loc.data.link&&null==loc.error_list.sponsor_link||(loc.data.link=com_data_obj.link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/product_tile_post_link_update",{post_id:loc.data.post_id,link:loc.data.link},function(data){loc.set_attributes_json_callback(data,loc,"sponsor_link")},"json"))},Product_Tile_Post.fn.generate_rss_version=function(loc){var _html="";return General.is_null_empty_undefined($("#lead_image_wrap .img_wrapper img").attr("src"))||(_html+=String.format("<img src='{0}' />",$("#lead_image_wrap .img_wrapper img").attr("src"))),printf(_html+=String.format("<p>{0}</p>
1",$("#excerpt").val()),"rss_version sponsored tile"),_html},function(_obj){Post_Edit.call(this,_obj),this.shell_type="job_of_the_day_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Job_Of_The_Day_Post_Data(p_data,_obj),this.job_id_modal=null}),Project_Post_Base=(Job_Of_The_Day_Post.inherits(Post_Edit),Job_Of_The_Day_Post.fn.ext_init=function(){var _html,loc=this;loc.is_new&&(_html="",_html=(_html+="<div class='generic_message'><h3>Start a Design Job Post</h3><p>Enter the job id for the job you wish to create the post for. The fields will autopopulate with the job information. You will be able to edit until your heart is content.</p><div id='form_wrap'><label for='job_id_fetch'>Job Id<em></em></label><input type='text' id='fetch_job_info_from_id' value='' />")+String.format("<ul class=''><li><a id='fetch_job_info' class='btn' href='#'>Populate Job Fields</a></li></ul></div></div>",""),loc.job_id_modal=new Quick_Modal({appendTo:"core77"}),loc.job_id_modal.set_form_width(600),loc.job_id_modal.set_content(_html),loc.job_id_modal.draw_overlay(),$("#fetch_job_info_from_id").live("click.get_job_info_json",function(event){$("#fetch_job_info_from_id").removeClass("error").prev().find("em").text("").removeClass("error")})),$("#fetch_job_info").live("click",function(e){e.preventDefault(),loc.fetch_job_info_from_id($("#fetch_job_info_from_id").val(),loc)}),$("#job_id").bind({blur:function(e){e.preventDefault(),loc.fetch_job_info_from_id($(this).val(),loc)},click:function(e){$("#job_id").removeClass("error").prev().find("em").text("").removeClass("error")}})},Job_Of_The_Day_Post.fn.fetch_job_info_from_id=function(_id,loc){$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/coroflot_job_info"),{job_id:_id},function(data){var job_data;data=General.parse_json_if_needed(data),General.status_ok(data.status)?(job_data=General.parse_json_if_needed(data.job),null!=loc.job_id_modal&&loc.job_id_modal.remove_overlay(),$("#job_title").val(job_data.title),$("#company_name").val(job_data.company_name),$("#job_city").val(job_data.city),$("#job_state").val(job_data.state_abbreviation),$("#job_country").val(job_data.country_text),$("#excerpt").val(job_data.description.word_trunc(50,!1).replace(/<br.*>/gi,"")),$("#job_id").val(_id)):0<$("#fetch_job_info_from_id").length?$("#fetch_job_info_from_id").addClass("error").prev().find("em").text("Job ID doesn't exist").addClass("error"):($("#job_id").addClass("error").prev().find("em").text("Job ID doesn't exist").addClass("error"),$("#job_title").val(""),$("#company_name").val(""),$("#excerpt").val("")),printf(data,"data_from_job_search_jsonp")})},Job_Of_The_Day_Post.fn.get_compare_data_obj=function(){return new Job_Of_The_Day_Post_Data},Job_Of_The_Day_Post.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.job_id=$("#job_id").val(),com_data_obj.job_title=$("#job_title").val(),com_data_obj.job_city=$("#job_city").val(),com_data_obj.job_state=$("#job_state").val(),com_data_obj.job_country=$("#job_country").val(),com_data_obj.company_name=$("#company_name").val(),com_data_obj.job_id==loc.data.job_id&&null==loc.error_list.job_id||(loc.data.job_id=com_data_obj.job_id,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_job_id_update",{post_id:loc.data.post_id,job_id:loc.data.job_id},function(data){loc.set_attributes_json_callback(data,loc,"job_id")},"json")),com_data_obj.job_title==loc.data.job_title&&null==loc.error_list.job_title||(loc.data.job_title=com_data_obj.job_title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_job_title_update",{post_id:loc.data.post_id,job_title:loc.data.job_title},function(data){loc.set_attributes_json_callback(data,loc,"job_title")},"json")),com_data_obj.job_city==loc.data.job_city&&null==loc.error_list.job_city||(loc.data.job_city=com_data_obj.job_city,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_job_city_update",{post_id:loc.data.post_id,job_city:loc.data.job_city},function(data){loc.set_attributes_json_callback(data,loc,"job_city")},"json")),com_data_obj.job_state==loc.data.job_state&&null==loc.error_list.job_state||(loc.data.job_state=com_data_obj.job_state,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_job_state_update",{post_id:loc.data.post_id,job_state:loc.data.job_state},function(data){loc.set_attributes_json_callback(data,loc,"job_state")},"json")),com_data_obj.job_country==loc.data.job_country&&null==loc.error_list.job_country||(loc.data.job_country=com_data_obj.job_country,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_job_country_update",{post_id:loc.data.post_id,job_country:loc.data.job_country},function(data){loc.set_attributes_json_callback(data,loc,"job_country")},"json")),com_data_obj.company_name==loc.data.company_name&&null==loc.error_list.company_name||(loc.data.company_name=com_data_obj.company_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/job_of_the_day_post_company_name_update",{post_id:loc.data.post_id,company_name:loc.data.company_name},function(data){loc.set_attributes_json_callback(data,loc,"company_name")},"json"))},Job_Of_The_Day_Post.fn.generate_rss_version=function(loc){var _html="";return General.is_null_empty_undefined($("#lead_image_wrap .img_wrapper img").attr("src"))||(_html+=String.format("<img src='{0}' />",$("#lead_image_wrap .img_wrapper img").attr("src"))),printf(_html+=String.format("<p>{0}</p>
1",$("#excerpt").val()),"rss_version sponsored tile"),_html},function(_obj){Post_Edit.call(this,_obj),this.details_count,this.overview_count,this.image_collection_limit=12,this.undo_manager=null,this.link_rel_type="ugc",this.is_text_input_project_for=!1,this.is_text_input_designer_name=!1}),Project_Post=(Project_Post_Base.inherits(Post_Edit),Project_Post_Base.fn.get_undo_manager_object=function(_obj){return new Undo_Manager({levels_of_undo:100,container_ids:["overview","details"],frequency:500,selection_type:"non_rangy"})},Project_Post_Base.fn.get_text_menu_actions=function(_focus_node){var context_sensitive_action;return"designer_name"==$(_focus_node).attr("id")||"project_for"==$(_focus_node).attr("id")?[]:(context_sensitive_action="post_title"==$(_focus_node).attr("id")?["italic"]:"h1"==$(_focus_node).context.nodeName.toString().toLowerCase()||"h2"==$(_focus_node).context.nodeName.toString().toLowerCase()?["italic","link","h1","h2"]:$(_focus_node).hasClass("caption")||$(_focus_node).hasClass("credit")?["bold","italic","link"]:["bold","italic","link","h1","h2"],"team_credits"==$(_focus_node).parents("section").attr("id")?["bold","italic","link"]:context_sensitive_action)},Project_Post_Base.fn.ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;"virtual_student_project_post"!=loc.shell_type&&(loc.is_text_input_designer_name||null!=com_data_obj.designer_name&&(com_data_obj.designer_name=$("#designer_name").html().clean_white_space().replace(/<br\/?>/gi,""),(com_data_obj.designer_name==loc.data.designer_name||Post_Base.defaults.is_default_text(com_data_obj.designer_name))&&null==loc.error_list.designer_name||(loc.data.designer_name=com_data_obj.designer_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_designer_name_update",{post_id:loc.data.post_id,designer_name:loc.data.designer_name},function(data){loc.set_attributes_json_callback(data,loc,"designer_name")},"json"))),!loc.is_text_input_project_for&&(com_data_obj.project_for=$("#project_for").html().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.project_for!=loc.data.project_for&&!Post_Base.defaults.is_default_text(com_data_obj.project_for)||null!=loc.error_list.project_for)&&(loc.data.project_for=com_data_obj.project_for,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_project_for_update",{post_id:loc.data.post_id,project_for:loc.data.project_for},function(data){loc.set_attributes_json_callback(data,loc,"project_for")},"json")),com_data_obj.team_credits=$("#team_credits").html().clean_white_space(),(com_data_obj.team_credits==loc.data.team_credits||Post_Base.defaults.is_default_text(com_data_obj.team_credits,"p"))&&null==loc.error_list.team_credits||(loc.data.team_credits=com_data_obj.team_credits,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_team_credits_update",{post_id:loc.data.post_id,team_credits:loc.data.team_credits},function(data){loc.set_attributes_json_callback(data,loc,"team_credits")},"json"))),null!=com_data_obj.external_link&&(com_data_obj.external_link=$("#external_link").val().clean_white_space(),com_data_obj.external_link==loc.data.external_link&&null==loc.error_list.external_link||(loc.data.external_link=com_data_obj.external_link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_external_link_update",{post_id:loc.data.post_id,external_link:loc.data.external_link},function(data){loc.set_attributes_json_callback(data,loc,"external_link")},"json"))),com_data_obj.details=$("#details").html().clean_white_space(),null!=com_data_obj.overview&&(com_data_obj.overview=$("#overview").html().clean_white_space(),(com_data_obj.overview==loc.data.overview||Post_Base.defaults.is_default_text(com_data_obj.overview,"p"))&&null==loc.error_list.overview||(loc.data.overview=com_data_obj.overview,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_overview_update",{post_id:loc.data.post_id,overview:loc.data.overview},function(data){loc.set_attributes_json_callback(data,loc,"overview")},"json"))),(com_data_obj.details==loc.data.details||Post_Base.defaults.is_default_text(com_data_obj.details,"p"))&&null==loc.error_list.details||(loc.data.details=com_data_obj.details,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_details_update",{post_id:loc.data.post_id,details:loc.data.details},function(data){loc.set_attributes_json_callback(data,loc,"details")},"json")),loc.ext_ext_set_post_attributes(com_data_obj,loc)},Project_Post_Base.fn.base_ext_init=function(){var loc=this;loc.create_gallery_zone(),loc.undo_manager=loc.get_undo_manager_object(),loc.overview_count=new Text_Counter({elem_id:"overview",mode:"word",get_text_method:"text",max_count:501}),loc.overview_count.init();loc.details_count=new Text_Counter({elem_id:"details",mode:"word",get_text_method:"text",max_count:1501}),loc.details_count.init(),$("#designer_name, #project_for, #team_credits").live({mouseup:function(e){loc.post_mouseup_handler(e,loc,this)},keydown:function(e){loc.post_keydown_handler(e,loc,this)}})},function(_obj){Project_Post_Base.call(this,_obj),this.shell_type="project_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Project_Post_Data(p_data,_obj)}),Profile_Firm_Project_Post=(Project_Post.inherits(Project_Post_Base),Project_Post.fn.get_all_images=function(_zone){for(var _imgs=new Array,k=0;k<$(".gallery_zone > ul > li").length;k++){var $_this_img=$($(".gallery_zone > ul > li").get(k)).find("> .slide_wrapper img"),_src=$_this_img.attr("src"),_file_id=$_this_img.attr("data-gallery-img-id"),_width=parseInt($_this_img.attr("data-gallery-img-width")),$_this_img=parseInt($_this_img.attr("data-gallery-img-height")),_width=new Dimensions({width:_width,height:$_this_img});_imgs.push(new Image_Base({src:_src,file_id:_file_id,dimension:_width})),"virtual_student_project_post"==this.shell_type||$("#add_lead_image_wrapper").hasClass("has_content")||$("#add_lead_image_wrapper").addClass("has_content")}return _imgs},Project_Post.fn.ext_init=function(){var project_requests;this.base_ext_init(),this.is_new&&((project_requests=new Quick_Modal({appendTo:"core77"})).set_form_width(600),project_requests.set_content("<div class='generic_message'><h3>Thanks for your interest in sharing your work with the Core77 audience.</h3><p>Our readers look for original, notable design works, particularly those that have an innovative element. Whether it is a new material, a new manufacturing technique, or a particularly clever solution to a problem, these types of stories enjoy particular success with our audience.</p><p>Our editors review every project that is submitted on a daily basis. The publication schedule is driven by other articles in the queue, and as a result cannot be predicted. Due to the volume of submissions we will follow up with you only if your project is successfully published.</p><ul class='modal_bottom'><li class='quick_m_close'><a class='btn' href='#'>Continue</a></li></ul></div>"),project_requests.draw_overlay())},Project_Post.fn.draw_post_submit_overlay=function(_type){var _html="",project_requests=(_html=(_html=(_html=(_html+="<div class='generic_message'><h3>Thank You</h3>")+String.format("<p>Your {0} has been successfully submitted to our editors for review.</p>","Project"))+String.format("<ul class='modal_bottom'><li class='left'><a class='btn' href='{0}'>Create another post</a></li>",GLOBALS.PUBLISH_ROOT_PATH.append("account/posts")))+String.format("<li><a class='btn secondary_action' href='{0}'>Browse Core77</a></li></ul></div>",GLOBALS.WEB_ROOT_PATH),new Quick_Modal({appendTo:"core77",close_off:!0}));project_requests.set_form_width(600),project_requests.set_content(_html),project_requests.draw_overlay()},Project_Post.fn.get_compare_data_obj=function(){return new Project_Post_Data},Project_Post.fn.ext_ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.project_type=$("#project_post_project_type").val(),com_data_obj.tag=0<$("#project_post_tag").length?$("#project_post_tag").val():0,com_data_obj.project_type==loc.data.project_type&&null==loc.error_list.project_type||(loc.data.project_type=com_data_obj.project_type,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_project_type_update",{post_id:loc.data.post_id,project_type:loc.data.project_type},function(data){loc.set_attributes_json_callback(data,loc,"project_type")},"json")),0<$("#project_post_tag").length&&(com_data_obj.tag==loc.data.tag&&null==loc.error_list.tag||(loc.data.tag=com_data_obj.tag,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_tag_update",{post_id:loc.data.post_id,tag_id:loc.data.tag},function(data){loc.set_attributes_json_callback(data,loc,"tag")},"json")))},Project_Post.fn.generate_rss_version=function(loc){for(var _html="",_overview=$("#overview").html().clean_white_space(),k=(_html+=Post_Base.defaults.is_default_text(_overview,"p")?"":_overview,0);k<10;k++){var _img_str,_credit_str,_title_str,$li=$($(".gallery_zone > ul.slideshow_ul > li").get(k));0<$li.length&&!$li.hasClass("add_new")&&(_img_str=String.format("<img src='{0}' />",$li.find(".slide_wrapper img").attr("src")),_credit_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .credit").html().clean_white_space())?"":String.format("<div class='credit'>Credit: {0}</div>",$li.find(".slide_wrapper .credit").html()),_title_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .title").html().clean_white_space())?"":String.format("<div class='title'>{0}</div>",$li.find(".slide_wrapper .title").html()),$li=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .caption").html().clean_white_space())?"":String.format("<div class='caption'>{0}</div>",$li.find(".slide_wrapper .caption").html()),_html+=String.format("<div class='img_wrapper'>{0}{1}{2}{3}</div>",_img_str,_title_str,$li,_credit_str))}return printf(_html,"rss_version project"),_html},function(_obj){Project_Post_Base.call(this,_obj),this.shell_type="profile_firm_project_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Profile_Firm_Project_Post_Data(p_data,_obj),this.is_text_input_title=!0,this.is_text_input_project_for=!0,this.image_collection_limit=8,this.addition_units_modal="",this.custom_delete=!0}),Virtual_Student_Project_Post=(Profile_Firm_Project_Post.inherits(Project_Post_Base),Profile_Firm_Project_Post.fn.convert_create_to_edit=function(_post_id,_profile_id,remove_all_query_string_params){remove_all_query_string_params=null!=remove_all_query_string_params&&remove_all_query_string_params;var _current_url=window.location.toString();_current_url.includes("post_id=")&&_current_url.includes("profile_id=")||(printf(_current_url),_current_url=_current_url.replace("create","edit"),remove_all_query_string_params=(_current_url=(_current_url=remove_all_query_string_params?_current_url.split("?")[0]:_current_url).includes("#")?_current_url.split("#")[0]:_current_url).includes("?")?"&":"?",_current_url=String.format("{0}{1}post_id={2}&profile_id={3}",_current_url,remove_all_query_string_params,_post_id,_profile_id),remove_all_query_string_params=new History_State({id:0,page:"",user_id:0,project_id:0,title:"",update_url:_current_url}),history.pushState(remove_all_query_string_params,"",_current_url))},Profile_Firm_Project_Post.fn.add_edit_addition_unit=function(loc,_type,_unit_id){"link"===_type&&(loc.addition_units_modal.set_draw_overlay_and_close_clbk({draw_overlay_clbk:function(){loc.instance_profile_link=new Profile_Link_Unit({wrap_modal_ref:loc.addition_units_modal,add_to_dom:!0,save_callback:function(){}}),loc.instance_profile_link.init()},close_clbk:function(){loc.instance_profile_link.destroy()}}),$.post("/account/add_edit_link",{profile_id:loc.data.profile_id,unit_id:_unit_id,post_id:loc.data.post_id},function(data){loading.remove(),General.status_ok(data.status)&&(loc.addition_units_modal.remove_overlay(),loc.addition_units_modal.set_attach_class("addition_units_add_edit"),loc.addition_units_modal.set_content(data.data),loc.addition_units_modal.set_scroll_location($(window).scrollTop()),loc.addition_units_modal.draw_overlay())}))},Profile_Firm_Project_Post.fn.ext_init=function(){var loc=this;loc.base_ext_init(),loc.convert_create_to_edit(loc.data.post_id,loc.data.profile_id,!0),loc.custom_delete&&$("#delete_post").click(function(e){confirm("You are about to delete this project and all of its contents. This can't be und
1one, are you sure you wish do delete?")&&(loading.create(),$.post(GLOBALS.ROOT_PATH+"account/profile_project_delete",{profile_id:loc.data.profile_id,post_id:loc.data.post_id},function(data){General.status_ok(data.status,loc)&&(window.location=String.format("/account/edit-firm-profile?profile_id={0}",loc.data.profile_id))},"json"))}),new Modern_Radio_Button({hidden_input_id:"project_visibility_hidden",radio_group_parent_id:"project_visibility_radio_wrap"}).init(),loc.addition_units_modal=new Quick_Modal({use_modern_centering:!0,new_animation:!1,extra_class:"addition_units_add_edit",is_no_scroll:!0,save_scroll_spot:!0,shell_obj:loc}),$(".addition_units .new_unit").live("click",function(e){var $this=$(this),_type=$this.attr("data-type"),_max_limit=$this.attr("data-ml");$this.parents(".addition_units").find(".unit_saved_container .unit_saved").length<_max_limit?(loading.create(),"new_link"===_type&&loc.add_edit_addition_unit(loc,"link",0)):($this="","new_link"===_type&&($this=General.plural_handler(_max_limit,"Link","s")),alert(String.format("You can only add a max of {0} {1}",_max_limit,$this)))}),$(".action_menu > span").live("click",function(e){var $this=$(this),_action=$this.attr("data-action"),_type=$this.attr("data-type"),_unit_id=$this.attr("data-id");switch(loading.create(),_action){case"edit":loc.add_edit_addition_unit(loc,_type,_unit_id);break;case"delete":"link"===_type&&$.post("/account/profile_link_delete",{profile_id:loc.data.profile_id,unit_id:_unit_id,post_id:loc.data.post_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_links .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_links .unit_saved_container")))})}}),0<$("#team_credits").length&&new Text_Counter({elem_id:"team_credits",mode:"character",get_text_method:"text",max_count:800}).init(),$(".checkbox_wrap").live("click",function(event){var $this=$(this);loc.checkbox_handler($this,function($passed_this){3<loc.get_checkbox_checked_as_array($("#profile_project_specialties > li > div")).length&&(alert("You can only have a max of 3 categories selected for your project."),loc.checkbox_handler($passed_this))},function($passed_this){})})},Profile_Firm_Project_Post.fn.get_undo_manager_object=function(_obj){return new Undo_Manager({levels_of_undo:100,container_ids:["details"],frequency:500,selection_type:"non_rangy"})},Profile_Firm_Project_Post.fn.draw_post_submit_overlay=function(_type){},Profile_Firm_Project_Post.fn.get_compare_data_obj=function(){return new Profile_Firm_Project_Post_Data},Profile_Firm_Project_Post.fn.ext_ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.title=$("#profile_project_title").val(),com_data_obj.project_for=$("#profile_for_client").val(),com_data_obj.is_public=$("#project_visibility_hidden").val(),(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),(com_data_obj.project_for==loc.data.project_for||Post_Base.defaults.is_default_text(com_data_obj.project_for))&&null==loc.error_list.project_for||(loc.data.project_for=com_data_obj.project_for,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_project_for_update",{post_id:loc.data.post_id,project_for:loc.data.project_for},function(data){loc.set_attributes_json_callback(data,loc,"project_for")},"json")),com_data_obj.is_public==loc.data.is_public&&null==loc.error_list.is_public||(loc.data.is_public=com_data_obj.is_public,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_project_post_base_is_public_update",{post_id:loc.data.post_id,profile_id:loc.data.profile_id,is_public:loc.data.is_public},function(data){loc.set_attributes_json_callback(data,loc,"is_public")},"json")),com_data_obj.specialties=loc.get_checkbox_checked_as_array($("#profile_project_specialties > li > div")),com_data_obj.specialties.toString()==loc.data.specialties.toString()&&null==loc.error_list.specialties||(loc.data.specialties=com_data_obj.specialties,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_project_specialty_update",{profile_id:loc.data.profile_id,post_id:loc.data.post_id,specialty_ids:loc.data.specialties.toString()},function(data){loc.set_attributes_json_callback(data,loc,"specialties")},"json"))},function(_obj){Project_Post_Base.call(this,_obj),this.shell_type="virtual_student_project_post";var p_data=General.is_null_empty_undefined(_obj.data)?{}:_obj.data,lead_image_data=General.is_null_empty_undefined(_obj.data_lead_image)?{}:_obj.data_lead_image;this.data=new Virtual_Student_Project_Post_Data(p_data,lead_image_data),this.virtual_student_shows=General.is_null_empty_undefined(_obj.virtual_student_shows)?{}:_obj.virtual_student_shows,this.is_new="true"==_obj.is_new.toString().toLowerCase(),this.show_type=General.is_null_empty_undefined(_obj.show_type)?0:parseInt(_obj.show_type),this.this_show_info={},this.school_name_selected="",this.direct_link_create="true"==_obj.direct_link_create.toString().toLowerCase(),this.is_text_input_title=!0,this.image_collection_limit=6}),Award_Post=(Virtual_Student_Project_Post.inherits(Project_Post_Base),Virtual_Student_Project_Post.fn.generate_shows_select_html_from_school_id=function(loc,_school_id){if(0!=_school_id){for(var _returned_html="<select id='primary_show_selection'><option value='0'>Select your show</option>",k=0;k<loc.virtual_student_shows.length;k++)loc.virtual_student_shows[k].school_id===_school_id&&(_returned_html+=String.format("<option value='{0}'>{1}</option>",loc.virtual_student_shows[k].id,loc.virtual_student_shows[k].show_name),loc.this_show_info=loc.virtual_student_shows[k],loc.this_show_info.large_banner_image=String.format("https://s3files.core77.com/images/student_showcase/{0}",loc.this_show_info.large_banner_image));return _returned_html}},Virtual_Student_Project_Post.fn.ext_init=function(){var virtual_student_project_start,loc=this;loc.base_ext_init(),loc.is_new&&(loc.direct_link_create?loc.convert_create_to_edit(loc.data.post_id,!0):((virtual_student_project_start=new Quick_Modal({appendTo:"core77",close_off:!0,extra_overlay_class:"not_transparent",primary_close_clbk:function(){}})).set_form_width(600),virtual_student_project_start.set_form_to_wrap("start_student_showcase"),virtual_student_project_start.draw_overlay(),$("#confim_and_close").live("click",function(e){loading.create();var _show_name,school_id=parseInt($("#primary_school_selection").val()),show_id=parseInt($("#primary_show_selection").val());if(0!=show_id)for(var k=0;k<loc.virtual_student_shows.length;k++)loc.virtual_student_shows[k].id===show_id&&(_show_name=loc.virtual_student_shows[k].show_name,loc.this_show_info.show_name=_show_name);0!==school_id&&null!=show_id&&0!==show_id?$.post("/account/virtual_student_project_post_show_id_and_school_id_update",{post_id:loc.data.post_id,school_id:school_id,show_id:show_id},function(data){General.status_ok(data.status)?(loc.show_type=data.data,$(".variable_use_element").addClass("hide"),$(String.format(".variable_use_element[data-type-use={0}]",loc.show_type)).removeClass("hide"),loc.show_type=loc.show_type,$("#student_show_cap").removeClass("start_push"),$("#student_show_cap .show_name").text(loc.this_show_info.show_name),$("#student_show_cap .school_name").text(loc.school_name_selected),virtual_student_project_start.remove_overlay(),loc.convert_create_to_edit(loc.data.post_id),loading.remove()):(loading.remove(),alert("There was a problem when trying to configure your project, please reload and try again. If this persists please contact support. Thanks."))}):alert("Before you begin populating your project you need to select your School and the Show you will be participating in. Please select them now from the dropdowns above. Please note that you need to select a school before you can select the correct show. Thanks.")}))),$("#primary_school_selection").live("change",function(e){var _html,_school_id_selected=parseInt($(this).val());loc.school_name_selected=$("#primary_school_selection option:selected").text(),0!==_school_id_selected&&($("#show_select_wrap").empty(),_html="<label>Select Your Show<em></em></label>",_html+=loc.generate_shows_select_html_from_school_id(loc,_school_id_selected),$(_html).appendTo($("#show_select_wrap")))}),$("#virtual_student_embed_code").live("blur",function(e){var _embed_with_action,_embed=$(this).val();""!=_embed.clean_white_space()?!/(<script)|(onclick)|(onerror)|(onload)/.test(_embed)&&/(youtube)|(vimeo)/.test(_embed)?/(<iframe)/.test(_embed)?(_embed=_embed.replace(/<p[\s\S]*?<\/p>/gi,"").replace(/<a[\s\S]*?<\/a>/gi,"").replace(/<div[\s\S]*?<\/div>/gi,""),_embed_with_action=String.format("<div class='iframe_wrap'>{0}</div><div class='primary_action_wrap'></div>",_embed),$(this).val(_embed),$("#preview_embedded_media").html(_embed_with_action),$("#preview_embedded_media").removeClass("hide")):alert('You are trying to embed a URL. You need to go to the source you are trying to embed and look in the "Share" section below your content. In there you will see a block of "Embed code". If you copy that and paste it here you will be able to embed your content in the project.'):alert("Sorry this embed type is currently not supported."):($("#preview_embedded_media").empty(),$("#preview_embedded_media").addClass("hide"))})},Virtual_Student_Project_Post.fn.draw_post_submit_overlay=function(_type){var _html="",project_requests=(_html=(_html=(_html+="<div class='generic_message'><h3>Success</h3>")+String.format("<p>Your {0} has been successfully submitted as part of the {1} show from {2}.</p>","Student Showcase Project",$(".show_name").text(),$(".school_name").text())+"<ul class='modal_bottom'>")+String.format("<li><a class='btn' href='{0}'>Go to Core77</a></li></ul></div>",GLOBALS.WEB_ROOT_PATH),new Quick_Modal({appendTo:"core77",close_off:!0}));project_requests.set_form_width(600),project_requests.set_content(_html),project_requests.draw_overlay()},Virtual_Student_Project_Post.fn.get_compare_data_obj=function(){return new Virtual_Student_Project_Post_Data},Virtual_Student_Project_Post.fn.ext_ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.embed_code=escape($("#virtual_student_embed_code").val()),1==loc.show_type?com_data_obj.title=$
1("#project_title").val():com_data_obj.title=$("#student_name").val(),(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),com_data_obj.embed_code==loc.data.embed_code&&null==loc.error_list.embed_code||(loc.data.embed_code=com_data_obj.embed_code,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/virtual_student_project_post_embed_update",{post_id:loc.data.post_id,embed_code:loc.data.embed_code},function(data){loc.set_attributes_json_callback(data,loc,"embed_code")},"json")),com_data_obj.designer_name=$("#student_name").val(),(com_data_obj.designer_name==loc.data.designer_name||Post_Base.defaults.is_default_text(com_data_obj.designer_name))&&null==loc.error_list.designer_name||(loc.data.designer_name=com_data_obj.designer_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_designer_name_update",{post_id:loc.data.post_id,designer_name:loc.data.designer_name},function(data){loc.set_attributes_json_callback(data,loc,"designer_name")},"json")),com_data_obj.channels=[354],com_data_obj.channels.join(",")==loc.data.channels.join(",")&&null==loc.error_list.channels||(loc.data.channels=com_data_obj.channels,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_channel_update",{post_id:loc.data.post_id,channel_ids:loc.data.channels.join(",")},function(data){loc.set_attributes_json_callback(data,loc,"channels")},"json"))},Virtual_Student_Project_Post.fn.generate_rss_version=function(loc){for(var _html="",_overview=$("#overview").html().clean_white_space(),k=(_html+=Post_Base.defaults.is_default_text(_overview,"p")?"":_overview,0);k<10;k++){var _img_str,_credit_str,_title_str,$li=$($(".gallery_zone > ul.slideshow_ul > li").get(k));0<$li.length&&!$li.hasClass("add_new")&&(_img_str=String.format("<img src='{0}' />",$li.find(".slide_wrapper img").attr("src")),_credit_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .credit").html().clean_white_space())?"":String.format("<div class='credit'>Credit: {0}</div>",$li.find(".slide_wrapper .credit").html()),_title_str=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .title").html().clean_white_space())?"":String.format("<div class='title'>{0}</div>",$li.find(".slide_wrapper .title").html()),$li=Post_Base.defaults.is_default_text($li.find(".slide_wrapper .caption").html().clean_white_space())?"":String.format("<div class='caption'>{0}</div>",$li.find(".slide_wrapper .caption").html()),_html+=String.format("<div class='img_wrapper'>{0}{1}{2}{3}</div>",_img_str,_title_str,$li,_credit_str))}return printf(_html,"rss_version project"),_html},function(_obj){Project_Post_Base.call(this,_obj),this.shell_type="award_post";var p_data=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data,_obj=General.is_null_empty_undefined(_obj.data_lead_image)?new Object:_obj.data_lead_image;this.data=new Award_Post_Data(p_data,_obj),this.default_save_post_name="award_entry_saved",this.complete_modal,this.save_rss_version=!1,this.is_text_input_title=!0,this.is_text_input_project_for=!0,this.is_text_input_designer_name=!0}),Post_Public=(Award_Post.inherits(Project_Post_Base),Award_Post.fn.ext_init=function(){var loc=this;loc.base_ext_init(),$("input#add_pdf").fileupload({dataType:"json",formData:{post_id:loc.data.post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){var split_it;null!=data.files[0].name&&1<(split_it=data.files[0].name.split(".")).length&&"pdf"==split_it[split_it.length-1]&&(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){if(General.wrap_and_reset_form($("#add_pdf")),data=General.parse_json_if_needed(data.result),General.status_ok(data.status,loc)){message_slider(General.success_text.pdf_file_uploaded),$(".pdf_wrap .upload_zone").hasClass("has_content")||($(".pdf_wrap .upload_zone").addClass("has_content"),$(".pdf_wrap .upload_zone span").text("Change PDF"));try{0==$("li.pdf_wrap a").length?$(String.format("<a href='{0}' target='_blank'><em class='c77_icon'>`</em><span>View PDF</span></a>",data.pdf.url)).appendTo($("li.pdf_wrap")):$("li.pdf_wrap a").attr({href:data.pdf.url})}catch(e){loading.remove()}}else message_slider(data.text,!0);loading.remove()}}),$("input#add_video").fileupload({dataType:"json",formData:{post_id:loc.data.post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){var split_it;null!=data.files[0].name&&1<(split_it=data.files[0].name.split(".")).length&&("mp4"==split_it[split_it.length-1]||"m4v"==split_it[split_it.length-1])&&(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var _html;General.wrap_and_reset_form($("#add_video")),data=General.parse_json_if_needed(data.result),General.status_ok(data.status,loc)?(message_slider(General.success_text.video_file_uploaded),$("#video_upload .upload_zone").hasClass("has_content")||$("#video_upload .upload_zone").addClass("has_content"),$("#video_upload .upload_zone span").text("Change Project Video"),0<$("#video_upload video").length?($("#video_upload video source").attr({src:data.video.url}),$("#video_upload video").get(0).load()):(_html="<video class='large' controls>",_html+=String.format("<source src='{0}' type='video/mp4'></video>",data.video.url),$(_html).appendTo($("#video_upload")))):message_slider(data.text,!0),loading.remove()}}),0<$("#team_credits").length&&new Text_Counter({elem_id:"team_credits",mode:"character",get_text_method:"text",max_count:800}).init(),$("._spon_sel").live("change",function(event){var $this=$(this);$this.parent().find(".h_i_val").val($this.val())}),$(".checkbox_wrap").live("click",function(event){var $this=$(this);loc.checkbox_handler($this)}),$("#save_entry").live("click",function(e){e.preventDefault(),loc.save(function(){loc.save_callback_default(General.success_text[loc.default_save_post_name],loc,!0)})}),$("#delete_entry").live("click",function(e){confirm("You are about to delete this award entry and all of its contents. This can't be und
1one, are you sure you wish do delete?")&&(loading.create(),$.post(GLOBALS.ROOT_PATH+"account/post_delete",{post_id:loc.data.post_id},function(data){General.status_ok(data.status,loc)&&(window.location="/account/awards")},"json"))}),$("#complete_entry").live("click",function(e){e.preventDefault();loc.data.post_id;loc.save(function(){loc.check_for_completeness({is_complete:function(){var _html="<div id='post_errors' class='award_choices_over'><h3>Added to Cart!</h3>",_entry_type=(_html+=String.format("<ul class='choices_list'><li class='left'><a class='btn' href='{0}'>Continue to Payment</a></li>",GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-payment-select")),2==loc.data.award_post_entry_type?"professional":"student"),_html=(_html=_html+String.format("<li class='left'><a class='btn' href='{0}'>Make Another Entry</a></li>",GLOBALS.PUBLISH_ROOT_PATH.append(String.format("account/create-{0}-award-entry",_entry_type)))+"</ul>")+String.format("<div class='option_3'><a class='' href='{0}'>Back to Entry Home</a></div>",GLOBALS.PUBLISH_ROOT_PATH.append("account/awards"))+"</div>";loc.complete_modal=null,loc.complete_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0}),loc.complete_modal.set_content(_html),loc.complete_modal.set_form_width(700),loc.complete_modal.draw_overlay()},not_complete:function(){}})})})},Award_Post.fn.get_compare_data_obj=function(){return new Award_Post_Data},Award_Post.fn.ext_ext_set_post_attributes=function(com_data_obj,_loc){var loc=_loc;com_data_obj.categories=loc.get_checkbox_checked_as_array($("#award_categories > li > div")),com_data_obj.title=$("#post_title_text").val(),com_data_obj.designer_name=$("#designer_name_text").val(),com_data_obj.project_for=$("#project_for_text").val(),(com_data_obj.title==loc.data.title||Post_Base.defaults.is_default_text(com_data_obj.title))&&null==loc.error_list.title||(loc.data.title=com_data_obj.title,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/post_title_update",{post_id:loc.data.post_id,title:loc.data.title},function(data){loc.set_attributes_json_callback(data,loc,"title")},"json")),(com_data_obj.designer_name==loc.data.designer_name||Post_Base.defaults.is_default_text(com_data_obj.designer_name))&&null==loc.error_list.designer_name||(loc.data.designer_name=com_data_obj.designer_name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_designer_name_update",{post_id:loc.data.post_id,designer_name:loc.data.designer_name},function(data){loc.set_attributes_json_callback(data,loc,"designer_name")},"json")),(com_data_obj.project_for==loc.data.project_for||Post_Base.defaults.is_default_text(com_data_obj.project_for))&&null==loc.error_list.project_for||(loc.data.project_for=com_data_obj.project_for,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/project_post_base_project_for_update",{post_id:loc.data.post_id,project_for:loc.data.project_for},function(data){loc.set_attributes_json_callback(data,loc,"project_for")},"json")),com_data_obj.categories.toString()==loc.data.categories.toString()&&null==loc.error_list.categories||(loc.data.categories=com_data_obj.categories,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_categories_update",{post_id:loc.data.post_id,category_ids:loc.data.categories.toString()},function(data){loc.set_attributes_json_callback(data,loc,"categories")},"json")),0<$("#notes").length&&(com_data_obj.admin_notes=$("#notes").val().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.admin_notes==loc.data.admin_notes&&null==loc.error_list.admin_notes||(loc.data.admin_notes=com_data_obj.admin_notes,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/admin_award_post_notes_update",{post_id:loc.data.post_id,admin_notes:loc.data.admin_notes},function(data){loc.set_attributes_json_callback(data,loc,"admin_notes")},"json"))),0<$("#designer_twitter_handle").length&&(com_data_obj.designer_twitter_handle=$("#designer_twitter_handle").val().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.designer_twitter_handle==loc.data.designer_twitter_handle&&null==loc.error_list.designer_twitter_handle||(loc.data.designer_twitter_handle=com_data_obj.designer_twitter_handle,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_designer_twitter_handle_update",{post_id:loc.data.post_id,designer_twitter_handle:loc.data.designer_twitter_handle},function(data){loc.set_attributes_json_callback(data,loc,"designer_twitter_handle")},"json"))),0<$("#client_twitter_handle").length&&(com_data_obj.client_twitter_handle=$("#client_twitter_handle").val().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.client_twitter_handle==loc.data.client_twitter_handle&&null==loc.error_list.client_twitter_handle||(loc.data.client_twitter_handle=com_data_obj.client_twitter_handle,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_client_twitter_handle_update",{post_id:loc.data.post_id,client_twitter_handle:loc.data.client_twitter_handle},function(data){loc.set_attributes_json_callback(data,loc,"client_twitter_handle")},"json"))),0<$("#date_to_market").length&&(com_data_obj.date_to_market=$("#date_to_market").val().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.date_to_market==loc.data.date_to_market&&null==loc.error_list.date_to_market||(loc.data.date_to_market=com_data_obj.date_to_market,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_date_to_market_update",{post_id:loc.data.post_id,date_to_market:loc.data.date_to_market},function(data){loc.set_attributes_json_callback(data,loc,"date_to_market")},"json"))),0<$("#date_to_market_link").length&&(com_data_obj.date_to_market_link=$("#date_to_market_link").val().clean_white_space().replace(/<br\/?>/gi,""),com_data_obj.date_to_market_link==loc.data.date_to_market_link&&null==loc.error_list.date_to_market_link||(loc.data.date_to_market_link=com_data_obj.date_to_market_link,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_date_to_market_link_update",{post_id:loc.data.post_id,date_to_market_link:loc.data.date_to_market_link},function(data){loc.set_attributes_json_callback(data,loc,"date_to_market_link")},"json"))),0<$("#use_keyshot").length&&(com_data_obj.use_keyshot=parseInt($("#use_keyshot").val()),com_data_obj.use_keyshot==loc.data.use_keyshot&&null==loc.error_list.use_keyshot||(loc.data.use_keyshot=com_data_obj.use_keyshot,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_use_keyshot_update",{post_id:loc.data.post_id,use_keyshot:loc.data.use_keyshot},function(data){loc.set_attributes_json_callback(data,loc,"use_keyshot")},"json"))),0<$("#use_stratasys").length&&(com_data_obj.use_stratasys=parseInt($("#use_stratasys").val()),com_data_obj.use_stratasys==loc.data.use_stratasys&&null==loc.error_list.use_stratasys||(loc.data.use_stratasys=com_data_obj.use_stratasys,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_use_stratasys_update",{post_id:loc.data.post_id,use_stratasys:loc.data.use_stratasys},function(data){loc.set_attributes_json_callback(data,loc,"use_stratasys")},"json"))),0<$("#is_special_prize_eligible").length&&(com_data_obj.is_special_prize_eligible=parseInt($("#is_special_prize_eligible").val()),com_data_obj.is_special_prize_eligible==loc.data.is_special_prize_eligible&&null==loc.error_list.is_special_prize_eligible||(loc.data.is_special_prize_eligible=com_data_obj.is_special_prize_eligible,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_is_special_prize_eligible_update",{post_id:loc.data.post_id,is_special_prize_eligible:loc.data.is_special_prize_eligible},function(data){loc.set_attributes_json_callback(data,loc,"is_special_prize_eligible")},"json"))),0<$("#use_fusion").length&&(com_data_obj.use_fusion=parseInt($("#use_fusion").val()),com_data_obj.use_fusion==loc.data.use_fusion&&null==loc.error_list.use_fusion||(loc.data.use_fusion=com_data_obj.use_fusion,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/award_post_use_fusion_update",{post_id:loc.data.post_id,use_fusion:loc.data.use_fusion},function(data){loc.set_attributes_json_callback(data,loc,"use_fusion")},"json")))},function(_obj){var _this_meta_data;Post_Base.call(this,_obj),this.shell_type="post_public",this.data=new Post_Public_Data(_obj.data),this.user_data=new User({name:String.format("{0} {1}",_obj.data.user_profile.first_name,_obj.data.user_profile.last_name),avatar:_obj.data.user_profile.avatar_url,link:General.user_plog_url(_obj.data.user_profile.handle),id:_obj.data.user_profile.user_id}),this.post_image_collection=new Array,this.inline_comments=new Array,this.paginator,this.include_commenting=!0,this.paginator,this.number_of_posts=General.is_null_empty_undefined(_obj.number_of_posts)?-1:_obj.number_of_posts,this.page_number=1,this.auto_scroll_load,this.meta_data_list=[],General.is_null_empty_undefined(_obj.meta_data_set_initial)||(_this_meta_data=new Meta_Data_Set({id:_obj.meta_data_set_initial.post_id,title:_obj.meta_data_set_initial.meta_title,de
1scription:_obj.meta_data_set_initial.meta_description,url:_obj.meta_data_set_initial.meta_url,image:_obj.meta_data_set_initial.meta_image}),this.meta_data_list.push(_this_meta_data)),this.post_ids_displayed_list=[],General.is_null_empty_undefined(_obj.meta_data_set_initial)||this.post_ids_displayed_list.push(_obj.meta_data_set_initial.post_id),this.post_ids_called_for_next=[],this.current_post_id=_obj.data.id}),Resource_Post_Public=(Post_Public.inherits(Post_Base),Post_Public.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end();$.post(GLOBALS.ROOT_PATH.append("home/channel-posts-more"),{channel_id:1,start_row:results.start_row,end_row:results.end_row},function(data){loc.get_posts_callback(loc,data,results,page_load_get_more)})},Post_Public.fn.show_more=function(loc){loading.create(),loc.page_number=parseInt(loc.page_number)+1,loc.get_posts(loc)},Post_Public.fn.initialize_paginator=function(){this.paginator=new Paginator({row_count:this.number_of_posts,container_li:".golden_layout > li",starting_page_num:1,container_id_to_append_show_more:"add_to_col"}),this.paginator.init()},Post_Public.fn.populate_post_images_collection=function(){function Post_Image(_obj){this.id=_obj.id,this.src=_obj.src,this.width=_obj.width,this.height=_obj.height,this.caption=_obj.caption}var loc=this;$("#post div.img_wrapper").each(function(index,val){var $wrap=$(this),_image_id=$wrap.find("img").attr("data-image-id"),index=("0"==_image_id&&(_image_id=index,$wrap.find("img").attr({"data-image-id":_image_id})),$wrap.find("span.caption").html()),_image_id=new Post_Image({id:_image_id,src:$wrap.find("img").attr("src"),width:$wrap.find("img").attr("data-image-width"),height:$wrap.find("img").attr("data-image-height"),caption:Post_Base.defaults.is_default_text(index)?"":index});loc.post_image_collection.push(_image_id)}),printf(loc.post_image_collection,"loc.post_image_collection")},Post_Public.fn.render_slideshow_from_post_image_collection=function(_current_id){var _html="<div data-slideshow-id='null' id='img_preview_large' class='gallery_zone gallery_wrapper white clear_both grid' contenteditable='false'>";return _html+="<ul class='not_selectable slideshow_ul'>",$.each(this.post_image_collection,function(index,val){var slide_class="";this.id==_current_id&&(slide_class="curr selected"),_html=(_html=(_html+=String.format("<li class='{0}' data-gallery-img-id='{1}'>",slide_class,this.id))+String.format("<img class='thumb' data-gallery-thumbnail-id='{0}' src='{1}' />",this.id,this.src)+"<div class='slide_wrapper'>")+String.format("<img data-gallery-img-id='{0}' data-gallery-img-width='{1}' data-gallery-img-height='{2}' src='{3}' />",this.id,this.width,this.height,this.src),General.is_null_empty_undefined(this.caption)||(_html+=String.format("<span class='caption'>{0}</span>",this.caption)),_html+="</div></li>"}),_html+="</ul></div>"},Post_Public.fn.images_in_post_as_slideshow=function(){var loc=this;loc.populate_post_images_collection(),$("#post div.img_wrapper").live("click",function(){var _img_as_slideshow=loc.render_slideshow_from_post_image_collection($(this).find("img").attr("data-image-id")),_img_as_slideshow=($(_img_as_slideshow).prependTo("#post"),$("#img_preview_large .slideshow_ul li.curr").prev().addClass("prev").end().next().addClass("next"),$("#post").parent().parent().addClass("post_section"),$(".promo_zone").addClass("hide"),new Gallery_Public({$this:$("#img_preview_large"),shell_obj:loc,update_url_on:!1}));_img_as_slideshow.init(),$("#img_preview_large").data("instance",_img_as_slideshow),$("ul.slideshow_ul li.curr").trigger("click")}),$("#img_preview_large").live("click",function(){$("#img_preview_large").data("instance",null),$("#img_preview_large").remove(),$("#post").parent().parent().removeClass("post_section"),$("#core77").removeClass("gallery_fullscreen"),$(".promo_zone").removeClass("hide")}),$("body").live({keydown:function(e){1==$("#img_preview_large").length&&(e.which==KEYS.left_arrow?$("#img_preview_large li.prev").trigger("click"):e.which!=KEYS.up_arrow&&(e.which==KEYS.right_arrow?$("#img_preview_large li.next").trigger("click"):e.which!=KEYS.down_arrow&&e.which==KEYS.escape&&$("#img_preview_large").trigger("click")))}})},Post_Public.fn.get_inline_comment_match=function(id){for(var match=-1,k=0;
1k<this.inline_comments.length;k++)this.inline_comments[k].id==id&&(match=k);return match},Post_Public.fn.add_inline_comment_count_node=function(ic_id,count,_class){count=0==count?"p":count,_class=General.is_null_empty_undefined(_class)?"":_class,_html=String.format("<div data-ic-get='{0}' class='ic_cc_wrap not_selectable {1}'><span class='ic_count'>{2}</span></div>",ic_id,_class,count),$(_html).appendTo($("p[data-ic-marker="+ic_id+"]"))},Post_Public.fn.get_inline_comments=function(){var loc=this;$("#post p[data-ic-marker]").each(function(index,val){var ic_id=$(this).attr("data-ic-marker"),comments_ar=new Array;$("#user_comments li[data-ic-from]").each(function(index,val){var $this;$(this).attr("data-ic-from")==ic_id&&($this=$(this),comments_ar.push(new Comment_Data({id:$this.attr("data-c-id"),number_up_votes:$this.children(".c_metadata").find("> .up_vote").find("span").text(),number_down_votes:$this.children(".c_metadata").find("> .down_vote").attr("data-dv"),inline_comment_marker:ic_id,tier_number:$this.attr("class").replace("comment_wrapper",""),comment:$this.children(".comment_wrap").html(),name:$this.children(".c_metadata").find("> .comment_from").find("a").text(),link:$this.children(".c_metadata").find("> .comment_from").find("a").attr("href"),avatar:$this.children(".c_metadata").find("> .avatar").find("img").attr("src"),date_relative:$this.children(".c_metadata").find("> .time").text()})))}),0<comments_ar.length&&(0==$(String.format("p[data-ic-marker={0}] div[data-ic-get={0}]",ic_id)).length&&loc.add_inline_comment_count_node(ic_id,comments_ar.length),loc.inline_comments.push(new Inline_Comment_Collection_Data({id:ic_id,count:comments_ar.length,comments:comments_ar})))})},Post_Public.fn.post_mouseup_handler=function(e,loc,element){var current_line_height,$this=$(e.target),_focus_node="img"!=$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():"";loc.enter_keep=new Array,loc.soft_enter_keep=new Array,$(e.target).hasClass("edit_module_prop")||"img"==$(e.target).context.nodeName.toString().toLowerCase()||"post_header"==$(e.target).parent().attr("id")||$(e.target).hasClass("add_module")?(loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]}),$("#post").removeClass("unlight"),$("#post p").removeClass("ic_p_highlight")):""==(e=Selection.get_selection_info()).content||Selection.is_caret()||e.content==Text_Menu.previous_selection?Post_Base.defaults.is_default_text($(_focus_node).text().replace(/p$/,""))?Selection.select_all_text($(_focus_node).get(0)):(loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]}),Text_Menu.previous_selection=new String,$("#post").removeClass("unlight"),$("#post p").removeClass("ic_p_highlight")):(Text_Menu.previous_selection=e.content,"post"!=$(_focus_node).attr("id")&&(loc=Selection.get_selection_dimensions(),_focus_node=new Coordinates,current_line_height=parseInt($("#post p").css("line-height").replace("px","")),current_line_height=loc.height>current_line_height?$this.width()/2+$this.offset().left:loc.width/2+e.top_left.x,_focus_node.set_property("x",current_line_height),_focus_node.set_property("y",e.top_left.y+$(document).scrollTop()),new Array))},Post_Public.fn.post_keydown_handler=function(e,loc){var prev_node,_focus_node=Selection.get_focus_node(),start_end=Selection.is_start_end(_focus_node);$($(_focus_node).get(0)).hasClass("at_end")&&$($(_focus_node).get(0)).removeClass("at_end"),e.which==KEYS.enter?($(".add_module").remove(),loc.enter_keep.push(1),"post_header"!=$(_focus_node).parent().attr("id")&&!$(_focus_node).hasClass("caption")||KEYS.soft_return(e)||e.preventDefault(),1!=loc.enter_keep.length&&2<=loc.enter_keep.length&&e.preventDefault()):e.which==KEYS.del||e.which==KEYS.backspace?(loc.enter_keep=new Array,prev_node=null!=$(_focus_node).prev()[0]?$(_focus_node).prev()[0].nodeName.toString().toLowerCase():"","post_header"==$(_focus_node).parent().attr("id")?(!start_end.atStart||start_end.atEnd||Selection.is_range()||e.preventDefault(),(1==$($(_focus_node).get(0)).text().length||start_end.atStart&&start_end.atEnd)&&(e.preventDefault(),$($(_focus_node)[0]).text(Post_Base.defaults.text.title),Selection.select_all_text($(_focus_node)[0]))):"caption"==$(_focu
1s_node)[0].className?(!start_end.atStart||start_end.atEnd||Selection.is_range()||e.preventDefault(),(1==$($(_focus_node).get(0)).text().length||start_end.atStart&&start_end.atEnd)&&(e.preventDefault(),$($(_focus_node)[0]).text(Post_Base.defaults.text.caption),Selection.set_selection_range($(_focus_node)[0],0,0),Selection.select_all_text($(_focus_node)[0]))):"div"==prev_node&&start_end.atStart||""==prev_node&&start_end.atStart||"hgroup"==prev_node&&start_end.atStart?Selection.is_range()||e.preventDefault():start_end.atStart&&$(_focus_node).context.nodeName.toString().toLowerCase()!=prev_node&&((start_end=$(_focus_node)).wrap(String.format("<{0}/>",prev_node)),prev_node=start_end.context.parentElement,start_end.contents().unwrap(),$(start_end.context.parentElement).unwrap(),Selection.set_selection_range(prev_node,0,0))):KEYS.all(e)?e.preventDefault():KEYS.arrow_select(e)||(KEYS.paste(e)?loc.paste_handler(_focus_node):loc.enter_keep=new Array)},Post_Public.fn.create_edit_module_prop_menu=function(e,loc,element){var element=$(element),menu_coords=(Selection.clear_selection(),new Coordinates);menu_coords.set_property("x",element.offset().left),menu_coords.set_property("y",element.offset().top)},Post_Public.fn.make_inline_comment=function($this,loc){var _id=$this.attr("data-ic-get"),match=loc.get_inline_comment_match(_id),menu_coords=new Coordinates,_actions=(menu_coords.set_property("x",$this.parent().offset().left),menu_coords.set_property("y",$this.parent().offset().top),$this.hasClass("make_new")?["new_comment"]:["comment_list","new_comment"]),_actions=new Inline_Comment_Menu({actions:_actions,coords:menu_coords,parent:$this.parent(),appendTo_id:"body",comments:loc.inline_comments[match],shell_obj:loc,ic_marker:_id});loc.add_menu(_actions),_actions.render()},Post_Public.fn.ad_induction_handler=function(post_id,selector){for(var k=0;k<$(String.format(".article_page_wrap[data-post-id={0}] .{1}",post_id,selector)).length;k++){var this_ad_slot=$($(String.format(".article_page_wrap[data-post-id={0}] .{1}",post_id,selector)).get(k)).attr("id"),_ad_slot_type=$($(String.format(".article_page_wrap[data-post-id={0}] .{1}",post_id,selector)).get(k)).data("ad-type");!("sidebar_induced_ad"==selector&&$(window).width()<=900)&&(_ad_slot_type=Google_Ad_Induction.create_ad_slot({type:_ad_slot_type,unique_ad_slot_id:this_ad_slot}),googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot(_ad_slot_type))}},Post_Public.fn.get_next_permalink=function(next_article_id,next_article_type,resource_order_csv){var loc=this,existing_posts_rendered_already=(resource_order_csv=null==resource_order_csv?"":resource_order_csv,loc.post_ids_displayed_list.toString()),_page_number=loc.post_ids_displayed_list.length;$.post("/home/get-related-permalink",{post_id:next_article_id,post_type:next_article_type,existing_posts_rendered_already:existing_posts_rendered_already,draw_ad_type:1,page_number:_page_number,resource_order_csv:resource_order_csv},function(data){var to_render,_this_meta_data,article_count_scrolled_to;General.status_ok(data.status)&&(_this_meta_data=new Meta_Data_Set({id:data.data.post_id,title:data.data.meta_title,description:data.data.meta_description,url:data.data.meta_url,image:data.data.meta_image}),loc.meta_data_list.push(_this_meta_data),(_this_meta_data=$(String.format(".article_page_wrap[data-post-id={0}]",loc.data.post_id))).data("has-loaded-next")||(_this_meta_data.attr({"data-has-loaded-next":!0}),loc.post_ids_displayed_list.push(data.data.post_id),to_render=data.data.rendered,$(to_render).insertAfter(_this_meta_data),1==next_article_type?(loc.setup_ad_induction(loc,data.data.post_id),loc.ad_induction_handler(data.data.post_id,"sidebar_induced_ad"),to_render=Google_Ad_Induction.create_ad_slot({type:Google_Ad_Induction.ad_types.leaderboard,unique_ad_slot_id:_this_meta_data.find(".leaderboard_ad .ad_wrap").attr("id")}),Google_Ad_Induction.init_ad_slot(to_render)):2==next_article_type&&(_this_meta_data=$(String.format(".article_page_wrap[data-post-id={0}] .gallery_zone_slick > div",data.data.post_id)),loc.init_gallery_slider(loc,_this_meta_data)),article_c
1ount_scrolled_to=loc.post_ids_displayed_list.length,General.do_when(function(){return window.ga=General.is_null_empty_undefined(window.ga)?null:window.ga,!General.is_null_empty_undefined(ga)},function(){ga("send",{hitType:"event",eventCategory:"scroll to next article",eventAction:String.format("Loaded article {0}",article_count_scrolled_to),eventLabel:data.data.post_id})},200)))})},Post_Public.fn.scroll_get_permalink_handler=function(loc){$(document).scroll(function(e){for(var scroll_top_plus_window_height=$(window).scrollTop()+$(window).height(),$next_article_trigger=$(String.format(".article_page_wrap[data-post-id={0}] .trigger_next_article",loc.data.post_id)),loaded_next=$(String.format(".article_page_wrap[data-post-id={0}]",loc.data.post_id)).data("has-loaded-next"),next_post_id_to_get=$next_article_trigger.data("next-article-id"),next_post_type_to_get=$next_article_trigger.data("next-article-post-type"),next_post_resource_island_order=$next_article_trigger.data("next-article-rio-list"),has_already_requested_this_post=loc.post_ids_called_for_next[loc.post_ids_called_for_next.length-1]===next_post_id_to_get,_current_post_id_from_dom_calc=(!(has_already_requested_this_post=0===loc.post_ids_called_for_next.length?!1:has_already_requested_this_post)&&!loaded_next&&$next_article_trigger.offset().top<scroll_top_plus_window_height&&(loc.post_ids_called_for_next.push(next_post_id_to_get),loc.get_next_permalink(next_post_id_to_get,next_post_type_to_get,next_post_resource_island_order)),loc.data.post_id),k=0;k<loc.post_ids_displayed_list.length;k++)scroll_top_plus_window_height>$(String.format(".article_page_wrap[data-post-id={0}]",loc.post_ids_displayed_list[k])).offset().top&&(_current_post_id_from_dom_calc=loc.post_ids_displayed_list[k]);loc.data.post_id=_current_post_id_from_dom_calc;for(var _meta_set_index=0,k=0;k<loc.meta_data_list.length;k++)loc.meta_data_list[k].id===loc.data.post_id&&(_meta_set_index=k);has_already_requested_this_post=loc.meta_data_list[_meta_set_index];parseInt(loc.data.post_id)!==parseInt(loc.current_post_id)&&(printf(loc.data.post_id,"added in here"),loaded_next=new History_State({page:"core77-blog-permalink",extra_ids_obj:{post_id:loc.data.post_id},title:has_already_requested_this_post.title,update_url:has_already_requested_this_post.url}),history.pushState(loaded_next,has_already_requested_this_post.title,has_already_requested_this_post.url),document.title=has_already_requested_this_post.title,General.do_when(function(){return window.ga=General.is_null_empty_undefined(window.ga)?null:window.ga,!General.is_null_empty_undefined(ga)},function(){ga("set","page",location.pathname),ga("send","pageview")},200)),loc.current_post_id=loc.data.post_id})},Post_Public.fn.setup_ad_induction=function(loc,post_id){General.do_when(function(){return window.googletag&&googletag.apiReady},function(){loc.ad_induction_handler(post_id,"induced_ad"),loc.ad_induction_handler(post_id,"sidebar_induced_ad")},300)},Post_Public.fn.handle_post_initial_load=function(loc,post_id){$.post(String.format("{0}/home/increment_post_view",GLOBALS.SECURE_ROOT_PATH),{post_id:loc.data.post_id},function(){},"json");var $current_article=$(String.format(".article_page_wrap[data-post-id={0}] #post p",post_id)),_hide_at_end_p_only=!0;0<$(String.format(".article_page_wrap[data-post-id={0}] #post div[data-twitter-embed]",post_id)).length&&(_hide_at_end_p_only=!1);for(var k=$current_article.length-1;0<=k;k--){var $next_node,$p_node=$($current_article.get(k)),_this_text=$p_node.text(),_this_html=$p_node.html();_hide_at_end_p_only?($next_node=$($p_node.context.nextElementSibling),""!=_this_text.clean_white_space()||"<br>"!=_this_html.clean_white_space()&&""!=_this_html.clean_white_space()||!$next_node.hasClass("hide")&&!General.is_null_empty_undefined($p_node.context.nextElementSibling)||$p_node.addClass("hide")):""!=_this_text.clean_white_space()||"<br>"!=_this_html.clean_white_space()&&""!=_this_html.clean_white_space()||$p_node.addClass("hide")}loc.include_commenting&&loc.include_commenting_functionality("permalink")},Post_Public.fn.ext_init=function(){},Post_Public.fn.init=function(){var loc=this;loc.base_init(),loc.handle_comment_show_preference(),loc.handle_post_initial_load(loc,loc.data.post_id),loc.setup_ad_induction(loc,loc.data.post_id);new Select_Best_Image_Size({container_selector:".post_header_wrap",mode:"single"}).init(),new Social_Widget_Count({url:[window.location.toString(),loc.data.legacy_url]});$("#post .img_wrapper > a").live("click",function(e){$(this).parent().hasClass("caption")||$(this).hasClass("allow_link_go")||e.preventDefault()}),$("#post_header").next().hasClass("large")||$("#post_header").next().css({"padding-top":"30px"}),$("#core77").click(function(e){$(e.target).parent().hasClass("prompt_box")||($("#post").removeClass("unlight"),$("#post p").removeClass("ic_p_highlight"),loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]}))}),$(".favorite").live("click",function(event){event.preventDefault();var event=$(this),this_post_id=event.data("this-post-id"),_action_taken=$(this).hasClass("already_taken")?"Favorite":"Favorited";loc.user_object_xref_add({success_message:General.success_text.post_recommends,$this:event,action_taken_text:_action_taken,object_id:this_post_id,object_type:USER_OBJECT_XREF_TYPES.post_recommends,post_user_id:loc.user_data.id,override_text:"ignore this",extra_callback:function(post_id){var post_id=$(String.format(".article_page_wrap[data-post-id={0}] .fav_action .this_ac_count",post_id)),fav_count=parseInt(post_id.data("number-of-favorites"));post_id.text(fav_count+1)}},loc)}),$("#title_cap_share").live("click",function(event){$(this).parent().hasClass("open")?$(this).parent().removeClass("open"):$(this).parent().addClass("open")}),$(".social_btn a").live("click",function(event){$.post(GLOBALS.ROOT_PATH.append("home/post_shares_increment"),{post_id:loc.data.post_id},function(data){})});var channels_in=new Array;$(".channels_posted_to li > a").each(function(index,val){channels_in.push($(this).text())}),$(".read_full_bio").click(function(e){$(".full_bio").hasClass("hide")?($(".trunc_bio").addClass("hide"),$(".full_bio").removeClass("hide"),$(".read_full_bio").text("Read less")):($(".trunc_bio").removeClass("hide"),$(".full_bio").addClass("hide"),$(".read_full_bio").text("Read more"))}),loc.scroll_get_permalink_handler(loc),loc.integration_webinar_form_handler(loc),$("#event_register_form input").live("focus",function(e){$(this).removeClass("error")}),$("#event_register_form #submit_event_reservation").live("click",function(e){loading.create();var $form=$(this).parents("form"),registrant=new Event_Registrant({first_name:$form.find("#first_name").val(),last_name:$form.find("#last_name").val(),email:$form.find("#email").val(),company_name:$form.find("#company_name").val(),job_title:$form.find("#job_title").val(),event_name:$form.find("#event_name").val()}),validate=registrant.is_validate();validate.is_valid?$.post("/home/event_registration",{registrant:registrant.get_params()},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?(loading.remove(),$form.find(".form_wrap").addClass("hide"),$('<div class="header_type">Thanks!</div><p>We\'ll get back to you soon with more details.</p>').insertAfter($form.find(".form_wrap"))):(alert(data.text),loading.remove())}):(loading.remove(),validate.not_valid.includes("first_name")&&$form.find("#first_name").addClass("error"),validate.not_valid.includes("last_name")&&$form.find("#last_name").addClass("error"),validate.not_valid.includes("email")&&$form.find("#email").addClass("error"),validate.not_valid.includes("job_title")&&$form.find("#job_title").addClass("error"),validate.not_valid.includes("company_name")&&$form.find("#company_name").addClass("error"))}),loc.ext_init()},function(_obj){Post_Public.call(this,_obj),this.shell_type="resource_post_public",this.data=new Resource_Post_Public_Data(_obj.data),this.data.owner_id=parseInt($("#owner_id").val()),this.data.added_by_id=parseInt($("#added_by_id").val()),this.user_data=new User({name:String.format("{0} {1}",_obj.data.user_profile.first_name,_obj.data.user_profile.last_name),avatar:_obj.data.user_profile.avatar_url,link:General.user_plog_url(_obj.data.user_profile.handle),id:_obj.data.user_profile.user_id}),this.post_image_collection=new Array,this.inline_comments=new Array,this.paginator,this.include_commenting=!0,this.paginator,this.number_of_posts=General.is_null_empty_undefined(_obj.number_of_posts)?-1:_obj.number_of_posts,this.page_number=1,this.auto_scroll_load,this.meta_data_list=[];var _this_meta_data=new Meta_Data_Set({id:_obj.meta_data_set_initial.post_id,title:_obj.meta_data_set_initial.meta_title,de
1scription:_obj.meta_data_set_initial.meta_description,url:_obj.meta_data_set_initial.meta_url,image:_obj.meta_data_set_initial.meta_image});this.meta_data_list.push(_this_meta_data),this.post_ids_displayed_list=[],this.post_ids_displayed_list.push(_obj.meta_data_set_initial.post_id),this.post_ids_called_for_next=[],this.current_post_id=_obj.data.id}),Post_With_Image_Collection_Public_Base=(Resource_Post_Public.inherits(Post_Public),Resource_Post_Public.fn.customized_resource_comments=function(loc){$(".submit_custom_comment").live("click",function(e){var _comment_text,$this=$(this);GLOBALS.IS_LOGGED_IN?(_comment_text=$this.parents("ul").find("textarea").val())!=Post_Base.defaults.text.comment&&(_comment_text={post_id:loc.data.post_id,body_text:_comment_text,post_user_id:loc.data.owner_id,is_resource_post_comment:!0},loading.create(),$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"home/comment_add",data:_comment_text,dataType:"json",success:function(data){var _keep_scroll,_set_val;data=General.parse_json_if_needed(data),loading.remove(),General.status_ok(data.status)?(message_slider(General.success_text.comment_make),(_keep_scroll=new Keep_Set_Scroll_Position).set_keep(),$this.parents("#comment_zone").remove(),$(data.data.rendered).insertAfter($("#post")),0<$(String.format("[data-c-id={0}]",data.data.comment_id)).length&&(_set_val=$(String.format("[data-c-id={0}]",data.data.comment_id)).offset().top,_keep_scroll.set_keep(_set_val),_keep_scroll.set_scroll_from_keep(60),General.flash_class_add($(String.format("[data-c-id={0}]",data.data.comment_id)),"flash_on",8e10)),$("#place_comment_enter_top .comment_wrap textarea").val(""),$("#place_comment_enter_bottom .comment_wrap textarea").val("")):message_slider(data.text,!0)}})):General.new_tab_link_override(GLOBALS.PUBLISH_ROOT_PATH.append("login"))})},Resource_Post_Public.fn.handle_post_initial_load=function(loc,post_id){$.post(String.format("{0}/home/increment_post_view",GLOBALS.SECURE_ROOT_PATH),{post_id:loc.data.post_id},function(){},"json");var $current_article=$(String.format(".article_page_wrap[data-post-id={0}] #post p",post_id)),_hide_at_end_p_only=!0;0<$(String.format(".article_page_wrap[data-post-id={0}] #post div[data-twitter-embed]",post_id)).length&&(_hide_at_end_p_only=!1);for(var k=$current_article.length-1;0<=k;k--){var $next_node,$p_node=$($current_article.get(k)),_this_text=$p_node.text(),_this_html=$p_node.html();_hide_at_end_p_only?($next_node=$($p_node.context.nextElementSibling),""!=_this_text.clean_white_space()||"<br>"!=_this_html.clean_white_space()&&""!=_this_html.clean_white_space()||!$next_node.hasClass("hide")&&!General.is_null_empty_undefined($p_node.context.nextElementSibling)||$p_node.addClass("hide")):""!=_this_text.clean_white_space()||"<br>"!=_this_html.clean_white_space()&&""!=_this_html.clean_white_space()||$p_node.addClass("hide")}loc.include_commenting&&loc.include_commenting_functionality("permalink")},Resource_Post_Public.fn.ext_init=function(){},Resource_Post_Public.fn.init=function(){var loc=this;loc.customized_resource_comments(loc),$(".pin_comment").live("click",function(e){var $this=$(this),_comment_id=$this.data("this-comment-id"),$this=$this.data("this-post-id");$.post(GLOBALS.ROOT_PATH+"home/comment_pin",{post_id:$this,comment_id:_comment_id},function(data){General.status_ok(data.status)&&alert("pinned comment_id"+_comment_id)})}),$(".custom_resource_comment_wrap textarea").live("focus",function(e){GLOBALS.IS_LOGGED_IN||General.new_tab_link_override(GLOBALS.PUBLISH_ROOT_PATH.append("login"))}),loc.handle_post_initial_load(loc,loc.data.post_id),$("#post .img_wrapper > a").live("click",function(e){$(this).parent().hasClass("caption")||$(this).hasClass("allow_link_go")||e.preventDefault()}),$("#post_header").next().hasClass("large")||$("#post_header").next().css({"padding-top":"30px"}),$("#core77").click(function(e){$(e.target).parent().hasClass("prompt_box")||($("#post").removeClass("unlight"),$("#post p").removeClass("ic_p_highlight"),loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]}))}),$(".favorite").live("click",function(event){event.preventDefault();var event=$(this),this_post_id=event.data("this-post-id"),_action_taken=$(this).hasClass("already_taken")?"Favorite":"Favorited";loc.user_object_xref_add({success_message:General.success_text.design_guide_upvote,$this:event,action_taken_text:_action_taken,object_id:this_post_id,object_type:USER_OBJECT_XREF_TYPES.design_guide_upvote,post_user_id:loc.user_data.id,override_text:"ignore this",extra_callback:function(post_id){var $favorite_count_wrap=$(String.format(".fav_action .this_ac_count",post_id));0==$favorite_count_wrap.length?$("<div class='this_ac_count' data-number-of-favorites='1'>1</div>").appendTo($(String.format(".fav_action",post_id))):(post_id=parseInt($favorite_count_wrap.data("number-of-favorites")),$favorite_count_wrap.text(post_id+1))}},loc)}),$("#title_cap_share").live("click",function(event){$(this).parent().hasClass("open")?$(this).parent().removeClass("open"):$(this).parent().addClass("open")}),$(".social_btn a").live("click",function(event){$.post(GLOBALS.ROOT_PATH.append("home/post_shares_increment"),{post_id:loc.data.post_id},function(data){})}),$("ul.golden_layout").hasClass(FLEX_STOPS.get_stop().str)||($("ul.golden_layout").removeClass("up_1 up_2 up_3"),FLEX_STOPS.layout.sterilize($(".golden_layout")),FLEX_STOPS.layout.init(null,!0),$("ul.golden_layout").addClass(FLEX_STOPS.get_stop().str)),$(window).resize(function(){$("ul.golden_layout").hasClass(FLEX_STOPS.get_stop().str)||($("ul.golden_layout").removeClass("up_1 up_2 up_3"),FLEX_STOPS.layout.sterilize($(".golden_layout")),FLEX_STOPS.layout.init(),$("ul.golden_layout").addClass(FLEX_STOPS.get_stop().str))}),loc.ext_init()},function(_obj){Post_Public.call(this,_obj)}),Gallery_Post_Public=(Post_With_Image_Collection_Public_Base.inherits(Post_Public),Post_With_Image_Collection_Public_Base.fn.init_gallery_zone
1=function(loc){loc=new Gallery_Public({$this:$(".gallery_zone"),shell_obj:loc});loc.init(),$(".gallery_zone").data("instance",loc)},Post_With_Image_Collection_Public_Base.fn.gallery_handler=function(){$(".gallery_zone").live("click",function(e){$("#core77").removeClass("gallery_fullscreen"),$("#ad_frame_wrapper").addClass("hide"),$(this).removeClass("black"),$(this).removeClass("gray"),$(this).addClass("white"),$(this).removeClass("slide"),$(this).addClass("grid")})},function(_obj){Post_With_Image_Collection_Public_Base.call(this,_obj),this.shell_type="gallery_post_public"}),Project_Post_Public=(Gallery_Post_Public.inherits(Post_With_Image_Collection_Public_Base),Gallery_Post_Public.fn.init_gallery_slider=function(loc,$current_article){$current_article.slick({infinite:!0,dots:!1,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0})},Gallery_Post_Public.fn.ext_init=function(){var $gallery_zone_cont=$("[data-initial-gallery-zone=true] .gallery_zone_slick > div");this.init_gallery_slider(this,$gallery_zone_cont),$(".go_full_gallery").live("click",function(e){$("#core77").hasClass("sl_gallery_fullscreen")?($("#core77").removeClass("sl_gallery_fullscreen"),$(".gallery_zone_slick .slide_wrapper").each(function(index,val){var _reg_img=$(this).attr("data-img");General.is_null_empty_undefined(_reg_img)||$(this).css({"background-image":String.format("url({0})",_reg_img)})})):($("#core77").addClass("sl_gallery_fullscreen"),$(".gallery_zone_slick .slide_wrapper").each(function(index,val){var _original_img=$(this).attr("data-original-img");General.is_null_empty_undefined(_original_img)||$(this).css({"background-image":String.format("url({0})",_original_img)})})),$(".gallery_zone_slick > div").slick("resize")})},function(_obj){Post_With_Image_Collection_Public_Base.call(this,_obj),this.shell_type="project_post_public"}),Calendar_Post_Public=(Project_Post_Public.inherits(Post_With_Image_Collection_Public_Base),Project_Post_Public.fn.ext_init=function(){this.init_gallery_zone(this),this.gallery_handler()},function(_obj){Post_Public.call(this,_obj),this.shell_type="calendar_post_public",this.include_commenting=!1}),Gift_Guide_Post_Public=(Calendar_Post_Public.inherits(Post_Public),Calendar_Post_Public.fn.ext_init=function(){var mapper=new Google_Map_It({id:"map_draw",latitude:$(".view_map").attr("data-lat"),longitude:$(".view_map").attr("data-long")});mapper.init(),$(".view_map").click(function(event){event.preventDefault(),event.stopPropagation(),$("#map_wrap").css({top:String.format("{0}px",$("#post_header").outerHeight())}).addClass("slide_out"),setTimeout(function(){mapper.bounce_marker(2e3)},650)}),$("#core77").click(function(){$("#map_wrap").removeClass("slide_out")}),$("#map_wrap").click(function(event){event.stopPropagation()})},function(_obj){Post_Public.call(this,_obj),this.include_commenting=!1}),Award_Site_Base=(Gift_Guide_Post_Public.inherits(Post_Public),Gift_Guide_Post_Public.fn.cookie_handle_vote=function(){var operational_values_obj,saved_operational_values=unescape(Cookie.read("operational_values"));General.is_null_empty_undefined(Cookie.read("operational_values"))||(operational_values_obj=Hash_Key_Value_List.get_list(saved_operational_values)).return_url==window.location&&setTimeout(function(){$(String.format(".vote_now[data-post-id={0}]",operational_values_obj.object_id)).click()},500)},Gift_Guide_Post_Public.fn.init=function(){var loc=this;loc.cookie_handle_vote(),$(".gg_w_p").bind("click",function(e){e.preventDefault(),$("#user_action_gg").hasClass("open")?($("#user_action_gg").removeClass("open"),$(this).text("h")):($("#user_action_gg").addClass("open"),$(this).text("r"))}),$(".vote_now").live("click",function(event){event.preventDefault();var event=$(this),_action_taken=$(this).hasClass("already_taken")?"Vote for this guide":"You Voted",_post_id=event.attr("data-post-id");loc.user_object_xref_add({success_message:$(this).hasClass("already_taken")?General.success_text.community_choice_unvote:General.success_text.community_choice_vote,$this:event,action_taken_text:_action_taken,object_id:_post_id,object_type:USER_OBJECT_XREF_TYPES.gift_guide_vote,extra_callback:function(data){var _share_url,data=parseInt(data.result),data=1<data?String.format("{0} Votes",data):String.format("{0} Vote",data);0==$(".vote_count").length?$(String.format("<span class='vote_count'>{0}</span>",data)).appendTo($(".date_published_vote_count")):$(".vote_count").text(data),$(this).hasClass("already_taken")||(
1data=new String,data+="<div class='generic_message'><h3>High five! You just helped this guide move up the ranks.</h3><p>Come back everyday to vote for your favorite guides, and tell your friends to cast a vote for you! The more love your guide gets, the closer you get to winning one of those grand prizes.</p><ul class='social_btn'>",_share_url=window.location.toString().remove_title_from_permalink_for_social_share(),data=(data=(data=(data=(data=(data=(data+="<li data-service='facebook' class='fb_bg hide_count'>")+String.format("<a target='_blank' href='http://www.facebook.com/sharer/sharer.php' onclick='window.open(\"http://www.facebook.com/sharer/sharer.php?u={0}&via=Core77 \"); return false;'>",_share_url)+"<span class='c77_icon'>Y</span><span class='share_count'>1</span></a></li><li data-service='twitter' class='tw_bg hide_count'>")+String.format("<a target='_blank' href='http://twitter.com/share' onclick='window.open(\"http://twitter.com/share?url={0}&via=Core77\"); return false;'>",_share_url)+"<span class='c77_icon'>m</span><span class='share_count'>1</span></a></li><li data-service='linkedin' class='linkedin_bg hide_count'>")+String.format("<a target='_blank' href='http://www.linkedin.com/cws/share' onclick='window.open(\"http://www.linkedin.com/cws/share?url={0}\"); return false;'>",_share_url)+"<span class='c77_icon'>U</span><span class='share_count'>1</span></a></li><li data-service='stumbleupon' class='stumbleupon_bg hide_count'>")+String.format("<a target='_blank' href='http://www.stumbleupon.com/submit' onclick='window.open(\"http://www.stumbleupon.com/submit?url={0}\"); return false;'>",_share_url)+"<span class='c77_icon'>[</span><span class='share_count'>1</span></a></li><li data-service='google_plus' class='g_plus_bg hide_count'>")+String.format("<a target='_blank' href='https://plus.google.com/share' onclick='window.open(\"https://plus.google.com/share?url={0}\"); return false'>",_share_url)+"<span class='c77_icon'>X</span><span class='share_count'>1</span></a></li><li data-service='reddit' class='reddit_bg hide_count'>")+String.format("<a href='http://www.reddit.com/submit' onclick='window.open(String.format(\"http://www.reddit.com/submit?url={0}\"); return false'>",_share_url)+"<span class='c77_icon'>H</span><span class='share_count'>1</span></a></li></ul><ul class='clear_both'><li class='left'><a class='btn' id='' href='/UltimateGiftGuide'>Find more gift guides</a></li></ul></div>",(_share_url=new Quick_Modal({appendTo:"core77",add_close_button:!0})).set_form_width(600),_share_url.set_content(data),_share_url.draw_overlay())}},loc)}),new Social_Widget_Count({url:[window.location.toString()]}).get_counts()},function(_obj){Shell_Base.call(this,_obj),this.main_page_wrap="core77",this.year=General.is_null_empty_undefined(_obj.year)?"2015":_obj.year}),Award_Public_Jury=(Award_Site_Base.inherits(Shell_Base),Award_Site_Base.fn.cookie_handle_vote=function(){var operational_values_obj,saved_operational_values=unescape(Cookie.read("operational_values"));General.is_null_empty_undefined(Cookie.read("operational_values"))||(operational_values_obj=Hash_Key_Value_List.get_list(saved_operational_values)).return_url==window.location&&setTimeout(function(){$(String.format(".community_choice_vote[data-post-id={0}][data-this-category-id={1}]",operational_values_obj.object_id,operational_values_obj.object_id2)).click()},500)},Award_Site_Base.fn.init=function(){var loc=this;$(".jury li, .jury_tiles li").click(function(){var section=$(this).html(),section=String.format("<div class='juror_wrap'>{0}</div>",section),jury_member_overlay=new Quick_Modal({appendTo:loc.main_page_wrap,add_close_button:!0});jury_member_overlay.set_content(section),jury_member_overlay.draw_overlay()}),$(".r_links").click(function(e){e.preventDefault();var e=$("#"+$(this).attr("data-overlay-section")).html(),e=String.format("<section id='comm_cho_rules_regulations' class='overlay_section'>{0}</section>",e),r_overlay=new Quick_Modal({appendTo:"core77",add_close_button:!0});r_overlay.set_content(e),r_overlay.draw_overlay()}),$("#burger").click(function(){var burger=$(this),nav=$(".awards_nav");burger.hasClass("anim_burger")?(burger.removeClass("anim_burger"),nav.removeClass("open")):(burger.addClass("anim_burger"),nav.addClass("open"))}),$("#hamburger").click(function(){var burger=$(this),nav=$(".nav_items");$("#hamburger").die("click.layout_base_hamburger"),burger.hasClass("anim_burger")?(burger.removeClass("anim_burger"),nav.removeClass("open")):(burger.addClass("anim_burger"),nav.addClass("open"))}),$("#past_winners").click(function(e){e.preventDefault(),e.stopPropagation();e=$(this).next();e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),loc.ext_init()},function(_obj){Award_Site_Base.call(this,_obj)}),Award_Public_Trophy=(Award_Public_Jury.inherits(Award_Site_Base),Award_Public_Jury.fn.ext_init=function(){},function(_obj){Award_Site_Base.call(this,_obj)}),Award_Public_Winners=(Award_Public_Trophy.inherits(Award_Site_Base),Award_Public_Trophy.fn.ext_init=function(){},function(_obj){Award_Site_Base.call(this,_obj),this.categories=_obj.categories_shuffled}),Award_Public_Main_Landing=(Award_Public_Winners.inherits(Award_Site_Base),Award_Public_Winners.fn.get_next_category_block=function(_loc){},Award_Public_Winners.fn.functionality_2015=function(loc){900<$(window).width()&&new Parallax_Scroll({keyframes:[{wrapper:$("#all_category_list"),from_bottom:!0,duration:500,animations:[{not_default:!0,selector:"#more_from_category_title",opacity:[1,0],translateX:[0,-1e3]},{not_default:!0,selector:"#more_from_category",opacity:[1,0]},{selector:"#post_header",opacity:[1,0],translateX:[0,-1e3]},{selector:"#all_categories_title",opacity:[0,1],translateX:[-1e3,0]}]}]}).init()},Award_Public_Winners.fn.ext_init=function(){var loc=this;loc.cookie_handle_vote(),$("#core77").hasClass("no_vote")||$(".community_choice_vote").live("click",function(event){event.preventDefault();var $this=$(this),event=$(this).hasClass("already_taken")?"Vote Now":"You Voted",_post_id=$this.attr("data-post-id"),_category_id=$this.attr("data-this-category-id");loc.user_object_xref_add({success_message:$(this).hasClass("already_taken")?General.success_text.community_choice_unvote:General.success_text.community_choice_vote,$this:$this,action_taken_text:event,object_id:_post_id,object_id2:_category_id,object_type:USER_OBJECT_XREF_TYPES.award_post_vote,override_text:!0,extra_callback:function(){var _html,_share_url;$(this).hasClass("already_taken")||(_html=new String,_html+="<div class='generic_message'><h3>Thanks for voting!</h3><p>Now that you've cast your vote, please invite your friends and family to do the same. Every vote counts and every vote brings more valuable exposure to these hard working designers. Thanks for your help!</p><ul class='social_btn'>",_share_url=$this.prev().attr("href").remove_title_from_permalink_for_social_share(),_html=(_html=(_html=(_html=(_html=(_html=(_html+="<li data-service='facebook' class='fb_bg hide_count'>")+String.format("<a target='_blank' href='http://www.facebook.com/sharer/sharer.php' onclick='window.open(\"http://www.facebook.com/sharer/sharer.php?u={0}&via=Core77 \"); return false;'>",_share_url)+"<span class='c77_icon'>Y</span><span class='share_count'>1</span></a></li><li data-service='twitter' class='tw_bg hide_count'>")+String.format("<a target='_blank' href='http://twitter.com/share' onclick='window.open(\"http://twitter.com/share?url={0}&via=Core77\"); return false;'>",_share_url)+"<span class='c77_icon'>m</span><span class='share_count'>1</span></a></li><li data-service='linkedin' class='linkedin_bg hide_count'>")+String.format("<a target='_blank' href='http://www.linkedin.com/cws/share' onclick='window.open(\"http://www.linkedin.com/cws/share?url={0}\"); return false;'>",_share_url)+"<span class='c77_icon'>U</span><span class='share_count'>1</span></a></li><li data-service='stumbleupon' class='stumbleupon_bg hide_count'>")+String.format("<a target='_blank' href='http://www.stumbleupon.com/submit' onclick='window.open(\"http://www.stumbleupon.com/submit?url={0}\"); return false;'>",_share_url)+"<span class='c77_icon'>[</span><span class='share_count'>1</span></a></li><li data-service='google_plus' class='g_plus_bg hide_count'>")+String.format("<a target='_blank' href='https://plus.google.com/share' onclick='window.open(\"https://plus.google.com/share?url={0}\"); return false'>",_share_url)+"<span class='c77_icon'>X</span><span class='share_count'>1</span></a></li><li data-service='reddit' class='reddit_bg hide_count'>")+String.format("<a href='http://www.reddit.com/submit' onclick='window.open(String.format(\"http://www.reddit.com/submit?url={0}\"); return false'>",_share_url)+"<span class='c77_icon'>H</span><span class='share_count'>1</span></a></li></ul><ul class='clear_both'><li class='left'><a class='btn' id='' href='/winners'>Find more projects</a></li></ul></div>",(_share_url=new Quick_Modal({appendTo:"core77",add_close_button:!0})).set_form_width(600),_share_url.set_content(_html),_share_url.draw_overlay())}},loc)}),"2015"==loc.year&&loc.functionality_2015()},function(_obj){Award_Site_Base.call(this,_obj),this.awards_pre_cta_modal=""}),Award_Public_Permalink=(Award_Public_Main_Landing.inherits(Award_Site_Base),Award_Public_Main_Landing.fn.make_draw_newsletter_overlay_for_CTA_awards=function(loc){loc.awards_pre_cta_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"CTA_modal"}),loc.awards_pre_cta_modal.set_form_to_wrap("CTA_modal"),loc.awards_pre_cta_modal.draw_overlay(!0),$("#user_email_pcta").live({focus:function(){$(this).removeClass("error"),"Enter a valid email"==$(this).val()&&$(this).val("")},keyup:function(e){var $this=$(this);e.which==KEYS.enter&&$this.next().click()}}),$(".get_newsletter_awards").live("click",function(){var $this=$(this),_entered_email=$this.prev().val();_entered_email.is_valid_email()?$.post(GLOBALS.ROOT_PATH+"home/subscribe_to_newsletter",{email:_entered_email},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?(ga("send",{hitType:"event",eventCategory:"Newsletter Signup",eventAction:"from awards pre new cycle",eventLabel:""}),message_slider(General.success_text.newsletter_signup_success),$this.prev().val(""),loc.awards_pre_cta_modal.remove_overlay()):alert("Please try again")},"json"):($this.prev().addClass("error"),$this.prev().val("Enter a valid email"))})},Award_Public_Main_Landing.fn.ext_init=function(){new Featured_Slider({container_selector:"#featured_slider",use_prev_next_btn:!0,is_autoplay:!0}).init()},function(_obj){Award_Site_Base.call(this,_obj)}),Award_Public_Category=(Award_Public_Permalink.inherits(Award_Site_Base),Award_Public_Permalink.fn.functionality_2015=function(){$(".award_nav_wrapper li").live("click",function(e){$(".award_nav_wrapper li").removeClass("active"),$(this).addClass("active");var data_goto=$(this).attr("data-goto"),_offset=$(".post_spacer").outerHeight()/2,data_goto=$(String.format("#{0}",data_goto)).offset().top-_offset;$("html, body").animate({scrollTop:data_goto},200)}
1),new Update_Section_Navigation_Scroll({from:"middle",$navigation_wrap:$(".award_nav_wrapper"),remove_active_classes:function(){$(".award_nav_wrapper li").removeClass("active")},section_ids:["overview_anchor","team_anchor","images_anchor","video_anchor","details_anchor","comments_anchor"]}).init(),900<$(window).width()&&new Parallax_Scroll({keyframes:[{wrapper:$("#post_top.post_spacer"),duration:300,animations:[{selector:"#post_top .comm_cho_wrap",opacity:[1,0],translateY:[0,500]}]},{wrapper:$("#post_bottom.post_spacer"),from_middle:!0,duration:300,animations:[]},{wrapper:$("#more_from_category"),from_bottom:!0,duration:500,animations:[{not_default:!0,selector:"#post_bottom .comm_cho_wrap",opacity:[1,0]},{selector:".full_bg_image.default_bg",opacity:[0,1]},{selector:"#more_from_category_title",opacity:[0,1],translateX:[-1e3,0]},{selector:".full_bg_image.award_bg",opacity:[1,0]},{selector:".project_info",opacity:[1,0],translateX:[0,-1e3]}]},{wrapper:$("#all_category_list"),from_bottom:!0,duration:500,animations:[{not_default:!0,selector:"#more_from_category_title",opacity:[1,0],translateX:[0,-1e3]},{not_default:!0,selector:"#more_from_category",opacity:[1,0]},{selector:"#all_categories_title",opacity:[0,1],translateX:[-1e3,0]}]}]}).init()},Award_Public_Permalink.fn.ext_init=function(){var loc=this;loc.cookie_handle_vote(),$(".community_choice_vote").click(function(event){event.preventDefault();var event=$(this),_action_taken=$(this).hasClass("already_taken")?"Vote for this project!":"You Voted for this project!",_post_id=event.attr("data-post-id"),_category_id=event.attr("data-this-category-id");loc.user_object_xref_add({success_message:General.success_text.community_choice_vote,$this:event,action_taken_text:_action_taken,object_id:_post_id,object_id2:_category_id,object_type:USER_OBJECT_XREF_TYPES.award_post_vote,extra_callback:function(){var _html=new String,thanks_for_voting=(_html=(_html=_html+"<div class='generic_message'><h3>Thanks for voting!</h3>"+"<p>Now that you've cast your vote, please invite your friends and family to do the same. Every vote counts and every vote brings more valuable exposure to these hard working designers. Thanks for your help!</p>")+String.format("{0}",$(".social_share_inner").html())+"<ul class='clear_both'><li class='left'><a class='btn' id='' href='/winners'>Find more projects</a></li></ul></div>",new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"thanks_for_voting"}));thanks_for_voting.set_form_width(600),thanks_for_voting.set_content(_html),thanks_for_voting.draw_overlay()}},loc)})},function(_obj){Award_Site_Base.call(this,_obj)}),Award_CTA_Base=(Award_Public_Category.inherits(Award_Site_Base),Award_Public_Category.fn.functionality_2015=function(loc){900<$(window).width()&&new Parallax_Scroll({keyframes:[{wrapper:$("#all_category_list"),from_bottom:!0,duration:500,animations:[{not_default:!0,selector:"#more_from_category_title",opacity:[1,0],translateX:[0,-1e3]},{not_default:!0,selector:"#more_from_category",opacity:[1,0]},{selector:"#post_header",opacity:[1,0],translateX:[0,-1e3]},{selector:"#all_categories_title",opacity:[0,1],translateX:[-1e3,0]}]}]}).init()},Award_Public_Category.fn.ext_init=function(){"2015"==this.year&&this.functionality_2015(this)},function(_obj){Award_Site_Base.call(this,_obj),this.main_page_wrap="c77da"}),Award_Public_Call_To_Action=(Award_CTA_Base.inherits(Award_Site_Base),function(_obj){Award_CTA_Base.call(this,_obj)}),Award_Public_Category_CTA=(Award_Public_Call_To_Action.inherits(Award_CTA_Base),Award_Public_Call_To_Action.fn.ext_init=function(){Cookie.campaign_tracker({cookie_mode:COOKIE_MODE.C77DA_2017,cookie_name:GLOBALS.C77DA_COOKIE_NAME,cookie_length:180}),$("#goto_com_choice").live("click",function(e){$("body, html").animate({scrollTop:$("section[data-section=comm_choice]").offset().top-25},500)}),$(".scroll_link").click(function(e){var section=$(this).attr("data-section-id");""!==section&&(e.preventDefault(),$("body, html").animate({scrollTop:$("[data-section="+section+"]").offset().top-50},500))}),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){General.is_null_empty_undefined(val)||"section"!=index||$("body, html").animate({scrollTop:$(String.format("[data-section={0}]",val)).offset().top-50},500)})),$(".jury_link").click(function(e){e.preventDefault(),$("body, html").animate({scrollTop:$(String.format("[data-section={0}]","jury")).offset().top-50},500)}),$("#c77da").click(function(){$(".past_years").hasClass("open")&&$(".past_years").removeClass("open")}),$("#sub_form").submit(function(e){e.preventDefault(),$.getJSON(this.action+"?callback=?",$(this).serialize(),function(data){(400===data.Status?$("<p class='error'>"+data.Message+"</p>"):$("<p class='success'>"+data.Message+"</p>")).insertAfter("#sub_form"),setTimeout(function(){$(".quick_m_close a").trigger("click")},3e3)})});var key_vals,bg_array=["https://s3files.core77.com/images/design_awards_2024/carousel/image_1.jpg","https://s3files.core77.com/images/design_awards_2024/carousel/image_2.jpg","https://s3files.core77.com/images/design_awards_2024/carousel/image_3.jpg","https://s3files.core77.com/images/design_awards_2024/carousel/image_4.jpg","https://s3files.core77.com/images/design_awards_2024/carousel/image_5.jpg"],_counter=1;setInterval(function(){$("#bg_1").hasClass("no_show")?($("#bg_1").removeClass("no_show").addClass("show"),$("#bg_2").removeClass("show").addClass("no_show")):$("#bg_1").hasClass("show")&&($("#bg_1").removeClass("show").addClass("no_show"),$("#bg_2").removeClass("no_show").addClass("show")),_counter++,bg_array.length<=_counter&&(_counter=0),setTimeout(function(){$(".bg_img.no_show").css("background-image",String.format("url({0})",bg_array[_counter]))},2e3)},6e3),new Peeking_Fixed_Nav({id_list_to_hide_show_on_scroll:["header","#mobile_main_nav"],callback_on_update:function(){$(".nav_items").removeClass("open"),$("#hamburger").removeClass("anim_burger")}}).init()},function(_obj){Award_CTA_Base.call(this,_obj)}),Award_Public_CTA_Leaf_Page=(Award_Public_Category_CTA.inherits(Award_CTA_Base),Award_Public_Category_CTA.fn.ext_init=function(){},function(_obj){Award_CTA_Base.call(this,_obj)}),Channel_Public_Base=(Award_Public_CTA_Leaf_Page.inherits(Award_CTA_Base),Award_Public_CTA_Leaf_Page.fn.ext_init=function(){},function(_obj){Shell_Base.call(this,_obj),this.data=new Channel_Public_Data(_obj.data.channel),this.featured_zone_slide_timeout,this.featured_zone_auto_timeout,this.current_feature_slide_index=0,this.auto_timer=6e3,this.paginator,this.paginator_postlets,this.page_number=1,this.param_data=new Channel_Parameters_Data,this.increment_channel_view_count=!0,this.auto_scroll_load,this.started_ever_scroll=!1,General.is_null_empty_undefined(_obj.data.total_postlets)||(this.data.number_of_postlets=parseInt(_obj.data.total_postlets)),this.shell_name="Channel_Public"}),Channel_Public_Homepage=(Channel_Public_Base.inherits(Shell_Base),Channel_Public_Base.fn.create_more_nodes=function(_output){},Channel_Public_Base.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end();$.post(GLOBALS.ROOT_PATH.append("home/channel-posts-more"),{channel_id:loc.data.channel_id,start_row:results.start_row,end_row:results.end_row},function(data){loc.get_posts_callback(loc,data,results,page_load_get_more)})},Channel_Public_Base.fn.show_more=function(loc){loading.remove($("#main_wrapper .flex_col")),loading.create($("#main_wrapper .flex_col"),!0),loc.param_data.page_number=parseInt(loc.param_data.page_number)+1,loc.get_posts(loc)},Channel_Public_Base.fn.initialize_paginator=function(){0<$(".golden_layout").length&&(this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".golden_layout > li",starting_page_num:this.param_data.page_number,container_id_to_append_show_more:"add_to_col",page_size:7}),this.paginator.init())},Channel_Public_Base.fn.initial_data_load=function(){var key_vals,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){General.is_null_empty_undefined(val)||null==loc.param_data[index]||(loc.param_data[index]=val,_has_params=!0)})),loc.initialize_paginator(),_has_params&&(loading.create(),loc.get_posts(loc,!0))},Channel_Public_Base.fn.parallax_scroll_setup=function(){new Parallax_Scroll({keyframes:[{wrapper:$("#ch_head"),duration:$("#ch_head").height(),animations:[{selector:".channel_name_wrap h1",translateY:[0,-400],opacity:[1,0]},{selector:".channel_name_wrap a",translateY:[0,-310],opacity:[1,0]},{selector:"#ch_head",translateY:[0,100]}]}]}).init()},Channel_Public_Base.fn.subscribe=function(){var loc=this;$(".subscribe").click(function(event){event.preventDefault();event=$(this);loc.user_object_xref_add({success_message:General.success_text.channel_subscribes,$this:event,action_taken_text:"Following this feed",object_id:loc.data.channel_id,object_type:USER_OBJECT_XREF_TYPES.channel_subscribes},loc)})}
1,Channel_Public_Base.fn.auto_scroll_page_up=function(loc){loc.auto_scroll_load=new List_Auto_Scroll_Load({shell_base:loc,show_more_id:"show_more",offset:100,is_loading_results:!1,show_more_clbk:function(loc){loc.is_loading_results=!0,Paginator.remove_show_more(),loc.shell_base.show_more(loc.shell_base)}}),loc.auto_scroll_load.init()},Channel_Public_Base.fn.base_init=function(){var loc=this;loc.increment_channel_view_count&&$.post(String.format("{0}home/increment_channel_view",GLOBALS.SECURE_ROOT_PATH),{channel_id:loc.data.channel_id},function(){},"json"),"macro_guide"!==loc.shell_name&&loc.initial_data_load(),loc.subscribe(),$("#show_more").live("click",function(event){loc.show_more(loc)}),loc.auto_scroll_page_up(loc),loc.include_commenting_functionality("channel"),$(".switch_presentation").live("click",function(e){var _img_html,$this=$(this),spotlight_image=$this.data("spotlight-image"),thumbnail_image=$this.data("thumbnail-image"),_post_id=$this.data("list-post-id");$this.parent().hasClass("presentation_mode")?($this.parent().removeClass("presentation_mode"),0==$this.parent().find(".img_wrapper img").length?(_img_html=String.format("<img src='{0}' />",thumbnail_image),$(_img_html).prependTo($this.parent().find(".img_wrapper a"))):($this.parent().find(".img_wrapper img").attr({src:thumbnail_image}),$this.parent().find(".img_wrapper img").removeClass("hide")),$this.parent().find(".img_cvr").addClass("hide"),$.post(GLOBALS.ROOT_PATH+"home/post_presentation_mode_update",{post_id:_post_id,presentation_mode:0},function(data){General.status_ok(data.status)&&alert("presentation mode updated - set regular")})):($this.parent().addClass("presentation_mode"),$this.parent().find(".img_wrapper img").addClass("hide"),0==$this.parent().find(".img_cvr").length?(_img_html=String.format("<div class='img_cvr' style='background-image: url({0});'>&nbsp;</div>",spotlight_image),$(_img_html).prependTo($this.parent().find(".img_wrapper a"))):$this.parent().find(".img_cvr").removeClass("hide"),$.post(GLOBALS.ROOT_PATH+"home/post_presentation_mode_update",{post_id:_post_id,presentation_mode:1},function(data){General.status_ok(data.status)&&alert("presentation mode updated - set presentation")}))})},function(_obj){Channel_Public_Base.call(this,_obj),this.gallery_slider,this.core77_question_slider,this.list_type=0,this.scroll_position=0}),Channel_Public=(Channel_Public_Homepage.inherits(Channel_Public_Base),Channel_Public_Homepage.fn.get_amount_to_show_postlet_slider=function(){var _amount_to_show=3;return $(window).width()<570?_amount_to_show=1:$(window).width()<900&&(_amount_to_show=2),_amount_to_show},Channel_Public_Homepage.fn.initialize_paginator=function(){0<$(".golden_layout").length&&(this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".golden_layout > li",starting_page_num:this.param_data.page_number,container_id_to_append_show_more:"add_to_col",page_size:GLOBALS.PUBLISHED_POST_COUNT_PAGE_1}),this.paginator.init())},Channel_Public_Homepage.fn.get_posts_callback=function(loc,data,results,page_load_get_more){if(data=General.parse_json_if_needed(data),General.status_ok(data.status)){loading.remove(),loading.remove($("#main_wrapper .flex_col"));var _output=unescape(data.data[0].text),_output_2=unescape(data.data[1].text),_html="",section_count=1,_html_list=[];if(page_load_get_more){for(var list_li=_output.split("</li>"),section_count=Math.ceil((list_li.length-1)/loc.paginator.page_size),k=0;k<section_count;k++){var end_num=loc.paginator.page_size<list_li.length?loc.paginator.page_size:list_li.length,end_num=list_li.splice(0,end_num).join("</li>");/<li/.test(end_num)&&_html_list.push(end_num)}Paginator.remove_show_more()}else _html_list.push(_output);for(k=0;k<section_count;k++){for(var ad_slot_created="",_custom_page_topper_ad_pages=(new String,AD_ZONES.specific_zones),m=0;m<_custom_page_topper_ad_pages.length;m++)$("#core77").hasClass(_custom_page_topper_ad_pages[m])&&_custom_page_topper_ad_pages[m];var split_html_list,_set_one,_page_number=(General.is_null_empty_undefined(loc.param_data)?loc:loc.param_data).page_number,_leaderboard_ad_unit_id=String.format("{0}_{1}",General.get_unique_id(),k);$("#core77").hasClass("plog"),_html=""!==_output_2.clean_white_space()?(_set_one=(split_html_list=_html_list[k].split("</li>")).splice(0,GLOBALS.POSTLET_WIDGET_PLACEMENT_IN_LIST),split_html_list=split_html_list,_html=(_html+="<section class='section_wrap post_list'><ul class='golden_layout'>")+_set_one.join("</li>")+"</ul>",_set_one=new Date,_set_one=6<loc.param_data.page_number?_set_one.add_days(-1*(loc.param_data.page_number-1)).ToMonthDayAndYearIfNotCurrent():_set_one.add_days(-1*(loc.param_data.page_number-1)).get_day_as_string(),_html+=String.format("<div class='day_of_week'>{0}</div><div class='hp_section_header_wrap postlets_unit'><div class='fixed_side'><div class='name'>Design Daily</div><img class='surfer' src='https://s3files.core77.com/images/surf_emoji.png' /></div><div class='flex_side'><div class='header_context'>Our editor's picks from around the web.</div></div></div>",_set_one),_set_one=GLOBALS.POSTLET_COUNT_PAGE_1,(_html=_html+String.format("<div class='postlet_list page_{0}' data-this-section-count='{1}'>",_page_number,_set_one)+_output_2+"</div><ul class='golden_layout'>")+split_html_list.join("</li>")+"</ul></section>"):(_html+="<section class='section_wrap post_list'><ul class='golden_layout'>")+_html_list[k]+"</ul></section>",$("#core77").hasClass("plog")||(_html=(_html+="<div class='leaderboard_ad'>
1")+String.format("<div class='ad_wrap' data-ad-type='1' id='{0}'></div>",_leaderboard_ad_unit_id)+"</div>"),$(_html).appendTo($("#main_wrapper .flex_col"));ad_slot_created=Google_Ad_Induction.create_ad_slot({type:Google_Ad_Induction.ad_types.leaderboard,unique_ad_slot_id:_leaderboard_ad_unit_id});googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot(ad_slot_created)}loc.golden_layout_flex(),loc.auto_scroll_load.is_loading_results=!1,results.show_more&&Paginator.draw_show_more(loc.paginator)}},Channel_Public_Homepage.fn.get_posts_callback_set_one=function(loc,data,results){var _output;data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(loading.remove($("#main_wrapper .flex_col"),!0),Paginator.remove_show_more(),_output=unescape(data.data[0].text),data=unescape(data.data[1].text),$(_output).prependTo($(".post_list_prime .golden_layout")),$(data).prependTo($(".post_list_prime .postlet_list"))),loc.golden_layout_flex(),loc.auto_scroll_load.is_loading_results=!1,results.show_more&&Paginator.draw_show_more(loc.paginator)},Channel_Public_Homepage.fn.get_posts=function(loc,page_load_get_more,results_set_one){var results=loc.paginator.calc_start_end();0==loc.list_type?$.post(GLOBALS.ROOT_PATH.append("home/channel-posts-with-postlets-more"),{channel_id:loc.data.channel_id,start_row:results.start_row,end_row:results.end_row,page_number:loc.param_data.page_number},function(data){loc.paginator.row_count=data.data[0].total_count,results_set_one?loc.get_posts_callback_set_one(loc,data,results):loc.get_posts_callback(loc,data,results,page_load_get_more)}):$.post(GLOBALS.ROOT_PATH.append("home/trending-posts-more"),{start_row:results.start_row,end_row:results.end_row,trending_type:loc.list_type},function(data){loc.paginator.row_count=data.total_count,results_set_one?loc.get_posts_callback_set_one(loc,data,results):loc.get_posts_callback(loc,data,results,page_load_get_more)})},Channel_Public_Homepage.fn.auto_scroll_page_up=function(loc){loc.auto_scroll_load=new List_Auto_Scroll_Load({shell_base:loc,show_more_id:"show_more",offset:100,is_loading_results:!1,show_more_clbk:function(loc){loc.is_loading_results=!0,Paginator.remove_show_more(),loc.shell_base.show_more(loc.shell_base)}}),loc.auto_scroll_load.init()},Channel_Public_Homepage.fn.init=function(){var loc=this;loc.base_init(),$(".favorite").live("click",function(event){event.preventDefault(),event.stopPropagation();var event=$(this),this_post_id=event.data("this-post-id"),this_user_id=event.data("this-author-id"),_action_taken=$(this).hasClass("already_taken")?"Favorite":"Favorited";loc.user_object_xref_add({success_message:General.success_text.post_recommends,$this:event,action_taken_text:_action_taken,object_id:this_post_id,object_type:USER_OBJECT_XREF_TYPES.post_recommends,post_user_id:this_user_id,override_text:"ignore this",extra_callback:function(post_id){var post_id=$(String.format(".postlet_list li[data-post-id={0}] .fav_action .this_ac_count",post_id)),fav_count=parseInt(post_id.data("number-of-favorites"));post_id.text(fav_count+1)}},loc)}),$(".postlet_link_out").live("click",function(e){var $this=$(this),_link=$this.attr("href"),$this=$this.data("ref-id");e.preventDefault();try{ga("send",{hitType:"event",eventCategory:"postlet_article_click",eventAction:_link,eventLabel:String.format("https://www.core77.com/postlets/{0}",$this)}),General.new_tab_link_override(_link)}catch(e){General.new_tab_link_override(_link)}}),loc.handle_comment_show_preference(),$("#filter_list li").live("click",function(e){var $this=$(this);$this.hasClass("active")||(loading.remove($("#main_wrapper .flex_col")),loading.create($("#main_wrapper .flex_col"),!0),loc.list_type=$this.attr("data-type"),$("#filter_list li").removeClass("active"),$this.addClass("active"),loc.scroll_position=$(window).scrollTop(),loc.param_data.page_number=1,window.location.hash="",document.body.scrollTop=document.documentElement.scrollTop=loc.scroll_position,loc.auto_scroll_load.is_loading_results=!0,Paginator.remove_show_more(),$(".post_list_prime .golden_layout").empty(),$("#add_to_col .leaderboard_ad").remove(),$("#add_to_col .post_list").remove(),loc.get_posts(loc,!1,!0))})},function(_obj){Channel_Public_Base.call(this,_obj)}),Channel_Public_Search_Page=(Channel_Public.inherits(Channel_Public_Base),Channel_Public.fn.init=function(){this.base_init(),this.golden_layout_flex(function(){})},function(_obj){Channel_Public.call(this,_obj),this.data.number_of_posts=0,this.increment_channel_view_count=!1}),Channel_Public_Webinar_Sessions=(Channel_Public_Search_Page.inherits(Channel_Public),function(_obj){}),Channel_Public_Buyout=(Channel_Public_Webinar_Sessions.inherits(Channel_Public),Channel_Public_Webinar_Sessions.fn.init=function(){this.integration_webinar_form_handler(this)},function(_obj){Channel_Public_Base.call(this,_obj)}),Channel_Public_Jobs=(Channel_Public_Buyout.inherits(Channel_Public_Base),Channel_Public_Buyout.fn.handle_buyout_ad_size=function(){var $node=$(".buy_out_ad img"),img_ref="",img_ref=1100<$(window).width()?$node.attr("data-large-ad"):500<$(window).width()?$node.attr("data-medium-ad"):$node.attr("data-small-ad");General.image_loaded({new_img:img_ref,$node:$node,callback:function($node,new_img,$top_parent){$node.attr({src:new_img})},$top_parent:""})},Channel_Public_Buyout.fn.init=function(){this.base_init(),this.golden_layout_flex(function(){})},function(_obj){Channel_Public_Base.call(this,_obj)}),Channel_Public_Projects=(Channel_Public_Jobs.inherits(Channel_Public_Base),Channel_Public_Jobs.fn.init=function(){},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Sidebar_Filters({member_css_class:"search_form_member",extra_properties:["page_number"],shell_obj:this})}),Channel_Product_Tiles_Public=(Channel_Public_Projects.inherits(Channel_Public_Base),Channel_Public_Projects.fn.initialize_paginator=function(){0<$(".golden_layout").length&&(this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".golden_layout > li",starting_page_num:this.page_number}),this.paginator.init())},Channel_Public_Projects.fn.get_posts_callback=function(loc,data,results,page_load_get_more){var _output,data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(loading.remove(),_output=unescape(data.text),$(".golden_layout").removeClass("up_3 up_2 up_1"),$(_output).appendTo($(".golden_layout")),loc.golden_layout_flex(),Paginator.remove_show_more(),$(".golden_layout li").length<data.total_count&&Paginator.draw_show_more(loc.paginator),loc.auto_scroll_load.is_loading_results=!1)}
1,Channel_Public_Projects.fn.choose_tag=function(val,loc){$("#tag_select > li.current").attr("data-value")!=val&&($("#tag_select > li").removeClass("current"),$(String.format("#tag_select > li[data-value='{0}']",val)).addClass("current")),$("#tag_select_mobile").val()!=val&&$("#tag_select_mobile").val(val),loading.create(),loc.get_posts(loc,!0)},Channel_Public_Projects.fn.initial_data_load=function(){var key_vals,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.param_data[index].value=val,loc.param_data[index].set_value_and_update_filter_members(val,loc.data.member_css_class,index,loc,"param_data"),_has_params=!0})),loc.initialize_paginator(),loc.golden_layout_flex(function(){}),_has_params&&(loading.create(),loc.get_posts(loc,!0))},Channel_Public_Projects.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end(page_load_get_more),params=(page_load_get_more&&$(".golden_layout").empty(),loc.param_data.rewriteURL());params.start_row=results.start_row,params.end_row=results.end_row,$.post(GLOBALS.ROOT_PATH.append("home/project-posts-more"),params,function(data){loc.get_posts_callback(loc,data,results,page_load_get_more)})},Channel_Public_Projects.fn.init=function(){var loc=this;loc.base_init(),$("#add_your_projects").click(function(event){event.preventDefault();event=$(this);GLOBALS.IS_LOGGED_IN?window.location=event.attr("href"):$(".login_signup_modal").trigger("click")}),$("#tag_select > li").live("click",function(event){event.preventDefault();event=$(this).attr("data-value");loc.choose_tag(event,loc)}),$("#tag_select_mobile").live("change",function(event){event.preventDefault();event=$(this).val();loc.choose_tag(event,loc)})},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Sidebar_Filters({member_css_class:"search_filter_btns",extra_properties:["page_number"],shell_obj:this}),this.param_data.page_number=1}),Channel_Public_School_Listing=(Channel_Product_Tiles_Public.inherits(Channel_Public_Base),Channel_Product_Tiles_Public.fn.golden_layout_flex=function(_clbk,no_ad){FLEX_STOPS.layout.init(_clbk,no_ad),$(window).resize(function(){FLEX_STOPS.layout.init(_clbk,no_ad)})},Channel_Product_Tiles_Public.fn.get_posts_callback=function(loc,data,results,page_load_get_more){var _output,data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(loading.remove(),_output=unescape(data.text),$(".golden_layout").removeClass("up_3 up_2 up_1"),$(_output).appendTo($(".golden_layout")),loc.golden_layout_flex($.noop,!1),Paginator.remove_show_more(),$(".golden_layout li").length<data.total_count&&Paginator.draw_show_more(loc.paginator),loc.auto_scroll_load.is_loading_results=!1)},Channel_Product_Tiles_Public.fn.choose_category=function(val,loc){$("#category_select > li.current").attr("data-value")!=val&&($("#category_select > li").removeClass("current"),$(String.format("#category_select > li[data-value='{0}']",val)).addClass("current")),$("#category_select_mobile").val()!=val&&$("#category_select_mobile").val(val),loading.create(),loc.get_posts(loc,!0)},Channel_Product_Tiles_Public.fn.choose_sort_by=function(val,loc){$("#sort_by > li.current").attr("data-value")!=val&&($("#sort_by > li").removeClass("current"),$(String.format("#sort_by > li[data-value='{0}']",val)).addClass("current")),$("#sort_by_mobile").val()!=val&&$("#sort_by_mobile").val(val),loading.create(),loc.get_posts(loc,!0)},Channel_Product_Tiles_Public.fn.initial_data_load=function(){var key_vals,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.param_data[index].value=val,loc.param_data[index].set_value_and_update_filter_members(val,loc.data.member_css_class,index,loc,"param_data"),_has_params=!0})),loc.initialize_paginator(),loc.golden_layout_flex($.noop,!1),_has_params&&(loading.create(),loc.get_posts(loc,!0))},Channel_Product_Tiles_Public.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end(page_load_get_more),params=(page_load_get_more&&$(".golden_layout li:not(.placeholder_zone)").remove(),loc.param_data.rewriteURL());params.start_row=results.start_row,params.end_row=results.end_row,params.channel_id=loc.data.channel_id,$.post(GLOBALS.ROOT_PATH.append("home/product-tile-posts-posts-more"),params,function(data){loc.get_posts_callback(loc,data,results,page_load_get_more)})},Channel_Product_Tiles_Public.fn.init=function(){var loc=this;loc.base_init(),$("#add_your_projects").click(function(event){event.preventDefault();event=$(this);GLOBALS.IS_LOGGED_IN?window.location=event.attr("href"):$(".login_signup_modal").trigger("click")}),$("#category_select > li").live("click",function(event){event.preventDefault();event=$(this).attr("data-value");loc.choose_category(event,loc)}),$("#category_select_mobile").live("change",function(event){event.preventDefault();event=$(this).val();loc.choose_category(event,loc)}),$("#sort_by > li").live("click",function(event){event.preventDefault();event=$(this).attr("data-value");loc.choose_sort_by(event,loc)}),$("#sort_by_mobile").live("change",function(event){event.preventDefault();event=$(this).val();loc.choose_sort_by(event,loc)})},function(_obj){Channel_Public_Base.call(this,_obj),this.school_data,this.school_paginator,this.number_of_school_listings,this.school_results=_obj.data.schools,this.mapper,this.must_reads}),Channel_Public_Calendar=(Channel_Public_School_Listing.inherits(Channel_Public_Base),Channel_Public_School_Listing.fn.get_school_listings=function(loc,reset_page_number){reset_page_number=!General.is_null_empty_undefined(reset_page_number)&&reset_page_number;reset_page_number=loc.school_data.rewriteURL();reset_page_number.start_row=0,reset_page_number.end_row=1e4,$.post(GLOBALS.ROOT_PATH.append("school/school-search-free-text"),reset_page_number,function(data){var old_results,schools,data=General.parse_json_if_needed(data);loading.remove(),General.status_ok(data.status)?(schools=General.parse_json_if_needed(data.schools),old_results=loc.school_results,loc.school_results=sch
1ools,$("#school_search_clone div.leaderboard_ad").empty(),schools=FLEX_STOPS.layout.create_ad_exception("","school_search"),$(schools).appendTo($("#school_search_clone div.leaderboard_ad")),$("#school_search_clone").removeClass("open"),loc.mapper.clear_markers_set_new(loc,old_results)):message_slider(data.text,!0)})},Channel_Public_School_Listing.fn.show_other_school_matches=function(this_obj,loc,_map_inst){for(var matches=_map_inst.get_closest_markers(this_obj,loc.school_results,_map_inst,3,1e4),_html=new String,k=0;k<matches.length;k++)$.each(loc.school_results,function(index,val){var _logo;this.school_id==matches[k].school_id&&(_logo=String.format("http://s3files.core77.com/schools/logos/{0}.jpg",this.school_id),_html+=String.format("<li data-index='{0}'><img src='{1}'/><div class='details_wrap'><h4><span>{2}</span></h4><h5 class='loc'>{3}<span class='distance'>{4} miles</span></h5></div></li>",index,_logo,this.school_name,this.address.location_string.replace(this.address.address1+", ",""),matches[k].distance))});$("#school_search_clone #details_view div.nearby_schools ul").empty(),$(_html).appendTo($("#school_search_clone #details_view div.nearby_schools ul"))},Channel_Public_School_Listing.fn.show_school_details=function(this_obj,loc,_map_inst){$("#school_search_clone").hasClass("open")||$("#school_search_clone").addClass("open");var _html=new String,_logo=String.format("http://s3files.core77.com/schools/logos/{0}.jpg",this_obj.school_id),_programs=(_html=(_html=(_html=(_html+="<div class='school_info'><div class='school_top_cap'>")+String.format("<div class='img_wrapper'><img src='{0}' /></div>",_logo))+String.format("<h1><a href='http://{0}' target='_blank'>{1}</a></h1>",this_obj.school_url,this_obj.school_name))+String.format("<h2 class='location'>{0}</h2></div>",this_obj.address.location_string)+"<div class='program_list'>",this_obj.programs.split(","));if(0<_programs.length){_html+="<ul>";for(var k=0;k<_programs.length;k++)_html+=String.format("<li>{0}</li>",_programs[k]);_html+="</ul>"}General.is_null_empty_undefined(this_obj.additional_specialties)||(_html+=String.format("<p class='add_programs'><strong>Additional Specialties: </strong>{0}</p>",this_obj.additional_specialties.replace(/^"/,"").replace(/"$/,""))),_html=(_html+="</div>")+String.format("<p>{0}</p>",this_obj.overview.replace(/^"/,"").replace(/"$/,""))+"<div class='nearby_schools col_300'><h2 class='sidebar_cap'>Other Nearby Schools</h2><ul></ul></div></div>",$("#school_search_clone #details_view").empty(),$(_html).appendTo($("#school_search_clone #details_view")),loc.show_other_school_matches(this_obj,loc,_map_inst)},Channel_Public_School_Listing.fn.init=function(){var loc=this;loc.base_init(),loc.golden_layout_flex(function(){loc.mapper=new Multi_Marker_Map_It({id:"school_search_clone #map_draw",latitude:35,longitude:-60,recenter:!1,shell_obj:loc,zoom:3,draw_list:"school_results",marker_reference_id:"school_id",marker_click_callback_name:"show_school_details",custom_marker:{path:"M16,2C7.715,2,1,8.715,1,17c0,15,15,33,15,33s15-18,15-33C31,8.715,24.284,2,16,2z M16,26c-4.971,0-9-4.03-9-9 c0-4.971,4.029-9,9-9s9,4.029,9,9C25,21.97,20.971,26,16,26z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#23272e",stroke_weight:2,fill_color:"#f60",scale:1},custom_marker_active:{path:"M16,2C7.715,2,1,8.715,1,17c0,15,15,33,15,33s15-18,15-33C31,8.715,24.284,2,16,2z M16,26c-4.971,0-9-4.03-9-9 c0-4.971,4.029-9,9-9s9,4.029,9,9C25,21.97,20.971,26,16,26z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#23272e",stroke_weight:2,fill_color:"#303743",scale:1}}),loc.mapper.init(),General.is_null_empty_undefined(loc.must_reads)||clearTimeout(loc.must_reads.auto_play_timeout),loc.must_reads=new Timer_Slider({container_selector:"#school_must_reads_clone .timer_slider",use_prev_next_btn:!1,create_pagination_nodes:!0,is_autoplay:!0}),loc.must_reads.init()}),do_when(function(){return 0<$("#school_search_clone").length},function(){loc.school_data=new Create_Obj_From_Form_Nodes({form_id:"school_search_clone #school_search_form",shell_obj:loc});var key_vals,_has_school_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.school_data[index].set_value_and_update_form(val,loc.school_data.form_id,index,loc),_has_school_params=!0})),$("#school_search_clone div.checkbox_wrap").live("click",function(event){var $this=$(this);loc.checkbox_handler($this)}),$("#school_search_clone select#program_select_0_").change(function(){var set_additions=loc.get_addition_box_nodes($("#school_search_clone #program_box"));loc.add_addition_box_node_via_select(loc,$(this),set_additions,$("#school_search_clone #program_box"))}),$(".addition_box .remove").live("click",function(e){$(this).parent().remove()}),$("#school_search_clone #search").live("click",function(event){event.preventDefault(),loc.get_school_listings(loc,!0)}),$("#school_search_clone #school_search_toggle").live("click",function(){$("#school_search_clone form").hasClass("open")?($("#school_search_clone form").removeClass("open"),$(this).text("e")):($("#school_search_clone form").addClass("open"),$(this).text("r"))}),$("#school_search_clone #more_options").live("click",function(event){$("#school_search_clone .school_list_search li.show_hide").each(function(index,val){$(val).hasClass("show")?$(val).removeClass("show"):$(val).addClass("show")})}),_has_school_params&&loc.get_school_listings(loc,!0),$("#school_search_clone #details_view div.nearby_schools ul li").live("click",function(){var _index=$(this).attr("data-index");new google.maps.event.trigger(loc.school_results[_index].marker,"click")})},250)},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Calendar_Channel_Parameters_Data(_obj.data.channel)}),Channel_Public_Gallery=(Channel_Public_Calendar.inherits(Channel_Public_Base),Channel_Public_Calendar.fn.init=function(){var loc=this;loc.base_init(),new Timer_Slider({container_selector:"#featured_calendar_slider",use_prev_next_btn:!1,create_pagination_nodes:!0}
1).init(),loc.parallax_scroll_setup(),$("#filter_calendar").change(function(e){var _event=$(this).val(),_start_date=new Date,_end_date=new Date;_end_date.setMonth(_end_date.getMonth()+24),$.post(GLOBALS.ROOT_PATH.append("home/calendar_search"),{event_type:_event,start_date:_start_date.to_MM_DD_YYYY(),end_date:_end_date.to_MM_DD_YYYY(),channel_id:loc.param_data.id},function(data){var last_month="",_counter=0,_html="";$.each(data,function(index,val){this.end_date.ToString("MMMM")!=last_month&&(0!=_counter&&(_html+="</ul>"),_html=_html+String.format('<h1 class="section_header month_header section_wrap full_width">{0}</h1>',this.end_date.ToString("MMMM"))+'<ul class="calendar_listing section_wrap">'),_html=_html+String.format('<li class="" data-calendar-type="{0}" >',this.event_type)+'<div class="duration_wrap">',this.start_date.Day!=this.end_date.Day&&(_html=(_html=(_html+='<div class="date_wrap start">')+String.format('<span class="month">{0}</span>',this.start_date.ToString("MMM")))+String.format('<span class="day">{0}</span>',this.start_date.ToString("dd"))+"</div>"),this.start_date.Day!=this.end_date.Day&&(_html+="<em>Through</em>"),_html=(_html=(_html=(_html=(_html+='<div class="date_wrap end">')+String.format('<span class="month">{0}</span>',this.end_date.ToString("MMM")))+String.format('<span class="day">{0}</span>',this.end_date.ToString("dd"))+'</div></div><div class="post_info_wrap">')+String.format('<span class="event_type">{0}</span>',"needed_still"))+String.format("<h1 class='calendar_headline'><a href=\"{0}\">{1}</a></h1>","need_url_still"),this.venue_name.is_empty()||(_html+=String.format('<span class="location">{0} </span>',this.venue_name)),this.address.location_string.is_empty()?_html+='<span class="location">Online</span>':_html+=String.format('<span class="location">{0}</span>',this.address.location_string),this.event_link.is_empty()||(_html+=String.format('<a href="{0}" target="_blank" class="sm_btn">Go to Website<em class="c77_icon">x</em></a>',General.resolve_url(this.event_link))),this.address.location_string.is_empty()||(_html+=String.format('<span class="sm_btn view_map" data-lat="{0}" data-long="{1}">View on Map<em class="c77_icon">k</em></span>',this.address.latitude,this.address.longitude)),_html+=String.format("<p>{0}...</p></div></li>",this.excerpt.clean_white_space()),_counter==Model.published_posts.calendar_posts.
1Count-1&&(_html+="</ul>"),_counter++,last_month=this.end_date.ToString("MMMM")}),$(".month_header").remove(),$(".calendar_listing").remove(),$(_html).insertAfter($(".calendar_checkbox"))})})},function(_obj){Channel_Public_Base.call(this,_obj)}),Channel_Public_Design_Events_NY=(Channel_Public_Gallery.inherits(Channel_Public_Base),Channel_Public_Gallery.fn.init=function(){this.base_init(),this.golden_layout_flex(function(){})},function(_obj){Channel_Public_Base.call(this,_obj),this.design_event_data=new Design_Event_Data_NY(_obj.data),this.saved_list=_obj.data.saved_list,this.events_to_draw=[],this.old_list=[],this.filterable_event_types=["exhibition","opening / party"],this.event_neighborhoods={all:{latitude:40.710050182859355,longitude:-73.98748956604004,zoom:13},SOHO:{latitude:40.7215,longitude:-74.00045,zoom:13},The_Village:{latitude:40.731,longitude:-73.994,zoom:13},Chelsea:{latitude:40.747799,longitude:-73.998,zoom:13},Downtown:{latitude:40.729874,longitude:-73.996,zoom:13},Midtown:{latitude:40.757,longitude:-73.98,zoom:13},Brooklyn:{latitude:40.7,longitude:-73.958,zoom:13},Uptown:{latitude:40.781,longitude:-73.958,zoom:13},Queens:{latitude:40.781,longitude:-73.958,zoom:13}},this.filter_data,this.mapper,this.marker_callback_timeout,this.window_animation_frame}),Channel_Public_Gift_Guide=(Channel_Public_Design_Events_NY.inherits(Channel_Public_Base),Channel_Public_Design_Events_NY.fn.init=function(){var key_vals,loc=this;loc.golden_layout_flex(),loc.filter_data=new Create_Obj_From_Form_Nodes({form_id:"filter_events",shell_obj:loc}),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.filter_data[index].set_value_and_update_form(val,loc.filter_data.form_id,index,loc)})),loc.get_matching_events(loc),loc.mapper=new Multi_Marker_Map_It({id:"map_draw",latitude:loc.event_neighborhoods.all.latitude,longitude:loc.event_neighborhoods.all.longitude,recenter:!1,shell_obj:loc,zoom:loc.event_neighborhoods.all.zoom,draw_list:"events_to_draw",marker_reference_id:"post_id",marker_secondary_id:"event_type",marker_click_callback_name:"map_marker_click_callback",map_control_location:"LEFT_BOTTOM",style:[{featureType:"landscape",elementType:"geometry",stylers:[{color:"#cccccc"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#999999"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#bbbbbb"}]},{}],color_by_type:function(_obj){var result="#E29C05";switch(null!=_obj.event_type?_obj.event_type:_obj.secondary_id){case 8:result="#CB3FED";break;case 4:result="#00AFEF"}return result},custom_marker:{path:"M23.808,9.521c0-4.865-3.943-8.809-8.808-8.809S6.192,4.656,6.192,9.521c0,4.227,2.977,7.758,6.949,8.609v10.529h3.717 V18.13C20.83,17.278,23.808,13.748,23.808,9.521z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#f60",scale:1},custom_marker_active:{path:"M23.808,9.521c0-4.865-3.943-8.809-8.808-8.809S6.192,4.656,6.192,9.521c0,4.227,2.977,7.758,6.949,8.609v10.529h3.717 V18.13C20.83,17.278,23.808,13.748,23.808,9.521z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#f20022",scale:2}}),loc.mapper.init(),$("ul#events_list li").live("click",function(event){var _post_id,_match,$li=$(this);$li.hasClass("open")?$li.removeClass("open"):(_post_id=$li.attr("data-post-id"),$.each(loc.events_to_draw,function(index,val){this.post_id==_post_id&&(_match=this)}),new google.maps.event.trigger(_match.marker,"click"))}),$("ul#events_list li a").live("click",function(event){event.stopPropagation()}),$("ul#events_list li p").live("click",function(event){event.stopPropagation()}),$("#event_search_toggle").live("click",function(){$("#filter_events_menu").hasClass("open")?($("#filter_events_menu").removeClass("open"),$(this).text("e")):($("#filter_events_menu").addClass("open"),$(this).text("r"))}),$("#list_toggle").live("click",function(){$("#event_list_wrap").hasClass("open")?$("#event_list_wrap").removeClass("open"):$("#event_list_wrap").addClass("open")}),setTimeout(function(){$(".nycxdesign_map #nycxd_header").addClass("time_to_move_on"),$(".nycxdesign_map header").addClass("time_to_move_on")},3e3),$("#nycxd_header").live("click",function(event){$(".nycxdesign_map #nycxd_header").addClass("time_to_move_on"),$(".nycxdesign_map header").addClass("time_to_move_on"),$(".nycxdesign_map #partners_with").addClass("time_to_move_on")}),$(".ul_button_select li").live("click",function(event){var save_update_modal,$this=$(this);$this.parent().find("li.active").removeClass("active"),$this.addClass("active"),"saved"!=$this.attr("data-value")||null!=loc.saved_list&&0<loc.saved_list.length?loc.get_matching_events(loc):($this=new String,$this+="<div class='generic_message'><h3>You don't have any saved events</h3><p>Search through the event list and select the events that you would like to save and quickly have access to later on all of your devices.</p><ul class='modal_bottom'><li class='quick_m_close'><a class='btn' href='#'>Got it</a></li></ul></div>",(save_update_modal=new Quick_Modal({appendTo:"core77"})).set_form_width(500),save_update_modal.set_content($this),save_update_modal.draw_overlay())}),$("#where").change(function(event){var _this=loc.event_neighborhoods[$(this).val().replace(" ","_")];loc.mapper.pan_zoom_map_to(_this),loc.get_matching_events(loc)}),$("#when").change(function(event){loc.get_matching_events(loc)}),$(".save_event").click(function(event){event.preventDefault(),event.stopPropagation();var event=$(this),_post_id=event.parent().attr("data-post-id");event.hasClass("already_taken")||($("#trigger_login_form").attr({"data-return-url":GLOBALS.WEB_ROOT_PATH.append("nydesignmap")}),loc.user_object_xref_add({success_message:General.success_text.design_event_saved,$this:event,action_taken_text:"Saved",object_id:_post_id,object_type:USER_OBJECT_XREF_TYPES.design_event_save,extra_callback:function(post_id){loc.saved_list.push(parseInt(post_id))}},loc))}
1),950<$(window).width()?$("#event_search_toggle").click():$(window).width()<=650&&loc.engage_draggable(loc)},Channel_Public_Design_Events_NY.fn.engage_draggable=function(loc){loc.window_animation_frame=window.requestAnimationFrame(function(){loc.engage_draggable(loc)}),$(window).scrollTop()>=$("#design_events_display").offset().top&&null!=loc.mapper&&(loc.mapper.map.set("draggable",!0),window.cancelAnimationFrame(loc.window_animation_frame),printf("cancelled"))},Channel_Public_Design_Events_NY.fn.map_marker_click_callback=function(this_obj,loc,_map_inst){clearTimeout(loc.marker_callback_timeout),$("#event_list_wrap").hasClass("open")||$("#event_list_wrap").addClass("open"),$("ul#events_list li").removeClass("open");var $elem=$(String.format("ul#events_list li[data-post-id={0}]",this_obj.post_id));$elem.addClass("open"),$elem.offset().top;loc.marker_callback_timeout=setTimeout(function(){$("ul#events_list").animate({scrollTop:$elem.offset().top-$("ul#events_list").offset().top+$("ul#events_list").scrollTop()-10})},300)},Channel_Public_Design_Events_NY.fn.get_date_formated=function(start_date,start_time,end_date,end_time){var formated_date="",start_date=new Date(parseInt(start_date.replace("/Date(","").replace(")/",""))+432e5),end_date=new Date(parseInt(end_date.replace("/Date(","").replace(")/",""))+432e5),start_date=(formated_date+=String.format("<span class='event_date'>{0}",start_date.to_DDD_MMM_d()),start_date.to_DDD_MMM_d()!=end_date.to_DDD_MMM_d()&&(formated_date+=String.format(" &mdash; {0}",end_date.to_DDD_MMM_d())),formated_date+="</span>",General.format_time(start_time.Hours,start_time.Minutes,!1)),end_date=General.format_time(end_time.Hours,end_time.Minutes,!1);return formated_date+=String.format("<span class='event_time'>{0}",start_date),start_date!=end_date&&(formated_date+=String.format(" &mdash; {0}",end_date)),formated_date+="</span>"},Channel_Public_Design_Events_NY.fn.get_matching_events=function(loc){0!=loc.events_to_draw.length&&(loc.old_list=loc.events_to_draw),loc.events_to_draw=[];var _date,params=loc.filter_data.rewriteURL(),_when="all",_where=("all"!=params.when&&(_date=params.when.split("|"),_when=new Date(_date[0],parseInt(_date[1])-1,_date[2],12,0,0,0)),params.where),_what=params.what;1==params.what.length?_what=[parseInt(params.what)]:"other"==params.what&&(_what=[2,3,5,6,7]),$.each(loc.design_event_data.events,function(index,val){var start_date=new Date(parseInt(this.start_date.replace("/Date(","").replace(")/",""))+432e5),end_date=new Date(parseInt(this.end_date.replace("/Date(","").replace(")/",""))+432e5);("all"==_when||_when.getDate()>=start_date.getDate()&&_when.getDate()<=end_date.getDate()&&_when.getMonth()>=start_date.getMonth()&&_when.getMonth()<=end_date.getMonth())&&("all"==_where||_where==this.neighborhood)&&("saved"==_what&&loc.saved_list.contains(this.post_id)&&loc.events_to_draw.push(this),"all"==_what||General.is_compare_logic(this.event_type,_what,"||"))&&loc.events_to_draw.push(this)}),loc.draw_list(loc)},Channel_Public_Design_Events_NY.fn.draw_markers=function(loc){},Channel_Public_Design_Events_NY.fn.get_list_class=function(_type){var this_type_key=General.get_key_by_value(EVENT_TYPES,_type);return this.filterable_event_types.contains(General.event_type_as_string(_type))?this_type_key.toLowerCase():"other"},Channel_Public_Design_Events_NY.fn.draw_list=function(loc){var _html="",results_count=(0<loc.events_to_draw.length?$.each(loc.events_to_draw,function(index,val){_html+=loc.create_list_item(this)}):650<$(window).width()?_html+="<li class='no-results'><h1>No Results Found</h1><img src='https://s3.amazonaws.com/s3files.core77.com/images/nycxd_no_results.png'><p>UH-OH! Back to the drawing board</p></li>":_html+="<li class='no-results'><h1>No Results Found</h1><p>Try adjusting your search</p></li>",String.format("{0} Result{1}",loc.events_to_draw.length,1==loc.events_to_draw.length?"":"s"));$("#results_count").text(results_count),$("#events_list").empty(),0!=loc.old_list.length&&loc.mapper.clear_markers_set_new(loc,loc.old_list),$(_html).appendTo($("#events_list")),loc.draw_markers(loc)},Channel_Public_Design_Events_NY.fn.create_list_item=function(_obj){var _html="",already_saved=(_html+=String.format("<li data-post-id='{0}' class='{1}'>",_obj.post_id,this.get_list_class(_obj.event_type)),this.saved_list.contains(_obj.post_id)?"already_taken":""),already_saved_text=this.saved_list.contains(_obj.post_id)?"Saved":"Save This",_html=(_html=(_html=(_html+=String.format("<span class='save_event sm_btn {1}'>{2}</span><h1>{0}</h1>",_obj.title,already_saved,already_saved_text))+String.format("<h2>{0}</h2>",this.get_date_formated(_obj.start_date,_obj.start_time,_obj.end_date,_obj.end_time)))+String.format("<h3>{0}</h3>",General.event_type_as_string(_obj.event_type))+"<div class='details_wrap'>")+String.format("<div class='body_text_wrap'>{0}</div>",_obj.body_text);return General.is_null_empty_undefined(_obj.address.location_string)||(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||/(android)/i.test(navigator.userAgent)?_html+=String.format("<p class='venue_name'>{0}</p><p class='addresss'><a href='http://maps.google.com/?saddr=Current%20Location&daddr={1}'>{2}</a></p>",_obj.venue_name,escape(_obj.address.location_string),_obj.address.location_string.replace(/,\s(NY)\s\d{5},\s(USA)/,"")):_html+=String.format("<p class='venue_name'>{0}</p><p class='addresss'>{1}</p>",_obj.venue_name,_obj.address.location_string.replace(/,\s(NY)\s\d{5},\s(USA)/,""))),General.is_null_empty_undefined(_obj.event_link)||(already_saved=/http(s)?:\/\//.test(_obj.event_link)?_obj.event_link:String.format("http://{0}",_obj.event_link),_html+=String.format("<a class='event_link' href='{0}' target='_blank'>{0}</a>",already_saved)),_html+="</div></li>"},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Gift_Guide_Channel_Parameters_Data,this.data.number_of_posts=parseInt(_obj.data.total_posts),this.gift_guide_template=parseInt(_obj.gift_guide_template)}),Channel_Public_Design_Guide=(Channel_Public_Gift_Guide.inherits(Channel_Public_Base),Channel_Public_Gift_Guide.fn.initialize_paginator=function(){this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".gift_guide_listings > li",starting_page_num:this.param_data.page_number}),this.paginator.init()},Channel_Public_Gift_Guide.fn.set_active_states_on_search_params=function(loc){(2017<loc.gift_guide_template?($(".filter_by").removeClass("active"),$(String.format("li[data-sort-by={0}][data-filter-by={1}]",loc.param_data.sort_by,loc.param_data.featured))):($(".sort_by li").removeClass("active"),$(String.format("li[data-sort-by={0}]",loc.param_data.sort_by)).addClass("active"),$(".gg_nav_actions li.filter_by").removeClass("active"),$(String.format("li[data-filter-by={0}]",loc.param_data.featured)))).addClass("active")},Channel_Public_Gift_Guide.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end(page_load_get_more);loc.param_data.rewrite_url(),loc.set_active_states_on_search_params(loc),$.post(GLOBALS.WEB_ROOT_PATH.append("ultimategiftguide/gift-guide-posts-more"),{gift_guide_template:loc.gift_guide_template,start_row:results.start_row,end_row:results.end_row,sort_by:loc.param_data.sort_by,only_featured:loc.param_data.featured,keywords:loc.param_data.keywords},function(data){loading.remove();data=General.parse_json_if_needed(data);if(General.status_ok(data.status)){Paginator.remove_show_more();var _html,data=unescape(data.text),section_count=1,_html_list=new Array;
1if(page_load_get_more)for(var list_li=data.split("</li>"),section_count=Math.ceil((list_li.length-1)/loc.paginator.page_size),k=0;k<section_count;k++){var end_num=loc.paginator.page_size<list_li.length?loc.paginator.page_size:list_li.length,end_num=list_li.splice(0,end_num).join("</li>");/<li/.test(end_num)&&_html_list.push(end_num)}else _html_list.push(data);page_load_get_more&&($(".channel_gift_guide_main").remove(),$(".gift_guide_promo_listing").remove());for(k=0;k<section_count;k++){new String;for(var _custom_page_topper_ad_pages=AD_ZONES.specific_zones,m=0;m<_custom_page_topper_ad_pages.length;m++)$("#core77").hasClass(_custom_page_topper_ad_pages[m])&&_custom_page_topper_ad_pages[m];_html=(_html=(_html="<section class=' channel_gift_guide_main'><ul class='gift_guide_listings'>")+_html_list[k]+"</ul></section>")+String.format("<div class='gift_guide_promo_listing'>{0}</div>",$("#gift_guide_promo_zone").html()),$(_html).appendTo($(".gift_guide_sand_wrap"))}results.show_more&&Paginator.draw_show_more(loc.paginator)}})},Channel_Public_Gift_Guide.fn.init=function(){var loc=this;loc.base_init(),2017<=loc.gift_guide_template?$(".filter_by").live("click",function(e){$(".filter_by").removeClass("active");var sort_by=$(this).attr("data-sort-by"),filter_by=$(this).attr("data-filter-by");loc.param_data.featured="true"===filter_by,loc.param_data.sort_by=sort_by,$(this).addClass("active"),loc.get_posts(loc,!0)}):($(".sort_by li").click(function(){$(".sort_by li").removeClass("active");var sort_by=$(this).attr("data-sort-by");loc.param_data.sort_by=sort_by,$(this).addClass("active"),loc.get_posts(loc,!0)}),$(".gg_nav_actions li.filter_by").click(function(){$(".gg_nav_actions li.filter_by").removeClass("active");var filter_by=$(this).attr("data-filter-by");loc.param_data.featured="true"==filter_by,$(this).addClass("active"),loc.get_posts(loc,!0)})),$(".gg_w_p").bind("click",function(e){e.preventDefault(),$("#user_action_gg").hasClass("open")?($("#user_action_gg").removeClass("open"),$(this).text("h")):($("#user_action_gg").addClass("open"),$(this).text("r"))}),new Social_Widget_Count({url:[window.location.toString()]}).get_counts()},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Design_Guide_Channel_Parameters_Data,this.data.number_of_posts=parseInt(_obj.data.total_posts),this.shell_name="design_guide"}),Channel_Public_Macro_Design_Guide=(Channel_Public_Design_Guide.inherits(Channel_Public_Base),Channel_Public_Design_Guide.fn.initialize_paginator=function(){this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".design_guide_listings > li",starting_page_num:this.param_data.page_number,page_size:12}),this.paginator.init()},Channel_Public_Design_Guide.fn.ad_induction_handler=function(selector){for(var k=0;k<$(String.format(".design_guide_listings .{0}",selector)).length;k++){var $ad_slot=$($(String.format(".design_guide_listings .{0}",selector)).get(k)),this_ad_slot=$ad_slot.attr("id"),$ad_slot=$ad_slot.data("ad-type"),$ad_slot=Google_Ad_Induction.create_ad_slot({type:$ad_slot,unique_ad_slot_id:this_ad_slot});googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot($ad_slot)}},Channel_Public_Design_Guide.fn.setup_ad_induction=function(loc){General.do_when(function(){return window.googletag&&googletag.apiReady},function(){loc.ad_induction_handler("induced_ad")},300)},Channel_Public_Design_Guide.fn.set_active_states_on_search_params=function(loc){},Channel_Public_Design_Guide.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end(page_load_get_more);loc.param_data.rewrite_url(),loc.set_active_states_on_search_params(loc),$.post(GLOBALS.WEB_ROOT_PATH.append("home/resource-posts-more"),{channel_id:loc.data.channel_id,start_row:results.start_row,end_row:results.end_row,sort_by:loc.param_data.sort_by},function(data){loading.remove(),data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=unescape(data.text),$(data).appendTo($(".design_guide_listings")),loc.ad_induction_handler("induced_ad"),results.show_more&&Paginator.draw_show_more(loc.paginator),loc.auto_scroll_load.is_loading_results=!1)})},Channel_Public_Design_Guide.fn.init=function(){var loc=this;loc.base_init(),loc.setup_ad_induction(loc),$(".sort_by li").click(function(){var sort_by;$(this).hasClass("active")||(loading.create(),$(".sort_by li").removeClass("active"),sort_by=$(this).attr("data-sort-by"),loc.param_data.sort_by=sort_by,$(this).addClass("active"),$(".design_guide_listings").empty(),loc.get_posts(loc,!0))}),$(".big_action").live("click",function(e){e.stopPropagation()}),$(".favorite").live("click",function(event){event.preventDefault(),event.stopPropagation();var event=$(this),this_post_id=event.data("this-post-id"),this_user_id=event.data("this-author-id"),_action_taken=$(this).hasClass("already_taken")?"Favorite":"Favorited";loc.user_object_xref_add({success_message:General.success_text.design_guide_upvote,$this:event,action_taken_text:_action_taken,object_id:this_post_id,object_type:USER_OBJECT_XREF_TYPES.design_guide_upvote,post_user_id:this_user_id,override_text:"ignore this",extra_callback:function(post_id){var $favorite_count_wrap=$(String.format(".resource_item[data-post-id={0}] .fav_action .this_ac_count",post_id));0==$favorite_count_wrap.length?$("<div class='this_ac_count' data-number-of-favorites='1'>1</div>").appendTo($(String.format(".resource_item[data-post-id={0}] .fav_action",post_id))):(post_id=parseInt($favorite_count_wrap.data("number-of-favorites")),$favorite_count_wrap.text(post_id+1))}},loc)}),$(".resource_body_wrap .resource_link_out").live("click",function(e){e.stopPropagation()}),new Social_Widget_Count({url:[window.location.toString()]}).get_counts(),$(".view_rules").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"view_rules_modal",force_absolute:!0});e.set_form_to_wrap("view_rules"),e.set_form_width(600),e.draw_overlay(!0)})},function(_obj){Channel_Public_Base.call(this,_obj),this.param_data=new Design_Guide_Channel_Parameters_Data,this.data.number_of_posts=parseInt(_obj.data.total_posts)}),Design_Firms_Base=(Channel_Public_Macro_Design_Guide.inherits(Channel_Public_Base),Channel_Public_Macro_Design_Guide.fn.initialize_paginator=function(){this.paginator=new Paginator({row_count:this.data.number_of_posts,container_li:".design_guide_listings_macro .macro_item",starting_page_num:this.param_data.page_number,page_size:6}),this.paginator.init()},Channel_Public_Macro_Design_Guide.fn.ad_induction_handler=function(selector){for(var k=0;k<$(String.format(".design_guide_listings_macro .{0}",selector)).length;k++){var $ad_slot=$($(String.format(".design_guide_listings_macro .{0}",selector)).get(k)),this_ad_slot=$ad_slot.attr("id"),$ad_slot=$ad_slot.data("ad-type"),$ad_slot=Google_Ad_Induction.create_ad_slot({type:$ad_slot,unique_ad_slot_id:this_ad_slot});googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot($ad_slot)}},Channel_Public_Macro_Design_Guide.fn.setup_ad_induction=function(loc){General.do_when(function(){return window.googletag&&googletag.apiReady},function(){loc.ad_induction_handler("induced_ad")},300)},Channel_Public_Macro_Design_Guide.fn.set_active_states_on_search_params=function(loc){},Channel_Public_Macro_Design_Guide.fn.get_posts=function(loc,page_load_get_more){var results=loc.paginator.calc_start_end(page_load_get_more),_page_num=loc.paginator.get_page_number(),_partial_view="macro_resource_guide_list_option_1";try{_partial_view=_page_num%2==0?"macro_resource_guide_list_option_2":"macro_resource_guide_list_option_1"}catch(e){printf("error trying to extract page number from paginator")}loc.param_data.rewrite_url(),loc.set_active_states_on_search_params(loc),$.post(GLOBALS.WEB_ROOT_PATH.append("home/design-guide-macro-more"),{channel_id:loc.data.channel_id,start_row:results.start_row,end_row:results.end_row,sort_by:loc.param_data.sort_by,partial_view:_partial_view},function(data){loading.remove(),loc.paginator.remove_show_more_specific(),data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=unescape(data.text),page_load_get_more&&$(".design_guide_listings_macro").empty(),$(data).appendTo($(".design_guide_listings_macro")),loc.ad_induction_handler("induced_ad"),results.show_more)&&Paginator.draw_show_more(loc.paginator)})},Channel_Public_Macro_Design_Guide.fn.init=function(){var loc=this;loc.base_init(),$(".view_rules").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"view_rules_modal",force_absolute:!0});e.set_form_to_wrap("view_rules"),e.set_form_width(600),e.draw_overlay(!0)}),loc.setup_ad_induction(loc),$(".sort_by li").click(function(){$(".sort_by li").removeClass("active");var sort_by=$(this).attr("data-sort-by");loc.param_data.sort_by=sort_by,$(this).addClass("active"),loading.create(),loc.get_posts(loc,!0)}),new Social_Widget_Count({url:[window.location.toString()]}).get_counts()},function(_obj){Shell_Base.call(this,_obj),this.total_count=parseInt(_obj.total_count),this.paginator,this.data=new Sidebar_Filters({member_css_class:"search_form_member",extra_properties:["page_number"],shell_obj:this}),this.get_more_action_url="firms/search_for_firms_more"}),Design_Firms_Public=(Design_Firms_Base.inherits(Shell_Base),Design_Firms_Base.fn.get_data=function(loc,reset_page_number){reset_page_number=!General.is_null_empty_undefined(reset_page_number)&&reset_page_number,loc.data.page_number.value=1<loc.data.page_number.value?loc.data.page_number.value:1;var results=loc.paginator.calc_start_end(reset_page_number),params=(reset_page_number&&(loc.data.page_number.value="",loc.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.design_firms)),loc.data.rewriteURL());params.start_row=results.start_row,params.end_row=results.end_row,$.post(GLOBALS.ROOT_PATH.append(loc.get_more_action_url),params,function(data){var count_text_word,data=General.parse_json_if_needed(data);loading.remove(),General.status_ok(data.status)?(reset_page_number&&$("ul.firm_listings").empty(),0<data.total_count?""!=data.text.clean_white_space()&&$(data.text).appendTo($("ul.firm_listings")):alert("0 results found, please try to broaden your search"),loc.total_count=data.total_count,loc.paginator.reinit(loc.total_count),loc.reset_results_languague_on_search&&(count_text_word=1==loc.total_count?"Result":"Results",$("#post_count_header").text(String.format("{0} {1}",loc.total_count,count_text_word)))):message_slider(data.text,!0)}),null!=loc.get_data_ext&&loc.get_data_ext(params,loc)},Design_Firms_Base.fn.choose_tag=function(val,loc){$("#tag_list > li.current").attr("data-value")!=val&&($("#tag_list > li").removeClass("current"),$(String.format("#tag_list > li[data-value='{0}']",val)).addClass("current")),$("#specialties_select").val()!=val&&$("#specialties_select").val(val),loading.create(),loc.get_data(loc,!0)},Design_Firms_Base.fn.base_init=function(){var key_vals,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.data[index].value=val,loc.data[index].set_value_and_update_filter_members(val,loc.data.member_css_class,index,loc),_has_params=!0})),loc.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.design_firms),loc.paginator=new Paginator({row_count:loc.total_count,container_li:".firm_listings > li",starting_page_num:loc.data.page_number.value,page_size:30,container_id_to_append_show_more:"firm_listings"}),loc.paginator.init(),$("#tag_list > li").live("click",function(event){event.preventDefault();event=$(this).attr("data-value");loc.choose_tag(event,loc)}),$("#specialties_select").live("change",function(event){event.preventDefault();event=$(this).val();loc.choose_tag(event,loc)}),$("#sort_by").live("change",function(event){event.preventDefault(),loading.create(),loc.get_data(loc,!0)}),$("#show_more").live("click",function(event){loading.create(),loc.data.page_number.value=General.is_null_empty_undefined(loc.data.page_number.value)?2:parseInt(loc.data.page_number.value)+1,loc.get_data(loc)}),_has_params&&(loading.create(),loc.get_data(loc,!0))},function(_obj){Design_Firms_Base.call(this,_obj),this.get_more_action_url="firms/search_for_firms_more"}),Design_Firms_Projects_Public=(Design_Firms_Public.inherits(Design_Firms_Base),Design_Firms_Public.fn.init=function(){this.base_init()},function(_obj){Design_Firms_Base.call(this,_obj),this.get_more_action_url="firms/projects_more"}),Design_Firms_Projects_Details_Public=(Design_Firms_Projects_Public.inherits(Design_Firms_Base),Design_Firms_Projects_Public.fn.init=function(){this.base_init(),$(".bundle_action span").live("click",function(e){var firm_id=$(this).attr("data-bundle-group-id");e.stopPropagation(),$(String.format("li.primary[data-firm-id={0}]",firm_id)).hasClass("bundled")?($(String.format("li[data-firm-id={0}]",firm_id)).not(".primary").removeClass("hide").addClass("show"),$(String.format("li.primary[data-firm-id={0}]",firm_id)).removeClass("bundled").addClass("unbundled")):($(String.format("li[data-firm-id={0}]",firm_id)).not(".primary").removeClass("show").addClass("hide"),$(String.format("li.primary[data-firm-id={0}]",firm_id)).removeClass("unbundled").addClass("bundled"))})},function(_obj){Shell_Base.call(this,_obj)}),Plog_Public=(Design_Firms_Projects_Details_Public.inherits(Shell_Base),Design_Firms_Projects_Details_Public.fn.init=function(){(new Google_Lat_long_Geocode).get_lat_long($("#map_draw").attr("data-location-string"),function(coords){new Google_Map_It({id:"map_draw",latitude:coords.latitude,longitude:coords.longitude,zoom:11}).init()})},function(_obj){Shell_Base.call(this,_obj),this.data=new Plog_Public_Data(_obj.data),this.total_count=parseInt(_obj.total_count),this.page_number=1,this.paginator,this.comment_slider,this.recommend_slider,this.auto_scroll_load,this.started_ever_scroll=!1}),Plog_Public_Updated=(Plog_Public.inherits(Shell_Base),Plog_Public.fn.golden_layout_flex=function(_clbk,no_ad){FLEX_STOPS.layout.init(_clbk,!1),$(window).resize(function(){FLEX_STOPS.layout.init(_clbk,!1)})}
1,Plog_Public.fn.auto_scroll_page_up=function(loc){loc.auto_scroll_load=new List_Auto_Scroll_Load({shell_base:loc,show_more_id:"show_more",offset:100,is_loading_results:!1,show_more_clbk:function(loc){loc.is_loading_results=!0,Paginator.remove_show_more(),loc.shell_base.show_more(loc.shell_base)}}),loc.auto_scroll_load.init()},Plog_Public.fn.show_more=function(loc){loading.remove($("#main_wrapper .flex_col")),loading.create($("#main_wrapper .flex_col"),!0),loc.page_number=parseInt(loc.page_number)+1,window.location.hash=String.format("page_number={0}",loc.page_number),loc.get_posts(loc)},Plog_Public.fn.get_posts=function(loc,page_load_get_more){var results=(loc=this).paginator.calc_start_end(),param={user_id:loc.data.user_id,feed_page_type:1,activity_type:1,start_row:results.start_row,end_row:results.end_row};$.post(GLOBALS.ROOT_PATH.append("home/display-activity-feed-post"),param,function(data){loc.get_posts_callback(loc,data,results,page_load_get_more)})},Plog_Public.fn.init=function(){var key_vals,loc=this,_has_page_num=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(key_vals.page_number)||(loc.page_number=key_vals.page_number,_has_page_num=!0)),loc.paginator=new Paginator({row_count:loc.total_count,container_li:".golden_layout > li",starting_page_num:loc.page_number}),loc.paginator.init(),loc.auto_scroll_page_up(loc),loc.golden_layout_flex(function(){new Parallax_Scroll({keyframes:[{wrapper:$("#profile_head"),duration:$("#profile_head").height(),animations:[{selector:"#profile_head .profile_wrap img",translateY:[0,-400],opacity:[1,0]},{selector:"#profile_head .profile_wrap h1",translateY:[0,-310],opacity:[1,0]},{selector:"#profile_head .profile_wrap h3",translateY:[0,-280],opacity:[1,0]},{selector:"#profile_head .profile_wrap h4",translateY:[0,-260],opacity:[1,0]},{selector:"#profile_head .profile_wrap h4.member_since",translateY:[0,-230],opacity:[1,0]},{selector:"#profile_head",translateY:[0,100]}]}]}).init()},!1),$(".subscribe").click(function(event){event.preventDefault();event=$(this);loc.user_object_xref_add({success_message:General.success_text.user_subscribes,$this:event,action_taken_text:"Subscribed",object_id:loc.data.user_id,object_type:USER_OBJECT_XREF_TYPES.user_subscribes},loc)}),$("#show_more").live("click",function(event){loc.show_more(loc)}),$.ajax({url:String.format("https://boards.core77.com/profile_lookup.php?user_id={0}&callback=?",loc.data.user_id),dataType:"jsonp",success:function(data){var _html,star_rank,match_index,plural_ending_or_not,data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(_html=new String,0<data.number_of_posts)&&(star_rank=[{rank:"",stars:"<span class='has_star'>}</span>}}}}"},{rank:"",stars:"<span class='has_star'>}}</span>}}}"},{rank:"",stars:"<span class='has_star'>}}}</span>}}"},{rank:"",stars:"<span class='has_star'>}}}}</span>}"},{rank:"",stars:"<span class='has_star'>}}}}}</span>"},{rank:"Moderator",stars:"<span class='has_star'>}}}}}</span>"},{rank:"Administrator",stars:"<span class='has_star'>}}}}}</span>"}],match_index=["one","two","three","four","self-realization","Moderator","Administration"].indexOf(data.number_of_stars),plural_ending_or_not=1<parseInt(data.number_of_posts)?"s":"",_html+=String.format("<span class='steps'>Community Rank: {0} <em class='c77_icon'>{1}</em></span><span class='forum_posts'>{2} Forum Post{3}</span>",star_rank[match_index].rank,star_rank[match_index].stars,data.number_of_posts,plural_ending_or_not),$(_html).appendTo($("#disccusion_data")),$("#disccusion_data").removeClass("hide"))}}),_has_page_num&&(loading.create(),loc.get_posts(loc,!0))},function(_obj){Shell_Base.call(this,_obj),this.data=new Plog_Public_Data(_obj.data),this.total_count=parseInt(_obj.total_count),this.page_number=1,this.paginator,this.paginator_list=[],this.current_list_id=0,this.user_id=General.is_null_empty_undefined(_obj.user_id)?0:_obj.user_id}),Account_Page_Base=(Plog_Public_Updated.inherits(Shell_Base),Plog_Public_Updated.fn.get_posts=function(loc,_current_paginator){var results=_current_paginator.paginator.calc_start_end(),loc={user_id:loc.user_id,start_row:results.start_row,end_row:results.end_row};$.post(_current_paginator.endpoint,loc,function(data){printf(data),data=General.parse_json_if_needed(data),General.status_ok(data.status)&&$(data.text).appendTo($(String.format("[data-list-id={0}] .data_add_zone",_current_paginator.identifier))),Paginator.draw_show_more(_current_paginator.paginator)})},Plog_Public_Updated.fn.setup_paginator_list=function(loc){for(var k=0;k<$("#activity_segment_wrap li").length;k++){var $this=$($("#activity_segment_wrap li").get(k));if(!$this.data("paginator-ignore")){var list_id=$this.data("list-id-use"),total_count=(0!=k?$(String.format("[data-list-id={0}]",list_id)).addClass("hide"):($this.addClass("active"),loc.current_list_id=list_id),$this.data("total-count")),$this=$this.data("list-item-node"),_endpoint="";switch(parseInt(list_id)){case 1:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_upvoted_guide_items_more");break;case 2:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_favorited_blog_posts_more");break;case 3:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_favorited_postlets_more");break;case 4:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_user_comments_more");break;case 5:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_guide_items_more");break;case 6:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_reader_projects_more");break;case 7:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_gift_guides_more");break;case 8:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_blog_posts_more");break;case 9:_endpoint=GLOBALS.PUBLISH_ROOT_PATH.append("home/plog_gallery_posts_more")}$this=String.format("[data-list-id={0}] .data_add_zone > {1}",list_id,$this),list_id=new Multi_Paginator_Shell({identifier:list_id,paginator:new Paginator({row_count:total_count,container_li:$this,starting_page_num:1,page_size:12,is_plog_page:!0}),endpoint:_endpoint});0==k&&list_id.paginator.init(),loc.paginator_list.push(list_id)}}},Plog_Public_Updated.fn.get_current_paginator=function(loc){for(var _current_paginator=null,k=0;k<loc.paginator_list.length;k++)loc.paginator_list[k].identifier==loc.current_list_id&&(_current_paginator=loc.paginator_list[k]);return _current_paginator},Plog_Public_Updated.fn.init=function(){var loc=this;loc.setup_paginator_list(loc),$("#activity_segment_wrap li").live("click",function(e){var list_id,$this=$(this);$this.hasClass("active")||(list_id=$this.data("list-id-use"),loc.current_list_id=list_id,loc.get_current_paginator(loc).paginator.init(),$("#activity_segment_wrap li").removeClass("active"),$this.addClass("active"),$("[data-list-id]").addClass("hide"),$(String.format("[data-list-id={0}]",list_id)).removeClass("hide"))}),$("#show_more").live("click",function(event){Paginator.remove_show_more();var _current_paginator=loc.get_current_paginator(loc);loc.get_posts(loc,_current_paginator,!1)})},function(_obj){Shell_Base.call(this,_obj)}),All_Posts_Account=(Account_Page_Base.inherits(Shell_Base),Account_Page_Base.fn.base_init=function(){this.shell_base_init(),General.is_browser_block()&&$(Shell_Base.create_block_browser()).appendTo("#core77")},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="all_posts_account",this.published_count=parseInt(_obj.total_posts),this.data=new Create_Obj_From_Form_Nodes({form_id:"search_published_posts",extra_properties:["page_number"],shell_obj:this}),this.paginator,this.total_posts=parseInt(_obj.total_posts)}),Awards_Account=(All_Posts_Account.inherits(Account_Page_Base),All_Posts_Account.fn.get_posts=function(loc,reset_page_number){reset_page_number=!General.is_null_empty_undefined(reset_page_number)&&reset_page_number,loc.data.page_number.value=1<loc.data.page_number.value?loc.data.page_number.value:1;var results=loc.paginator.calc_start_end(reset_page_number),params=(reset_page_number&&(loc.data.page_number.value=""),loc.data.rewriteURL());params.start_row=results.start_row,params.end_row=results.end_row,params.status="5",$.post(GLOBALS.ROOT_PATH.append("account/posts-more"),params,function(data){data=General.parse_json_if_needed(data);loading.remove(),General.status_ok(data.status)?(reset_page_number&&$("ul.listing").empty(),$(data.text).appendTo($("ul.listing")),loc.total_posts=data.total_count,loc.paginator.reinit(loc.total_posts)):message_slider(data.text,!0)})},All_Posts_Account.fn.init=function(){var key_vals,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.data[index].set_value_and_update_form(val,loc.data.form_id,index),_has_params=!0})),loc.paginator=new Paginator({row_count:loc.total_posts,container_li:".listing > li",starting_page_num:loc.data.page_number.value}),loc.paginator.init(),loc.base_init(),$("#create_new").click(function(e){var $this=$(this),$this=(Selection.clear_selection(),new Post_Type_Menu({actions:["post","gallery","calendar"],parent:$this.parent(),appendTo_id:"create_new"}));loc.add_menu($this),$this.render()}),$("#show_more").live("click",function(event){loading.create(),loc.data.page_number.value=General.is_null_empty_undefined(loc.data.page_number.value)?2:parseInt(loc.data.page_number.value)+1,loc.get_posts(loc)}),$("#search_published_posts #search_posts").live("click",function(event){event.preventDefault(),loading.create(),loc.get_posts(loc,!0)}),_has_params&&loc.get_posts(loc,!0)},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="awards_account"}),Account_Settings=(Awards_Account.inherits(Account_Page_Base),Awards_Account.fn.init=function(){var loc=this;loc.base_init(),loc.golden_layout_flex(null,!0),$("#paid_award_entries li a").click(function(event){var status_update_modal;$(this).attr("href").contains("award-entry-preview")||(event.preventDefault(),event=new String,event+="<div class='generic_message'><h3>Hang on there</h3><p>Your award entry has been submitted and is currently being reviewed by our team. Since your entry has been submitted it can no longer be edited.</p><ul class='modal_bottom'><li class='quick_m_close' style='margin-top: 20px;'><a href='#' class='btn'>Close</a></li></ul></div>",(status_update_modal=new Quick_Modal({appendTo:"core77"})).set_form_width(500),status_update_modal.set_content(event),status_update_modal.draw_overlay())}),$("#incomplete_award_entries .delete_draft").click(function(e){confirm("You are about to delete this award entry and all of its contents. This can't be und
1one, are you sure you wish do delete?")&&(loading.create(),$.post(GLOBALS.ROOT_PATH+"account/post_delete",{post_id:$(this).attr("data-post-id")},function(data){General.status_ok(data.status,loc)&&(window.location="/account/awards")},"json"))}),$("#paid_award_entries li .resend_invoice").click(function(event){event.preventDefault();var event=$(this).attr("data-post-id"),_html=new String,get_invoice_by_email=(_html=(_html=_html+"<div class='generic_message' id='get_awards_invoice_modal'><h3>Get your invoice delivered to your email</h3>"+"<p>Please add an email address below to get your invoice sent out to you.</p>")+String.format("<p><input type='text' id='email_for_invoice' value=''/><br/><span class='btn' data-post-id='{0}' id='get_my_invoice'>Send my invoice</span></p>",event)+"<ul class='modal_bottom'><li class='quick_m_close' style='margin-top: 20px;'><a href='#' class=''>Cancel</a></li></ul></div>",new Quick_Modal({appendTo:"core77",close_clbk:function(){$("#get_my_invoice").die("click")}}));get_invoice_by_email.set_form_width(500),get_invoice_by_email.set_content(_html),get_invoice_by_email.draw_overlay(),$("#get_my_invoice").live("click",function(e){var _email=$("#get_awards_invoice_modal #email_for_invoice").val(),_post_id=$(this).attr("data-post-id");_email.is_valid_email()?General.is_null_empty_undefined(_post_id)?alert("Please try again. If this persists please contact support for assitance."):$.post("/account/resend_my_award_entry_invoice",{post_id:_post_id,email:_email},function(data){General.status_ok(data.status)?(alert("Your invoice was sent to "+_email),get_invoice_by_email.remove_overlay()):alert(data.text)}):alert("Please enter a valid email address")})})},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="account_settings"}),Profile_Base=(Account_Settings.inherits(Account_Page_Base),Account_Settings.fn.init=function(){this.base_init(),$(".input_change").click(function(){var $change_fields=$(this).parent().parent().find("ul");$change_fields.hasClass("hide")?$change_fields.removeClass("hide"):$change_fields.addClass("hide")}),$(".radio_btn li").live("click",function(e){var $this=$(this),_action=$this.find("span").attr("data-radio-action");$("#newsletter_section li span").removeClass("checked").addClass("unchecked"),$this.find("span").addClass("checked"),$("#"+_action).trigger("click")}),$("#update_email").live("click",function(event){var _email=$("#user_setting_new_email").val();$.post(GLOBALS.PUBLISH_ROOT_PATH_SECURE.append("account/settings_change_email"),{new_email:_email},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?message_slider(General.success_text.email_updated):message_slider(data.text,!0)})}),$("#update_password").live("click",function(event){var _current_password=$("#user_setting_current_password").val(),_new_password=$("#user_setting_new_password").val(),_confirm_password=$("#user_setting_confirm_password").val();message_slider.close(),$.post(GLOBALS.PUBLISH_ROOT_PATH_SECURE.append("account/settings_change_password"),{current_password:_current_password,new_password:_new_password,confirm_new_password:_confirm_password},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?message_slider(General.success_text.password_updated):message_slider(data.text,!0)})})},function(_obj){Shell_Base.call(this,_obj),this.f_uid=General.is_null_empty_undefined(_obj.f_uid)?0:_obj.f_uid}),Profiles_Firms_Account=(Profile_Base.inherits(Shell_Base),Profile_Base.fn.base_init=function(){$("[data-firm-profile-delete]").live("click",function(e){e.stopPropagation();e=$(this).attr("data-profile-id");confirm("Are you sure you want to delete this profile and all the associated data? This can not be undone.")&&(loading.create(),$.post("/account/profile_delete",{profile_id:e},function(data){General.status_ok(data.status)&&(window.location="/account/design-companies")}))})},function(_obj){Profile_Base.call(this,_obj)}),Profile_Edit=(Profiles_Firms_Account.inherits(Profile_Base),Profiles_Firms_Account.fn.init=function(){this.base_init()},function(_obj){Profile_Base.call(this,_obj),this.shell_type="profile_type_base_account",this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?0:_obj.profile_id;General.is_null_empty_undefined(_obj.data_profile_image)||(this.profile_image=new Avatar_Image({src:_obj.data_profile_image.image.url,file_id:_obj.data_profile_image.image.id,dimension:new Dimensions({width:_obj.data_profile_image.image.width,height:_obj.data_profile_image.image.height}),crop_rectangle:new Crop_Rectangle({x1:_obj.data_profile_image.crop.x1,x2:_obj.data_profile_image.crop.x2,y1:_obj.data_profile_image.crop.y1,y2:_obj.data_profile_image.crop.y2}),crop_source_image:new Image_Base({src:_obj.data_profile_image.source.url,file_id:_obj.data_profile_image.source.id,dimension:new Dimensions({width:_obj.data_profile_image.source.width,height:_obj.data_profile_image.source.height})}),shell_obj:this})),this.addition_units_modal="",this.instance_profile_link="",this.instance_profile_inquiry="",this.instance_profile_award_press="",this.instance_profile_location="",this.profile_image_menu="",this.sending_count=0,this.error_list={},this.profile_has_changed=!1,this.auto_save_timeout,this.auto_save_interval=3e4}
1),Profile_Firm=(Profile_Edit.inherits(Profile_Base),Profile_Edit.fn.save_callback_default=function(_text,loc,alert_even_on_no_change){General.do_when(function(){return 0==loc.sending_count},function(){message_slider.close();var error_stack,has_errors=!1;$.each(loc.error_list,function(index,val){null!=val&&(has_errors=!0)}),has_errors?(error_stack=[],$.each(loc.error_list,function(index,val){null!=val&&error_stack.push(val)}),message_slider(error_stack,!0)):loc.post_has_changed?message_slider(_text):alert_even_on_no_change&&message_slider("There are no new changes to save")},200)},Profile_Edit.fn.is_auto_savable=function(loc){return!0},Profile_Edit.fn.auto_save=function(){var loc=this;loc.is_auto_savable(loc)&&(printf("auto-saving.........."),loc.save(function(){loc.save_callback_default(General.success_text.profile_auto_saved,loc,!1)}),loc.auto_save_timeout=setTimeout(function(){loc.auto_save()},loc.auto_save_interval))},Profile_Edit.fn.save_from_button=function(_clbk){this.save(_clbk)},Profile_Edit.fn.save=function(_clbk){var loc=this;loc.set_profile_attributes(),printf(loc.data,"save_data"),General.is_valid_callback(_clbk)&&_clbk(),loc.is_auto_savable(loc)&&(clearTimeout(loc.auto_save_timeout),loc.auto_save_timeout=setTimeout(function(){loc.auto_save()},loc.auto_save_interval))},Profile_Edit.fn.get_compare_data_obj=function(){return new Firm_Profile_Data},Profile_Edit.fn.set_attributes_json_callback=function(data,loc,_key){data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?(null!=loc.error_list&&null!=loc.error_list[_key]&&(loc.error_list[_key]=void 0),loc.profile_has_changed=!0):loc.error_list[_key]=data.text,loc.sending_count--},Profile_Edit.fn.ext_set_profile_attributes=function(com_data_obj,loc){},Profile_Edit.fn.set_profile_attributes=function(){var loc=this,com_data_obj=(loc.sending_count=0,loc.profile_has_changed=!1,loc.get_compare_data_obj());com_data_obj.name=$("#name").val(),com_data_obj.main_webite=$("#main_website").val(),com_data_obj.description=$("#description").val(),com_data_obj.year_founded=$("#year_founded").val(),com_data_obj.affiliations=$("#affiliations").val(),com_data_obj.name==loc.data.name&&null==loc.error_list.name||(loc.data.name=com_data_obj.name,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_name_update",{profile_id:loc.data.profile_id,name:loc.data.name},function(data){loc.set_attributes_json_callback(data,loc,"name")},"json")),com_data_obj.main_webite==loc.data.main_webite&&null==loc.error_list.main_webite||(loc.data.main_webite=com_data_obj.main_webite,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_main_website_update",{profile_id:loc.data.profile_id,main_website:loc.data.main_webite},function(data){loc.set_attributes_json_callback(data,loc,"main_webite")},"json")),com_data_obj.description==loc.data.description&&null==loc.error_list.description||(loc.data.description=com_data_obj.description,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_description_update",{profile_id:loc.data.profile_id,description:loc.data.description},function(data){loc.set_attributes_json_callback(data,loc,"description")},"json")),com_data_obj.year_founded==loc.data.year_founded&&null==loc.error_list.year_founded||(loc.data.year_founded=com_data_obj.year_founded,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_year_founded_update",{profile_id:loc.data.profile_id,year_founded:loc.data.year_founded},function(data){loc.set_attributes_json_callback(data,loc,"year_founded")},"json")),com_data_obj.affiliations==loc.data.affiliations&&null==loc.error_list.affiliations||(loc.data.affiliations=com_data_obj.affiliations,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_affiliations_update",{profile_id:loc.data.profile_id,affiliations:loc.data.affiliations},function(data){loc.set_attributes_json_callback(data,loc,"affiliations")},"json")),loc.ext_set_profile_attributes(com_data_obj,loc)},Profile_Edit.fn.add_edit_addition_unit=function(loc,_type,_unit_id){switch(_type){case"link":loc.addition_units_modal.set_draw_overlay_and_close_clbk({draw_overlay_clbk:function(){loc.instance_profile_link=new Profile_Link_Unit({wrap_modal_ref:loc.addition_units_modal,add_to_dom:!0,save_callback:function(){}}),loc.instance_profile_link.init()},close_clbk:function(){loc.instance_profile_link.destroy()}}),$.post("/account/add_edit_link",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){loading.remove(),General.status_ok(data.status)&&(loc.addition_units_modal.remove_overlay(),loc.addition_units_modal.set_attach_class("addition_units_add_edit"),loc.addition_units_modal.set_content(data.data),loc.addition_units_modal.set_scroll_location($(window).scrollTop()),loc.addition_units_modal.draw_overlay())});break;case"inquiry":loc.addition_units_modal.set_draw_overlay_and_close_clbk({draw_overlay_clbk:function(){loc.instance_profile_inquiry=new Profile_Inquiry_Unit({wrap_modal_ref:loc.addition_units_modal,add_to_dom:!0,save_callback:function(){}}),loc.instance_profile_inquiry.init()},close_clbk:function(){loc.instance_profile_inquiry.destroy()}}),$.post("/account/add_edit_inquiry",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(loc.addition_units_modal.remove_overlay(),loc.addition_units_modal.set_attach_class("addition_units_add_edit"),loc.addition_units_modal.set_content(data.data),loc.addition_units_modal.set_scroll_location($(window).scrollTop()),loc.addition_units_modal.draw_overlay())});break;case"award_press":loc.addition_units_modal.set_draw_overlay_and_close_clbk({draw_overlay_clbk:function(){loc.instance_profile_award_press=new Profile_Award_Press_Unit({wrap_modal_ref:loc.addition_units_modal,add_to_dom:!0,save_callback:function(){}}),loc.instance_profile_award_press.init()},close_clbk:function(){loc.instance_profile_award_press.destroy()}}),$.post("/account/add_edit_award_press",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(loc.addition_units_modal.remove_overlay(),loc.addition_units_modal.set_attach_class("addition_units_add_edit"),loc.addition_units_modal.set_content(data.data),loc.addition_units_modal.set_scroll_location($(window).scrollTop()),loc.addition_units_modal.draw_overlay())});break;case"location":loc.addition_units_modal.set_draw_overlay_and_close_clbk({draw_overlay_clbk:function(){loc.instance_profile_location=new Profile_Location_Unit({wrap_modal_ref:loc.addition_units_modal,add_to_dom:!0,save_callback:function(){}}),loc.instance_profile_location.init()},close_clbk:function(){loc.instance_profile_location.destroy()}}),$.post("/account/add_edit_location",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(loc.addition_units_modal.remove_overlay(),loc.addition_units_modal.set_attach_class("addition_units_add_edit"),loc.addition_units_modal.set_content(data.data),loc.addition_units_modal.set_scroll_location($(window).scrollTop()),loc.addition_units_modal.draw_overlay())})}},Profile_Edit.fn.init=function(){var loc=this;loc.base_init(),loc.profile_image_menu=new Profile_Image_Menu({actions:["upload"],shell_obj:loc.profile_image,f_uid:loc.f_uid,profile_id:loc.profile_id}),loc.profile_image_menu.init(),$("#profile_image_menu [data-button=upload]").click(function(event){loc.profile_image_menu.make_upload(null,loc.profile_image_menu)}),loc.addition_units_modal=new Quick_Modal({use_modern_centering:!0,new_animation:!1,extra_class:"addition_units_add_edit",is_no_scroll:!0,save_scroll_spot:!0,shell_obj:loc}),$(".addition_units .new_unit").live("click",function(e){var $this=$(this),_type=$this.attr("data-type"),_max_limit=$this.attr("data-ml");
1if($this.parents(".addition_units").find(".unit_saved_container .unit_saved").length<_max_limit)switch(loading.create(),_type){case"new_link":loc.add_edit_addition_unit(loc,"link",0);break;case"new_inquiry":loc.add_edit_addition_unit(loc,"inquiry",0);break;case"new_award_press":loc.add_edit_addition_unit(loc,"award_press",0);break;case"new_location":loc.add_edit_addition_unit(loc,"location",0)}else{var _type_as_word="";switch(_type){case"new_link":_type_as_word=General.plural_handler(_max_limit,"Link","s");break;case"new_inquiry":_type_as_word=General.plural_handler(_max_limit,"Inquiry","","Inquiries");break;case"new_award_press":_type_as_word=General.plural_handler(_max_limit,"Award/Press","","Awards/Press");break;case"new_location":_type_as_word=General.plural_handler(_max_limit,"Location","s")}alert(String.format("You can only add a max of {0} {1}",_max_limit,_type_as_word))}}),$(".action_menu > span").live("click",function(e){var $this=$(this),_action=$this.attr("data-action"),_type=$this.attr("data-type"),_unit_id=$this.attr("data-id");switch(loading.create(),_action){case"edit":loc.add_edit_addition_unit(loc,_type,_unit_id);break;case"delete":switch(_type){case"link":$.post("/account/profile_link_delete",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_links .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_links .unit_saved_container")))});break;case"inquiry":$.post("/account/profile_inquiry_delete",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_inquiries .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_inquiries .unit_saved_container")))});break;case"award_press":$.post("/account/profile_award_press_delete",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_awards_press .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_awards_press .unit_saved_container")))});break;case"location":$.post("/account/profile_location_delete",{profile_id:loc.profile_id,unit_id:_unit_id},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_locations .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_locations .unit_saved_container")))})}}}),$("#profile_links_sortable").sortable({cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight-reorder",scroll:!0,update:function(event,ui){loading.create();var sort_order=$(this).sortable("toArray",{attribute:"data-id"}).toString();printf(sort_order),$.post("/account/profile_link_order_update",{profile_id:loc.profile_id,order_csv:sort_order},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_links .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_links .unit_saved_container")))})}}),$("#profile_links_sortable").disableSelection(),$("#profile_inquiries_sortable").sortable({cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight-reorder",scroll:!0,update:function(event,ui){loading.create();var sort_order=$(this).sortable("toArray",{attribute:"data-id"}).toString();printf(sort_order),$.post("/account/profile_inquiry_order_update",{profile_id:loc.profile_id,order_csv:sort_order},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_inquiries .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_inquiries .unit_saved_container")))})}}),$("#profile_inquiries_sortable").disableSelection(),$("#profile_locations_sortable").sortable({cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight-reorder",scroll:!0,update:function(event,ui){loading.create();var sort_order=$(this).sortable("toArray",{attribute:"data-id"}).toString();printf(sort_order),$.post("/account/profile_location_order_update",{profile_id:loc.profile_id,order_csv:sort_order},function(data){General.status_ok(data.status)&&(loading.remove(),General.status_ok(data.status))&&(data=unescape(data.data),$("div.addition_units.profile_locations .unit_saved_container").empty(),$(data).appendTo($("div.addition_units.profile_locations .unit_saved_container")))})}}),$("#profile_locations_sortable").disableSelection(),setTimeout(function(){loc.auto_save()},loc.auto_save_interval),$("#save_btn").click(function(e){e.preventDefault(),loc.save_from_button(function(){loc.save_callback_default(General.success_text.post_saved,loc,!0)})}),loc.ext_init()},Profile_Edit.fn.ext_init=function(){},function(_obj){Profile_Edit.call(this,_obj);_obj=General.is_null_empty_undefined(_obj.data)?new Object:_obj.data;this.data=new Firm_Profile_Data(_obj)}),Profile_Firm_Manage_Subscription=(Profile_Firm.inherits(Profile_Edit),Profile_Firm.fn.get_compare_data_obj=function(){return new Firm_Profile_Data},Profile_Firm.fn.ext_set_profile_attributes=function(com_data_obj,loc){com_data_obj.employees=$("#employees").val(),com_data_obj.clients=$("#clients").val(),com_data_obj.ga_code=$("#ga_code").val(),com_data_obj.firm_type=$("#type_of_firm").val(),com_data_obj.employees==loc.data.employees&&null==loc.error_list.employees||(loc.data.employees=com_data_obj.employees,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_employees_update",{profile_id:loc.data.profile_id,employees:loc.data.employees},function(data){loc.set_attributes_json_callback(data,loc,"employees")},"json")),com_data_obj.ga_code==loc.data.ga_code&&null==loc.error_list.ga_code||(loc.data.ga_code=com_data_obj.ga_code,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_ga_code_update",{profile_id:loc.data.profile_id,ga_code:loc.data.ga_code},function(data){loc.set_attributes_json_callback(data,loc,"ga_code")},"json")),com_data_obj.clients==loc.data.clients&&null==loc.error_list.clients||(loc.data.clients=com_data_obj.clients,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_clients_update",{profile_id:loc.data.profile_id,clients:loc.data.clients},function(data){loc.set_attributes_json_callback(data,loc,"clients")},"json")),com_data_obj.firm_type==loc.data.firm_type&&null==loc.error_list.firm_type||(loc.data.firm_type=com_data_obj.firm_type,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_firm_type_update",{profile_id:loc.data.profile_id,firm_type:loc.data.firm_type},function(data){loc.set_attributes_json_callback(data,loc,"firm_type")},"json")),com_data_obj.specialties=loc.get_checkbox_checked_as_array($("#profile_specialties > li > div")),com_data_obj.specialties.toString()==loc.data.specialties.toString()&&null==loc.error_list.specialties||(loc.data.specialties=com_data_obj.specialties,loc.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/profile_specialty_update",{profile_id:loc.data.profile_id,specialty_ids:loc.data.specialties.toString()},function(data){loc.set_attributes_json_callback(data,loc,"specialties")},"json"))},Profile_Firm.fn.ext_init=function(){var loc=this;$("#profile_specialties .checkbox_wrap").live("click",function(event){var $this=$(this);loc.checkbox_handler($this,function($passed_this){3<loc.get_checkbox_checked_as_array($("#profile_specialties > li > div")).length&&(alert("You can only have a max of 3 specialties selected for your profile."),loc.checkbox_handler($passed_this))},function($passed_this){})}),new Modern_Radio_Button({hidden_input_id:"type_of_firm",radio_group_parent_id:"profile_firm_type_radio_wrap"}).init()},function(_obj){this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?0:_obj.profile_id,this.end_on=General.is_null_empty_undefined(_obj.end_on)?0:_obj.end_on}),Profile_Individual=(Profile_Firm_Manage_Subscription.inherits(Shell_Base),Profile_Firm_Manage_Subscription.cancel_handler=function(en
1d_date,profile_id){window.confirm(String.format("Are you sure you want to cancel your Core77 Company Profile Subscription? You will be able to continue to use your subscription until {0} if you cancel now.",end_date))&&$.post("/account/unsubscribe-from-premium-listing",{profile_id:profile_id},function(data){General.status_ok(data.status)?window.location=String.format("{0}&r=y",window.location):alert(data.text)})},Profile_Firm_Manage_Subscription.fn.init=function(){var loc=this;$("#cancel_subscription_renewal").live("click",function(e){Profile_Firm_Manage_Subscription.cancel_handler(loc.end_on,loc.profile_id)})},function(_obj){Account_Page_Base.call(this,_obj);this.shell_type="profile_individual_account",this.avatar_image=new Avatar_Image({src:_obj.data.image.url,file_id:_obj.data.image.id,dimension:new Dimensions({width:_obj.data.image.width,height:_obj.data.image.height}),crop_rectangle:new Crop_Rectangle({x1:_obj.data.crop.x1,x2:_obj.data.crop.x2,y1:_obj.data.crop.y1,y2:_obj.data.crop.y2}),crop_source_image:new Image_Base({src:_obj.data.source.url,file_id:_obj.data.source.id,dimension:new Dimensions({width:_obj.data.source.width,height:_obj.data.source.height})}),shell_obj:this})}),Admin_Profile_Edit=(Profile_Individual.inherits(Account_Page_Base),Profile_Individual.fn.get_fields=function(){var filtered_about=General.sanitize_html_out_form_field("#user_profile_about");return{return_via_json:!0,"user_profile.first_name":$("#user_profile_first_name").val(),"user_profile.last_name":$("#user_profile_last_name").val(),"user_profile.user_title":$("#user_profile_user_title").val(),"user_profile.company_name":$("#user_profile_company_name").val(),"user_profile.handle":$("#user_profile_handle").val(),"user_profile.about":filtered_about,"user_profile.external_link_1":$("#user_profile_external_link_1").val(),"user_profile.external_link_2":$("#user_profile_external_link_2").val(),"user_profile.external_link_3":$("#user_profile_external_link_3").val(),"user_profile.location.location_string":$("#location").val(),"user_profile.location.address1":$("#address_1").val(),"user_profile.location.city":$("#city").val(),"user_profile.location.zip":$("#zip").val(),"user_profile.location.state_abbreviation":$("#state_abbreviation").val(),"user_profile.location.country_abbreviation":$("#country_abbreviation").val(),"user_profile.location.latitude":$("#latitude").val(),"user_profile.location.longitude":$("#longitude").val()}},Profile_Individual.fn.shared_init=function(loc){new Google_Location_Geocode({exclude_error_class:!0}).init(),$("input, textarea").click(function(){$(this).hasClass("error")&&$(this).removeClass("error").prev().find("em").text("*Required").removeClass("error")}),$("#user_profile_about").blur(function(){General.sanitize_html_out_form_field("#user_profile_about")})},Profile_Individual.fn.init=function(){var loc=this;loc.base_init(),loc.shared_init(loc),$("#tr_save").live("click",function(e){$("#submit_profile").click()}),new Avatar_Image_Menu({actions:["upload","crop"],shell_obj:loc.avatar_image}).init(),$("#submit_profile").click(function(e){e.preventDefault(),0==$("#user_profile .error").length&&(loading.create(),e=loc.get_fields(),$.ajax({type:"POST",url:"/account/edit-profile",data:e,dataType:"json",success:function(data){loading.remove();var choose_your_adventure,data=General.parse_json_if_needed(data);General.status_ok(data.status)?(loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:"",remain_logged_in:!0,user:new User({name:String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()),avatar:$("#avatar_wrapper img").attr("src"),link:String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),$("#user_profile_handle").val()),profile_complete:!General.is_null_empty_undefined($("#user_profile_first_name").val())&&!General.is_null_empty_undefined($("#user_profile_last_name").val())&&!General.is_null_empty_undefined($("#user_profile_handle").val())})},loc),"true"==$("#just_activated").val()&&((choose_your_adventure=new Quick_Modal({appendTo:"core77",attach_class:"no_styles"}
1)).set_form_width(935),choose_your_adventure.set_form_to_wrap("profile_complete_actions"),choose_your_adventure.draw_overlay()),message_slider(General.success_text.profile_saved)):$.each(data.errors,function(index,val){var $selector=0<$(String.format("input[name='{0}']",this.key)).length?$(String.format("input[name='{0}']",this.key)):$(String.format("textarea[name='{0}']",this.key));(/(location)/.test(this.key)?$("#location").addClass("error").prev().find("em").text("Please enter a valid location"):$selector.addClass("error").prev().find("em").text(this.message)).addClass("error")})}}))})},function(_obj){Profile_Individual.call(this,_obj),this.f_uid=_obj.f_uid}),Manage_Nav=(Admin_Profile_Edit.inherits(Profile_Individual),Admin_Profile_Edit.fn.init=function(){this.base_init(),this.shared_init(this),new Avatar_Image_Menu({actions:["upload","crop"],shell_obj:this.avatar_image,f_uid:this.f_uid}).init()},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="manage_nav_account"}),Manage_List_Base=(Manage_Nav.inherits(Account_Page_Base),Manage_Nav.fn.set_up_sortable=function(_id,is_top_level,url_action){var options={cursor:"move",handle:".move",revert:!0,placeholder:"ui-state-highlight",scroll:!0,update:function(event,ui){var params={channel_ids:$(this).sortable("toArray",{attribute:"data-channel-id"}).toString(),top_level_channels:is_top_level};$.post(GLOBALS.ROOT_PATH+"/account/"+url_action,params,function(data){})}};$(_id).sortable(options),$(_id).disableSelection()},Manage_Nav.fn.create_list_item=function(_obj){var _html=new String,_move_class=_obj.active?"<span class='move c77_icon'>h</span>":"",_action_text=_obj.active?"deactivate c77_icon'><span>r</span>":"activate'><span>Feature Channel</span>",_action_edit_text=_obj.active?"edit_channel c77_icon'>A":"'>Edit",_inactive_extra_nodes=_obj.active?"":String.format("<h3>Posts: {0} <a href='{1}' target='_blank' style='font-size: 14px; margin-left: 10px;' class='c77_icon'>x</a></h3>",_obj.number_of_posts,_obj.link),_title_node=_obj.active?"a":"h1",_href_needed=_obj.active?"href='#'":"";return(_html+=String.format("<li data-channel-id='{0}' data-number-of-posts='{1}' data-link='{2}'>",_obj.channel_id,_obj.number_of_posts,_obj.link))+String.format("{0}<{1} {2}>{3}</{1}>{4}",_move_class,_title_node,_href_needed,_obj.title,_inactive_extra_nodes)+String.format("<ul class='meta post_actions'><li data-action='set_state' class='{0}</li><li class='{1}</li></ul></li>",_action_text,_action_edit_text)},Manage_Nav.fn.init=function(){var loc=this;loc.set_up_sortable("ul#active_in_nav",!1,"channels_reorder"),loc.set_up_sortable("ul#active_in_nav_channel_collections",!1,"channel_collections_reorder"),$("li.edit_channel").live("click",function(event){var $this=$(this),menu_coords=new Coordinates;menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top);var param={channel_id:$this.parent().parent().attr("data-channel-id")};$.ajax({type:"POST",url:GLOBALS.ROOT_PATH.append("account/channel_get_manage_nav"),data:param,dataType:"json",success:function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=new Edit_Channel_Menu({actions:["channel_name","channel_manager","save","edit_details"],coords:menu_coords,parent:$this.parent(),appendTo_id:"body",channel_name:data.channel.name,channel_description:data.channel.description,channel_id:data.channel.id,channel_manager:data.channel.user_name,channel_manager_id:data.channel.user_id,users_channel_manage:data.channel.users_channel_manage,shell_obj:loc}),loc.add_menu(data),data.render())}})}),$("li[data-action=set_state]").live("click",function(event){var $this=$(this),_title=($this.hasClass("activate")?$this.parent().parent().find("h1"):$this.parent().parent().find("a")).text(),_obj={channel_id:$this.parent().parent().attr("data-channel-id"),title:_title,active:$this.hasClass("activate"),is_top_level:$this.hasClass("site_section"),number_of_posts:$this.parent().parent().attr("data-number-of-posts"),link:$this.parent().parent().attr("data-link")};$.post(GLOBALS.ROOT_PATH+"account/channel_set_activate",{id:_obj.channel_id,active:_obj.active,is_to
1p_level:_obj.is_top_level},function(data){var _found,$insert_before;data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=loc.create_list_item(_obj),$this.parent().parent().remove(),_obj.active?$(data).appendTo($("ul#active_in_nav")):(_found=!1,$("#inactive_in_nav > li").each(function(index,val){var this_title=$(this).find("h1").text();!_found&&_obj.title<this_title&&(_found=!0,$insert_before=$(this))}),$(data).insertBefore($insert_before)))},"json")}),$("li[data-action=set_state_collection]").live("click",function(event){var $this=$(this),_title=($this.hasClass("activate")?$this.parent().parent().find("h1"):$this.parent().parent().find("a")).text(),_obj={channel_id:$this.parent().parent().attr("data-channel-id"),title:_title,active:$this.hasClass("activate"),is_top_level:!1,number_of_posts:$this.parent().parent().attr("data-number-of-posts"),link:$this.parent().parent().attr("data-link"),is_collection:"true"==$this.parent().parent().attr("data-is-collection")};$.post(GLOBALS.ROOT_PATH+"account/channel_collection_set_activate",{id:_obj.channel_id,active:_obj.active,is_top_level:_obj.is_top_level},function(data){var _found,$insert_before;data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(data=loc.create_list_item(_obj),$this.parent().parent().remove(),_obj.active?$(data).appendTo($("ul#active_in_nav_channel_collections")):(_found=!1,$("#inactive_in_nav > li").each(function(index,val){var this_title=$(this).find("h1").text();!_found&&_obj.title<this_title&&(_found=!0,$insert_before=$(this))}),$(data).insertBefore($insert_before)))},"json")}),$("#core77").click(function(e){loc.close_all_other_menus()})},function(_obj){Account_Page_Base.call(this,_obj),this.total_posts=parseInt(_obj.total_posts),this.paginator,this.data=new Create_Obj_From_Form_Nodes({form_id:"search_posts",extra_properties:["page_number"],shell_obj:this}),this.reset_results_languague_on_search=!0}),Manage_Posts=(Manage_List_Base.inherits(Account_Page_Base),Manage_List_Base.fn.canned_searching=function(loc){$(".canned_searches span").live("click",function(event){var search_data=$(this).attr("data-canned-search"),search_data=Hash_Key_Value_List.get_list(search_data);loading.create(),$.each(search_data,function(index,val){loc.data[index].set_value_and_update_form(val,loc.data.form_id,index)}),loc.get_data(loc,!0)})},Manage_List_Base.fn.get_data=function(loc,reset_page_number){reset_page_number=!General.is_null_empty_undefined(reset_page_number)&&reset_page_number,loc.data.page_number.value=1<loc.data.page_number.value?loc.data.page_number.value:1;var results=loc.paginator.calc_start_end(reset_page_number),params=(reset_page_number&&(loc.data.page_number.value=""),loc.data.rewriteURL());params.start_row=results.start_row,params.end_row=results.end_row,$.post(GLOBALS.ROOT_PATH.append(loc.get_more_action_url),params,function(data){var count_text_word,data=General.parse_json_if_needed(data);loading.remove(),General.status_ok(data.status)?(reset_page_number&&$("ul.listing.entries").empty(),0<data.total_count?""!=data.text.clean_white_space()&&$(data.text).appendTo($("ul.listing.entries")):alert("0 results found, please try to broaden your search"),loc.total_posts=data.total_count,loc.paginator.reinit(loc.total_posts),loc.reset_results_languague_on_search&&(count_text_word=1==loc.total_posts?"Result":"Results",$("#post_count_header").text(String.format("{0} {1}",loc.total_posts,count_text_word)))):message_slider(data.text,!0)}),null!=loc.get_data_ext&&loc.get_data_ext(params,loc)},Manage_List_Base.fn.ext_base_int=function(){var key_vals,loc=this,_has_params=(loc.base_init(),!1);Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.data[index].set_value_and_update_form(val,loc.data.form_id,index),_has_params=!0})),loc.paginator=new Paginator({row_count:loc.total_posts,container_li:".entries > li",starting_page_num:loc.data.page_number.value}),loc.paginator.init(),$("#search_posts input#search").live("click",function(event){event.preventDefault(),loading.create(),loc.get_data(loc,!0)}),$("#show_more").live("click",function(event){loading.create(),loc.data.page_number.value=General.is_null_empty_undefined(loc.data.page_number.value)?2:parseInt(loc.data.page_number.value)+1,loc.get_data(loc)}),loc.canned_searching(loc),_has_params&&(loading.create(),loc.get_data(loc,!0))},function(_obj){Manage_List_Base.call(this,_obj),this.shell_type="manage_nav_account",this.get_more_action_url="account/manage-posts-more"}),Manage_Awards=(Manage_Posts.inherits(Manage_List_Base),Manage_Posts.fn.get_channel_data=function($this,_clbk){var channels=new Array;$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"/account/channels_get_by_post",data:{post_id:$this.parent().parent().attr("data-post-id")},dataType:"json",success:function(data){$.each(data.data,function(i,item){channels.push(new Channel({id:item.channel_id,status:item.status,name:item.channel_name,is_featured:item.is_featured,is_must_read:item.is_must_read,can_user_manage_channel:item.can_user_manage_channel}))}),General.is_valid_callback(_clbk)&&_clbk(channels)}})},Manage_Posts.fn.add_user_via_autocomplete=function(placeholder_arg,loc,_text,_id){$("#author_id").attr({value:_id})},Manage_Posts.fn.init=function(){var loc=this;loc.ext_base_int(),$(".publish_action").live("click",function(event){var $this=$(this);
1loc.get_channel_data($this,function(channels){var menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top),new Schedule_Post_Menu({actions:$this.hasClass("add_channel")?["channels","schedule"]:["channels","date","time","schedule"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,channels:channels,scheduled_date:$this.parent().parent().data("scheduled-date"),scheduled_time:$this.parent().parent().data("scheduled-time"),modified_for_add_channel:$this.hasClass("add_channel")}));loc.add_menu(menu_coords),menu_coords.render()})}),$("select.addition_box_select").live("change",function(){var $addition_box=$(this).parent().next(),set_channels=loc.get_addition_box_nodes($(this).parent().next());loc.add_addition_box_node_via_select(loc,$(this),set_channels,$addition_box)}),$(".addition_box span em.remove").live("click",function(e){e.stopPropagation(),$(this).parent().remove()}),$("li[data-post-status='PUBLISHED'] li.post_status").live("click",function(){var $this=$(this);loc.get_channel_data($this,function(channels){var menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.offset().left),menu_coords.set_property("y",$this.offset().top),new Schedule_Post_Menu({actions:["channels"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,channels:channels,scheduled_date:$this.parent().parent().data("scheduled-date"),scheduled_time:$this.parent().parent().data("scheduled-time")}));loc.add_menu(menu_coords),menu_coords.render()})}),$(".feature_action span").live("click",function(event){var $this=$(this).parent();loc.get_channel_data($this,function(channels){var menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top),new Feature_Post_Menu({actions:["channels","feature"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,channels:channels}));loc.add_menu(menu_coords),menu_coords.render()})}),$(".must_read_action span").live("click",function(event){var $this=$(this).parent();loc.get_channel_data($this,function(channels){var menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top),new Must_Read_Post_Menu({actions:["channels","must_read"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,channels:channels}));loc.add_menu(menu_coords),menu_coords.render()})}),$(".sponsor_action span").live("click",function(event){var $this=$(this).parent(),post_id=$this.parent().parent().attr("data-post-id");confirm("Are you sure you would like to make this a Sponsored post")&&loc.user_object_xref_add({success_message:General.success_text.post_sponsor,$this:$this,action_taken_text:"Sponsored",object_id:post_id,object_type:USER_OBJECT_XREF_TYPES.post_sponsor},loc)}),$(".change_published_date_action span").live("click",function(event){var $this=$(this).parent(),menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top),new Change_Post_Published_Date_Menu({actions:["date","time","set"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,scheduled_date:$this.parent().parent().data("scheduled-date"),scheduled_time:$this.parent().parent().data("scheduled-time")}));loc.add_menu(menu_coords),menu_coords.render()}),$(".unpublish_action span").live("click",function(event){var $this=$(this).parent();
1loc.get_channel_data($this,function(channels){var menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.parent().parent().offset().left+$this.parent().parent().width()-$this.parent().width()),menu_coords.set_property("y",$this.offset().top),new Unpublish_Post_Menu({actions:["channels","unpublish"],coords:menu_coords,parent:$this.parent().parent(),appendTo_id:"body",post_id:$this.parent().parent().attr("data-post-id"),shell_obj:loc,channels:channels}));loc.add_menu(menu_coords),menu_coords.render()})}),$(".deactive_user span").live("click",function(event){var $this=$(this),$parent=$this.parent().parent().parent(),$this=$this.parent().attr("data-user-id");confirm("Are you sure you would like to Deactivate this user?")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_enable"),{user_id:$this,enable:!1},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider("User has been Deactivated"),$parent.remove()):message_slider(data.text,!0)})}),$(".delete_project span").live("click",function(event){var $parent=$(this).parent().parent().parent(),post_id=$parent.attr("data-post-id");confirm("You are about to delete this post and all of its contents. This can't be undone, are you sure you wish do delete?")&&$.post(GLOBALS.ROOT_PATH+"account/post_delete",{post_id:post_id},function(data){General.status_ok(data.status,loc)&&$parent.remove()},"json")}),$(".preview_stp span").live("click",function(e){var _p=$(this).parent();_p.attr("data-excerpt"),_p.attr("data-title"),_p.attr("data-author"),_p.attr("data-thumb")}),$("#core77").click(function(event){loc.close_all_other_menus()}),$("#author_name").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.add_user_via_autocomplete,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!0,enter_submit:!0,show_selected_value_in_elem:!0})},function(_obj){Manage_List_Base.call(this,_obj),this.shell_type="manage_awards_account",this.get_more_action_url="account/manage-awards-more"}),Manage_Users=(Manage_Awards.inherits(Manage_List_Base),Manage_Awards.fn.init=function(){this.ext_base_int(),$(".status_change").live("click",function(event){var $this=$(this);$.post(GLOBALS.ROOT_PATH.append("account/awards_admin_set_status"),{post_id:$this.parent().parent().attr("data-post-id"),status:$this.attr("data-status")},function(data){var result_text,data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider(General.success_text.award_status_update),result_text="","3"==$this.attr("data-status")?result_text="Reviewed":"4"==$this.attr("data-status")?result_text="Denied":"2"==$this.attr("data-status")&&(result_text="Pending"),$this.parent().parent().attr({"data-post-status":result_text.toUpperCase()}).find(".post_status").text(result_text)):message_slider(data.text,!0)})}),$(".send_entry_invoice").live("click",function(event){event.preventDefault();var event=$(this).attr("data-post-id"),_user_id=$(this).attr("data-user-id"),_html=new String,get_invoice_by_email=(_html=(_html=_html+"<div class='generic_message' id='get_awards_invoice_modal'><h3>Get your invoice delivered to your email</h3>"+"<p>Please add an email address below to get your invoice sent out to you.</p>")+String.format("<p><input type='text' id='email_for_invoice' value=''/><br/><span class='btn' data-post-id='{0}' data-user-id='{1}' id='get_my_invoice'>Send invoice</span></p>",event,_user_id)+"<ul class='modal_bottom'><li class='quick_m_close' style='margin-top: 20px;'><a href='#' class=''>Cancel</a></li></ul></div>",new Quick_Modal({appendTo:"core77",close_clbk:function(){$("#get_my_invoice").die("click")}}));get_invoice_by_email.set_form_width(500),get_invoice_by_email.set_content(_html),get_invoice_by_email.draw_overlay(),$("#get_my_invoice").live("click",function(e){var _email=$("#get_awards_invoice_modal #email_for_invoice").val(),_post_id=$(this).attr("data-post-id"),_user_id=$(this).attr("data-user-id");_email.is_valid_email()?General.is_null_empty_undefined(_post_id)?alert("Please try again. If this persists please contact support for assitance."):$.post("/account/admin_resend_award_entry_invoice",{post_id:_post_id,user_id:_user_id,email:_email},function(data){General.status_ok(data.status)?(alert("The invoice was sent to "+_email),get_invoice_by_email.remove_overlay()):alert(data.text)}):alert("Please enter a valid email address")})})},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="manage_users_account",this.paginator,this.manage_awards="true"==$("#award_manager_role").val(),this.data=new Create_Obj_From_Form_Nodes({form_id:"search_users",extra_properties:[],shell_obj:this})}),Manage_Comments=(Manage_Users.inherits(Account_Page_Base),Manage_Users.fn.create_list_item=function(_user,_user_profile,loc){var _html=new String,_category_assignment_for_juror={cat_id:"",cat_name:"",user_id:""},_html=String.format("<li data-user-id='{0}'>",_user.id),user_link=(_html=(_html+="<div class='person_wrap'>")+String.format("<img src='{0}' class='avatar left'>",_user.avatar_url),String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),_user.handle)),deactivated_text=2==_user.user_status?"":"<span class='deactivated_user'>[deactivated user]</span>";if(_html=_html+String.format("<a href='{0}' class='left'>{1} {2} (handle: {3})(user_id: {4}) {5}</a>",user_link,_user.first_name,_user.last_name,_user.handle,_user.id,deactivated_text)+"<div class='user_profile_wrap'>",General.is_null_empty_undefined(_user_profile.user_title)&&General.is_null_empty_undefined(_user_profile.company_name)||(_html+="<div class='title'>",General.is_null_empty_undefined(_user_profile.user_title)||(_html+=String.format("{0}{1}",_user_profile.user_title,General.is_null_empty_undefined(_user_profile.company_name)?"":",")),General.is_null_empty_undefined(_user_profile.company_name)||(_html+=_user_profile.company_name),_html+="</div>"),_html=(_html+=String.format("<div class='about'>{0}</div>",_user_profile.about))+String.format("<div class=''><em class='core_orange'>Email: </em> {0}</div>",_user.email),""!=_user_profile.external_link_1||""!=_user_profile.external_link_2||""!=_user_profile.external_link_3){_html+="<div class=''><em class='core_orange'>Links: </em>";
1for(var m=1;m<=3;m++){var this_link=_user_profile[String.format("external_link_{0}",m)];""!=this_link&&(_html+=String.format("<a href='{0}' target='_blank'>{0}</a>",this_link),3!==m)&&""!=_user_profile[String.format("external_link_{0}",m+1)]&&(_html+=", ")}_html+="</div>"}_html+="</div></div><div class='role_wrapper'>",loc.manage_awards&&($.each(_user.roles,function(index,val){var this_user_id;"award juror"!=this.role_name&&"award jury captain"!=this.role_name||(this_user_id=this.user_id,$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award_juror_get"),{juror_id:this_user_id},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(data.data=General.parse_json_if_needed(data.data),null!=data.data)&&0!=data.data.id&&(_category_assignment_for_juror.cat_id=data.data.id,_category_assignment_for_juror.cat_name=data.data.name,_category_assignment_for_juror.user_id=this_user_id,$(String.format("li[data-user-id={0}]",this_user_id)).find(".addition_box span[data-id=14]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award juror <em class='remove'>r</em>",_category_assignment_for_juror.cat_id,_category_assignment_for_juror.cat_name)),$(String.format("li[data-user-id={0}]",this_user_id)).find(".addition_box span[data-id=15]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award jury captain <em class='remove'>r</em>",_category_assignment_for_juror.cat_id,_category_assignment_for_juror.cat_name)))}))}),_html+="<div class='drop_down addition_box_btn_invis'><select class='award_category_jury'><option value='0'>Select an award category</option>",$("select#award_categories option").each(function(index,val){_html+=String.format("<option value='{0}'>{1}</option>",$(this).val(),$(this).text())}),_html+="</select><span class='dd_arrow c77_icon not_selectable'>\"</span></div>"),_html+="<div class='drop_down addition_box_btn_invis'><select class='user_roles'><option value='0'>Add User Role</option>",$("select#user_roles option").each(function(index,val){_html+=String.format("<option value='{0}'>{1}</option>",$(this).val(),$(this).text())}),_html+="</select><span class='dd_arrow c77_icon not_selectable'>\"</span></div><div class='addition_box'>",$.each(_user.roles,function(index,val){var custom_class="",_role_name=this.role_name;"award juror"!=this.role_name&&"award jury captain"!=this.role_name||(custom_class="award_juror_role",_role_name=""!=_category_assignment_for_juror.cat_name?String.format("[{0}] {1}",_category_assignment_for_juror.cat_name,_role_name):String.format("<strong data-category-id='0'>[needs category assignment]</strong> {0}",_role_name)),_html+=loc.create_addition_box_via_values(this.role_id,_role_name,"default user",custom_class)}),_html+="</div></div><ul class='actions'>";user_link=2==_user.user_status?"Deactivate":"Reactivate";return _html=_html+String.format("<li><span data-user-id='{0}' class='{1}'>{2} User</span></li><li><span data-user-id='{0}' class='log_in_as'>Log in as User</span></li><li><a href='/account/admin-edit-profile?user_id={0}' target='_blank' data-user-id='{0}' class='edit_profile'>Edit Profile</a></li><li data-user-id='{0}' class='obliterate'><span>Obliterate</span></li>",_user.id,user_link.toLowerCase(),user_link)+"</ul></li>"},Manage_Users.fn.user_search=function(_loc){var loc=_loc,_loc=loc.data.rewriteURL();$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/users_search"),_loc,function(data){if(printf(data=General.parse_json_if_needed(data)),General.status_ok(data.status)){for(var _html=new String,k=0;k<data.data.users.length;k++)_html+=loc.create_list_item(data.data.users[k],data.data.user_profiles[k],loc);$("#users_list").empty(),$(_html).appendTo($("#users_list"))}else message_slider(data.text,!0)})},Manage_Users.fn.log_in_as_user=function(_user_id,loc){confirm("Are you sure you would like log in as this user? After you are done you will need to log out and log back in as your self.")&&(loading.create(),$.post(GLOBALS.ROOT_PATH.append("account/login-as"),{user_id:_user_id,remember_me:!0},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:GLOBALS.PUBLISH_ROOT_PATH,remain_logged_in:data.remain_logged_in,user:new User({name:data.name,avatar:data.avatar,link:data.user_url,profile_complete:data.profile_complete})},loc):message_slider(data.text,!0)}))},Manage_Users.fn.init=function(){var key_vals,is_captain,loc=this,_has_params=!1;Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),$.each(key_vals,function(index,val){loc.data[index].set_value_and_update_form(val,loc.data.form_id,index),_has_params=!0})),$(".deactivate").live("click",function(event){var $this=$(this),$parent=$this.parent().parent().parent(),$this=$this.attr("data-user-id");confirm("Are you sure you would like to Deactivate this user?")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_enable"),{user_id:$this,enable:!1},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider("User has been Deactivated"),$parent.find("a").append("<span class='deactivated_user'>[deactivated user]</span>"),$parent.find(".actions .deactivate").addClass("reactivate").removeClass("deactivate").text("Reactivate User")):message_slider(data.text,!0)})}),$(".reactivate").live("click",function(event){var $this=$(this),$parent=$this.parent().parent().parent(),$this=$this.attr("data-user-id");confirm("Are you sure you would like to Reactivate this user?")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_enable"),{user_id:$this,enable:!0},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider("User has been Activated"),$parent.find(".deactivated_user").remove(),$parent.find(".actions .reactivate").addClass("deactivate").removeClass("reactivate").text("Deactivate User")):message_slider(data.text,!0)})}),$(".obliterate").live("click",function(event){var user_id=$(this).attr("data-user-id");confirm("Are you sure you would like to Obliterate this user? This will remove the user and all contributed content. This can not be undone.")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_delete"),{user_id:user_id},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?message_slider("User has been ... Obliterated"):message_slider(data.text,!0)})}),$("#core77").click(function(event){loc.close_all_other_menus()}),$("select.user_roles").live("change",function(){var params,this_val=parseInt($(this).val()),$this=$(this),_node=$this.parent().parent().find(".addition_box"),user_id=$this.parent().parent().parent().attr("data-user-id"),set_roles=loc.get_addition_box_nodes(_node),current_category_id=(loc.add_addition_box_node_via_select(loc,$(this),set_roles,_node),0),set_roles=(14!=this_val&&15!=this_val||($this.parent().parent().parent().find(".award_juror_role").each(function(index,val){null!=$(this).find("strong").attr("data-category-id")&&(current_category_id=$(this).find("strong").attr("data-category-id"))}),params={juror_id:user_id,category_id:current_category_id,is_captain:15==this_val},$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award_juror_category_xref_add"),params,function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&(message_slider(),data=0!=current_category_id?$("#award_categories").find(String.format("option[value={0}]",current_category_id)).text():"needs category assignment",$this.parent().parent().find(".addition_box span[data-id=14]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award juror <em class='remove'>r</em>",params.category_id,data)),$this.parent().parent().find(".addition_box span[data-id=15]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award jury captain <em class='remove'>r</em>",params.category_id,data)))})),loc.get_addition_box_nodes(_node));$.post(GLOBALS.ROOT_PATH.append("account/user_role_add"),{user_id:user_id,role_ids:set_roles.toString()},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?message_slider(General.success_text.user_role_add):message_slider(data.text,!0)})}),$(".addition_box span em.remove").live("click",function(e){var user_id=$(this).parent().parent().parent().parent().attr("data-user-id"),_node=$(this).parent().parent(),_node=(loc.get_addition_box_nodes(_node),$(this).parent().remove(),$(this).parent().hasClass("award_juror_role")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award_juror_category_xref_delete"),{juror_id:user_id,category_id:$(this).parent().find("strong").attr("data-category-id")},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&message_slider()}),loc.get_addition_box_nodes(_node));$.post(GLOBALS.ROOT_PATH.append("account/user_role_add"),{user_id:user_id,role_ids:_node.toString()},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?message_slider(General.success_text.user_role_remove):message_slider(data.text,!0)})}),$("#keyword").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.user_search,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!0,enter_submit:!0,show_selected_value_in_elem:!0}),$(".log_in_as").live("click",function(event){event.preventDefault();event=$(this).attr("data-user-id");loc.log_in_as_user(event,loc)}),$("#add_new_user").click(function(e){var _html=new String,new_user=(_html=(_html=(_html=(_html=_html+"<div class='branded_modal'><h3>K</h3><h4 id='context_specific_header'>Create A New User</h4>"+"<p id='context_specific_messaging'>Fill out the form below to add the new user.</p><p>&nbsp;</p>")+"<div class='form_wrap'>"+"<label for='new_username'>Username<em></em></label><input type='text' class='create_nu_field' id='new_username' value='' />")+"<label for='new_email'>Email<em></em></label><input type='text' class='create_nu_field' id='new_email' value='' />"+"<label for='new_password'>Password<em></em></label><input type='text' class='create_nu_field' id='new_password' value='' />")+"<ul class=''><li><a id='confirm_new_user' class='btn' href='#'>Create User</a></li>"+"</ul></div></div>",new Quick_Modal({appendTo:"core77"}));new_user.set_form_width(500),new_user.set_content(_html),new_user.draw_overlay(),$(".create_nu_field").live("click.create_user",function(event){$(this).removeClass("error").prev().find("em").text("").removeClass("error")}),$("#confirm_new_user").live("click.create_user",function(event){var params={user_name:$("#new_username").val(),password:$("#new_password").val(),email_address:$("#new_email").val()};General.is_null_empty_undefined(params.user_name)||General.is_null_empty_undefined(params.password)||General.is_null_empty_undefined(params.email_address)?(General.is_null_empty_undefined(params.user_name)&&$("#new_username").addClass("error").prev().find("em").text("Required").addClass("error"),General.is_null_empty_undefined(params.password)&&$("#new_password").addClass("error").prev().find("em").text("Required").addClass("error"),!General.is_null_empty_undefined(params.email_address)&&params.email_address.is_valid_email()||$("#new_email").addClass("error").prev().find("em").text("Enter a valid email address").addClass("error")):GLOBALS.IS_LOGGED_IN&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/admin_user_create"),params,function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?(message_slider(General.success_text.manual_new_user_created),$(".create_nu_field").die("click.create_user"),new_user.remove_overlay()):($("#confirm_new_user").die("click.create_user"),"Email already exists"==data.text?$("#new_email").addClass("error").prev().find("em").text(data.text).addClass("error"):alert(data.text))})})}),loc.manage_awards&&(is_captain=!1,$(".award_category_jury").live("change",function(event){var $this=$(this),params=(is_captain=0<$this.parent().parent().find(".addition_box span[data-id=15]").length,{juror_id:$this.parent().parent().parent().attr("data-user-id"),category_id:$this.val(),is_captain:is_captain});$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award_juror_category_xref_add"),params,function(data){var category_name;data=General.parse_json_if_needed(data),General.status_ok(data.status)?(message_slider(General.success_text.award_category_added),category_name=$this.find(String.format("option[value={0}]",$this.val())).text(),$this.parent().parent().find(".addition_box span[data-id=14]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award juror <em class='remove'>r</em>",params.category_id,category_name)),$this.parent().parent().find(".addition_box span[data-id=15]").html(String.format("<strong data-category-id='{0}'>[{1}]</strong> award jury captain <em class='remove'>r</em>",params.category_id,category_name))):message_slider(data.text,!0)})})),$("input#search").live("click",function(event){event.preventDefault(),loc.user_search(loc)}),_has_params&&loc.user_search(loc)},function(_obj){Manage_List_Base.call(this,_obj),this.shell_type="manage_comments_account",this.get_more_action_url="account/comment-management-more",this.paginator}),Awards_Entry_Payment=(Manage_Comments.inherits(Manage_List_Base),Manage_Comments.fn.init=function(){this.ext_base_int();$(".approve").live("click",function(event){var admin_status,$this=$(this),post_comment_id=$this.parents("li").attr("data-id"),current_spam_status=parseInt($this.parents("li").attr("data-spam-status")),current_admin_status=parseInt($this.parents("li").attr("data-admin-status")),current_spam_status=1==current_spam_status&&1==current_admin_status?admin_status=2:(admin_status=2,0);$.post(GLOBALS.ROOT_PATH.append("account/comment_update_status"),{post_comment_id:post_comment_id,admin_status:admin_status,spam_status:current_spam_status},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?($("#"+post_comment_id).text("Approved"),$this.parents("li").remove(),message_slider(General.success_text.comment_approved)):message_slider(data.text,!0)})}),$(".deny").live("click",function(event){var admin_status,$this=$(this),post_comment_id=$this.parents("li").attr("data-id"),current_spam_status=parseInt($this.parents("li").attr("data-spam-status")),current_admin_status=parseInt($this.parents("li").attr("data-admin-status")),current_spam_status=1==current_spam_status&&1==current_admin_status?admin_status=3:(admin_status=3,0);$.post(GLOBALS.ROOT_PATH.append("account/comment_update_status"),{post_comment_id:post_comment_id,admin_status:admin_status,spam_status:current_spam_status},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)?($("#"+post_comment_id).text("Denied"),$this.parents("li").remove(),message_slider(General.success_text.comment_denied)):message_slider(data.text,!0)})}),$(".deactivate").live("click",function(event){var user_id=$(this).attr("data-user-id");confirm("Are you sure you would like to Deactivate this user? This can not be undone.")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_enable"),{user_id:user_id,enable:!1},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?message_slider("User has been Deactivated"):message_slider(data.text,!0)})}),$(".obliterate").live("click",function(event){var user_id=$(this).attr("data-user-id");confirm("Are you sure you would like to Obliterate this user? This will remove the user and all contributed content. This can not be undone.")&&$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/user_delete"),{user_id:user_id},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?($(String.format("ul#comment_list > li[data-user-id={0}]",user_id)).remove(),message_slider("User has been ... Obliterated")):message_slider(data.text,!0)})})},function(_obj){Account_Page_Base.call(this,_obj),this.billing_form,this.award_entries_data_for_ecomm=General.is_null_empty_undefined(_obj.award_entries_data_for_ecomm)?[]:_obj.award_entries_data_for_ecomm,this.ecomm_transaction_id=General.is_null_empty_undefine
1d(_obj.ecomm_transaction_id)?"C77DA":_obj.ecomm_transaction_id,this.coupon_value=General.is_null_empty_undefined(_obj.coupon_value)?"0":_obj.coupon_value,this.GA4_analytics_id="G-8VS7HZR3NB"}),Judge_Award_Entries_Base=(Awards_Entry_Payment.inherits(Account_Page_Base),Awards_Entry_Payment.fn.update_cart_total=function(_award_post_entry_ids,path,_protocol){$.post(_protocol+"account/"+path,{award_post_entry_ids:_award_post_entry_ids},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)&&$(".payment_total").text(data.price)},"json")},Awards_Entry_Payment.fn.init=function(){var current_cookie,loc=this;$("li.checkbox_wrap").click(function(event){var $this=$(this);loc.checkbox_handler($this,function($this){var $this=$this.find("span"),default_text=$this.prev().find("em").attr("data-default-text"),default_text=General.is_null_empty_undefined(default_text)?"":default_text;$this.removeClass("error valid invalid").prev().find("em").removeClass("error valid invalid").text(default_text)})}),$(".add_to_cart").live("click",function(e){var $this=$(this),_post_id=$this.parents("li").attr("data-post-id"),cart_array=$("#post_ids_in_cart").val().split(",");cart_array.contains(_post_id)||(cart_array.push(_post_id),$("#post_ids_in_cart").val(cart_array.join(",")),cart_array=String.format("<li data-post-id='{0}'>{1}</li>",_post_id,$this.parents("li").html()),$(cart_array).appendTo($("#selected_entries")),$this.parents("li").addClass("in_cart"),loc.update_cart_total($("#post_ids_in_cart").val(),"award_post_entries_calculate_price",GLOBALS.PUBLISH_ROOT_PATH))}),$(".remove_from_cart").live("click",function(e){var cart_array,_index,$this=$(this),$in_cart=$("#selected_entries");1==$in_cart.find(">li").length?alert("You can not checkout with an empty cart"):($this=$this.parents("li").attr("data-post-id"),_index=(cart_array=$("#post_ids_in_cart").val().split(",")).indexOf($this),cart_array.splice(_index,1),$("#post_ids_in_cart").val(cart_array.join(",")),$in_cart.find(String.format("li[data-post-id={0}]",$this)).remove(),$("#unselected_entries").find(String.format("li[data-post-id={0}]",$this)).removeClass("in_cart"),0<$("#unselected_entries").length?loc.update_cart_total(cart_array.join(","),"award_post_entries_calculate_price",GLOBALS.PUBLISH_ROOT_PATH):0<$("form#billing").length&&loc.update_cart_total(cart_array.join(","),"award_post_entries_calculate_price_secure",GLOBALS.PUBLISH_ROOT_PATH_SECURE))}),0<$("#unselected_entries").length&&(loc.update_cart_total($("#post_ids_in_cart").val(),"award_post_entries_calculate_price",GLOBALS.PUBLISH_ROOT_PATH),$("#continue_to_billing").click(function(e){e.preventDefault();e=$("#post_ids_in_cart").val();General.is_null_empty_undefined(e)?alert("please select the Award Entries you would like to continue with"):$("#user_agreement").hasClass("checked")&&$("#edit_clause").hasClass("checked")?$(this).parents("form").submit():alert("Please check both agreement boxes to continue")}),$("#view_rules").click(function(e){e.preventDefault(),e.stopPropagation();e=new Quick_Modal({appendTo:"core77"});e.set_form_width(500),e.set_form_height(500),e.set_form_to_wrap("rules"),e.draw_overlay()}),$("#view_terms").click(function(e){e.preventDefault(),e.stopPropagation();e=new Quick_Modal({appendTo:"core77"});e.set_form_width(500),e.set_form_height(500),e.set_form_to_wrap("terms"),e.draw_overlay()})),$("#core77").hasClass("award_success_payment")&&new Social_Widget_Count({url:["http://www.core77designawards.com"]}).get_counts(),0<$("form#billing").length&&(loc.update_cart_total($("#post_ids_in_cart").val(),"award_post_entries_calculate_price_secure",GLOBALS.PUBLISH_ROOT_PATH_SECURE),new Credit_Cards({container_id:"card_number"}).init(),$("form#billing input[type=text], form#billing select").focus(function(event){var default_text=$(this).parents("li").find("label em").attr("data-default-text"),default_text=General.is_null_empty_undefined(default_text)?"":default_text;$(this).removeClass("error valid invalid").parents("li").find("label em").removeClass("error valid invalid").text(default_text),"billing_promo_code"==$(this).attr("id")&&$(".payment_discount_wrap").addClass("hide")}),$("#complete_purchase").click(function(e){e.preventDefault(),loc.billing_form=new Award_Payment_Billing_Form({email:"billing_email",contact_name:"billing_name",phone:"billing_phone",address_1:"address_1",city:"city",country:"billing_location_country",zip:"zip",credit_card_number:"card_number",csc:"card_security_code",cardholder_name:"card_holder_name",$form:$("#billing")}),loc.billing_form.validate()&&$("form#billing").submit()}),$("#billing_promo_code").blur(function(e){var $this=$(this),_val=$this.val();$.post(GLOBALS.PUBLISH_ROOT_PATH_SECURE+"account/award_post_entr
1ies_calculate_price_secure",{award_post_entry_ids:$("#post_ids_in_cart").val(),promo_code:_val},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(0<parseFloat(data.discount)?($this.addClass("valid"),$this.prev().find("em").addClass("valid"),$(".payment_discount").text(data.discount.toString().replace(".00","")),$(".payment_subtotal").text(data.price_before_discount.toString().replace(".00","")),$(".payment_discount_wrap").removeClass("hide")):($(".payment_discount_wrap").addClass("hide"),$this.addClass("invalid"),$this.prev().find("em").addClass("invalid").text("Invalid promotion code"),setTimeout(function(){$this.hasClass("invalid")&&($this.removeClass("invalid"),$this.prev().find("em").removeClass("invalid").text(""))},2e3)),$(".payment_total").text(data.price))},"json")})),$("#core77").hasClass("award_success_payment")&&(current_cookie=General.is_null_empty_undefined(Cookie.read(GLOBALS.C77DA_COOKIE_NAME))?"":unescape(Cookie.read(GLOBALS.C77DA_COOKIE_NAME)),loc.google_analytics_ga4(loc,function(){var ga4_pass_obj={event:"purchase",ecommerce:{currency:"USD",items:loc.award_entries_data_for_ecomm,transaction_id:loc.ecomm_transaction_id,affiliation:String.format("campaigns: {0}",current_cookie),value:$(".payment_total").text(),tax:"0",shipping:"0",coupon:loc.coupon_value}};try{dataLayer.push({ecommerce:null}),dataLayer.push(ga4_pass_obj)}catch(e){console.log("no gtag")}}))},function(_obj){Manage_List_Base.call(this,_obj),this.get_more_action_url="account/awards-entries-more",this.reset_results_languague_on_search=!1}),Review_Award_Entries=(Judge_Award_Entries_Base.inherits(Manage_List_Base),Judge_Award_Entries_Base.fn.get_data_ext=function(param,loc){$.post(GLOBALS.ROOT_PATH.append("awards-entries-shortlisted"),{type:params.type},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)||message_slider(data.text,!0)})},Judge_Award_Entries_Base.fn.judge_base_init=function(){var loc=this;loc.ext_base_int(),$("#sort_by").change(function(e){loading.create(),loc.get_data(loc,!0)}),$("#select_type li").live("click",function(e){loading.create(),$("#select_type li").removeClass("active");var _type=$(this).attr("data-type"),_count=$(this).attr("data-count");loc.total_posts=parseInt(_count),$("#type").val(_type),loc.get_data(loc,!0),$(this).addClass("active")}),Hash_Key_Value_List.key_values_exist()||loc.get_data(loc,!0),$(".account_jumping").live("click",function(e){var _user_id=$(this).attr("data-user-id");loading.create(),$.post("/account/account_jump_login",{user_id:_user_id},function(data){var _url;data=General.parse_json_if_needed(data),General.status_ok(data.status)?(_url=window.location.toString().split("#")[0],loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:String.format("{0}",_url),remain_logged_in:!0,user:new User({name:String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()),avatar:$("#avatar_wrapper img").attr("src"),link:String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),$("#user_profile_handle").val()),profile_complete:!General.is_null_empty_undefined($("#user_profile_first_name").val())&&!General.is_null_empty_undefined($("#user_profile_last_name").val())&&!General.is_null_empty_undefined($("#user_profile_handle").val())})},loc)):alert("Sorry this user_id is not supported")})})},function(_obj){Judge_Award_Entries_Base.call(this,_obj)}),Finalize_Award_Entries=(Review_Award_Entries.inherits(Judge_Award_Entries_Base),Review_Award_Entries.fn.get_data_ext=function(param,loc){$.post(GLOBALS.ROOT_PATH.append("account/awards-entries-shortlisted"),{type:param.type},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?($("ul#shortlist").addClass("empty_list").empty(),""!=data.data.clean_white_space()&&($(data.data).appendTo($("ul#shortlist")),$("ul#shortlist").removeClass("empty_list"))):message_slider(data.text,!0)}),$("#select_type li").removeClass("active"),$(String.format("#select_type li[data-type={0}]",param.type)).addClass("active")},Review_Award_Entries.fn.init=function(){this.judge_base_init(),$(".remove_from_list").live("click",function(event){var $this=$(this),_post_id=$this.attr("data-post-id");$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-shortlist-add-remove"),{post_id:_post_id,add:!1},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(1==$this.parents("ul").find("li").length&&$this.parents("ul").addClass("empty_list"),$this.parent().remove()):message_slider(data.text,!0)})})},function(_obj){Judge_Award_Entries_Base.call(this,_obj)}),Judge_Award_Entry=(Finalize_Award_Entries.inherits(Judge_Award_Entries_Base),Finalize_Award_Entries.fn.get_data_ext=function(param,loc){$.post(GLOBALS.ROOT_PATH.append("account/awards-entries-winners-circle"),{type:param.type},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?($("ul#shortlist").addClass("empty_list").empty(),""!=data.data.clean_white_space()&&($(data.data).appendTo($("ul#shortlist")),$("ul#shortlist").removeClass("empty_list"))):message_slider(data.text,!0)}),$("#select_type li").removeClass("active"),$(String.format("#select_type li[data-type={0}]",param.type)).addClass("active")},Finalize_Award_Entries.fn.init=function(){var _html,status_update_modal,loc=this;loc.judge_base_init(),$(".open_winner_type_menu").live("click",function(event){var $this=$(this),menu_coords=new Coordinates,_actions=(menu_coords.set_property("x",$this.offset().left+$this.width()/2),menu_coords.set_property("y",$this.offset().top),["assign_notable","assign_runner_up","assign_winner","remove_from_winner"]);switch($this.attr("data-winner-type").toLowerCase()){case"winner":_actions=["assign_notable","assign_runner_up","remove_from_winner"];break;case"runner up":_actions=["assign_notable","assign_winner","remove_from_winner"];break;case"notable":_actions=["assign_runner_up","assign_winner","remove_from_winner"]}menu_coords=new Awards_Set_Winner_Type_Menu({actions:_actions,coords:menu_coords,parent:$this.parents("li"),appendTo_id:"body",post_id:$this.attr("data-post-id"),shell_obj:loc});loc.add_menu(menu_coords),menu_coords.render()}),$("#core77").click(function(event){loc.close_all_other_menus()}),(new Date).getTime()<new Date(2015,3,11,12,0,0,0)&&(_html="",_html=(_html=new String+"<div class='generic_message'><h3>Hang On!</h3><p>This page is only for Final Judging when your entire jury team gets together. We'll open this up before your Final Judging date. </p>")+String.format("<ul class='modal_bottom'><li><a class='btn' href='{0}'>Go to Pre-Judging</a></li></ul></div>",GLOBALS.PUBLISH_ROOT_PATH.append("account/awards-entries-review-list")),(status_update_modal=new Quick_Modal({appendTo:"core77",close_off:!0})).set_form_width(600),status_update_modal.set_content(_html),status_update_modal.draw_overlay())},function(_obj){Account_Page_Base.call(this,_obj),this.is_final=!(!_obj.is_final||"false"==_obj.is_final.toLowerCase()),this.post_id=_obj.post_id}),Submit_Award_Winners=(Judge_Award_Entry.inherits(Account_Page_Base),Judge_Award_Entry.fn.add_to_collection=function(_url,loc,param,_clbk){$.post(_url,param,function(data){loading.remove();data=General.parse_json_if_needed(data);General.status_ok(data.status)?General.is_valid_callback(_clbk)&&_clbk():message_slider(data.text,!0)})},Judge_Award_Entry.fn.init=function(){var loc=this;
1loc.base_init(),loc.is_final?$("#winner_circle_add").click(function(e){$("#winner_circle_add").hasClass("already_taken")?($("#winner_circle_add").removeClass("already_taken"),loc.add_to_collection(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-winner-circle-add-remove"),loc,{post_id:loc.post_id,add:!1},function(){message_slider("Removed from Winner's Circle!")})):($("#winner_circle_add").addClass("already_taken"),loc.add_to_collection(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-winner-circle-add-remove"),loc,{post_id:loc.post_id,add:!0},function(){message_slider("Added to Winner's Circle!")}))}):$("#shortlist_add").click(function(e){$("#shortlist_add").hasClass("already_taken")?($("#shortlist_add").removeClass("already_taken"),loc.add_to_collection(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-shortlist-add-remove"),loc,{post_id:loc.post_id,add:!1},function(){message_slider("Removed from Shortlist!")})):($("#shortlist_add").addClass("already_taken"),loc.add_to_collection(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-shortlist-add-remove"),loc,{post_id:loc.post_id,add:!0},function(){message_slider("Added to Shortlist!")}))}),$(".next_entry").live("click",function(e){""==$(this).attr("href")&&(e.preventDefault(),alert("You are at the end of the list"))}),$(".prev_entry").live("click",function(e){""==$(this).attr("href")&&(e.preventDefault(),alert("You are at the beginning of the list"))})},function(_obj){Account_Page_Base.call(this,_obj),this.category=_obj.category}),My_77=(Submit_Award_Winners.inherits(Account_Page_Base),Submit_Award_Winners.fn.is_valid_selections=function(_obj){var loc=_obj.loc,is_valid=!0,pro_error=!1,_link="/account/awards-entries-finalize-list",_html=(_html=new String)+"<div id='post_errors'><h3>Hang On</h3>"+"<p>Before you can confirm your results, please resolve the following:</p><ul class='bullet_list'>";0==$("#professional_winners li[data-winner-type=WINNER]").length&&"Tools"!=loc.category&&(_html+="<li>You must to select a Professional Winner</li>",pro_error=!(is_valid=!1)),1<$("#professional_winners li[data-winner-type=WINNER]").length&&(_html+="<li>You can only select one Professional Winner</li>",pro_error=!(is_valid=!1)),3<$("#professional_winners li[data-winner-type=RUNNER_UP]").length&&"Commercial Equipment"!=loc.category&&(_html+="<li>You can't select more than three Professional Runners Up</li>",pro_error=!(is_valid=!1)),20<$("#professional_winners li[data-winner-type=NOTABLE]").length&&(_html+="<li>You can't select more than 20 Professional Notables</li>",pro_error=!(is_valid=!1)),0==$("#student_winners li[data-winner-type=WINNER]").length&&"De
1sign Education Initiative"!=loc.category&&"Design Concept"!=loc.category&&"Crowdfunding"!=loc.category&&(_html+="<li>You must select a Student Winner</li>",is_valid=!1,pro_error||(_link="/account/awards-entries-finalize-list#type=1&is_final=true&result_type=all&sort_by=title")),1<$("#student_winners li[data-winner-type=WINNER]").length&&(_html+="<li>You can only select one Student Winner</li>",is_valid=!1,pro_error||(_link="/account/awards-entries-finalize-list#type=1&is_final=true&result_type=all&sort_by=title")),3<$("#student_winners li[data-winner-type=RUNNER_UP]").length&&"Commercial Equipment"!=loc.category&&(_html+="<li>You can't select more than three Student Runners Up</li>",is_valid=!1,pro_error||(_link="/account/awards-entries-finalize-list#type=1&is_final=true&result_type=all&sort_by=title")),20<$("#student_winners li[data-winner-type=NOTABLE]").length&&(_html+="<li>You can't select more than 20 Student Notables</li>",is_valid=!1,pro_error||(_link="/account/awards-entries-finalize-list#type=1&is_final=true&result_type=all&sort_by=title")),_html+=String.format("</ul><ul><li><a class='btn' href='{0}'>Go Back</a></li></ul></div>",_link),is_valid||(loading.remove(),(loc=new Quick_Modal({appendTo:"core77",close_off:!0})).set_content(_html),loc.set_form_width(500),loc.draw_overlay()),is_valid?General.is_valid_callback(_obj.is_complete)&&_obj.is_complete():General.is_valid_callback(_obj.not_complete)&&_obj.not_complete()},Submit_Award_Winners.fn.init=function(){var loc=this;$("#finish_judging").click(function(event){loading.create(),loc.is_valid_selections({loc:loc,is_complete:function(){$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/awards-submit-results"),{},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?window.location=GLOBALS.PUBLISH_ROOT_PATH.append("account/awards-entries-finalize-list"):message_slider(data.text,!0)})},not_complete:function(){}})}),$(".account_jumping").live("click",function(e){var _user_id=$(this).attr("data-user-id");loading.create(),$.post("/account/account_jump_login",{user_id:_user_id},function(data){var _url;data=General.parse_json_if_needed(data),General.status_ok(data.status)?(_url=window.location.toString().split("#")[0],loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:String.format("{0}",_url),remain_logged_in:!0,user:new User({name:String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()),avatar:$("#avatar_wrapper img").attr("src"),link:String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),$("#user_profile_handle").val()),profile_complete:!General.is_null_empty_undefined($("#user_profile_first_name").val())&&!General.is_null_empty_undefined($("#user_profile_last_name").val())&&!General.is_null_empty_undefined($("#user_profile_handle").val())})},loc)):alert("Sorry this user_id is not supported")})})},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="my_77"}),Edit_Channels_Account=(My_77.inherits(Account_Page_Base),My_77.fn.golden_layout_flex=function(_clbk){FLEX_STOPS.layout.init(_clbk),$(window).resize(function(){FLEX_STOPS.layout.init(_clbk)})},My_77.fn.init=function(){this.base_init(),this.golden_layout_flex()},function(_obj){Account_Page_Base.call(this,_obj),this.shell_type="channels_account",this.prot_domain="http://www.core77.com/"}),Signup_Page=(Edit_Channels_Account.inherits(Account_Page_Base),Edit_Channels_Account.fn.update_header_text=function(_txt){$("#channel_creator h1").text(_txt)},Edit_Channels_Account.fn.update_fields=function(_obj,loc){$("#channel_id").val(_obj.id),$("#channel_name").val(_obj.name).trigger("keyup"),$("#channel_description").val(_obj.description),$("#channel_url").val(_obj.url_name),$("#channel_template option[value="+_obj.template+"]").attr("selected","selected"),$("#user_box_selected").html(""),$("#user_entry").val(""),$("#user_box_selected").empty(),$("#manager_box_selected").empty(),$("#channel_collection_box_data").empty(),$("span.checkbox").hasClass("checked")&&$("span.checkbox").removeClass("checked").addClass("unchecked"),$("li.checkbox_wrap p em").remove(),null!=_obj.users_accessible&&$.each(_obj.users_accessible,function(i,item){item=loc.html_for_manager_node(item.user_id,item.first_name+" "+item.last_name);$(item).appendTo($("#user_box_selected"))}),_obj.is_public&&$("span#public_channel").trigger("click"),_obj.can_be_submitted_to&&$("span#public_submit_channel").trigger("click"),_obj.is_restricted&&$("span#restrict_submit").trigger("click"),_obj.is_collection&&$("span#is_channel_c
1ollection").trigger("click"),null!=_obj.collection_list&&$.each(_obj.collection_list.split(","),function(i,item){var _existing_id=parseInt(this);$("#channel_collection_box option").each(function(index,val){var _id=parseInt($(this).attr("value")),_name=$(this).text();_id==_existing_id&&(_id=String.format("<span class='' data-id='{0}'>{1}<em class='remove'>r</em></span>",_id,_name),$(_id).appendTo($("#channel_collection_box_data")))})}),null!=_obj.users_channel_manage&&$.each(_obj.users_channel_manage,function(i,item){item=loc.html_for_manager_node(item.user_id,item.first_name+" "+item.last_name);$(item).appendTo($("#manager_box_selected"))}),$("#is_a_user_interest").attr("checked",_obj.is_a_user_interest)},Edit_Channels_Account.fn.html_for_manager_node=function(_id,_text){return String.format("<span data-id='{0}' class='added_user'>{1}<em class='remove'>r</em></span>",_id,_text)},Edit_Channels_Account.fn.add_user_via_autocomplete=function(placeholder_arg,loc,_text,_id){var _html=loc.html_for_manager_node(_id,_text),loc=loc.get_addition_box_nodes($("#user_box_selected"));""==_text||loc.contains(_id)||$(_html).appendTo($("#user_box_selected"))},Edit_Channels_Account.fn.add_manager_via_autocomplete=function(placeholder_arg,loc,_text,_id){var _html=loc.html_for_manager_node(_id,_text),loc=loc.get_addition_box_nodes($("#manager_box_selected"));""==_text||loc.contains(_id)||$(_html).appendTo($("#manager_box_selected"))},Edit_Channels_Account.fn.get_fields=function(){var extend_params,params={id:$("#channel_id").val(),name:$("#channel_name").val(),description:$("#channel_description").val(),url_name:$("#channel_url").val(),template:$("#channel_template").val(),user_ids_accessible:this.get_addition_box_nodes($("#user_box_selected")).toString(),is_a_user_interest:$("#is_a_user_interest").is(":checked"),is_restricted:$("span#restrict_submit").hasClass("checked"),is_public:$("span#public_channel").hasClass("checked"),user_ids_for_manage:this.get_addition_box_nodes($("#manager_box_selected")).toString(),can_be_submitted_to:$("span#public_submit_channel").hasClass("checked")};return $("span#is_channel_collection").hasClass("checked")&&(extend_params={is_collection:"true",collection_list:this.get_addition_box_nodes($("#channel_collection_box_data")).toString()},$.extend(params,extend_params)),params},Edit_Channels_Account.fn.channel_click_handler=function(_this,_id,loc){loc.update_header_text("Edit Channel"),$("#active_channels ul li").removeClass("current"),window.location.hash=String.format("channel_id={0}",_id),$(_this).addClass("current"),$.ajax({type:"POST",url:"/account/channel",data:{channel_id:_id},dataType:"json",success:function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&loc.update_fields({id:data.channel.id,name:data.channel.name,description:data.channel.description,url_name:data.channel.url_name,template:data.channel.template,users_accessible:data.channel.users_accessible,is_a_user_interest:data.channel.is_a_user_interest,is_restricted:data.channel.is_restricted,users_channel_manage:data.channel.users_channel_manage,is_public:data.channel.is_public,can_be_submitted_to:data.channel.can_be_submitted_to,is_collection:data.channel.is_collection,collection_list:data.channel.collection_list},loc)}})},Edit_Channels_Account.fn.init=function(){var hash_key_vals,_selector,loc=this;Hash_Key_Value_List.key_values_exist()&&(hash_key_vals=Hash_Key_Value_List.get_list(),_selector=String.format("#active_channels li[data-channel-id={0}]",hash_key_vals.channel_id),loc.channel_click_handler(_selector,hash_key_vals.channel_id,loc)),$("form#channel_form input[type=submit]").click(function(event){event.preventDefault();var param=loc.get_fields();General.is_null_empty_undefined(param.name)?alert("A channel name is required"):$.ajax({type:"POST",url:"/account/channel_update",data:loc.get_fields(),dataType:"json",success:function(data){var _found,$insert_before,data=General.parse_json_if_needed(data);General.status_ok(data.status)&&(0==param.id?(data=String.format("<li data-channel-id='{0}' class='current'><a href='#'><span class='title'>{1}</span></a></li>",param.id,param.name),loc.update_header_text("Edit Channel"),$("#active_channels ul li").removeClass("current"),_found=!1,$("#active_channels ul > li").each(function(index,val){var this_title=$(this).find("span.title").text();!_found&&param.name<this_title&&(_found=!0,$insert_before=$(this))}),$(data).insertBefore($insert_before)):$("#active_channels li#"+param.id+" span.title").text(channel_name),message_slider(General.success_text.channel_info_saved))}})}),$("#create_new").live("click",function(event){loc.update_header_text("Create Channel"),$("#active_channels ul li").removeClass("current"),loc.update_fields({id:0,name:"",description:"",url_name:"",template:""})}),$("#active_channels li").live("click",function(event){event.preventDefault(),loc.channel_click_handler(this,$(this).data("channel-id"),loc)}),$("#active_channels li a").click(function(event){event.preventDefault()}),$("form").keypress(function(event){event.which==KEYS.enter&&"channel_description"!==$(event.target).attr("id")&&event.preventDefault()}),$("li.checkbox_wrap").click(function(event){var $this=$(this);loc.checkbox_handler($this,function($this){"public_channel"!=$this.find("span").attr("id")&&$this.find("p").append("<em>Note: You need to specify the users below</em>
1"),"is_channel_collection"==$this.find("span").attr("id")&&$("#public_submit_channel").hasClass("checked")&&$("#public_submit_channel").removeClass("checked").addClass("unchecked"),"public_submit_channel"==$this.find("span").attr("id")&&$("#is_channel_collection").hasClass("checked")&&$("#is_channel_collection").removeClass("checked").addClass("unchecked")},function($this){"public_channel"!=$this.find("span").attr("id")&&$this.find("p em").remove()})}),$(".addition_box_select").live("change",function(){var _addition_box=$(this).parent().next(),set_channels=loc.get_addition_box_nodes(_addition_box);loc.add_addition_box_node_via_select(loc,$(this),set_channels,_addition_box)}),$(".addition_box .remove").live("click",function(e){$(this).parent().remove()}),$("#user_entry").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.add_user_via_autocomplete,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!0,enter_submit:!0,show_selected_value_in_elem:!1}),$("#manager_entry").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.add_manager_via_autocomplete,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!0,enter_submit:!0,show_selected_value_in_elem:!1})},function(_obj){Shell_Base.call(this,_obj)}),Conference_Site_2015_Base=(Signup_Page.inherits(Shell_Base),Signup_Page.fn.init=function(){$("#signup_form #user_email").val($("#fed_useremail").val()),$("#signup_form #user_name").val($("#fed_username").val()),$("#signup_form #new_password").val($("#fed_new_password").val()),$("#signup_form #confirm_password").val($("#fed_confirm_password").val()),$("#signup_form #return_url").val($("#fed_return_url").val()),$("#signup_form #source").val($("#fed_source").val()),$("#signup_form #oauth_object_id").val($("#oauth_object_id").val()),$("#signup_form #oauth_provider").val($("#fed_oauth_provider").val())},function(_obj){Shell_Base.call(this,_obj),this.modal}),Conference_Site_2015_Coming_Soon=(Conference_Site_2015_Base.inherits(Shell_Base),Conference_Site_2015_Base.fn.base_init=function(){$("#core77").hasClass("attendee_register")||General.is_mobile_device()||new Parallax_Scroll({keyframes:[{wrapper:$("#core77"),duration:$("#c77_content").height(),animations:[{selector:"#site_background",translateY:[9*-$(window).height(),0]}]}]}).init()},function(_obj){Conference_Site_2015_Base.call(this,_obj)}),Conference_Site_2015_Main=(Conference_Site_2015_Coming_Soon.inherits(Conference_Site_2015_Base),Conference_Site_2015_Coming_Soon.fn.init=function(){var loc=this;loc.base_init(),$("#ticket_info, .ticket_info_in_content").live("click",function(e){e.preventDefault();e=new String;e+="<div class='generic_message'><h3>Get Your Pre-Sale Invitation!</h3><p>",General.is_mobile_device()?e+="Sign up now & we'll send you an invite-only pass to buy tickets for $200 off. Only 50 pre-sale tickets are available. Don't miss out!":e+="Sign up now and we will send you an exclusive invitation to buy your tickets for $200 off the regular price. The invitation will be sent out at 10am, EDT on Wednesday, July 15th.<br/><br/>Only 50 pre-sale tickets will be available, so it's first come, first serve!",e+="</p><ul class='form_wrap'><li><label for='your_name'>
1Name<em></em></label><input type='text' id='user_name' value='' /></li><li><label for='your_email'>Email Address<em></em></label><input type='text' id='user_aquired_email' value='' /></li></ul><ul class=''><li class='left'><a id='sign_up_for_info' class='btn' href='#'>Sign Me Up</a></li></ul></div>",loc.modal=null,loc.modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,new_animation:!0}),loc.modal.set_form_width(550),loc.modal.set_content(e),loc.modal.draw_overlay(),$("#user_aquired_email").live("click.email_remind",function(event){$("#user_activate_email").removeClass("error").prev().find("em").text("").removeClass("error")}),$("#user_name").live("click.email_remind",function(event){$("#user_name").removeClass("error").prev().find("em").text("").removeClass("error")}),$("#sign_up_for_info").live("click.email_remind",function(event){var param;""!=$("#user_aquired_email").val()&&""!=$("#user_name").val()?(param={"cm-name":$("#user_name").val(),"cm-zjtdhi-zjtdhi":$("#user_aquired_email").val()},$.getJSON("http://core77.createsend.com/t/y/s/zjtdhi/?callback=?",param,function(data){400===data.Status?alert("Error: "+data.Message):($("#email_remind_later").die("click.email_remind"),$("#user_aquired_email").die("click.email_remind"),$("#user_name").die("click.email_remind"),loc.modal.remove_overlay(),loc.modal=null,data=new String,data+="<div class='generic_message'><h3>Thanks for signing up!</h3><p>We'll send you more details on the pre-sale and conference as they approach.</p><img id='dancing_guy' src='https://s3.amazonaws.com/s3files.core77.com/images/airguy_dancing.gif' /></div>",loc.modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,new_animation:!0}),loc.modal.set_form_width(550),loc.modal.set_content(data),loc.modal.draw_overlay())})):(""!=$("#user_aquired_email").val()&&$("#user_aquired_email").addClass("error").prev().find("em").text("Please enter your email address").addClass("error"),""!=$("#user_name").val()&&$("#user_name").addClass("error").prev().find("em").text("Please enter your name").addClass("error"))})}),General.is_mobile_device()||setTimeout(function(){$("#ticket_info").click()},5e3)},function(_obj){Conference_Site_2015_Base.call(this,_obj)}),Conference_Site_Attendee_Register=(Conference_Site_2015_Main.inherits(Conference_Site_2015_Base),Conference_Site_2015_Main.fn.get_background_for_svg_rect=function(_type){var _fill="";switch(_type){case"future_now":_fill="url(#g1)";break;case"collaboration_now":_fill="rgba(255, 242, 0 ,.85)";break;case"making_now":_fill="rgba(236, 0, 140, .85)";break;case"business_now":_fill="rgba(0, 174, 239, .85)"}return _fill},Conference_Site_2015_Main.fn.make_svg_rect_backgrounds=function($this,loc,selector){var ctx=$this.get(0),selector=$this.find(selector).get(0),SVGRect=selector.getBBox(),rect=document.createElementNS("http://www.w3.org/2000/svg","rect");rect.setAttribute("x",SVGRect.x-8),rect.setAttribute("y",SVGRect.y-10),rect.setAttribute("width",SVGRect.width+8),rect.setAttribute("height",SVGRect.height+10),rect.setAttribute("fill",loc.get_background_for_svg_rect($this.parents("li").data("type"))),rect.setAttribute("class","background_rect"),ctx.insertBefore(rect,selector)},Conference_Site_2015_Main.fn.init=function(){var key_vals,loc=this;loc.base_init(),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(key_vals.tickets)||setTimeout(function(){$("#ticket_fringe").trigger("click")},500),General.is_null_empty_undefined(key_vals.thank_you)||setTimeout(function(){var thank_you_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"thank_you_modal"});thank_you_modal.set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.draw_overlay(!0)},500)),$(".code_of_conduct_link").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal"});e.set_form_to_wrap("code_of_conduct"),e.set_form_width(600),e.draw_overlay(!0)}),$("#get_tickets .close").click(function(event){event.preventDefault(),$("#ticket_fringe").trigger("click")}),General.is_mobile_device()||$(".drag_wrap div").not(".not_draggable").draggable(),$(".nav_wrap li").live("click",function(e){$(".nav_wrap li").removeClass("active"),$(this).addClass("active");var data_goto=$(this).attr("data-goto"),data_goto=$(String.format("#{0}",data_goto)).offset().top-160;$("html, body").animate({scrollTop:data_goto},1e3)}
1),new Update_Section_Navigation_Scroll({from:"middle",$navigation_wrap:$(".nav_wrap"),remove_active_classes:function(){$(".nav_wrap li").removeClass("active")},section_ids:["speakers_anchor","welcome_anchor","venue_anchor","field_trips_anchor","schedule_anchor","sponsor_anchor"]}).init(),1200<$(window).width()&&$("#quick_m_overlay").live("click.slide_fringe",function(){$("#quick_m_overlay").remove(),$("#get_tickets").hasClass("open")&&$("#ticket_fringe").trigger("click")}),$("#ticket_fringe").live("click",function(event){var ticket_modal;1200<$(window).width()?$("#get_tickets").hasClass("open")?$("#get_tickets").removeClass("open"):($("#get_tickets").addClass("open"),$("<div id='quick_m_overlay' class='invis_overlay'></div>").appendTo($("#core77")).addClass("fade_in")):((ticket_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0})).set_content($("#get_tickets .section_wrap").html()),ticket_modal.set_form_width(600),ticket_modal.draw_overlay(!0))}),$(".company_segment").each(function(index,val){loc.make_svg_rect_backgrounds($(this),loc,".speaker_company")}),$(".speaker_name_svg").each(function(index,val){loc.make_svg_rect_backgrounds($(this),loc,".speaker_name")}),$(".speaker_tiles li").live("click",function(e){var _new_top;$(this).hasClass("open")?$(this).removeClass("open"):($(".speaker_tiles li").removeClass("open"),$(this).addClass("open"),_new_top=$(this).offset().top-120,$("html, body").animate({scrollTop:_new_top},1e3))}),$(".speaker_tiles li .speaker_bio").live("click",function(e){e.stopPropagation()})},function(_obj){Shell_Base.call(this,_obj),this.data=new Conference_Attendee(_obj.data)}),Conference_Site_2015_Attendee_Slideshow=(Conference_Site_Attendee_Register.inherits(Shell_Base),Conference_Site_Attendee_Register.fn.init=function(){var key_vals,loc=this;new Google_Location_Geocode({exclude_error_class:!0}).init(),$("#twitter_handle").blur(function(){var val=$(this).val();/^@/.test(val)||$(this).val(String.format("@{0}",val))}),$("#save_attendee").click(function(e){var _attendee_id=General.is_null_empty_undefined($("#attendee_id").val(),0)?"":$("#attendee_id").val();loc.data.set_property("id",_attendee_id),loc.data.set_property("name",$("#name").val()),loc.data.set_property("job_title",$("#job_title").val()),loc.data.set_property("company_name",$("#company_name").val()),loc.data.set_property("web_link",$("#web_link").val()),"@"!=$("#twitter_handle").val()&&loc.data.set_property("twitter_handle",$("#twitter_handle").val()),loc.data.set_property("question2",$("#question2").val()),loc.data.set_property("about",$("#about").val()),loc.data.location.set_property("id",$("#address_id").val()),loc.data.location.set_property("address_1",$("#address_1").val()),loc.data.location.set_property("city",$("#city").val()),loc.data.location.set_property("state_abbreviation",$("#state_abbreviation").val()),loc.data.location.set_property("country_abbreviation",$("#country_abbreviation").val()),loc.data.location.set_property("zip",$("#zip").val()),loc.data.location.set_property("latitude",$("#latitude").val()),loc.data.location.set_property("longitude",$("#longitude").val()),loc.data.location.set_property("location_string",$("#location").val()),loc.data.is_valid()&&$.post(GLOBALS.WEB_ROOT_PATH.append("conference/conference_attendee_update"),loc.data.get_params(),function(data){var thank_you_modal;data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?((thank_you_modal=new Quick_Modal({appendTo:"core77",attach_class:"thank_you_modal",close_off:!0})).set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.draw_overlay(!0)):message_slider(data.text,!0)})}),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(key_vals.thank_you)||setTimeout(function(){var thank_you_modal=new Quick_Modal({appendTo:"core77",attach_class:"thank_you_modal",close_off:!0});thank_you_modal.set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.draw_overlay(!0)},500)),$("input#image2").fileupload({dataType:"json",formData:{attendee_id:loc.data.id,image_no:2},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.WEB_ROOT_PATH.append("conference/conference_attendee_image_receive"),add:function(e,data){null!=data.files[0].name&&(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){data=General.parse_json_if_needed(data.result),General.wrap_and_reset_form($("input#image2")),General.status_ok(data.status,loc)?(message_slider("Image 2 has been successfully uploaded"),0==$("#
1image_2_upload .image_preview").length&&$("<div class='image_preview'></div>").insertAfter($("#image_2_upload label")),loc.data.set_property("image2",data.image.url),$("#image_2_upload .image_preview").css({"background-image":String.format("url({0})",data.image.url)}),$("#image_2_upload span").text("Replace Image"),$("#add_image_2_wrapper").hasClass("has_content")||$("#add_image_2_wrapper").addClass("has_content")):message_slider(data.text,!0),loading.remove()}})},function(_obj){Shell_Base.call(this,_obj),this.slideshow_to=null,this.paused=!1}),Award_Slideshow=(Conference_Site_2015_Attendee_Slideshow.inherits(Shell_Base),Conference_Site_2015_Attendee_Slideshow.fn.run_slide=function(loc){clearTimeout(loc.slideshow_to);var $curr=$("#conference_slideshow li.current");0<$curr.next().length?$curr.next().addClass("current").end().removeClass("current"):($curr.removeClass("current"),$($("#conference_slideshow li").get(0)).addClass("current")),loc.slideshow_to=setTimeout(function(){loc.run_slide(loc)},2e4)},Conference_Site_2015_Attendee_Slideshow.fn.init=function(){var loc=this;loc.shell_base_init(),$($("#conference_slideshow li").get(0)).addClass("current"),loc.slideshow_to=setTimeout(function(){loc.run_slide(loc)},2e4),$("body").keydown(function(e){e.which==KEYS.spacebar&&(loc.paused?(loc.paused=!1,$("#conference_slideshow").removeClass("paused"),loc.slideshow_to=setTimeout(function(){loc.run_slide(loc)},100)):(clearTimeout(loc.slideshow_to),loc.paused=!0,$("#conference_slideshow").addClass("paused")))})},function(_obj){Shell_Base.call(this,_obj),this.main_page_wrap="core77",this.year=General.is_null_empty_undefined(_obj.year)?"2015":_obj.year,this.time_per_slide=2e4,this.time_per_slide_details=12e3,this.time_per_slide_flag=4e3,this.slide_shell="award_slideshow",this.slide_node="div",this.slideshow_slide_timeout=null,this.slideshow_slide_details_timeout=null,this.slideshow_slide_flag_timeout=null,this.paused=!1,this.sponsor_position_every=20,this.presenting_sponsor_position_every=-1,this.award_logo_slide_every=10,this.slide_count_sponsor=0,this.last_sponsor_slide_id_shown=0,this.slide_count_presenting_sponsor=0,this.slide_count_logo=0,this.$last_current_slide="",this.max_slide_count=36}),Conference_Site_2016_Base=(Award_Slideshow.inherits(Shell_Base),Award_Slideshow.fn.get_sponsor_slide=function(){return this.last_sponsor_slide_id_shown=this.last_sponsor_slide_id_shown+1>$(".award_sponsor_slide").length?1:this.last_sponsor_slide_id_shown+1,printf(this.last_sponsor_slide_id_shown,"sponsor_id_displaying"),$(String.format(".award_sponsor_slide[data-sponsor-id={0}]",this.last_sponsor_slide_id_shown))},Award_Slideshow.fn.run_slide=function(loc){loc.slide_count_sponsor++,loc.slide_count_presenting_sponsor++,loc.slide_count_logo++,clearTimeout(loc.slideshow_slide_timeout),clearTimeout(loc.slideshow_slide_details_timeout),clearTimeout(loc.slideshow_slide_flag_timeout);var _id,$next_slide,$curr=$(String.format("#{0} > {1}.current",loc.slide_shell,loc.slide_node));$curr.find(".project_details").removeClass("active"),$curr.find(".winner_details").removeClass("active"),loc.slide_count_presenting_sponsor==loc.presenting_sponsor_position_every||loc.slide_count_sponsor==loc.sponsor_position_every||loc.slide_count_logo==loc.award_logo_slide_every?($curr.hasClass("award_presenting_sponsor_slide")&&$curr.hasClass("award_sponsor_slide")&&$curr.hasClass("award_logo_slide")||(loc.$last_current_slide=$curr),loc.slide_count_presenting_sponsor==loc.presenting_sponsor_position_every?($next_slide=$(".award_presenting_sponsor_slide"),loc.slide_count_presenting_sponsor=0,loc.slide_count_logo==loc.award_logo_slide_every&&(loc.slide_count_logo=0),loc.slide_count_sponsor==loc.sponsor_position_every&&(loc.slide_count_sponsor=0)):loc.slide_count_sponsor==loc.sponsor_position_every?($next_slide=loc.get_sponsor_slide(),loc.slide_count_sponsor=0,loc.slide_count_logo==loc.award_logo_slide_every&&(loc.slide_count_logo=0)):($next_slide=$(".award_logo_slide"),loc.slide_count_logo=0)):(($curr.hasClass("award_presenting_sponsor_slide")||$curr.hasClass("award_sponsor_slide")||$curr.hasClass("award_logo_slide"))&&($curr.removeClass("current"),$curr=loc.$last_current_slide),_id=parseInt($curr.attr("id")),$next_slide=_id+1<=loc.max_slide_count?$(String.format("#{0} {1}#{2}",loc.slide_shell,loc.slide_node,_id+1)):$(String.format("#{0} {1}#{2}",loc.slide_shell,loc.slide_node,1))),$curr.removeClass("current"),$next_slide.addClass("current"),loc.slideshow_slide_details_timeout=setTimeout(function(){$next_slide.find(".project_details").addClass("active")},loc.time_per_slide_details),loc.slideshow_slide_flag_timeout=setTimeout(function(){$next_slide.find(".winner_details").addClass("active")},loc.time_per_slide_flag),loc.slideshow_slide_timeout=setTimeout(function(){loc.run_slide(loc)},loc.time_per_slide)},Award_Slideshow.fn.init=function(){var loc=this,$next_slide=(loc.shell_base_init(),$($(String.format("#{0} > {1}",loc.slide_shell,loc.slide_node)).get(0)));$next_slide.addClass("current"),loc.slideshow_slide_timeout=setTimeout(function(){loc.slide_count_sponsor++,loc.slide_count_logo++,loc.run_slide(loc)},loc.time_per_slide),loc.slideshow_slide_details_timeout=setTimeout(function(){$next_slide.find(".project_details").addClass("active")},loc.time_per_slide_details),loc.slideshow_slide_flag_timeout=setTimeout(function(){$next_slide.find(".winner_details").addClass("active")},loc.time_per_slide_flag),$("body").keydown(function(e){e.which==KEYS.spacebar&&(loc.paused?(loc.paused=!1,$(String.format("#{0}",loc.slide_shell)).removeClass("paused hide_pause"),loc.slideshow_slide_timeout=setTimeout(function(){loc.run_slide(loc)},100)):(clearTimeout(loc.slideshow_slide_timeout),loc.paused=!0,$(String.format("#{0}",loc.slide_shell)).addClass("paused"))),e.which==KEYS.enter&&loc.paused&&$(String.format("#{0}",loc.slide_shell)).addClass("hide_pause")})},function(_obj){Shell_Base.call(this,_obj)}),Conference_Site_2016_Yearbook=(Conference_Site_2016_Base.inherits(Shell_Base),C
1onference_Site_2016_Base.fn.base_init=function(){$("#burger").click(function(e){$("#nav_list").hasClass("open")?$("#nav_list").removeClass("open"):$("#nav_list").addClass("open")}),$(".tiles.hide_sub_section li").click(function(e){$(this).find(".sub_section").hasClass("open")?$(this).find(".sub_section").removeClass("open").end().find(".speaker_name").removeClass("open"):$(this).find(".sub_section").addClass("open").end().find(".speaker_name").addClass("open")}),$(".nav_wrap li").live("click",function(e){$(".nav_wrap li").removeClass("active"),$(this).addClass("active");var data_goto=$(this).attr("data-goto"),data_goto=($("#burger").click(),$(String.format("#{0}",data_goto)).offset().top-160);$("html, body").animate({scrollTop:data_goto},1e3)})},function(_obj){Conference_Site_2016_Base.call(this,_obj)}),Conference_Site_2016_Main=(Conference_Site_2016_Yearbook.inherits(Conference_Site_2016_Base),Conference_Site_2016_Yearbook.fn.init=function(){this.base_init()},function(_obj){Conference_Site_2016_Base.call(this,_obj),this.mapper=null,this.conference_locations=[]}),Conference_Site_2018_Base=(Conference_Site_2016_Main.inherits(Conference_Site_2016_Base),Conference_Site_2016_Main.fn.map_marker_click_callback=function(this_obj,loc,_map_inst){$("#conference_location_data").hasClass("open")||$("#conference_location_data").addClass("open"),$("#conference_location_data").find(".location_name").text(this_obj.location_name).end().find(".location_address").text(this_obj.address.location_string).end().find(".location_description").text(this_obj.location_description)},Conference_Site_2016_Main.fn.create_location_list=function(loc){loc.conference_locations.push({location_name:"Vibiana",location_description:"Our venue for main stage speakers and panel discussions along with gala interactive reception at the end of Day One.",address:new Address_Base({address_1:"214 S Main St",city:"Los Angeles",state_abbreviation:"CA",zip:"90012",latitude:34.0504492,longitude:-118.24443350000001,location_string:"214 S Main St"})}),loc.conference_locations.push({location_name:"Standard Hotel",location_description:"Main conference hotel, for those visiting Los Angeles. Day Two workshops take place here, along with a rooftop meetup.",address:new Address_Base({address_1:"550 S Flower St",city:"Los Angeles",state_abbreviation:"CA",zip:"90017",latitude:34.0501653,longitude:-118.25696319999997,location_string:"550 S Flower St"})}),loc.conference_locations.push({location_name:"U.S. Bank Tower",location_description:"Tour Location",address:new Address_Base({address_1:"633 West Fifth St",city:"Los Angeles",state_abbreviation:"CA",zip:"90071",latitude:34.0511203,longitude:-118.25432209999997,location_string:"633 West Fifth St"})}),loc.conference_locations.push({location_name:"Hyperloop Tech",location_description:"Tour Location",address:new Address_Base({address_1:"2161 Sacramento St",city:"Los Angeles",state_abbreviation:"CA",zip:"90021",latitude:34.0308275,longitude:-118.22809589999997,location_string:"2161 Sacramento St"})}),loc.conference_locations.push({location_name:"Los Angeles Cleantech Incubator (LACI)",location_description:"Tour Location",address:new Address_Base({address_1:"525 S Hewitt St",city:"Los Angeles",state_abbreviation:"CA",zip:"90013",latitude:34.0408779,longitude:-118.2350394,location_string:"525 S Hewitt St"})}),loc.conference_locations.push({location_name:"Library Bar",location_description:"Opening night party spot.",address:new Address_Base({address_1:"630 West 6th Street",city:"Los Angeles",state_abbreviation:"CA",zip:"90017",latitude:34.048955,longitude:-118.256144,location_string:"630 West 6th Street"})})},Conference_Site_2016_Main.fn.init=function(){var _nav_list,key_vals,loc=this;loc.base_init();General.is_mobile_device()||(new SVG_List_Creator({number_of_svg_paths:8,container_id:"svg_layer",max_duration:40,min_duration:22,number_of_patterns:6}).get_list(),new Mouse_Interact_SVG_Animate({container_id:"svg_layer",svg_selection_class:"marble_float",max_duration:40,min_duration:22,keep_away_from_restricted_area:!1,restricted_area_dimensions:new Dimensions({width:.5,height:.5})}).init(),_nav_list=[],$(".nav_wrap li").each(function(index,val){_nav_list.push($(this).attr("data-goto"))}
1),new Update_Section_Navigation_Scroll({from:"middle",$navigation_wrap:$(".nav_wrap"),remove_active_classes:function(){$(".nav_wrap li").removeClass("active")},section_ids:_nav_list}).init()),loc.create_location_list(loc),loc.mapper=new Multi_Marker_Map_It({id:"map_draw",latitude:34.0427899,longitude:-118.24361110000001,recenter:!1,shell_obj:loc,zoom:14,draw_list:"conference_locations",marker_reference_id:"post_id",marker_secondary_id:"event_type",marker_click_callback_name:"map_marker_click_callback",map_control_location:"LEFT_BOTTOM",style:[{featureType:"landscape",elementType:"geometry",stylers:[{color:"#AFAA90"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#363636"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#FCFBE4"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#DFDDCA"}]},{}],color_by_type:function(_obj){var result="#E29C05";switch(null!=_obj.event_type?_obj.event_type:_obj.secondary_id){case 8:result="#CB3FED";break;case 4:result="#00AFEF"}return result},custom_marker:{path:"M23.808,9.521c0-4.865-3.943-8.809-8.808-8.809S6.192,4.656,6.192,9.521c0,4.227,2.977,7.758,6.949,8.609v10.529h3.717 V18.13C20.83,17.278,23.808,13.748,23.808,9.521z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#f60",scale:1},custom_marker_active:{path:"M23.808,9.521c0-4.865-3.943-8.809-8.808-8.809S6.192,4.656,6.192,9.521c0,4.227,2.977,7.758,6.949,8.609v10.529h3.717 V18.13C20.83,17.278,23.808,13.748,23.808,9.521z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#f20022",scale:2}}),loc.mapper.init(),$("#close_map_data").click(function(e){$("#conference_location_data").removeClass("open"),loc.mapper.clear_markers_set_new(loc,loc.conference_locations,!0)}),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(key_vals.thank_you)||setTimeout(function(){var thank_you_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"thank_you_modal"});thank_you_modal.set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.set_form_height(450),thank_you_modal.draw_overlay(!0)},500),General.is_null_empty_undefined(key_vals.schedule)||setTimeout(function(){$("li[data-goto=schedule_anchor]").trigger("click")},500),General.is_null_empty_undefined(key_vals.speakers)||setTimeout(function(){$("li[data-goto=speakers_anchor]").trigger("click")},500)),$(".code_of_conduct_link").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal",force_absolute:!0});e.set_form_to_wrap("code_of_conduct"),e.set_form_width(600),e.draw_overlay(!0)})},function(_obj){Shell_Base.call(this,_obj)}),Conference_Site_2018_Main=(Conference_Site_2018_Base.inherits(Shell_Base),Conference_Site_2018_Base.fn.base_init=function(){$("#burger").click(function(e){$("#nav_list").hasClass("open")?$("#nav_list").removeClass("open"):$("#nav_list").addClass("open")}),$(".tiles.hide_sub_section li").click(function(e){$(this).find(".sub_section").hasClass("open")?$(this).find(".sub_section").removeClass("open").end().find(".speaker_name").removeClass("open"):$(this).find(".sub_section").addClass("open").end().find(".speaker_name").addClass("open")}),$(".nav_wrap li").live("click",function(e){var data_goto;"ticket_btn"!=$(this).attr("id")&&($(".nav_wrap li").removeClass("active"),$(this).addClass("active"),data_goto=$(this).attr("data-goto"),$(".burger_menu").hasClass("active")&&$(".burger_menu").removeClass("active"),data_goto=$(String.format("#{0}",data_goto)).offset().top-160,$("html, body").animate({scrollTop:data_goto},1e3))})},function(_obj){Conference_Site_2018_Base.call(this,_obj),this.mapper=null,this.conference_locations=[]}),Conference_Site_2019_Base=(Conference_Site_2018_Main.inherits(Conference_Site_2018_Base),Conference_Site_2018_Main.fn.map_marker_click_callback=function(this_obj,loc,_map_inst){$("#conference_location_data").hasClass("open")||$("#conference_location_data").addClass("open"),$("#conference_location_data").find(".location_name").text(this_obj.location_name).end().find(".location_address").text(this_obj.address.location_string).end().find(".location_description").text(this_obj.location_description)},Conference_Site_2018_Main.fn.create_location_list=function(loc){loc.conference_locations.push({location_name:"A/D/O",location_description:"Our venue for main stage speakers and panel discussions.",address:new Address_Base({address_1:"29 Norman Ave",city:"Brooklyn",state_abbreviation:"NY",zip:"11222",latitude:40.7240615,longitude:-73.9548847,location_string:"29 Norman Ave"})})},Conference_Site_2018_Main.fn.init=function(){var _nav_list;this.base_init();General.is_mobile_device()||(_nav_list=[],$(".nav_wrap li").each(function(index,val){_nav_list.push($(this).attr("data-goto"))}
1),new Update_Section_Navigation_Scroll({from:"middle",$navigation_wrap:$(".nav_wrap"),remove_active_classes:function(){$(".nav_wrap li").removeClass("active")},section_ids:_nav_list}).init());new Peeking_Fixed_Nav({id_list_to_hide_show_on_scroll:["#head"],callback_on_update:function(){$(".burger_menu").removeClass("active"),$(".auto_scroller.initial_fixed").addClass("bottom_out")}}).init(),$("#burger").live("click",function(e){$(".burger_menu").hasClass("active")?$(".burger_menu").removeClass("active"):$(".burger_menu").addClass("active")}),$(".back_to_top").live("click",function(e){General.scroll_to_top()}),$(".continue_down_arrow").live("click",function(e){General.scroll_to_data_goto("text_section_1",85)}),this.create_location_list(this),this.mapper=new Multi_Marker_Map_It({id:"map_draw",latitude:40.723076,longitude:-73.9516899,recenter:!1,shell_obj:this,zoom:16,draw_list:"conference_locations",marker_reference_id:"post_id",marker_secondary_id:"event_type",marker_click_callback_name:"map_marker_click_callback",map_control_location:"LEFT_BOTTOM",marker_fill_color:"#ff617d",marker_stroke_color:"#ffffff",marker_scale:2,style:[{featureType:"landscape",elementType:"geometry",stylers:[{color:"#EDF2FF"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#B5C8FE"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#FDFEFF"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#AEC3FD"}]},{}],color_by_type:function(_obj){var result="#ff617d";switch(null!=_obj.event_type?_obj.event_type:_obj.secondary_id){case 8:case 4:result="#ff617d"}return result},custom_marker:{path:"M28.809,8.265l-7.072-7.073c0,0-6.95,6.737-6.736,6.735c0.214-0.001-6.736-6.736-6.736-6.736L1.192,8.264L7.928,15 l-6.736, 6.736l7.073, 7.072L15, 22.072l6.736, 6.736l7.072-7.072L22.074, 15L28.809, 8.265z",anchor:{x:17,y:52},opacity:1,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#ff617d",scale:2},custom_marker_active:{path:"M28.809,8.265l-7.072-7.073c0,0-6.95,6.737-6.736,6.735c0.214-0.001-6.736-6.736-6.736-6.736L1.192,8.264L7.928,15 l-6.736, 6.736l7.073, 7.072L15, 22.072l6.736, 6.736l7.072-7.072L22.074, 15L28.809, 8.265z",anchor:{x:17,y:52},opacity:.8,stroke_color:"#ffffff",stroke_weight:1,fill_color:"#ff617d",scale:2}}),this.mapper.init(),$(".map_section").live("click",function(e){$(".x_ado").hide()}),Hash_Key_Value_List.key_values_exist()&&(key_vals=Hash_Key_Value_List.get_list(),General.is_null_empty_undefined(key_vals.thank_you)||setTimeout(function(){var thank_you_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"thank_you_modal"});thank_you_modal.set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.set_form_height(450),thank_you_modal.draw_overlay(!0)},500),General.is_null_empty_undefined(key_vals.schedule)||setTimeout(function(){$("li[data-goto=schedule_anchor]").trigger("click")},500),General.is_null_empty_undefined(key_vals.speakers)||setTimeout(function(){$("li[data-goto=speakers_anchor]").trigger("click")},500)),$(".code_of_conduct_link").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal",force_absolute:!0});e.set_form_to_wrap("code_of_conduct"),e.set_form_width(600),e.draw_overlay(!0)}),$("*[data-mixer-font-features-class]").each(function(index,val){for(var $this=$(this),_class_add=$this.attr("data-mixer-font-features-class"),_percent_induction=General.is_null_empty_undefined($this.attr("data-mixer-font-features-percent"))?10:$this.attr("data-mixer-font-features-percent"),_new_html="",split_html=$this.html().clean_white_space().split('<span class="now_what">NOW wHat?</span>'),k=0;k<split_html.length;k++)if(""!=split_html[k]){for(var m=0;m<split_html[k].length;m++)General.randomBase(1,100)<=_percent_induction&&" "!=split_html[k][m]?_new_html+=String.format("<span class='{0}'>{1}</span>",_class_add,split_html[k][m]):_new_html+=split_html[k][m];_new_html+="<span class='now_what'>NOW wHat?</span>"}$this.html(_new_html)}),$(".peek_bio").live("click",function(e){var $this=$(this),$bio=$this.parent().find(".about");$bio.hasClass("hide")?($this.text("Hide Presenter Bio"),$bio.removeClass("hide")):($this.text("View Presenter Bio"),$bio.addClass("hide"))});var key_vals=new Date,close_it_down_date=new Date("October 6, 2018 00:00:00");key_vals<=close_it_down_date&&($("#flash_sale_countdown").countdown({until:close_it_down_date,format:"dHMs",timezone:-4,padZeroes:!0}),setTimeout(function(){document.body.scrollTop=document.documentElement.scrollTop=0;var modal_flash_sale=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"flash_sale"});modal_flash_sale.set_form_to_wrap("flash_sale_zone"),modal_flash_sale.set_form_width(600),modal_flash_sale.draw_overlay(!0)},500))},function(_obj){Shell_Base.call(this,_obj)}),Conference_Site_2019_Coming_Soon=(Conference_Site_2019_Base.inherits(Shell_Base),C
1onference_Site_2019_Base.fn.base_init=function(){},function(_obj){Conference_Site_2019_Base.call(this,_obj),this.mapper=null,this.conference_locations=[]}),Conference_Site_2019_Main=(Conference_Site_2019_Coming_Soon.inherits(Conference_Site_2019_Base),Conference_Site_2019_Coming_Soon.fn.init=function(){var loc=this;loc.base_init(),General.is_mobile_device(),new Full_Screen_Slide_With_Scroll_Feedback({$wrapper:$("#main_slide_wrap"),update_on_scroll:3e3,update_on_touchmove:200,pause_on_slide_time:1e3,enable_loop:!0}).init(),$("#signup_for_presale").live("submit",function(e){e.preventDefault();$(this);e=$("#user_email").val();e.is_valid_email()?$.post(GLOBALS.ROOT_PATH+"/home/subscribe_to_newsletter",{email:e,list_id:"b8edba8dcacd3b7ffeac99e8cef4b5c9",extra_key_vals:JSON.stringify({"pre-sale":"Yes"})},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)&&(($form_contents=$("#form_contents")).empty(),new String,$form_contents.html("<p>Thanks you are on the list!</p> <p> We will send an email on Wednesday May 15th with a link to the registration and ticket sale page. You'll have a 24 hour head start to get a ticket at the Early Bird price before we open up sales to the rest of the world.</p><p>Watch your inbox for the invite and set yourself a reminder to jump on the pre-sale! We look forward to seeing you at the conference in October!</p>"))},"json"):$("#user_email").addClass("error")})},function(_obj){Conference_Site_2019_Base.call(this,_obj),this.mapper=null,this.conference_locations=[],this.page_main_wrap_current=General.is_null_empty_undefined(_obj.page_main_wrap_current)?"#conference_wrap_current":_obj.page_main_wrap_current,this.page_main_wrap_old=General.is_null_empty_undefined(_obj.page_main_wrap_old)?"#conference_wrap_old_page":_obj.page_main_wrap_old,this.url_update_history=new URL_Via_History_API({use_google_analytics_page_update:!1}),this.ticket_modal_has_been_shown=!1,this.page_scroll_for_ticket_modal=0}),Student_Showcase_School_Shows=(Conference_Site_2019_Main.inherits(Conference_Site_2019_Base),Conference_Site_2019_Main.fn.create_location_list=function(loc){loc.conference_locations.push({custom_marker_path:"M25,1C11.746,1,1,11.746,1,25c0,13.254,10.746,24,24,24s24-10.746,24-24C49,11.746,38.254,1,25,1z M26.813,38h-3.676V20.47 c0-1.821,0.185-2.75,0.705-4.086h-1.67c-1.003,2.933-3.121,4.791-6.017,5.2V17.72c3.082-0.705,5.979-2.6,7.651-5.72h3.008V38z M37.846,38h-4.754v-4.828h4.754V38z",location_name:"1. Venue Address",location_description:"",address:new Address_Base({address_1:"19 Morris Ave",city:"Brooklyn",state_abbreviation:"NY",zip:"11205",latitude:40.6992184,longitude:-73.9761022,location_string:"19 Morris Ave"})}),loc.conference_locations.push({custom_marker_path:"M25,1C11.746,1,1,11.746,1,25c0,13.254,10.746,24,24,24s24-10.746,24-24C49,11.746,38.254,1,25,1z M31.895,37.357H15.66 v-3.809c6.751-4.152,12.323-8.168,12.323-13.014c0-3.15-1.974-4.777-4.396-4.777c-2.631,0-4.639,1.904-4.639,5.331l-3.496-0.484 c0.035-4.604,3.116-7.961,8.169-7.961c5.019,0,7.996,3.184,7.996,7.511c0,2.596-0.901,4.811-2.527,6.751 c-2.077,2.388-5.78,4.81-10.591,7.512l0.865,1.312c1.245-0.864,2.595-1.558,5.157-1.558h7.373V37.357z M40.548,37.357h-4.431v-4.501 h4.431V37.357z",location_name:"2. Recommended Hotel",location_description:"",address:new Address_Base({address_1:"216 Duffield Street",city:"Brooklyn",state_abbreviation:"NY",zip:"11201",latitude:40.6923295,longitude:-73.9836232,location_string:"216 Duffield Street"})})},Conference_Site_2019_Main.fn.populate_all_other_pages=function(get_all_pages){for(var loc=this,_currently_loaded_page=$($("#main_conference_wrap > .conference_page").get(0)).attr("data-page-name"),k=0;k<$("#navigate_sections ul > li").length;k++){var _action_name=$($("#navigate_sections ul > li").get(k)).find("> a").attr("data-action-name");get_all_pages||_action_name!=_currently_loaded_page?$.post("/conference/get_conference_section_html",{action_name:_action_name,conference_year:2019},function(data){General.status_ok(data.status)?($(data.data).appendTo($("#main_conference_wrap")),0<$("#map_draw").length&&(loc.init_map(),loc.create_location_list(loc)),0<$("#quote_slideshow").length&&$("#quote_slideshow").slick({infinite:!0,dots:!0,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0}),0<$("#experience_slideshow").length&&$("#experience_slideshow").slick({infinite:!0,dots:!0,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0})):printf(data.text,"in action [get_conference_section_html]",CONSOLE_TYPES.ERROR)}):$(String.format("#navigate_sections ul > li > a[data-action-name={0}]",_currently_loaded_page)).parent().addClass("active")}},Conference_Site_2019_Main.fn.switch_page=function(update_history,state_obj){var $old_active;null!=state_obj&&(General.scroll_to_top(),$($("#main_conference_wrap > .conference_page").get(0)).attr("data-page-name"),$old_active=$("#main_conference_wrap > .conference_page.active"),$(String.format("#main_conference_wrap > .conference_page[data-page-name={0}]",state_obj.page)).addClass("active"),update_history&&this.url_update_history.update_history_state(state_obj,function(){}),setTimeout(function(){$old_active.removeClass("active"),$("header").removeClass("index schedule presenters location").addClass(state_obj.page)},600))},Conference_Site_2019_Main.fn.get_rendered_page=function(update_history,state_obj){var loc=this;$.post("/conference/get_conference_section_html",{action_name:state_obj.page,conference_year:state_obj.id},function(data){var _old_html;General.status_ok(data.status)?(_old_html=$(loc.page_main_wrap_current).html(),$(loc.page_main_wrap_old).html(_old_html),$(loc.page_main_wrap_current).addClass("push_off_screen"),$(loc.page_main_wrap_current).html(data.data),update_history&&loc.url_update_history.update_history_state(state_obj,function(){})):printf(data.text,"in action [get_conference_section_html]",CONSOLE_TYPES.ERROR)})},Conference_Site_2019_Main.fn.init_map=function(){var _zoom=15;$(window).width()<=500&&(_zoom=13),this.mapper=new Multi_Marker_Map_It({id:"map_draw",latitude:40.6973,longitude:-73.9799,recenter:!1,shell_obj:this,zoom:_zoom,add_click_listener:!1,draw_list:"conference_locations",marker_reference_id:"post_id",marker_secondary_id:"event_type",marker_click_callback_name:"map_marker_click_callback",map_control_location:"LEFT_BOTTOM",marker_fill_color:"#ff941f",marker_stroke_color:"#ffffff",marker_scale:1,style:[{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#afcade"}]},{featureType:"administrative",elementType:"labels.icon",stylers:[{color:"#051d49"}]},{featureType:"administrative",elementType:"labels.text",stylers:[{color:"#051d49"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#051d49"}]},{featureType:"administrative",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#b2d0e3"}]},{featureType:"landscape",elementType:"labels.icon",stylers:[{color:"#051d49"}]},{featureType:"landscape",elementType:"labels.text.fill",stylers:[{color:"#bad9e7"}]},{featureType:"landscape",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{color:"#96b1c6"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{color:"#051d49"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#051d49"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"poi.government",elementType:"geometry.fill",stylers:[{color:"#8ca7be"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#bad9e7"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#96b1c6"}]},{featureType:"road",elementType:"labels.text",stylers:[{color:"#051d49"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#a7c5d8"}]},{featureType:"transit",elementType:"geometry.fill",stylers:[{color:"#96b1c6"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#051d49"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#8ca7be"}]},{featureType:"water",elementType:"labels",stylers:[{color:"#051d49"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#051d49"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{visibility:"off"}]}],color_by_type:function(_obj){var result="#ff941f";switch(null!=_obj.event_type?_obj.event_type:_obj.secondary_id){case 8:case 4:result="#ff941f"}return result},custom_marker:{path:"M28.809,8.265l-7.072-7.073c0,0-6.95,6.737-6.736,6.735c0.214-0.001-6.736-6.736-6.736-6.736L1.192,8.264L7.928,15 l-6.736, 6.736l7.073, 7.072L15, 22.072l6.736, 6.736l7.072-7.072L22.074, 15L28.809, 8.265z",anchor:{x:17,y:22},opacity:1,stroke_color:"#ffffff",stroke_weight:0,fill_color:"#ff941f",scale:1.25},custom_marker_active:{path:"M28.809,8.265l-7.072-7.073c0,0-6.95,6.737-6.736,6.735c0.214-0.001-6.736-6.736-6.736-6.736L1.192,8.264L7.928,15 l-6.736, 6.736l7.073, 7.072L15, 22.072l6.736, 6.736l7.072-7.072L22.074, 15L28.809, 8.265z",anchor:{x:17,y:32},opacity:.8,stroke_color:"#ffffff",stroke_weight:0,fill_color:"#ff941f",scale:1.25}}),this.mapper.init()},Conference_Site_2019_Main.fn.init=function(){var loc=this;loc.base_init(),General.is_mobile_device();loc.populate_all_other_pages(!1),setInterval(function(){loc.populate_all_other_pages(!0)},12e5),$(window).on("popstate",function(e){history.state&&loc.switch_page(!0,history.state)}),$(".get_rendered_section").live("click.conference_2019",function(e){var _action_name,_page_title,_url;e.preventDefault(),$(this).parent().hasClass("active")||($("#vert_burger").click(),e=$(this).attr("data-conference-year"),_action_name=$(this).attr("data-action-name"),_page_title=$
1(this).attr("data-title"),_url=$(this).attr("href"),$("#navigate_sections ul li").removeClass("active"),$(this).parent().addClass("active"),e=new History_State({id:e,page:_action_name,title:_page_title,update_url:_url}),loc.switch_page(!0,e))}),$("#vert_burger").live("click",function(e){$("#navigate_sections").hasClass("active")?($("#navigate_sections").removeClass("active"),$(this).removeClass("active")):($(this).addClass("active"),$("#navigate_sections").addClass("active"))}),0<$("#map_draw").length&&(loc.init_map(),loc.create_location_list(loc)),$(".active_ticket").live("click",function(){$("#buy_ticket_id_2019").trigger("click")}),0<$("#quote_slideshow").length&&$("#quote_slideshow").slick({infinite:!0,dots:!0,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0}),0<$("#experience_slideshow").length&&$("#experience_slideshow").slick({infinite:!0,dots:!0,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0}),$("#video_selection li").live("click",function(e){e.preventDefault(),$(this).hasClass("active")||($("#video_selection li").removeClass("active"),e=$(this).attr("data-youtube-video"),$("#video_zone iframe").attr({src:e}),$(this).addClass("active"))}),$("#signup_for_presale").live("submit",function(e){e.preventDefault();$(this);var e=$("#user_email").val(),_placeholder_text=$("#user_email").attr("data-placeholder");e.is_valid_email()&&e!=_placeholder_text?$.post(GLOBALS.ROOT_PATH+"/home/subscribe_to_newsletter",{email:e,list_id:"b8edba8dcacd3b7ffeac99e8cef4b5c9",extra_key_vals:JSON.stringify({"pre-sale":"Yes"})},function(data){var _success_signup_modal,data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)&&(($form_contents=$(".form_contents")).empty(),new String,data="<h2>Thanks you are on the list!</h2><p>We will send an email on Wednesday July 10th with a link to the registration and ticket sale page. You'll have a 24 hour head start to get a ticket before we open up sales to the rest of the world.</p><p>Watch your inbox for the invite and set yourself a reminder to jump on the pre-sale! We look forward to seeing you at the conference in October!</p>",$form_contents.html(data),data=String.format("<div class='qm_background_c77conf_2019'>{0}</div>",data),(_success_signup_modal=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal",force_absolute:!0})).set_content(data),_success_signup_modal.set_form_width(600),_success_signup_modal.draw_overlay(!0),$(".form_bits").remove(),General.scroll_to_top())},"json"):$("#user_email").addClass("error")}),$(".code_of_conduct").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal",force_absolute:!0});e.set_form_to_wrap("code_of_conduct"),e.set_form_width(600),e.draw_overlay(!0)}),$(".accessibility_policy").live("click",function(e){e.preventDefault(),document.body.scrollTop=document.documentElement.scrollTop=0;e=new Quick_Modal({appendTo:"core77",add_close_button:!0,attach_class:"code_of_conduct_modal",force_absolute:!0});e.set_form_to_wrap("accessibility_policy"),e.set_form_width(600),e.draw_overlay(!0)}),$("#user_email").live("focus",function(e){var $this=$(this),_placeholder=$this.attr("data-placeholder");$this.val()==_placeholder&&$this.val("")}),$("#user_email").live("blur",function(e){var $this=$(this),_placeholder=$this.attr("data-placeholder");""==$this.val()&&$this.val(_placeholder)}),$(".peek_bio").live("click",function(e){var $this=$(this);$this.next().hasClass("hide")?($this.next().removeClass("hide"),$this.text("Hide Presenter Bio")):($this.next().addClass("hide"),$this.text("View Presenter Bio"))}),$(".toggle_description").live("click",function(e){var $this=$(this);$this.parent().next().hasClass("hide")?($this.parent().next().removeClass("hide"),$this.addClass("turn_up")):($this.parent().next().addClass("hide"),$this.removeClass("turn_up"))})},Student_Showcase_Base=function(_obj){Shell_Base.call(this,_obj)},Student_Showcase_Base.inherits(Shell_Base),Student_Showcase_Base.fn.base_init=function(){},function(_obj){Student_Showcase_Base.call(this,_obj),this.competition_template=General.is_null_empty_undefined(_obj.competition_template)?0:_obj.competition_template,this.total_all_shows=General.is_null_empty_undefined(_obj.total_all_shows)?0:parseInt(_obj.total_all_shows),this.total_active_shows=General.is_null_empty_undefined(_obj.total_active_shows)?0:parseInt(_obj.total_active_shows),this.total_coming_soon_shows=General.is_null_empty_undefined(_obj.total_coming_soon_shows)?0:parseInt(_obj.total_coming_soon_shows),this.all_shows_paginator="",this.active_shows_paginator="",this.coming_soon_shows_paginator="",this.intersection_observer_data_unit="",this.intersection_observer_show_cell_wrap="",this.intersection_observer_panelist_cell_wrap="",this.active_shows_sort_by=VIRTUAL_STUDENT_SHOW_SORT_BY.OPENING_DATE,this.coming_soon_shows_sort_by=VIRTUAL_STUDENT_SHOW_SORT_BY.ALPHA_SCHOOL_SHOW,this.page_size=12}),Student_Showcase_School_Show_Projects=(Student_Showcase_School_Shows.inherits(Student_Showcase_Base),Student_Showcase_School_Shows.fn.get_shows=function(loc,_competition_template,_start_row,_end_row,_get_abstract_type,_sort_by){$.post("/studentshowcase/all-shows-more",{competition_template:_competition_template,start_row:_
1start_row,end_row:_end_row,get_show_types:_get_abstract_type,sort_by:_sort_by},function(data){loading.remove(),General.status_ok(data.status)&&(printf(data),_get_abstract_type==VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_READY?($(data.text).appendTo($(".unit_grid.active_shows")),_end_row<loc.total_active_shows&&Paginator.draw_show_more(loc.active_shows_paginator)):_get_abstract_type==VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_COMING_SOON?($(data.text).appendTo($(".unit_grid.coming_soon_shows")),_end_row<loc.total_coming_soon_shows&&Paginator.draw_show_more(loc.coming_soon_shows_paginator)):printf("nope"),General.is_mobile_device()?$(".show_cell_wrap").addClass("is_visible"):loc.intersection_observer_show_cell_wrap.re_init())})},Student_Showcase_School_Shows.fn.init=function(){var loc=this;loc.base_init(),loc.active_shows_paginator=new Paginator({row_count:loc.total_active_shows,container_li:".active_shows .show_cell_wrap",starting_page_num:1,container_id_to_append_show_more:"active_shows_block",show_more_html:"<div data-show-more-dom='' class='trans_all get_more_shows' id='show_more_active_shows'>Show More</div>",page_size:loc.page_size}),loc.active_shows_paginator.init(),loc.coming_soon_shows_paginator=new Paginator({row_count:loc.total_coming_soon_shows,container_li:".coming_soon_shows .show_cell_wrap",starting_page_num:1,container_id_to_append_show_more:"coming_soon_shows_block",show_more_html:"<div data-show-more-dom='' class='trans_all get_more_shows' id='show_more_coming_soon_shows'>Show More</div>",page_size:loc.page_size}),loc.coming_soon_shows_paginator.init(),$(".sort_by_select li").live("click",function(e){var _list_name,_get_abstract_type,$this=$(this);$this.hasClass("active")||($this.parent().find("li").removeClass("active"),$this.addClass("active"),_list_name=$this.data("list-name"),$this=$this.data("id"),_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ALL,loading.create(),"active_shows"==_list_name?(loc.active_shows_sort_by=$this,_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_READY,$(".unit_grid.active_shows").empty(),loc.active_shows_paginator.remove_show_more_specific()):"coming_soon_shows"==_list_name&&(loc.coming_soon_shows_sort_by=$this,_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_COMING_SOON,$(".unit_grid.coming_soon_shows").empty(),loc.coming_soon_shows_paginator.remove_show_more_specific()),loc.get_shows(loc,loc.competition_template,1,loc.page_size,_get_abstract_type,$this))}),$(".get_more_shows").live("click",function(e){var $this=$(this),results={},_start_row=0,_end_row=0,_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ALL,_sort_by=VIRTUAL_STUDENT_SHOW_SORT_BY.OPENING_DATE;"show_more_active_shows"==$this.attr("id")?(_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_READY,_start_row=(results=loc.active_shows_paginator.calc_start_end()).start_row,_end_row=results.end_row,_sort_by=loc.active_shows_sort_by,loc.active_shows_paginator.remove_show_more_specific()):"show_more_coming_soon_shows"==$this.attr("id")&&(_get_abstract_type=VIRTUAL_STUDENT_SHOW_TYPE_ABSTRACT_GET.ONLY_COMING_SOON,_start_row=(results=loc.coming_soon_shows_paginator.calc_start_end()).start_row,_end_row=results.end_row,_sort_by=loc.coming_soon_shows_sort_by,loc.coming_soon_shows_paginator.remove_show_more_specific()),loc.get_shows(loc,loc.competition_template,_start_row,_end_row,_get_abstract_type,_sort_by)}),$("[data-go-to=how_signup]").live("click",function(e){General.scroll_to_data_goto("how_signup",85)}),General.is_mobile_device()?($("[data-unit-number]").addClass("is_visible"),$(".show_cell_wrap").addClass("is_visible"),$(".panelist_cell_wrap").addClass("is_visible")):(loc.intersection_observer_data_unit=new Intersection_Observer_Custom({selector_to_handle:"[data-unit-number]",options:{rootMargin:"0px",threshold:.25}}),loc.intersection_observer_data_unit.init(),loc.intersection_observer_show_cell_wrap=new Intersection_Observer_Custom({selector_to_handle:".show_cell_wrap",options:{rootMargin:"0px",threshold:.35}}),loc.intersection_observer_show_cell_wrap.init(),loc.intersection_observer_panelist_cell_wrap=new Intersection_Observer_Custom({selector_to_handle:".panelist_cell_wrap",options:{rootMargin:"0px",threshold:.25}
1}),loc.intersection_observer_panelist_cell_wrap.init())},function(_obj){Student_Showcase_Base.call(this,_obj),this.total_project_count=General.is_null_empty_undefined(_obj.total_project_count)?0:parseInt(_obj.total_project_count),this.show_id=General.is_null_empty_undefined(_obj.show_id)?0:parseInt(_obj.show_id),this.competition_template=General.is_null_empty_undefined(_obj.competition_template)?0:parseInt(_obj.competition_template),this.project_paginator="",this.intersection_observer_show_cell_wrap="",this.page_size=12}),Student_Showcase_Add_Panelists_Shows=(Student_Showcase_School_Show_Projects.inherits(Student_Showcase_Base),Student_Showcase_School_Show_Projects.fn.init=function(){var loc=this;loc.base_init(),new Peeking_Fixed_Nav({id_list_to_hide_show_on_scroll:["#mobile_nav_unit"],callback_on_update:function(){}}).init(),loc.project_paginator=new Paginator({row_count:loc.total_project_count,container_li:".details_col .project_cell_wrap",starting_page_num:1,container_id_to_append_show_more:"outer_wrap_show",show_more_html:"<div data-show-more-dom='' class='trans_all get_more_projects' id='show_more_projects'>Show More</div>",page_size:loc.page_size}),loc.project_paginator.init(),General.is_mobile_device()?$("[data-unit-number]").addClass("is_visible"):(loc.intersection_observer_data_unit=new Intersection_Observer_Custom({selector_to_handle:"[data-unit-number]",options:{rootMargin:"0px",threshold:.25}}),loc.intersection_observer_data_unit.init()),$(".select_image_mode ul li").live("click",function(e){var $this=$(this),image_block_connect=$this.data("connect-image-block"),image_block_connect=$(String.format("div[data-image-block={0}]",image_block_connect));$this.hasClass("slides")?image_block_connect.hasClass("image_grid")&&($this.parent().find("li").removeClass("active"),$this.addClass("active"),image_block_connect.removeClass("image_grid").addClass("image_slider"),image_block_connect.slick({infinite:!0,dots:!1,speed:300,slidesToShow:1,adaptiveHeight:!1,arrows:!0,initialSlide:1}),image_block_connect.slick("slickPrev")):$this.hasClass("grid")&&image_block_connect.hasClass("image_slider")&&($this.parent().find("li").removeClass("active"),$this.addClass("active"),image_block_connect.removeClass("image_slider").addClass("image_grid"),image_block_connect.slick("unslick"))}),$("[data-goto-unit]").live("click",function(e){var _project_id=$(this).data("project-id"),_goto=$(this).data("goto-unit");0<$(String.format("[data-loaded-project-id={0}]",_project_id)).length?General.scroll_to_data_goto(_goto):(loc.project_paginator.remove_show_more_specific(),loading.create(),$.post("/studentshowcase/student-project-get-by-id",{competition_template:loc.competition_template,show_id:loc.show_id,project_id:_project_id},function(data){loading.remove(),General.status_ok(data.status)&&(printf(data),$(data.text).appendTo($("#outer_wrap_show")),$(String.format("[data-loaded-project-id={0}]",_project_id)).addClass("exception"),General.is_mobile_device()?$("[data-unit-number]").addClass("is_visible"):loc.intersection_observer_data_unit.re_init(),0<loc.total_project_count&&Paginator.draw_show_more(loc.project_paginator),General.scroll_to_data_goto(_goto))}))}),$("#back_to_student_list").live("click",function(e){General.scroll_to_data_goto("goto_student_list")}),$("#show_more_projects").live("click",function(e){$(this);var results=loc.project_paginator.calc_start_end(),_start_row=results.start_row,_end_row=results.end_row;loc.project_paginator.remove_show_more_specific(),$.post("/studentshowcase/student-project-posts-more",{competition_template:loc.competition_template,show_id:loc.show_id,start_row:_start_row,end_row:_end_row},function(data){if(General.status_ok(data.status)){printf(data),$(data.text).appendTo($("#outer_wrap_show")),General.is_mobile_device()||loc.intersection_observer_data_unit.re_init(),_end_row<loc.total_project_count&&Paginator.draw_show_more(loc.project_paginator);for(var k=0;k<$("[data-loaded-project-id]").length;k++){var _curr_project_id=$($("[data-loaded-project-id]").get(k)).data("loaded-project-id");1<$(String.format("[data-loaded-project-id={0}]",_curr_project_id)).length&&($(String.format(".exception[data-loaded-project-id={0}]",_curr_project_id)).hasClass("hide")||$(String.format(".exception[data-loaded-project-id={0}]",_curr_project_id)).addClass("hide"))}$(".exception.hide[data-loaded-project-id]").remove()}})})},function(_obj){Student_Showcase_Base.call(this,_obj),this.data=new Virtual_Student_Panelist(_obj.data),this.channel_selection_module=""}),Student_Showcase_Approve_Lists=(Student_Showcase_Add_Panelists_Shows.inherits(Student_Showcase_Base),Student_Showcase_Add_Panelists_Shows.fn.init=function(){var loc=this;loc.base_init(),0<$("#bio").length&&new Text_Counter({elem_id:"bio",mode:"char",max_count:500}).init(),$("input#avatar_image_up").fileupload({dataType:"json",formData:{panelist_id:$("#panelist_id").val()},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.WEB_ROOT_PATH.append("/studentshowcase/student_showcase_panelist_image_receive"),add:function(e,data){null!=data.files[0].name&&(loading.create(),data.submit())},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){data=General.parse_json_if_needed(data.result),General.wrap_and_reset_form($("input#avatar_image_up")),General.status_ok(data.status,loc)?(message_slider("Image 2 has been successfully uploaded"),0==$("#
1image_2_upload .image_preview").length&&$("<div class='image_preview'></div>").insertAfter($("#image_2_upload label")),$("#image_2_upload .image_preview").css({"background-image":String.format("url({0})",data.image.url)}),$("#image_2_upload span").text("Replace Image"),$("#add_image_2_wrapper").hasClass("has_content")||$("#add_image_2_wrapper").addClass("has_content")):message_slider(data.text,!0),loading.remove()}}),$("#save_panelist").click(function(e){var _panelist_id=General.is_null_empty_undefined($("#panelist_id").val(),0)?"":$("#panelist_id").val();loc.data.set_property("id",_panelist_id),loc.data.set_property("name",$("#name").val()),loc.data.set_property("title",$("#title").val()),loc.data.set_property("company",$("#company").val()),loc.data.set_property("social_link",$("#social_link").val()),loc.data.set_property("email",$("#email").val()),loc.data.set_property("city",$("#city").val()),loc.data.set_property("category_ids_csv",$("#category_ids_csv").val()),loc.data.set_property("bio",$("#bio").val()),loc.data.is_valid()&&$.post(GLOBALS.WEB_ROOT_PATH.append("studentshowcase/virtual_student_panelist_update"),loc.data.get_params(),function(data){var thank_you_modal;data=General.parse_json_if_needed(data),General.status_ok(data.status,loc)?((thank_you_modal=new Quick_Modal({appendTo:"core77",attach_class:"thank_you_modal",close_off:!0})).set_form_to_wrap("thank_you_box"),thank_you_modal.set_form_width(600),thank_you_modal.draw_overlay(!0)):message_slider(data.text,!0)})}),loc.channel_selection_module=new Multi_Element({shell_obj:loc,use_hidden_field_csv_for_list:!0}),loc.channel_selection_module.init(),$(".back_to_homepage_on_close").live("click",function(e){$(this);General.new_tab_link_override("/student-showcase")})},function(_obj){Student_Showcase_Base.call(this,_obj)}),Adlet_Billing_Payment=(Student_Showcase_Approve_Lists.inherits(Student_Showcase_Base),Student_Showcase_Approve_Lists.fn.init=function(){this.base_init(),$(".action_sect .approve").live("click",function(e){var $this=$(this),_panelist_id=$this.data("id");$.post("/studentshowcase/approve_panelist",{panelist_id:_panelist_id},function(data){$this.remove()})}),$(".action_sect .delete").live("click",function(e){var $this=$(this),_panelist_id=$this.data("id");$.post("/studentshowcase/delete_panelist",{panelist_id:_panelist_id},function(data){$this.parent().parent().remove()})}),$(".action_sect .edit").live("click",function(e){var _panelist_id=$(this).data("id");General.new_tab_link_override(String.format("/studentshowcase/update_panelist?panelist_id={0}",_panelist_id))})},function(_obj){Shell_Base.call(this,_obj),this.billing_form}),Directory_Companies_Public=(Adlet_Billing_Payment.inherits(Shell_Base),Adlet_Billing_Payment.fn.init=function(){var loc=this;$("input#add_adlet_image").fileupload({dataType:"json",formData:{},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.SECURE_ROOT_PATH+"home/adlet_image_upload",add:function(e,data){loading.create(),data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){General.wrap_and_reset_form($("#add_adlet_image")),data.result=General.parse_json_if_needed(data.result),General.status_ok(data.result.status)?(loading.remove(),$("#avatar_placeholder img").attr({src:data.result.data}).parent().parent().removeClass("hide"),$("#url_for_ad_image").val(data.result.data),$(".upload_img_wrap").removeClass("full_width_force")):message_slider(data.result.text,!0),loading.remove()}}),new Credit_Cards({container_id:"card_number"}).init(),$("form#adlet_billing input[type=text], form#adlet_billing select").focus(function(event){var default_text=$(this).parents("li").find("label em").attr("data-default-text"),default_text=General.is_null_empty_undefined(default_text)?"":default_text;$(this).removeClass("error valid invalid").parents("li").find("label em").removeClass("error valid invalid").text(default_text)}),$("#complete_purchase").click(function(e){e.preventDefault(),loc.billing_form=new Adlet_Payment_Billing_Form({contact_name:"adlet_contact_name",company_name:"adlet_company_name",phone:"adlet_phone_number",email:"adlet_email",credit_card_number:"card_number",csc:"card_security_code",cardholder_name:"card_holder_name",link:"adlet_link_submitted",$form:$("#adlet_billing")}),loc.billing_form.validate()&&$("form#adlet_billing").submit()}),$("#adlet_status").change(function(e){var _now=new Date,now_plus_3
10_days=new Date((new Date).setDate(_now.getDate()+30));"approved"!=$(this).val()&&"rejected"!=$(this).val()||"1/1/0001 12:00:00 AM"!=$("#start_date").val()||($("#start_date").val(String.format("{0}/{1}/{2}",_now.getMonth()+1,_now.getDate,_now.getFullYear())),$("#end_date").val(String.format("{0}/{1}/{2}",now_plus_30_days.getMonth()+1,now_plus_30_days.getDate,now_plus_30_days.getFullYear())))}),$("#start_date").change(function(e){var _start_date=new Date($("#start_date").val());new Date($("#end_date").val())<_start_date&&$("#end_date").val($("#start_date").val())}),$(".dp_icon").click(function(){$(this).parent().parent().next().focus()}),$(".datepicker").datepicker()},function(_obj){Shell_Base.call(this,_obj),this.page=General.is_null_empty_undefined(_obj.page)?"":_obj.page,this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?0:parseInt(_obj.profile_id),this.profile_ids=General.is_null_empty_undefined(_obj.profile_ids)?"":_obj.profile_ids}),Login_Signup=(Directory_Companies_Public.inherits(Shell_Base),Directory_Companies_Public.fn.pre_fire=function(loc){"profile"==loc.page&&0<loc.profile_id?$.post("/directory/h_v_st",{p_id:loc.profile_id,prfl_v:1},function(){}):"project"==loc.page&&0<loc.profile_id?$.post("/directory/h_v_st",{p_id:loc.profile_id,proj_v:1},function(){}):"companies"==loc.page&&$.post("/directory/h_ptv_st",{p_ids:loc.profile_ids},function(){})},Directory_Companies_Public.fn.init=function(){this.pre_fire(this),(new Shuttle_Slider).init(),$("[data-max-height-restrict-trigger]").live("click",function(e){var $this=$(this);$this.parents("div[data-max-height-restrict]").find("div[data-max-height-restrict-zone]").hasClass("more")?($this.text("Read More"),$this.parents("div[data-max-height-restrict]").find("div[data-max-height-restrict-zone]").removeClass("more")):($this.text("Show Less"),$this.parents("div[data-max-height-restrict]").find("div[data-max-height-restrict-zone]").addClass("more"))}),this.lazy_load_images=new Lazy_Load_Images_AF({shell_base:this,unloaded_selector_in_frame:".lazy_bg_draw",selector_in_frame:".lazy_bg_draw",callback:function($unit,shell_base){var img_src=$unit.attr("data-src");$unit.removeClass("lazy_bg_draw").css({"background-image":String.format("url({0})",img_src)})},callback_no_get:function($unit,shell_base){}}),this.lazy_load_images.init(),this.lazy_load_job_images=new Lazy_Load_Images_AF({shell_base:this,unloaded_selector_in_frame:".lazy_draw",selector_in_frame:".lazy_draw",callback:function($unit,shell_base){var img_src=$unit.find("img").attr("data-src");$unit.removeClass("lazy_draw pl_col op_1 op_2 op_3 op_4").find("img").attr({src:img_src})},callback_no_get:function($unit,shell_base){}}),this.lazy_load_job_images.init()},function(_obj){Shell_Base.call(this,_obj),this.return_url=General.is_null_empty_undefined(_obj.return_url)?"https://codex.core77.com/account":_obj.return_url}),Layout_Page_Base=(Login_Signup.inherits(Shell_Base),Login_Signup.fn.init=function(){var _operational_value=Cookie.read("operational_values");unescape(_operational_value).split("&")[0].split("=");$("#operational_values").val(unescape(_operational_value)),$("#return_url").val(this.return_url)},function(_obj){Shell_Base.call(this,_obj),this.shell_type="layout_page",this.log_in_modal,this.register_modal,this.login_signup_modal,this.google_analytics_id="UA-385556-1",this.GA4_analytics_id="G-WW7S3LF90V",this.init_core77_main_events=!0,this.include_google_ads_setup=!0,this.use_footer_newsletter_signup=!0,this.use_c77da_fixed_convo_widget=!1,this.use_special_text_ad=!0}),Layout_Page_Web=(Layout_Page_Base.inherits(Shell_Base),Layout_Page_Base.fn.set_form_fed_data=function(_fed,_on_form,form_id){_fed=$("#"+_fed).val(),form_id=$(String.format("{0} #{1}",form_id,_on_form));General.is_null_empty_undefined(_fed)||form_id.val(_fed)},Layout_Page_Base.fn.set_signup_form_data=function(loc){loc.set_form_fed_data("fed_useremail","user_email","#signup"),loc.set_form_fed_data("fed_username","user_name","#signup"),loc.set_form_fed_data("fed_new_password","new_password","#signup"),loc.set_form_fed_data("fed_confirm_password","confirm_password","#signup"),loc.set_form_fed_data("fed_oauth_object_id","oauth_object_id","#signup"),loc.set_form_fed_data("fed_oauth_provider","oauth_provider","#signup")},Layout_Page_Base.fn.proceed_log_out=function(){Shell_Base.proceed_log_out()},Layout_Page_Base.fn.ajax_signup=function($form){var loc=this,user_cred=new User_Cred_Signup({email:"user_email",username:"user_name",password:"new_password",confirm_password:"confirm_password",return_url:"return_url",oauth_object_id:"oauth_object_id",oauth_provider:"oauth_provider",time_offset_in_ms:"time_offset_in_ms",source:"source",$form:$form}),$form=user_cred.validate(),captcha_token="undefined"!=typeof grecaptcha&&grecaptcha.getResponse?grecaptcha.getResponse():"";captcha_token?$form?(($form=user_cred.get_params())["g-recaptcha-response"]=captcha_token,$.ajax({type:"POST",url:GLOBALS.SECURE_ROOT_PATH+"home/signup",data:$form,dataType:"json",error:function(){loading.remove()},success:function(data){var _html,check_email_modal;data=General.parse_json_if_needed(data),loading.remove(),General.status_ok(data.status,loc)?null!=data.return_url&&null!=data.cookie_value?(loading.create(),loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:data.return_url,remain_logged_in:!0,user:new User({name:"",avatar:"",link:"",profile_complete:!1})},loc)):(_html=new String+"<div id='activate_email' class='branded_modal' style='display: block;'><h3>K</h3><h4 id='context_specific_header'>Almost ready to go</h4><p id='context_specific_messaging'>Check your email to complete your account registration.</p>",General.is_null_empty_undefined(loc.register_modal)||loc.register_modal.remove_overlay(),loc.register_modal=null,(check_email_modal=new Quick_Modal({appendTo:"core77"})).set_form_width(500),check_email_modal.set_content(_html),check_email_modal.draw_overlay(!0)):($.each(data.errors,function(index,val){user_cred.set_error(!0,user_cred.get_prop_name(this.key,user_cred),this.message)}),"undefined"!=typeof grecaptcha&&grecaptcha.reset&&grecaptcha.reset())}})):loading.remove():(loading.remove(),$("#rfvRecaptchaV2_register").show())},Layout_Page_Base.fn.ajax_login=function($form){var loc=this,user_cred=new User_Cred_Login({username:"user_name",password:"your_password",operational_values:"operational_values",return_url:"return_url",$form:$form});user_cred.validate()&&$.ajax({type:"POST",url:GLOBALS.PUBLISH_ROOT_PATH_SECURE+"home/login",data:user_cred.get_params(),dataType:"json",success:function(data){var i_data,xref_type,_$this,_text,data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?(user_cred.has_operational_values()&&(i_data=General.parse_json_if_needed(data.operational_result),xref_type=General.get_key_by_value(USER_OBJECT_XREF_TYPES,i_data.type),_$this=/subscribe/.test(xref_type)?$(".subscribe"):$(".recommend"),_text=String.format("{0}d",_$this.text()),"award_post_vote"==xref_type&&(_$this=$(".community_choice_vote"),_text="You voted for this project"),loc.user_object_xref_success_clbk(i_data,{$this:_$this,success_message:General.success_text[xref_type],action_taken_text:_text},loc)),loc.proceed({cookie_name:data.cookie_name,cookie_val:data.cookie_value,codex_cookie_val:data.codex_cookie_value,return_url:data.return_url,remain_logged_in:data.remain_logged_in,user:new User({name:data.name,avatar:data.avatar,link:data.user_url,profile_complete:data.profile_complete})},loc)):null!=data.errors&&(loading.remove(),"login_error"==data.errors[0].key&&(data.errors=new Array,data.errors.push({message:"The Username or Password entered is incorrect",ke
1y:"username"}),data.errors.push({message:"The Username or Password entered is incorrect",key:"password"})),$.each(data.errors,function(index,val){user_cred.set_error(!0,user_cred[this.key],this.message)}))}})},Layout_Page_Base.fn.run_site_search=function(){var search_text=$("li#search_li input").val();General.is_null_empty_undefined(search_text)||(window.location=String.format("{0}home/search-results?keyword={1}",GLOBALS.WEB_ROOT_PATH,search_text))},Layout_Page_Base.fn.set_context_sensitive_language=function($this){var join_overlay_header=General.is_null_empty_undefined($this.attr("data-overlay-header-join"))?General.default_text.join_now_modal_header:$this.attr("data-overlay-header-join"),join_overlay_message=General.is_null_empty_undefined($this.attr("data-overlay-message-join"))?General.default_text.join_now_modal_message:$this.attr("data-overlay-message-join"),sign_in_overlay_header=General.is_null_empty_undefined($this.attr("data-overlay-header-sign-in"))?General.default_text.sign_in_modal_header:$this.attr("data-overlay-header-sign-in"),$this=General.is_null_empty_undefined($this.attr("data-overlay-message-sign-in"))?General.default_text.sign_in_modal_message:$this.attr("data-overlay-message-sign-in");$("#signup #context_specific_header").html(join_overlay_header),$("#signup #context_specific_messaging").html(join_overlay_message),$("#login #context_specific_header").html(sign_in_overlay_header),$("#login #context_specific_messaging").html($this)},Layout_Page_Base.fn.reset_sign_in_up_forms=function(){$(".login_register #form_wrap").removeClass("open").addClass("close"),$(".login_register #choice_wrap").removeClass("close").addClass("open")},Layout_Page_Base.fn.facebook_tracking=function(){var e,n,f,b;f=window,b=document,e="script",f.fbq||(n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},f._fbq||(f._fbq=n),(n.push=n).loaded=!0,n.version="2.0",n.queue=[],(f=b.createElement(e)).async=!0,f.src="https://connect.facebook.net/en_US/fbevents.js",(b=b.getElementsByTagName(e)[0]).parentNode.insertBefore(f,b)),fbq("init","533741757076804"),fbq("track","PageView")},Layout_Page_Base.fn.handle_ad_units_sidebar=function(){if(!$("#core77").hasClass("no_sb_macro_ad_init"))for(var k=0;k<$(".sidebar_induced_ad").length;k++){var this_ad_slot=$($(".sidebar_induced_ad").get(k)).attr("id"),_ad_slot_type=$($(".sidebar_induced_ad").get(k)).data("ad-type");!(!$($(".sidebar_induced_ad").get(k)).data("mobile-display")&&$(window).width()<=900)&&(_ad_slot_type=Google_Ad_Induction.create_ad_slot({type:_ad_slot_type,unique_ad_slot_id:this_ad_slot}),googletag.pubads().addEventListener("slotRenderEnded",function(event){event.isEmpty&&(event=event.slot.getSlotElementId(),console.log(event),googletag.display(event),googletag.pubads().refresh([event]))}),Google_Ad_Induction.init_ad_slot(_ad_slot_type))}},Layout_Page_Base.fn.handlers_c77da_fixed_convo_widget=function(){$(".c77da_fixed_convo_widget_wrap .close_ad").live("click",function(e){var c77da_on_cookie=General.is_null_empty_undefined(Cookie.read("h_c77da"))?"":unescape(Cookie.read("h_c77da"));$(".c77da_fixed_convo_widget").addClass("shrink_hide"),$(".c77da_fixed_convo_widget_wrap").addClass("closed"),""===c77da_on_cookie&&Cookie.create("h_c77da","yes",3)}),$(".action_c77da_fixed_convo_widget").live("click",function(e){General.is_null_empty_undefined(Cookie.read("h_c77da"))||unescape(Cookie.read("h_c77da"));$(".c77da_fixed_convo_widget").hasClass("shrink_hide")?($(".c77da_fixed_convo_widget").removeClass("shrink_hide"),$(".c77da_fixed_convo_widget_wrap").removeClass("closed")):($(".c77da_fixed_convo_widget").addClass("shrink_hide"),$(".c77da_fixed_convo_widget_wrap").addClass("closed"),Cookie.create("h_c77da","yes",3))})},Layout_Page_Base.fn.skybox_ad_init=function(loc){parent.do_when(function(){return null!=parent.googletag&&"object"==typeof parent.googletag.cmd},function(){var $ad_unit,this_ad_slot,_ad_slot_type,ad_slot_created,_units_needed_count=5;$(window).width()<=320?_units_needed_count=2:$(window).width()<=500?_units_needed_count=3:$(window).width()<=700?_units_needed_count=4:$(window).width()<=900&&(_units_needed_count=5);for(var k=0;k<_units_needed_count;k++)this_ad_slot=($ad_unit=$($("#blog_top_wrap.promo_zone.skybox .ad_wrap").get(k))).attr("id"),_ad_slot_type=$ad_unit.data("ad-type"),ad_slot_created=Google_Ad_Induction.create_ad_slot({type:_ad_slot_type,unique_ad_slot_id:this_ad_slot}),Google_Ad_Induction.init_ad_slot(ad_slot_created);if(_units_needed_count<5)for(k=_units_needed_count;k<=5;k++)$($("#blog_top_wrap.promo_zone.skybox .ad_wrap").get(k)).addClass("hide");for(k=0;k<_units_needed_count;k++)this_ad_slot=($ad_unit=$($(".skybox_wrap.logos .ad_wrap").get(k))).attr("id"),_ad_slot_type=$ad_unit.data("ad-type"),ad_slot_created=Google_Ad_Induction.create_ad_slot({type:_ad_slot_type,unique_ad_slot_id:this_ad_slot}),Google_Ad_Induction.init_ad_slot(ad_slot_created);if(_units_needed_count<5)for(k=_units_needed_count;k<=5;k++)$($(".skybox_wrap.in_content_images .ad_wrap").get(k)).addClass("hide")},200)},Layout_Page_Base.fn.init=function(){for(var loc=this,_current_source=(loc.shell_base_init(),"layout_page_awards"!==loc.shell_type&&loc.skybox_ad_init(),$(".psuedo_link").live("click",function(e){e.stopPropagation(),e.preventDefault();
1var e=$(this).attr("data-href"),_same_tab=$(this).data("same-tab");General.new_tab_link_override(e,_same_tab=null==_same_tab?!0:_same_tab)}),0<$(".sidebar_induced_ad").length&&General.do_when(function(){return window.googletag&&googletag.apiReady},function(){loc.handle_ad_units_sidebar()},300),0<$("#feature_fp_firms").length&&loc.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.design_firms),0<$(".coroflot_trending_block").length&&Coroflot_Util.handle_hot_percentages_draw($("#trending_max_score").val()),$("#nav_overlay_bgd").live("click",function(e){$("#main_nav_slider").removeClass("open sub_menu_is_open"),$("#mobile_searchbox").removeClass("mobile_open"),$("#hamburger").removeClass("open"),$("#nav_overlay_bgd").remove()}),$("#hamburger").live("click.layout_base_hamburger",function(event){var $search_box=$("#mobile_searchbox");$("#main_nav_slider").hasClass("open")?($("#main_nav_slider").removeClass("open sub_menu_is_open"),$search_box.removeClass("mobile_open"),$(this).removeClass("open"),$("#nav_overlay_bgd").remove()):($("#main_nav_slider").addClass("open"),$search_box.addClass("mobile_open"),$(this).addClass("open"),$("<div id='nav_overlay_bgd'></div>").insertBefore("#hamburger"))}),$("#core77").hasClass("account")||("none"!=$("header").css("display")&&0<$("#header_head").length&&$("#core77").hasClass("gift_guide"),0<$("#sidebar_units").length&&!$("#sidebar_units").hasClass("static_sidebar")&&new Sidebar_Follow_Change_Out({$sidebar:$("#sidebar_units"),sidebar_unit_node_name:"> li",update_on_scroll:2400,shell_obj:loc,enable_loop:!0}).init()),$("#trigger_search").live("click",function(e){$(".search_us").hasClass("active")?$(".search_us").removeClass("active"):$(".search_us").addClass("active")}),$("#burger_log_out").live("click",function(e){e.preventDefault(),loc.proceed_log_out(loc)}),loc.facebook_tracking(),window.location.toString()),whitelist=[".core77.com",".coroflot.com",".designdirectory.com","jsfiddle.net","fiddle.jshell.net"],_is_clear=!1,k=0;k<whitelist.length;k++)new RegExp(whitelist[k]).test(_current_source)&&(_is_clear=!0);_is_clear||($("body").empty(),window.location="http://www.core77.com"),$("#core77").click(function(event){$(".golden_layout > li.exception_ad iframe").css({width:"300px"})}),$(".in_content_ad").live({mouseover:function(event){event.stopPropagation(),$(this).css({width:"600px"})},mouseout:function(event){event.stopPropagation(),$(".golden_layout > li.exception_ad iframe").css({width:"300px"})}}),$("li#search_li #search_btn").click(function(event){loc.run_site_search()}),$("#header_search").live("keyup",function(event){event.which==KEYS.enter&&loc.run_site_search()}),$("#sign_up_with_username, #log_in_with_username, #go_back_to_choice").live("click",function(event){var $parent=$(this).closest(".login_register");$parent.find("#choice_wrap").hasClass("open")?($parent.find("#choice_wrap").removeClass("open").addClass("close"),$parent.find("#form_wrap").removeClass("close").addClass("open"),$parent.find("#go_back_to_choice").removeClass("close").addClass("open")):($parent.find("#choice_wrap").removeClass("close").addClass("open"),$parent.find("#form_wrap").removeClass("open").addClass("close"),$parent.find("#go_back_to_choice").removeClass("open").addClass("close"))}),$("#login_modal, #login_from_modal, .login_signup_modal, #trigger_login_modal, #trigger_login_form").live("click",function(event,$node){var cookie_return_url;General.is_logged_in()||(event.preventDefault(),loc.reset_sign_in_up_forms(),$node="login_from_modal"==(event=General.is_null_empty_undefined($node)?$(this):$node).attr("id")&&!$("#core77").hasClass("show_signup_form"),cookie_return_url=event.attr("data-cookie-return-url"),General.is_null_empty_undefined(cookie_return_url)?Cookie.erase("return_url"):Cookie.create("return_url",escape(String.format("return_url={0}",window.location)),.25),"login_from_modal"!=event.attr("id")&&loc.set_context_sensitive_language(event),General.is_null_empty_undefined(loc.register_modal)||loc.register_modal.remove_overlay($node),loc.register_modal=null,loc.log_in_modal=new Quick_Modal({appendTo:"core77"}),loc.log_in_modal.set_form_width(500),loc.log_in_modal.set_form_to_wrap("login"),General.is_chrome()&&56<=General.get_chrome_version()||loc.log_in_modal.draw_overlay(!$node),cookie_return_url="",(0<event.parents("#secondary_nav").length||$("#core77").hasClass("show_signup_form")||$("#core77").hasClass("show_login_form"))&&(cookie_return_url=GLOBALS.PUBLISH_ROOT_PATH,$("#login_form").find("#return_url").val(cookie_return_url),$("#signup_form").find("#return_url").val(cookie_return_url)),event.hasClass("login_signup_modal")&&(cookie_return_url=event.attr("data-url"),$("#login_form").find("#return_url").val(cookie_return_url)),null!=event.attr("data-return-url")&&(cookie_return_url=event.attr("data-return-url"),$("#login_form").find("#return_url").val(cookie_return_url)),null!=event.attr("data-source")&&($("#login_form").find("#source").val(event.attr("data-source")),$("#signup_form").find("#source").val(event.attr("data-source"))),General.is_chrome()&&56<=General.get_chrome_version()&&(window.location=String.format("{0}/login?return_url={1}",GLOBALS.PUBLISH_ROOT_PATH,cookie_return_url)))}),$("#forgot_password").click(function(event){event.preventDefault(),General.is_null_empty_undefined(loc.log_in_modal)||(loc.log_in_modal.remove_overlay(!0),loc.log_in_modal=null),loc.register_modal=new Quick_Modal({appendTo:"core77"}),loc.register_modal.set_form_width(500),loc.register_modal.set_form_to_wrap("request_reset"),loc.register_modal.draw_overlay(!0),function _setup_request_reset_captcha(){"undefined"==typeof grecaptcha||"function"!=typeof grecaptcha.render?setTimeout(_setup_request_reset_captcha,100):("number"==typeof loc.request_reset_widget_id?grecaptcha.reset(loc.request_reset_widget_id):loc.request_reset_widget_id=grecaptcha.render("request_reset_recaptcha",{sitekey:$("#recaptcha_v2_site_key").val()}),$("#rfvRecaptchaV2_reset").hide())}()}),$("#username_email").live("click",function(event){$(this).removeClass("error").prev().find("em").text("").removeClass("error")}),$("#reset_send_email").click(function(e){if(e.preventDefault(),loading.remove(),""!=$("#username_email").val()){e="number"==typeof loc.request_reset_widget_id&&"undefined"!=typeof grecaptcha?grecaptcha.getResponse(loc.request_reset_widget_id):"";if(!e)return $("#rfvRecaptchaV2_reset").show(),!1;var user_or_email=$("#username_email").val().is_valid_email?{email:$("#username_email").val()}:{username:$("#username_email").val()};user_or_email["g-recaptcha-response"]=e,$.post(GLOBALS.SECURE_ROOT_PATH+"home/forgot-password",user_or_email,function(data){loading.remove();var check_email_modal,data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)?(data=new String+"<div id='activate_email' class='branded_modal' style='display: block;'><h3>K</h3><h4 id='context_specific_header'>Please check your email</h4><p id='context_specific_messaging'>Follow the instructions in the email to reset your password</p>",General.is_null_empty_undefined(loc.register_modal)||(loc.register_modal.remove_overlay(!0),loc.register_modal=null),(check_email_modal=new Quick_Modal({appendTo:"core77"})).set_form_width(500),check_email_modal.set_content(data),check_email_modal.draw_overlay(!0)):($("#username_email").addClass("error").prev().find("em").text(General.error_text.email_not_exist).addClass("error"),"undefined"!=typeof grecaptcha&&"number"==typeof loc.request_reset_widget_id&&grecaptcha.reset(loc.request_reset_widget_id))},"json")}else $("#username_email").addClass("error").prev().find("em").text("Please enter an email address").addClass("error")}),$("#core77").hasClass("direct_u")||($(".login_register input[type=submit]").click(function(event){event.preventDefault(),loading.create();event=$(this);"signup_form"==event.parents("form").attr("id")?loc.ajax_signup(event.parents("form")):"login_form"==event.parents("form").attr("id")&&loc.ajax_login(event.parents("form"))}),$("#register_modal, #join_footer, .join_signup_modal").click(function(event){event.preventDefault(),loc.reset_sign_in_up_forms();var _split_url,event="register_modal"==$(this).attr("id")&&!$("#core77").hasClass("show_login_form");General.is_null_empty_undefined(loc.log_in_modal)||loc.log_in_modal.remove_overlay(event),loc.log_in_modal=null,loc.register_modal=new Quick_Modal({appendTo:"core77"}),loc.register_modal.set_form_width(500),loc.register_modal.set_form_to_wrap("signup"),loc.register_modal.draw_overlay(!event),$(this).hasClass("join_signup_modal")&&loc.set_context_sensitive_language($(this)),(0<$(this).parents("#secondary_nav").length||$("#core77").hasClass("show_signup_form")||$("#core77").hasClass("show_login_form"))&&(event=GLOBALS.PUBLISH_ROOT_PATH,1<(_split_url=window.location.toString().split("?return_url=")).length&&(event=_split_url[1]),$("#login_form").find("#return_url").val(event),$("#signup_form").find("#return_url").val(event))})),$(".login_register input[type=text], .login_register input[type=password]").focus(function(event){var default_text=$(this).prev().find("em").attr("data-default-text"),default_text=General.is_null_empty_undefined(default_text)?"":default_text;$(this).removeClass("error").prev().find("em").removeClass("error").text(default_text)}),$("#user_logged_in_menu").live("click",function(event){var menu_coords,_append_node,user_actions;event.preventDefault(),"none"==$("#hamburger").css("display")?(event=$(this),(menu_coords=new Coordinates).set_property("x",event.offset().left),menu_coords.set_property("y",event.offset().top+20),user_actions=["plog","posts","profile"],"yes"===$("#edits_channels").val()&&user_actions.push("manage_channels"),"yes"===$("#manages_posts").val()&&(user_actions.push("manage_posts"),user_actions.push("user_roles")),"yes"===$("#manages_nav").val()&&(user_actions.push("manage_core77"),user_actions.push("manage_comments")),user_actions.push("settings","log_out"),_append_node=$("#core77").hasClass("a_2015")?"core77":"body",user_actions=new Logged_In_Menu({actions:user_actions,coords:menu_coords,parent:event.parent().parent(),appendTo_id:_append_node,shell_obj:loc,is_fixed:$("#core77").hasClass("a_2015")}),loc.add_menu(user_actions),user_actions.render()):($(".site_segment_links_wrap").hasClass("mobile_open")||$("#hamburger").click(),setTimeout(function(){var _offset=$(window).height()<=580?100:0;General.scroll_to_data_goto_non_main_frame("burger_account_menu",$(".site_segment_links_wrap"),_offset)},100))}),$("#more_nav > ul > li").click(function(e){e.stopPropagation()}),$("#go_search").click(function(e){var term=$("#gcs_term").val();window.location=String.format("{0}/home/search?search={1}",GLOBALS.WEB_ROOT_PATH,term)}),$("#gcs_term").keyup(function(e){e.which==KEYS.enter&&$("#go_search").click()}),$(".go_search_mobile").click(function(e){var term=$(this).prev().val();window.location=String.format("{0}/home/search?search={1}",GLOBALS.WEB_ROOT_PATH,term)}),$(".gcs_term_mobile").keyup(function(e){e.which==KEYS.enter&&$(this).next().click()}),loc.set_signup_form_data(loc),$(document).resize(function(){loc.close_all_other_menus()}),$("#core77").hasClass("award_success_payment")||loc.google_analytics_ga4(loc,function(){}),loc.include_google_ads_setup&&General.load_js_css("//www.googletagservices.com/tag/js/gpt.js","js",function(loc){(googletag=window.googletag||{cmd:[]}).cmd.push(function(){var mapping_page_topper=googletag.sizeMapping().addSize([1350,200],[970,90]).addSize([1125,200],[728,90]).addSize([901,200],[]).addSize([730,200],[728,90]).addSize([0,0],[320,50]).build(),mapping_high_impact=(googletag.sizeMapping().addSize([0,0],[[300,250],[300,600]]).build(),googletag.sizeMapping().addSize([0,0],[[300,250],[300,600]]).build(),googletag.sizeMapping().addSize([1260,0],["fluid",[970,250]]).addSize([969,0],["fluid",[728,90]]).addSize([727,0],["fluid",[300,250]]).build());GOOGLE_AD_ZONES.homepage_leaderboard=googletag.defineSlot("/3452054/C77-Homepage-ATF-Top-Leaderboard-728x90-ATF",[[970,9
10],[728,90],[320,50]],"div-gpt-ad-1409838036741-0").defineSizeMapping(mapping_page_topper),GOOGLE_AD_ZONES.homepage_leaderboard.addService(googletag.pubads()),GOOGLE_AD_ZONES.homepage_in_content=googletag.defineSlot("/3452054/C77-Homepage-ATF-RightSide-MedRect-300x250",[[300,250],[300,600]],"div-gpt-ad-1423352946552-0"),GOOGLE_AD_ZONES.homepage_in_content.addService(googletag.pubads()),GOOGLE_AD_ZONES.main_in_content=googletag.defineSlot("/3452054/C77-Blog-Permalinks-ATF-RightSide-MedRect-300x250",[[300,250],[300,600]],"div-gpt-ad-1423352734091-0"),GOOGLE_AD_ZONES.main_in_content.addService(googletag.pubads()),GOOGLE_AD_ZONES.high_impact_zone=googletag.defineSlot("/3452054/C77-High-Impact-Zone",["fluid",[970,250],[728,90],[300,250]],"div-gpt-ad-1543869197842-0").defineSizeMapping(mapping_high_impact),GOOGLE_AD_ZONES.high_impact_zone.addService(googletag.pubads()),GOOGLE_AD_ZONES.high_impact_zone_2=googletag.defineSlot("/3452054/C77-High-Impact-2",["fluid",[970,250],[728,90],[300,250]],"div-gpt-ad-1543869114805-0").defineSizeMapping(mapping_high_impact),GOOGLE_AD_ZONES.high_impact_zone_2.addService(googletag.pubads()),googletag.enableServices()}),loc.google_ad_resizer=function(){googletag.pubads().refresh()}},loc),loc.set_user_session(),$("body").mousedown(function(e){"core77"!=$(e.target).attr("id")&&"body"!=$(e.target).context.nodeName.toString().toLowerCase()&&"c77_content"!=$(e.target).attr("id")&&"post_add_data"!=$(e.target).attr("id")||loc.close_all_other_menus({ignore_types:["comment_menu","reply_comment_menu"]})}),$(".full_bg_image").mousedown(function(e){loc.close_all_other_menus()}),General.is_null_empty_undefined(Cookie.read("needs_valid_email"))||General.status_ok(STATUS_CODE.no_email),Shell_Base.tooltip=new Tooltip,Shell_Base.tooltip.init(),0<$("#dd_ad").length&&loc.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.tile),0<$("#dd_ad_footer").length&&loc.design_directory_ad(DESIGN_DIRECTORY_AD_PLACEMENT.footer),$(".user_subscribe_email").live({focus:function(){$(this).removeClass("error"),"Enter a valid email"==$(this).val()&&$(this).val("")},keyup:function(e){var $this=$(this);e.which==KEYS.enter&&$this.next().click()}}),$(".get_newsletter").live("click",function(){var $this=$(this),from_bottom_slide_pop="yes"==$this.data("from-bottom-pop"),from_awards="yes"==$this.data("from-awards"),_entered_email=$this.prev().val();_entered_email.is_valid_email()?$.post(GLOBALS.ROOT_PATH+"home/subscribe_to_newsletter",{email:_entered_email,list_id:"b8edba8dcacd3b7ffeac99e8cef4b5c9",extra_key_vals:JSON.stringify({Core77_Newsletter:"Yes"})},function(data){var data=General.parse_json_if_needed(data);General.status_ok(data.status,loc)&&(data="homepage",window.location.toString().includes("/posts/")?data="blog post":window.location.toString().includes("/gallery/")?data="gallery post":window.location.toString().includes("/projects/")&&(data="project post"),from_bottom_slide_pop?(ga("send",{hitType:"event",eventCategory:"Newsletter Signup",eventAction:"from footer unit",eventLabel:data}),$("#full_bottom_pop #newsletter_signup").empty(),$("<h3>Thanks for signing up!</h3><p>Stay tuned for the latest from Core77</p><p><span id='set_longframe_cookie_close' class='btn'>Done</span></p>").appendTo($("#full_bottom_pop #newsletter_signup"))):from_awards?(ga("send",{hitType:"event",eventCategory:"Newsletter Signup",eventAction:"from awards pre new cycle",eventLabel:""}),message_slider(General.success_text.newsletter_signup_success),setTimeout(function(){window.location=window.location},400)):(ga("send",{hitType:"event",eventCategory:"Newsletter Signup",eventAction:"from sidebar unit",eventLabel:data}),message_slider(General.success_text.newsletter_signup_success),$this.prev().val("")))},"json"):($this.prev().addClass("error"),$this.prev().val("Enter a valid email"))}),$("#set_longframe_cookie_close").live("click",function(e){Cookie.create("snlbp","y",365),$("#full_bottom_pop").addClass("cookie_close")}),loc.use_footer_newsletter_signup&&new Scroll_Peek_With_Cookie({unit_id:"full_bottom_pop",cookie_name:"snlbp",longframe_cookie:"snlbp_lf",close_button_id:"close_newsletter_bottom_pop",trigger_point:300,callback_on_update:function(){}}).init(),loc.use_c77da_fixed_convo_widget&&loc.handlers_c77da_fixed_convo_widget(),loc.use_special_text_ad&&(void 0===Cookie.read("sp_tx_ad_cl")&&$(".special_text_ad_page_top").removeClass("hide"),$(".special_text_ad_page_top .close_ad").live("click",function(e){$(".special_text_ad_page_top").addClass("close hide"),null==Cookie.read("sp_tx_ad_cl")&&Cookie.create("sp_tx_ad_cl",!0,3)})),$("#accept_cookie_policy").live("click",function(e){$(this),General.is_null_empty_undefined(Cookie.read(GLOBALS.COOKIE_POLICY_ACCEPT))||unescape(Cookie.read(GLOBALS.COOKIE_POLICY_ACCEPT));var keep_scroll_pos=$(window).scrollTop();document.body.scrollTop=document.documentElement.scrollTop=keep_scroll_pos,Cookie.create(GLOBALS.COOKIE_POLICY_ACCEPT,"yes",365),$(".cookie_policy_banner").addClass("hide",function(){document.body.scrollTop=document.documentElement.scrollTop=keep_scroll_pos}),$("#core77").removeClass("extra_padd_me")}),$(".promo_zone.conference_2018_promozone [data-mixer-font-features-class]").each(function(index,val){for(var $this=$(this),_class_add=$this.attr("data-mixer-font-features-class"),_is_split_on="no-split"!=$this.attr("data-split-on"),_percent_induction=General.is_null_empty_undefined($this.attr("data-mixer-font-features-percent"))?10:$this.attr("data-mixer-font-features-percent"),_new_html="",split_html=$this.html().clean_white_space().split('<span class="now_what">NOW wHat?</span>'),k=0;k<split_html.length;k++)if(""!=split_html[k]){for(var m=0;m<split_html[k].length;m++)General.randomBase(1,100)<=_percent_induction&&" "!=split_html[k][m]?_new_html+=String.format("<span class='{0}'>{1}</span>",_class_add,split_html[k][m]):_new_html+=split_html[k][m];_is_split_on&&(_new_html+="<span class='now_what'>NOW wHat?</span>")}$this.html(_new_html)}),0<$("#c77da_2021_virtual_ceremony").length&&$("#c77da_2021_virtual_ceremony .op_cl").live("click",function(e){var $this=$(this);$this.hasClass("cls_it")?($this.parents("#c77da_2021_virtual_ceremony").addClass("is_closed"),Cookie.create("sc_c77da_vc",!0,1)):$this.hasClass("opn_it")&&($this.parents("#c77da_2021_virtual_ceremony").removeClass("is_closed"),Cookie.erase("sc_c77da_vc"))}),loc.ext_init()},function(_obj){Layout_Page_Base.call(this,_obj),this.shell_type="layout_page_web",this.channel_preview_ul_timeout,this.channel_preview_ul_add_class_timeout,this.channel_preview_info_timeout,this.interval=200,this.top_channels=new Channel_Nav_Section({container_id:"top_channels"}),this.is_site_header_frozen=!1,this.last_scroll_position=0}),Layout_Page_Publish=(Layout_Page_Web.inherits(Layout_Page_Base),Layout_Page_Web.fn.ext_init=function(){},function(_obj){Layout_Page_Base.call(this,_obj),this.shell_type="layout_page_publish",this.GA4_analytics_id="G-8VS7HZR3NB"}),Layout_Page_Awards=(Layout_Page_Publish.inherits(Layout_Page_Base),Layout_Page_Publish.fn.ext_init=function(){},function(_obj){Layout_Page_Base.call(this,_obj),this.shell_type="layout_page_awards",this.google_analytics_id="UA-385556-16",this.GA4_analytics_id="G-QHHEJ103PT"}),Layout_Page_Conference=(Layout_Page_Awards.inherits(Layout_Page_Base),Layout_Page_Awards.fn.ext_init=function(){},function(_obj){Layout_Page_Base.call(this,_obj),this.shell_type="layout_page_conference",this.init_core77_main_events=!1,this.include_google_ads_setup=!1}),Layout_Page_Student_Showcase=(Layout_Page_Conference.inherits(Layout_Page_Base),Layout_Page_Conference.fn.ext_init=function(){},function(_obj){Layout_Page_Base.call(this,_obj),this.shell_type="layout_page_conference",this.init_core77_main_events=!1,this.include_google_ads_setup=!1}),Menu=(Layout_Page_Student_Showcase.inherits(Layout_Page_Base),Layout_Page_Student_Showcase.fn.init=function(){this.google_analytics(this)},function(_obj){this.actions=null!=_obj.actions?_obj.actions:new Array,this.floating=null!=_obj.floating&&_obj.floating,this.coords=new Coordinates(null!=_obj.coords?_obj.coords:null),this.$wrapper_node=new String,this.appendTo_id=null!=_obj.appendTo_id?_obj.appendTo_id:new String,this.appendTo_id="body"==this.appendTo_id?this.appendTo_id:"#"+this.appendTo_id,this.shell_obj=null!=_obj.shell_obj?_obj.shell_obj:new String,this.style_class="menu_style",this.add_action_as_classname=!1,this.function_to_run_on_close=""}),Pill_Menu_Base=(Menu.prototype={constructor:Menu,log_it:function(prop){printf(prop)},actual_close_menu:function(loc){loc.$wrapper_node.fadeOut(0,function(){loc.unbind_namespaced_event("click"),loc.$wrapper_node.remove(),Prompt_Box.remove()}),null!=Shell_Base.tooltip&&Shell_Base.tooltip.remove_tooltip(Shell_Base.tooltip)},close_menu:function(){this.actual_close_menu(this)},bind_namespaced_event:function(event_type,func,_loc){this.$wrapper_node.bind(event_type+"."+this.menu_type,function(event){event.stopPropagation(),func(event,_loc)})},unbind_namespaced_event:function(event_type){this.$wrapper_node.unbind(event_type+"."+this.menu_type),this.$wrapper_node.unbind("."+this.menu_type),this.$wrapper_node.die(event_type+"."+this.menu_type),this.$wrapper_node.die("."+this.menu_type),printf("unbind")},button_event_terminal:function(event,loc){var _target=null!=$(event.target).attr("data-button")?$(event.target):$(event.target).parent();loc["make_"+_target.attr("data-button")](_target,loc,event)},actions_terminal:function(_action,parent,skip_active_action){skip_active_action=!General.is_null_empty_undefined(skip_active_action)&&skip_active_action;var active_action,_html=new String,skip_active_action=(skip_active_action||(active_action=this.get_actions_set_to_dom(_action)),"quote"==_action||"meridiem"==_action?_action.append("_wrapper"):"");return this.add_action_as_classname&&(skip_active_action=_action),(_html+=String.format("<li data-button='{0}' class='{1}'>",_action,skip_active_action))+this["create_"+_action+"_menu_item"](_action,active_action,parent,this)+"</li>"},get_actions_set_to_dom:function(_action){new Array;var _this_parent_node_name,is_active=new Array,node_map=(this.parent.hasClass(_action)&&is_active.push("active"),{bold:"b",italic:"i",h2:"h2",h1:"h1",quote:"blockquote",link:"a"}),this_node_name=this.parent.context.nodeName.toString().toLowerCase();return this_node_name==node_map[_action]&&(is_active.push("active"),"quote"==_action&&"p_quo"==this.parent.context.className&&is_active.push("active"),General.is_inline_level_node({exact_to_check:this_node_name}))&&(_this_parent_node_name=this.parent.context.parentElement.nodeName.toString().toLowerCase(),General.is_inline_level_node({exact_to_check:_this_parent_node_name})||$.each(node_map,function(index,val){_this_parent_node_name==val&&(is_active.push({extra_active:val+",active"}),General.do_when(function(){return 0<$(String.format("li[data-button={0}]",val)).length},function(){$(String.format("li[data-button={0}]",val)).find("span").addClass("active")},300))})),is_active},is_vimeo_kickstarter_youtube:function(loc,stamp,dim){var if_width,$iframe_elem=loc.parent.find("iframe"),stamp=($iframe_elem=General.is_null_empty_undefined(stamp)?$iframe_elem:$("#"+stamp).find("iframe")).attr("src");/(youtube|vimeo|kickstarter)/gi.test(stamp)&&(stamp=parseInt($iframe_elem.attr("height")),if_width=parseInt($iframe_elem.attr("width")),loc=General.is_null_empty_undefined(dim)?loc.parent.width():dim.width,$iframe_elem.css({height:stamp*loc/if_width,width:loc}))},remove_multi_state_active:function(loc,multi_member_actions){for(var k=0;k<multi_member_actions.length;k++)loc.$wrapper_node.find("."+multi_member_actions[k]).removeClass("active")},make_undefined:function(_target,loc){printf(_target,"this is undefined")}},function(_obj){Menu.call(this,_obj),this.menu_type="pill_menu"}),Listing_Menu=(Pill_Menu_Base.inherits(Menu),Pill_Menu_Base.fn.init=function(){this.$wrapper_node=$("."+this.menu_type),this.bind_namespaced_event("click",this.button_event_terminal,this),this.ext_init()},Pill_Menu_Base.fn.check_set_active_state=function(_target){var _target=_target.find("span"),has_set=_target.hasClass("active");return has_set?_target.removeClass("active"):_target.addClass("active"),has_set},Pill_Menu_Base.fn.remove_multi_state_active=function(loc,_target,multi_member_actions){for(var k=0;k<multi_member_actions.length;k++)_target.parent().find("."+multi_member_actions[k]).removeClass("active")},function(_obj){Pill_Menu_Base.call(this,_obj),this.menu_type="listing_menu"}),Image_Manipulation_Base=(Listing_Menu.inherits(Pill_Menu_Base),Listing_Menu.fn.make_tile=function(_target,loc){loc.remove_multi_state_active(loc,_target,["list"]),loc.check_set_active_state(_target),_target.parent().parent().find(".listing").removeClass("row_style")},Listing_Menu.fn.make_list=function(_target,loc){loc.remove_multi_state_active(loc,_target,["tile"]),loc.check_set_active_state(_target),_target.parent().parent().find(".listing").hasClass("row_style")||_target.parent().parent().find(".listing").addClass("row_style")},Listing_Menu.fn.ext_init=function(){},function(_obj){Pill_Menu_Base.call(this,_obj),this.menu_type="image_manipulation_base",this.number_images_to_upload=0,this.number_images_uploaded=0}),Lead_Image_Menu=(Image_Manipulation_Base.inherits(Pill_Menu_Base),Image_Manipulation_Base.fn.set_image_object_properties=function(_info,_img_obj){if(_info.image.id>=_img_obj.file_id)return _img_obj.set_property("src",_info.image.url),_img_obj.set_property("file_id",_info.image.id),General.is_null_empty_undefined(_img_obj.dimension)?_img_obj.dimension=new Dimensions({width:_info.image.width,height:_info.image.height}):(_img_obj.dimension.set_property("width",_info.image.width),_img_obj.dimension.set_property("height",_info.image.height)),_img_obj.crop_rectangle.set_property("x1",_info.crop.x1),_img_obj.crop_rectangle.set_property("y1",_info.crop.y1),_img_obj.crop_rectangle.set_property("x2",_info.crop.x2),_img_obj.crop_rectangle.set_property("y2",_info.crop.y2),_img_obj.crop_source_image.set_property("src",_info.source.url),_img_obj.crop_source_image.set_property("file_id",_info.source.id),General.is_null_empty_undefined(_img_obj.crop_source_image.dimension)?_img_obj.crop_source_image.dimension=new Dimensions({width:_info.source.width,height:_info.source.height}):(_img_obj.crop_source_image.dimension.set_property("width",_info.source.width),_img_obj.crop_source_image.dimension.set_property("height",_info.source.height)),printf(_info,"info"),printf(_img_obj,"img_obj"),_img_obj.src;printf("multiples fired but only one may pass")},Image_Manipulation_Base.fn.check_for_crop=function(){var crop_size=new Dimensions({width:400,height:400});this.shell_obj.data.lead_image.crop_source_image.dimension.width<crop_size.width||this.shell_obj.data.lead_image.crop_source_image.dimension.height<crop_size.height?$(".lead_image_menu span.crop").parent().addClass("hide"):$(".lead_image_menu span.crop").parent().removeClass("hide")},function(_obj){Image_Manipulation_Base.call(this,_obj),this.menu_type="lead_image_menu",this.action_timeout,this.current_selection,this.current_stored_lead_image=_obj.lead_image_src,this.set_width=_obj.set_width,this.set_height=_obj.set_height,this.usable_images=new Array}),Avatar_Image_Menu=(Lead_Image_Menu.inherits(Image_Manipulation_Base),Lead_Image_Menu.fn.set_lead_image_properties=function(info,_loc){var img_obj=_loc.shell_obj.data.lead_image,info=_loc.set_image_object_properties(info,img_obj);$("#post_preview div.img_wrapper img").attr({src:info}),_loc.check_for_crop()},Lead_Image_Menu.fn.select_lead_image=function(_target,loc){clearTimeout(loc.action_timeout),loc.get_valid_images();var style_margin_left,neg_margin,$img_ref=_target.parent().prev().find("img"),lead_img_ref=$img_ref.attr("data-img-number"),lead_img_ref=General.is_null_empty_undefined(lead_img_ref)?0:parseInt(lead_img_ref);0<loc.usable_images.length&&("choose_next"==_target.attr("data-button")?lead_img_ref=lead_img_ref+1>loc.usable_images.length-1?0:lead_img_ref+1:"choose_prev"==_target.attr("data-button")&&(lead_img_ref=lead_img_ref-1<0?loc.usable_images.length-1:lead_img_ref-1),(_target=loc.usable_images[parseInt(lead_img_ref)]).dimension.is_orientation("landscape")?(neg_margin=(_target.dimension.width*loc.set_height/_target.dimension.height-loc.set_height)/2,style_margin_left=String.format("-{0}px",neg_margin),$img_ref.attr(
1{src:_target.src,"data-img-number":lead_img_ref}).css({width:"auto",height:loc.set_height,"margin-top":"0px","margin-left":style_margin_left})):(neg_margin=(_target.dimension.height*loc.set_width/_target.dimension.width-loc.set_width)/2,style_margin_left=String.format("-{0}px",neg_margin),$img_ref.attr({src:_target.src,"data-img-number":lead_img_ref}).css({width:loc.set_width,height:"auto","margin-top":style_margin_left,"margin-left":"0px"})),neg_margin=_target.file_id,loc.current_selection={post_id:loc.shell_obj.data.post_id,file_id:neg_margin,file_url:_target.src},$(".lead_image_menu span.choose_image").parent().hasClass("hide"))&&($(".lead_image_menu span.choose_image").parent().removeClass("hide"),$(".lead_image_menu span.cancel_choose_image").parent().removeClass("hide"))},Lead_Image_Menu.fn.save_lead_image=function(loc){var action_endpoint=GLOBALS.ROOT_PATH+"account/post_lead_image_update";$.post(action_endpoint,loc.current_selection,function(data){var info,data=General.parse_json_if_needed(data);General.status_ok(data.status)?(info=data.image_info,loc.set_lead_image_properties(info,loc),$(".lead_image_menu span.choose_image").parent().addClass("hide")):message_slider(data.text,!0)},"json")},Lead_Image_Menu.fn.make_cancel_choose_image=function(_target,loc){$(".lead_image .img_wrapper img").attr({src:loc.current_stored_lead_image}),$(".lead_image_menu span.choose_image").parent().addClass("hide"),$(".lead_image_menu span.cancel_choose_image").parent().addClass("hide"),loc.reset_image_styles()},Lead_Image_Menu.fn.make_choose_image=function(_target,loc){loading.create(),$.post(GLOBALS.ROOT_PATH+"account/post_lead_image_update",loc.current_selection,function(data){loading.remove(),message_slider(General.success_text.lead_image_uploaded);var info,data=General.parse_json_if_needed(data);General.status_ok(data.status)?(info=data.image_info,loc.set_lead_image_properties(info,loc),loc.current_stored_lead_image=$(".lead_image .img_wrapper img").attr("src"),$(".lead_image_menu span.choose_image").parent().addClass("hide"),$(".lead_image_menu span.cancel_choose_image").parent().addClass("hide")):message_slider(data.text,!0)},"json")},Lead_Image_Menu.fn.reset_image_styles=function(){$(".lead_image .img_wrapper img").css({"margin-top":"0px","margin-left":"0px"})},Lead_Image_Menu.fn.make_upload=function(_target,_loc){var loc=_loc;loc.reset_image_styles(),$("input#add_lead_image").fileupload({dataType:"json",formData:{post_id:loc.shell_obj.data.post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file_lead_image",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var info;loc.number_images_uploaded++,General.wrap_and_reset_form($("#add_lead_image")),data.result=General.parse_json_if_needed(data.result),General.status_ok(data.result.status)?($("#lead_image_wrap img").attr({src:data.result.image_info.image.url}),$("#add_lead_image_wrapper").hasClass("has_content")||$("#add_lead_image_wrapper").addClass("has_content"),$("#add_lead_image_wrapper").find("span").text("Change Thumbnail"),info=data.result.image_info,loc.set_lead_image_properties(info,loc),message_slider(General.success_text.lead_image_upload)):message_slider(data.result.text,!0),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loading.remove())}})},Lead_Image_Menu.fn.make_crop=function(_target,_loc){_loc.reset_image_styles();var crop_size=new Dimensions({width:400,height:400});new Image_Cropper({post_id:_loc.shell_obj.data.post_id,image_crop_ref:_loc.shell_obj.data.lead_image,crop_min_width:400,set_width:"",ajax_url:GLOBALS.ROOT_PATH+"account/crop_lead_image",crop_size:crop_size,use_preview:!0,img_parent_id:"lead_image_wrap",callback:_loc.set_lead_image_properties,passed_obj:_loc,center_crop_rect_initially:!0,preview_width:_loc.set_width,preview_height:_loc.set_height,success_message:General.success_text.lead_image_crop}).init()},Lead_Image_Menu.fn.make_choose_prev=function(_target,loc){loc.select_lead_image(_target,loc)},Lead_Image_Menu.fn.make_choose_next=function(_target,loc){loc.select_lead_image(_target,loc)},Lead_Image_Menu.fn.get_valid_images=function(){var image_size=new Dimensions({width:400,height:400}),imgs_and_html=this.shell_obj.get_html_and_images();this.shell_obj.data.images=imgs_and_html.images;for(var k=0;k<this.shell_obj.data.images.length;k++){var _ref=this.shell_obj.data.images[k];_ref.dimension.width>=image_size.width&&_ref.dimension.height>=image_size.height&&this.usable_images.push(_ref)}1<this.usable_images.length?($("li[data-button=choose_prev]").removeClass("hide"),$("li[data-button=choose_next]").removeClass("hide")):($("li[data-button=choose_prev]").addClass("hide"),$("li[data-button=choose_next]").addClass("hide"))},Lead_Image_Menu.fn.ext_init=function(){this.get_valid_images(),this.check_for_crop()},function(_obj){Image_Manipulation_Base.call(this,_obj),this.menu_type="avatar_image_menu",this.action_timeout=null,this.f_uid=General.is_null_empty_undefined(_obj.f_uid)?0:_obj.f_uid}),Profile_Image_Menu=(Avatar_Image_Menu.inherits(Image_Manipulation_Base),Avatar_Image_Menu.fn.set_avatar_image_properties=function(info,loc){var img_obj=loc.shell_obj,loc=loc.set_image_object_properties(info,img_obj);$("#post_preview div.img_wrapper img").attr({src:loc})},Avatar_Image_Menu.fn.make_upload=function(_target,_loc){var loc=_loc,_loc={};0<loc.f_uid&&(_loc={f_uid:loc.f_uid}),$("input#add_avatar_image").fileupload({dataType:"json",formData:_loc,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file_avatar_image",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var info;loc.number_images_uploaded++,General.wrap_and_reset_form($("#add_avatar_image")),data.result=General.parse_json_if_needed(data.result),General.status_ok(data.result.status)?(loading.remove(),$("#avatar_placeholder img").attr({src:data.result.image_info.image.url}),info=data.result.image_info,loc.set_avatar_image_properties(info,loc),loc.shell_obj.shell_obj.proceed({cookie_name:data.result.cookie_name,cookie_val:data.result.cookie_value,codex_cookie_val:data.result.codex_cookie_value,return_url:"",remain_logged_in:!0,user:new User({name:String.format("{0} {1}",$("#user_profile_first_name").val(),$("#user_profile_last_name").val()),avatar:data.result.image_info.image.url,link:String.format("{0}{1}",GLOBALS.PUBLISH_ROOT_PATH.append("users/"),$("#user_profile_handle").val()),profile_complete:!General.is_null_empty_undefined($("#user_profile_first_name").val())&&!General.is_null_empty_undefined($("#user_profile_last_name").val())&&!General.is_null_empty_undefined($("#user_profile_handle").val())})},loc),message_slider(General.success_text.avatar_upload)):message_slider(data.result.text,!0),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loading.remove())}})},Avatar_Image_Menu.fn.make_crop=function(_target,loc){var _c_url=String.format("{0}/account/user_avatar_crop",GLOBALS.PUBLISH_ROOT_PATH);0<loc.f_uid&&(_c_url=String.format("{0}/account/user_avatar_crop?f_uid={1}",GLOBALS.PUBLISH_ROOT_PATH,loc.f_uid)),new Image_Cropper({image_crop_ref:loc.shell_obj,crop_min_width:160,set_width:"",ajax_url:_c_url,crop_size:new Dimensions({width:160,height:160}),use_preview:!0,img_parent_id:"avatar_wrapper",is_circle_image:!0,callback:loc.set_avatar_image_properties,passed_obj:loc,success_message:General.success_text.avatar_image_crop}).init()},Avatar_Image_Menu.fn.ext_init=function(){},function(_obj){Image_Manipulation_Base.call(this,_obj),this.menu_type="profile_image_menu",this.action_timeout=null,this.f_uid=General.is_null_empty_undefined(_obj.f_uid)?0:_obj.f_uid,this.profile_id=General.is_null_empty_undefined(_obj.profile_id)?0:_obj.profile_id}),Gallery_Menu_Public=(Profile_Image_Menu.inherits(Avatar_Image_Menu),Profile_Image_Menu.fn.set_image_properties=function(info,loc){var img_obj=loc.shell_obj,loc=loc.set_image_object_properties(info,img_obj);$(".logo_wrap .logo").css({"background-image":String.format("url({0})",loc)})},Profile_Image_Menu.fn.make_upload=function(_target,_loc){var loc=_loc,_loc={profile_id:loc.profile_id};0<loc.f_uid&&(_loc={f_uid:loc.f_uid,profile_id:loc.profile_id}),$("input#add_profile_image").fileupload({dataType:"json",formData:_loc,singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file_profile_image",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var info;loc.number_images_uploaded++,General.wrap_and_reset_form($("#add_profile_image")),data.result=General.parse_json_if_needed(data.result),General.status_ok(data.result.status)?(loading.remove(),info=data.result.image_info,loc.set_image_properties(info,loc),message_slider(General.success_text.profile_image_upload)):message_slider(data.result.text,!0),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loading.remove())}})},Profile_Image_Menu.fn.make_crop=function(_target,loc){var _c_url=String.format("{0}account/profile_image_crop",GLOBALS.PUBLISH_ROOT_PATH);0<loc.f_uid&&(_c_url=String.format("{0}account/profile_image_crop?f_uid={1}",GLOBALS.PUBLISH_ROOT_PATH,loc.f_uid)),new Image_Cropper({image_crop_ref:loc.shell_obj,crop_min_width:400,set_width:"",ajax_url:_c_url,crop_size:new Dimensions({width:400,height:400}),use_preview:!0,img_parent_id:"avatar_wrapper",is_circle_image:!1,
1callback:loc.set_image_properties,passed_obj:loc,success_message:General.success_text.profile_image_crop,profile_id:loc.profile_id}).init()},Profile_Image_Menu.fn.ext_init=function(){},function(_obj){Pill_Menu_Base.call(this,_obj),this.menu_type="gallery_menu_public"}),Text_Menu_Public=(Gallery_Menu_Public.inherits(Pill_Menu_Base),Gallery_Menu_Public.fn.make_full_screen=function(_target,loc){event.stopPropagation(),$("#core77").addClass("gallery_fullscreen"),_target.parent().parent().removeClass("white"),_target.parent().parent().removeClass("gray"),_target.parent().parent().addClass("black")},Gallery_Menu_Public.fn.make_grid=function(_target,loc){loc.remove_multi_state_active(loc,_target,["slide"]),loc.check_set_active_state(_target),_target.parent().parent().removeClass("slide"),_target.parent().parent().addClass("grid")},Gallery_Menu_Public.fn.make_prev=function(_target,loc){$(".gallery_zone li.prev").trigger("click")},Gallery_Menu_Public.fn.make_next=function(_target,loc){$(".gallery_zone li.next").trigger("click")},Gallery_Menu_Public.fn.make_slide=function(_target,loc){loc.remove_multi_state_active(loc,_target,["grid"]),loc.check_set_active_state(_target),_target.parent().parent().removeClass("grid"),_target.parent().parent().addClass("slide");_target=_target.parent().data("instance");1==_target.gallery_selected.members.length?_target.set_slide($(loc.parent.find("ul li").get(_target.gallery_selected.members[0].value)),!0):1<_target.gallery_selected.members.length?_target.set_slide($(loc.parent.find("ul li").get(_target.gallery_selected.pivot_point)),!0):_target.set_slide($(loc.parent.find("ul li").get(0)),!0)},Gallery_Menu_Public.fn.ext_init=function(){},function(_obj){Menu.call(this,_obj),this.menu_type="text_menu_public",this.parent=_obj.parent,this.focus_node=_obj.focus_node}),Text_Menu=(Text_Menu_Public.inherits(Menu),Text_Menu_Public.previous_selection=new String,Text_Menu_Public.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);_html+="<li class='d_point'></li>",$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.css({top:loc.coords.y-55,left:loc.coords.x-loc.$wrapper_node.width()/2}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Text_Menu_Public.fn.create_tweet_menu_item=function(_action,is_active){return String.format("<span class='{0} {1}'>m</span>",_action,is_active[0])},Text_Menu_Public.fn.create_comment_menu_item=function(_action,is_active){return String.format("<span class='{0} {1}'>Q</span>",_action,is_active[0])},Text_Menu_Public.fn.make_tweet=function(_target,loc){loc.check_set_active_state(_target),document.execCommand("bold",!1,"uniqueid")},Text_Menu_Public.fn.check_set_active_state=function(_target){var _target=_target.find("span"),has_set=_target.hasClass("active");return has_set?_target.removeClass("active"):_target.addClass("active"),has_set},Text_Menu_Public.fn.select_reset_focus_node=function(loc,$select_node){Text_Menu.previous_selection="",Selection.select_all_text($select_node.get(0)),loc.focus_node=Selection.get_focus_node(),$(loc.focus_node).trigger("mouseup")},function(_obj){Menu.call(this,_obj),this.menu_type="text_menu",this.parent=_obj.parent,this.focus_node=_obj.focus_node}),Inline_Image_Menu=(Text_Menu.inherits(Menu),Text_Menu.previous_selection=new String,Text_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);_html+="<li class='d_point'></li>",$(_html).appendTo(loc.$wrapper_node),loc.coords.y=loc.coords.y-55,loc.coords.x=loc.coords.x-loc.$wrapper_node.width()/2,loc.$wrapper_node.css({top:loc.coords.y,left:loc.coords.x}),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Text_Menu.fn.create_bold_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Bold' class='{0} {1}'>b</span>",_action,is_active[0])},Text_Menu.fn.create_italic_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Ital
1ic' class='{0} {1}'>i</span>",_action,is_active[0])},Text_Menu.fn.create_strike_through_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Strike-Through' class='{0} {1}'>V</span>",_action,is_active[0])},Text_Menu.fn.create_h1_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Header 1' class='{0} {1}'>1</span>",_action,is_active[0])},Text_Menu.fn.create_h2_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Header 2' class='{0} {1}'>2</span>",_action,is_active[0])},Text_Menu.fn.create_quote_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Block / Pull Quote' class='block {0}'>q</span><span class='pull {1}'>q</span>",is_active[0],is_active[1])},Text_Menu.fn.create_link_menu_item=function(_action,is_active){return"active"==is_active[0]&&$(Selection.get_focus_node()).attr("href"),String.format("<span data-tooltip='Create Link' class='{0} {1}'>l</span>",_action,is_active[0])},Text_Menu.fn.create_p_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Normal' class='{0} {1} not_c77_icon'>Normal</span>",_action,is_active[0])},Text_Menu.fn.make_bold=function(_target,loc,event){loc.check_set_active_state(_target),document.execCommand("bold",!1,null)},Text_Menu.fn.make_italic=function(_target,loc){loc.check_set_active_state(_target),document.execCommand("italic",!1,"uniqueid")},Text_Menu.fn.make_strike_through=function(_target,loc){loc.check_set_active_state(_target),document.execCommand("strikeThrough",!1,"uniqueid")},Text_Menu.fn.make_link=function(_target,loc){var link_ref=$(Selection.get_focus_node()).attr("href"),link_ref=(General.is_null_empty_undefined(link_ref)&&(link_ref=Post_Base.defaults.text.link),prompt("Enter the link URL",link_ref));link_ref&&""!=link_ref?(/^http(s)?:\/\//.test(link_ref)||(link_ref="http://"+link_ref),!Post_Base.defaults.is_default_text(link_ref)&&link_ref.is_valid_URL()?(document.execCommand("createLink",!1,link_ref),loc.check_set_active_state(_target),$("#post a").attr({target:"_blank"})):(message_slider("Please enter a valid URL in this format: http://www.website.com",!0),_target.find("span").removeClass("active"))):""==link_ref&&(document.execCommand("unlink",!1,""),loc.check_set_active_state(_target))},Text_Menu.fn.make_h1=function(_target,loc){var is_currently_on=loc.check_set_active_state(_target),_all_nodes_selected=Selection.get_all_selected_nodes(),_target=Selection.rangy_saveSelection();if(1<_all_nodes_selected.length)for(var k=0;k<_all_nodes_selected.length;k++){var current_id="",_clone_id="",_nodetype=is_currently_on?"p":"h1";($current_node_=$(_all_nodes_selected[k])).hasClass("caption")||(current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,_nodetype),$current_node=$(String.format("#{0}",current_id)))}else{for(var $current_node_=$(loc.focus_node);$current_node_&&General.is_inline_level_node({exact_to_check:$current_node_[0].nodeName});)$current_node_=$current_node_.parent();_target=Selection.rangy_saveSelection(),current_id="",_clone_id="",_nodetype=is_currently_on?"p":"h1";current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,_nodetype),$current_node=$(String.format("#{0}",current_id))}Selection.rangy_restoreSelection(_target),loc.select_reset_focus_node(loc,$current_node_.parent())},Text_Menu.fn.make_h2=function(_target,loc){var is_currently_on=loc.check_set_active_state(_target),_all_nodes_selected=Selection.get_all_selected_nodes(),_target=Selection.rangy_saveSelection();if(1<_all_nodes_selected.length)for(var k=0;k<_all_nodes_selected.length;k++){var current_id="",_clone_id="",_nodetype=is_currently_on?"p":"h2";($current_node_=$(_all_nodes_selected[k])).hasClass("caption")||(current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,_nodetype),$current_node=$(String.format("#{0}",current_id)))}else{for(var $current_node_=$(loc.focus_node);$current_node_&&General.is_inline_level_node({exact_to_check:$current_node_[0].nodeName});)$current_node_=$current_node_.parent();_target=Selection.rangy_saveSelection(),current_id="",_clone_id="",_nodetype=is_currently_on?"p":"h2";current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,_nodetype),$current_node=$(String.format("#{0}",current_id))}Selection.rangy_restoreSelection(_target),loc.select_reset_focus_node(loc,$current_node_.parent())},Text_Menu.fn.make_quote=function(_target,loc){var _span_block=_target.find("span.block"),_span_pull=_target.find("span.pull"),_all_nodes_selected=Selection.get_all_selected_nodes(),_target=Selection.rangy_saveSelection(),set_block_quote=!1,set_pull_quote=!1,set_normal=!1;if(1<_all_nodes_selected.length){for(var k=0;k<_all_nodes_selected.length;k++){var current_id="",_clone_id="";($current_node_=$(_all_nodes_selected[k])).hasClass("caption")||(_span_block.hasClass("active")||_span_pull.hasClass("active")?_span_block.hasClass("active")&&!_span_pull.hasClass("active")?(set_pull_quote=!0,$current_node_.addClass("p_quo")):_span_block.hasClass("active")&&_span_pull.hasClass("active")&&(set_normal=!0,current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"p"),$current_node=$(String.format("#{0}",current_id))):(set_block_quote=!0,current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"blockquote"),$current_node=$(String.format("#{0}",current_id))))}set_block_quote?_span_block.addClass("active"):set_pull_quote?_span_pull.addClass("active"):set_normal&&(_span_block.removeClass("active"),_span_pull.removeClass("active"))}else{for(var $current_node_=$(loc.focus_node);$current_node_&&General.is_inline_level_node({exact_to_check:$current_node_[0].nodeName});)$current_node_=$current_node_.parent();_target=Selection.rangy_saveSelection(),current_id="",_clone_id="";_span_block.hasClass("active")||_span_pull.hasClass("active")?_span_block.hasClass("active")&&!_span_pull.hasClass("active")?(_span_pull.addClass("active"),$current_node_.addClass("p_quo")):_span_block.hasClass("active")&&_span_pull.hasClass("active")&&(_span_block.removeClass("active"),_span_pull.removeClass("active"),current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"p"),$current_node=$(String.format("#{0}",current_id))):(_span_block.addClass("active"),current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"blockquote"),$current_node=$(String.format("#{0}",current_id)))}Selection.rangy_restoreSelection(_target),loc.select_reset_focus_node(loc,$current_node_)},Text_Menu.fn.make_p=function(_target,loc){loc.remove_multi_state_active(loc,["h1","h2","pull","block"]);var _all_nodes_selected=Selection.get_all_selected_nodes(),saved_selection=Selection.rangy_saveSelection();if(1<_all_nodes_selected.length)for(var k=0;k<_all_nodes_selected.length;k++){0<($current_node_=$(_all_nodes_selected[k])).find("span").length&&$current_node_.find("span").not(".no-interact, .rangySelectionBoundary").contents().unwrap();var current_id="",_clone_id="";$current_node_.hasClass("caption")||(current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"p"),$current_node=$(String.format("#{0}",current_id)))}else{for(var $current_node_=$(loc.focus_node),saved_selection=Selection.rangy_saveSelection();$current_node_&&General.is_inline_level_node({exact_to_check:$current_node_[0].nodeName});)$current_node_=$current_node_.parent();(0<$current_node_.parents("p").length||0<$current_node_.parents("h1").length||0<$current_node_.parents("h2").length||0<$current_node_.parents("blockquote").length)&&$current_node_.contents().unwrap(),0<$current_node_.find("em.caption").length&&$current_node_.find("em.caption").contents().unwrap(),0<$current_node_.find("em").length&&$current_node_.find("em").contents().unwrap(),0<$current_node_.find("span").length&&$current_node_.find("span").not(".no-interact, .rangySelectionBoundary").contents().unwrap();current_id="",_clone_id="";current_id=_clone_id=General.replace_node_with_new_node_type($current_node_,_clone_id,"p"),$current_node=$(String.format("#{0}",current_id))}Selection.rangy_restoreSelection(saved_selection),loc.select_reset_focus_node(loc,$current_node_.parent())},Text_Menu.fn.check_set_active_state=function(_target){var _target=_target.find("span"),has_set=_target.hasClass("active");return has_set?_target.removeClass("active"):_target.addClass("active"),has_set},Text_Menu.fn.select_reset_focus_node=function(loc,$select_node){Text_Menu.previous_selection="",loc.focus_node=Selection.get_focus_node(),$(loc.focus_node).trigger("mouseup")},function(_obj){Menu.call(this,_obj),this.menu_type="inline_image_menu",this.parent=_obj.parent,this.focus_node=_obj.focus_node}),Menu_Use_Text_Menu=(Inline_Image_Menu.inherits(Menu),Inline_Image_Menu.previous_selection=new String,Inline_Image_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],loc.parent);_html+="<li class='d_point'></li>",$(_html).appendTo(loc.$wrapper_node),loc.coords.y=loc.coords.y-55,loc.coords.x=loc.coords.x-loc.$wrapper_node.width()/2,loc.$wrapper_node.css({top:loc.coords.y,left:loc.coords.x}),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Inline_Image_Menu.fn.create_small_left_menu_item=function(_action,is_active,parent){is_active=is_active[0];return $(parent).hasClass("small")&&$(parent).hasClass("left")&&(is_active="active"),String.format("<span data-tooltip='Small Presentation' class='{0} {1}'>3</span>",_action,is_active)},Inline_Image_Menu.fn.create_medium_menu_item=function(_action,is_active,parent){is_active=is_active[0];return $(parent).hasClass("large")||$(parent).hasClass("small")||(is_active="active"),String.format("<span data-tooltip='Medium Presentation' class='{0} {1}'>4</span>",_action,is_active)},Inline_Image_Menu.fn.create_large_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Large Presentation' class='{0} {1}'>5</span>",_action,is_active[0])},Inline_Image_Menu.fn.create_add_caption_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Add Caption' class='{0} {1}
1 not_c77_icon'>Add Caption</span>",_action,is_active[0])},Inline_Image_Menu.fn.make_small_left=function(_target,loc){var $parent=$(loc.focus_node);loc.remove_multi_state_active(loc,["small_right","large","medium"]),loc.check_set_active_state(_target,!1)||($parent.removeClass("medium"),$parent.removeClass("large"),$parent.addClass("small"))},Inline_Image_Menu.fn.make_medium=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["small_left","small_right","large"]),loc.check_set_active_state(_target,!1)||($parent.removeClass("small"),$parent.removeClass("large"),$parent.addClass("clear_both"),$parent.removeClass("left"),$parent.removeClass("right"))},Inline_Image_Menu.fn.make_large=function(_target,loc){var $parent=$(loc.focus_node);loc.remove_multi_state_active(loc,["small_left","small_right","medium"]),loc.check_set_active_state(_target,!1)||($parent.removeClass("small"),$parent.removeClass("medium"),$parent.addClass("large")),$parent.addClass("clear_both"),$parent.removeClass("left"),$parent.removeClass("right")},Inline_Image_Menu.fn.make_add_caption=function(_target,loc){var _caption_info,$parent=$(loc.focus_node),_caption_id="",is_default=!(loc.shell_obj.undo_manager.is_paused=!0);$parent.next().hasClass("caption")?(""==$parent.next().text().clean_white_space()&&($parent.next().text(Post_Base.defaults.text.caption),is_default=!0),$parent.next().attr({id:General.get_unique_id()}),_caption_id=$parent.next().attr("id")):(_caption_id=(_caption_info=Module_Menu.generate_caption(Post_Base.defaults.text.caption)).id,$(_caption_info.html).insertAfter($parent),is_default=!0),Selection.rangy_select_all_text({id:_caption_id,is_default:is_default}),loc.shell_obj.undo_manager.is_paused=!1},Inline_Image_Menu.fn.check_set_active_state=function(_target){var _target=_target.find("span"),has_set=_target.hasClass("active");return has_set?_target.removeClass("active"):_target.addClass("active"),has_set},Inline_Image_Menu.fn.select_reset_focus_node=function(loc,$select_node){Text_Menu.previous_selection="",loc.focus_node=Selection.get_focus_node(),$(loc.focus_node).trigger("mouseup")},function(_obj){Text_Menu.call(this,_obj),this.menu_type="menu_use_text_menu"}),Properties_Menu=(Menu_Use_Text_Menu.inherits(Text_Menu),function(_obj){Menu.call(this,_obj),this.parent=_obj.parent}),Image_Menu=(Properties_Menu.inherits(Menu),Properties_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),$("."+loc.menu_type).data(loc.menu_type,{instance:loc});for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],loc.parent);_html+="<li class='r_point'></li>",$(_html).appendTo(loc.$wrapper_node);var draw_left=0<loc.coords.x-loc.$wrapper_node.width()-15,_left=draw_left?loc.coords.x-loc.$wrapper_node.width()-15:loc.coords.x+35;draw_left||loc.$wrapper_node.find(".r_point").addClass("l_point").removeClass("r_point"),loc.$wrapper_node.css({top:loc.coords.y-12,left:_left}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Properties_Menu.fn.create_small_left_menu_item=function(_action,is_active,parent){is_active=is_active[0];return $(parent).hasClass("small")&&$(parent).hasClass("left")&&(is_active="active"),String.format("<span data-tooltip='Small Presentation' class='{0} {1}'>3</span>",_action,is_active)},Properties_Menu.fn.create_small_right_menu_item=function(_action,is_active,parent){is_active=is_active[0];return $(parent).hasClass("small")&&$(parent).hasClass("right")&&(is_active="active"),String.format("<span class='{0} {1}'>J</span>",_action,is_active)},Properties_Menu.fn.create_medium_menu_item=function(_action,is_active,parent){is_active=is_active[0];return $(parent).hasClass("large")||$(parent).hasClass("small")||(is_active="active"),String.format("<span data-tooltip='Medium Presentation' class='{0} {1}'>4</span>",_action,is_active)},Properties_Menu.fn.create_large_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Large Presentation' class='{0} {1}'>5</span>",_action,is_active[0])},Properties_Menu.fn.create_left_menu_item=function(_action,is_active){return String.format("<span class='{0} {1}'>L</span>",_action,is_active[0])},Properties_Menu.fn.create_right_menu_item=function(_action,is_active){return String.format("<span class='{0} {1}'>R</span>",_action,is_active[0])},Properties_Menu.fn.create_link_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Create Link' class='{0} {1}'>l</span>",_action,is_active[0])},Properties_Menu.fn.create_remove_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Remove Item' 
1class='{0} {1}'>t</span>",_action,is_active[0])},Properties_Menu.fn.create_white_menu_item=function(_action,is_active){return String.format("<span data-tooltip='White Background' class='{0} {1}'>C</span>",_action,is_active[0])},Properties_Menu.fn.create_gray_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Gray Background' class='{0} {1}'>C</span>",_action,is_active[0])},Properties_Menu.fn.create_black_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Black Background' class='{0} {1}'>C</span>",_action,is_active[0])},Properties_Menu.fn.create_grid_menu_item=function(_action,is_active){return String.format("<span data-tooltip='View As Grid(edit only)' class='{0} {1}'>&lt;</span>",_action,is_active[0])},Properties_Menu.fn.create_slide_menu_item=function(_action,is_active){return String.format("<span data-tooltip='View As Slideshow(public display)' class='{0} {1}'>&gt;</span>",_action,is_active[0])},Properties_Menu.fn.create_upload_menu_item=function(_action,is_active){return String.format("<span data-tooltip='Add Images' class='{0} {1}'>u</span><input data-tooltip='Add Images' id='add_gallery_img' type='file' name='fileData' multiple='true' accept='image/*'/>",_action,is_active[0])},Properties_Menu.fn.make_remove=function(_target,loc){confirm("Removing this element can't be undone, are you sure you wish do delete?")&&(loc.parent.remove(),loc.close_menu(),null!=loc.shell_obj.lead_image_menu)&&loc.shell_obj.lead_image_menu.get_valid_images()},Properties_Menu.fn.make_left=function(_target,loc){var $parent=$(loc.parent);$parent.hasClass("small")&&(loc.remove_multi_state_active(loc,["right"]),loc.add_state_active(loc,["left"]),$parent.removeClass("clear_both"),$parent.removeClass("right"),$parent.addClass("left"))},Properties_Menu.fn.make_right=function(_target,loc){var $parent=$(loc.parent);$parent.hasClass("small")&&(loc.remove_multi_state_active(loc,["left"]),loc.add_state_active(loc,["right"]),$parent.removeClass("clear_both"),$parent.removeClass("left"),$parent.addClass("right"))},Properties_Menu.fn.make_small_left=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["small_right","large","medium"]),loc.auto_add_float(loc,$parent,"left"),loc.check_set_active_state(_target,!1)||($parent.removeClass("medium"),$parent.removeClass("large"),$parent.addClass("small"))},Properties_Menu.fn.make_small_right=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["small_left","large","medium"]),loc.auto_add_float(loc,$parent,"right"),loc.check_set_active_state(_target,!1)||($parent.removeClass("medium"),$parent.removeClass("large"),$parent.addClass("small"))},Properties_Menu.fn.make_medium=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["small_left","small_right","large"]),loc.check_set_active_state(_target,!1)||($parent.removeClass("small"),$parent.removeClass("large"),$parent.addClass("clear_both"),$parent.removeClass("left"),$parent.removeClass("right"))},Properties_Menu.fn.make_large=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["small_left","small_right","medium"]),loc.auto_add_float(loc,$parent),loc.check_set_active_state(_target,!1)||($parent.removeClass("small"),$parent.removeClass("medium"),$parent.addClass("large")),$parent.addClass("clear_both"),$parent.removeClass("left"),$parent.removeClass("right")},Properties_Menu.fn.make_black=function(_target,loc){var $parent=$(loc.parent);
1loc.remove_multi_state_active(loc,["white","gray"]),loc.add_state_active(loc,["black"]),$parent.removeClass("white"),$parent.removeClass("gray"),$parent.addClass("black")},Properties_Menu.fn.make_white=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["black","gray"]),loc.add_state_active(loc,["white"]),$parent.removeClass("black"),$parent.removeClass("gray"),$parent.addClass("white")},Properties_Menu.fn.make_gray=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["white","black"]),loc.add_state_active(loc,["gray"]),$parent.removeClass("white"),$parent.removeClass("black"),$parent.addClass("gray")},Properties_Menu.fn.add_state_active=function(loc,multi_member_actions){for(var k=0;k<multi_member_actions.length;k++)loc.$wrapper_node.find("."+multi_member_actions[k]).addClass("active")},Properties_Menu.fn.auto_add_float=function(loc,$parent,side){$parent.removeClass("clear_both"),"left"==side?($parent.removeClass("right"),$parent.addClass("left")):"right"==side&&($parent.removeClass("left"),$parent.addClass("right"))},Properties_Menu.fn.check_set_active_state=function(_target,set){set=!!General.is_null_empty_undefined(set)||set;var _target=_target.find("span"),has_set=_target.hasClass("active");return set?has_set?_target.removeClass("active"):_target.addClass("active"):has_set||_target.addClass("active"),has_set},function(_obj){Properties_Menu.call(this,_obj),this.menu_type="image_menu",this.parent=_obj.parent}),Embed_Menu=(Image_Menu.inherits(Properties_Menu),Image_Menu.fn.make_link=function(_target,loc){loc.check_set_active_state(_target)?document.execCommand("unlink",!1,""):(loc=prompt("Enter the link URL","Link URL"),document.execCommand("createLink",!1,loc))},Image_Menu.fn.make_remove=function(_target,loc){var file_id;confirm("Removing this element can't be undone, are you sure you wish do delete?")&&(file_id=loc.parent.find("img").attr("data-image-id"),$.post(GLOBALS.ROOT_PATH+"account/post_file_delete",{post_id:loc.shell_obj.data.post_id,file_ids:file_id},function(){printf("image id:"+file_id+" removed")},"json"),loc.parent.remove(),loc.close_menu())},function(_obj){Properties_Menu.call(this,_obj),this.menu_type="embed_menu",this.parent=_obj.parent}),Portal_Menu=(Embed_Menu.inherits(Properties_Menu),Embed_Menu.fn.make_small=function(_target,loc){Properties_Menu.prototype.make_small.call(this,_target,loc),loc.is_vimeo_kickstarter_youtube(loc)},Embed_Menu.fn.make_medium=function(_target,loc){Properties_Menu.prototype.make_medium.call(this,_target,loc),loc.is_vimeo_kickstarter_youtube(loc)},Embed_Menu.fn.make_large=function(_target,loc){Properties_Menu.prototype.make_large.call(this,_target,loc),loc.is_vimeo_kickstarter_youtube(loc)},function(_obj){Properties_Menu.call(this,_obj),this.menu_type="portal_menu",this.parent=_obj.parent}),Award_Category_Insert_Menu=(Portal_Menu.inherits(Properties_Menu),Portal_Menu.fn.make_link=function(_target,loc){loc.check_set_active_state(_target)?document.execCommand("unlink",!1,""):(loc=prompt("Enter the link URL","Link URL"),document.execCommand("createLink",!1,loc))},function(_obj){Properties_Menu.call(this,_obj),this.menu_type="award_category_insert_menu",this.parent=_obj.parent}),Gallery_Menu_Base=(Award_Category_Insert_Menu.inherits(Properties_Menu),function(_obj){Properties_Menu.call(this,_obj),this.gallery_object=_obj.gallery_object,this.parent=_obj.parent}),Gallery_Menu_Edit=(Gallery_Menu_Base.inherits(Properties_Menu),Gallery_Menu_Base.fn.make_grid=function(_target,loc){var $parent=$(loc.parent);loc.remove_multi_state_active(loc,["slide"]),loc.add_state_active(loc,["grid"]),$parent.find("ul").css({height:""}),$parent.removeClass("slide"),$parent.addClass("grid")},Gallery_Menu_Base.fn.make_slide=function(_target,loc){var $parent=$(loc.parent),$parent=(loc.remove_multi_state_active(loc,["grid"]),loc.add_state_active(loc,["slide"]),$parent.removeClass("grid"),$parent.addClass("slide"),$parent.data("instance"));1==$parent.gallery_selected.members.length?$parent.set_slide($(loc.parent.find("ul li").get($parent.gallery_selected.members[0].value)),!0):1<$parent.gallery_selected.members.length?$parent.set_slide($(loc.parent.find("ul li").get($parent.gallery_selected.pivot_point)),!0):$parent.set_slide($(loc.parent.find("ul li").get(0)),!0)},function(_obj){Gallery_Menu_Base.call(this,_obj),this.menu_type="gallery_menu_edit"}),Module_Menu=(Gallery_Menu_Edit.inherits(Gallery_Menu_Base),Gallery_Menu_Edit.fn.make_remove=function(_target,loc){confirm("Removing this element can't be und
1one, are you sure you wish do delete?")&&(loc.parent.remove(),$.post(GLOBALS.ROOT_PATH+"account/post_image_collection_delete",{post_id:loc.shell_obj.data.post_id,image_collection_id:loc.slideshow_id},function(){printf("slideshow removed")},"json"),loc.close_menu())},function(_obj){Menu.call(this,_obj),this.menu_type="module_menu",this.parent=_obj.parent,this.prepend_module_contents=null!=_obj.prepend_module_contents&&_obj.prepend_module_contents,this.at_end=_obj.at_end,this.number_images_to_upload=0,this.number_images_uploaded=0}),Choose_Award_Winner_Posts_Menu=(Module_Menu.inherits(Menu),Module_Menu.generate_caption=function(_html_text){var _caption_visibility=Post_Base.defaults.is_default_text(_html_text)?"public_hide":"",_caption_id=General.get_unique_id();return{html:String.format("<em id='{0}' class='caption {1}'>{2}</em>",_caption_id,_caption_visibility,_html_text),id:_caption_id}},Module_Menu.fn.render=function(){var loc=this,_html=new String;(loc.parent.hasClass("embed_wrapper")||loc.parent.hasClass("img_wrapper")||loc.parent.hasClass("portal_wrapper")||loc.parent.hasClass("award_winners_wrapper"))&&(loc.parent.next().hasClass("embed_wrapper")||loc.parent.next().hasClass("img_wrapper")||loc.parent.next().hasClass("portal_wrapper")||loc.parent.hasClass("award_winners_wrapper"))&&loc.actions.push("add_paragraph"),$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);_html+="<li class='l_point'></li>",$(_html).appendTo(loc.$wrapper_node),loc.coords.y=loc.coords.y-14,loc.coords.x=loc.coords.x+30,loc.$wrapper_node.css({top:loc.coords.y,left:loc.coords.x}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Module_Menu.fn.create_add_special_link_image_menu_item=function(_action){return String.format("<span data-tooltip='Add a Linked Image' class='{0}'>Il</span><input data-tooltip='Add a Linked Image' id='add_post_image' type='file' name='fileData' multiple='false' accept='image/*'/>",_action)},Module_Menu.fn.create_add_image_menu_item=function(_action){return String.format("<span data-tooltip='Add Image(s)' class='{0}'>I</span><input data-tooltip='Add Image(s)' id='add_post_image' type='file' name='fileData' multiple='true' accept='image/*'/>",_action)},Module_Menu.fn.create_image_bin_menu_item=function(_action){return String.format("<span data-tooltip='From Image Bin' class='{0}'>$</span>",_action)},Module_Menu.fn.create_add_embed_menu_item=function(_action){return String.format("<span data-tooltip='Embed Media' class='{0}'>v</span>",_action)},Module_Menu.fn.create_add_paragraph_menu_item=function(_action){return String.format("<span data-tooltip='Insert Paragraph' class='{0}'>O</span>",_action)},Module_Menu.fn.create_add_portal_menu_item=function(_action){return String.format("<span data-tooltip='Add Content Portal' class='{0}'>z</span>",_action)},Module_Menu.fn.create_add_gallery_menu_item=function(_action){return String.format("<span data-tooltip='Create Slideshow' class='{0}'>=</span>",_action)},Module_Menu.fn.create_add_formatted_c77da_menu_item=function(_action){return String.format("<span data-tooltip='Add formatted c77da winners' class='{0}'>|</span>",_action)},Module_Menu.fn.create_add_external_mp4_menu_item=function(_action){return String.format("<span data-tooltip='Add external mp4 video (ex. from Imgur)' class='{0}'>;</span>",_action)},Module_Menu.fn.make_add_special_link_image=function(_target,loc){$(loc.parent);var _html=new String;$("input#add_post_image").fileupload({dataType:"json",formData:{post_id:loc.shell_obj.data.post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var _link_to_use_for_img;loc.number_images_uploaded++,data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?(_link_to_use_for_img=prompt("Type in the link you wish to use with this image."),_html+="<div contenteditable='false' class='img_wrapper no_slideshow clear_both'>",General.is_null_empty_undefined(_link_to_use_for_img)||(_html+=String.format("<a href='{0}' class='allow_link_go' style='border-bottom: none;display:  inline-block;' target='_blank'>",_link_to_use_for_img)),_html=(_html=(_html+="<img  ")+String.format("data-image-width='{0}' data-image-height='{1}' ",data.image.width,data.image.height))+String.format("data-image-id='{0}' src='{1}'/>",data.image.id,data.image.url),General.is_null_empty_undefined(_link_to_use_for_img)||(_html+="</a>"),_html+="</div>",loc.close_menu(),loc.shell_obj.lead_image_menu.get_valid_images()):(message_slider(data.text,!0),loading.remove()),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loading.remove(),_html+=loc.add_at_end(loc),loc.insert_placement(loc,_html))}})},Module_Menu.fn.make_image_bin=function(_target,loc){$(loc.parent);for(var _html=new String,image_to_add_list=($("#post_image_bin").addClass("open_to_add"),[]),k=0;k<3;k++)image_to_add_list.push(new Image_Base({src:"",dimension:new Dimensions({width:20,height:20}),file_id:123}));var _unique_id=General.get_unique_id();String.format("<p id='{0}'>",_unique_id),String.format("data-image-width='{0}' data-image-height='{1}' ",image_to_add_list[0].dimension.width,image_to_add_list[0].dimension.height),String.format("data-image-id='{0}' src='{1}'/>",image_to_add_list[0].file_id,image_to_add_list[0].src);loc.close_menu()},Module_Menu.fn.make_add_image=function(_target,loc){$(loc.parent);var _html=new String;
1loc.shell_obj.undo_manager.is_paused=!0,$("input#add_post_image").fileupload({dataType:"json",formData:{post_id:loc.shell_obj.data.post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){var _html_img_bin;loc.number_images_uploaded++,data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?(_html_img_bin=String.format("<li data-image-url='{0}' data-image-id='{1}' data-image-width='{2}' data-image-height='{3}'><div style='background-image: url({0});'></div><span>{1}</span>",data.image.url,data.image.id,data.image.width,data.image.height),$(_html_img_bin).appendTo($("#post_image_bin ul")),_html_img_bin=General.get_unique_id(),_html=(_html=(_html=_html+String.format("<p id='{0}'>",_html_img_bin)+"<img  ")+String.format("data-image-width='{0}' data-image-height='{1}' ",data.image.width,data.image.height))+String.format("data-image-id='{0}' src='{1}'/>",data.image.id,data.image.url)+"</p>",loc.close_menu(),loc.shell_obj.lead_image_menu.get_valid_images()):(message_slider(data.text,!0),loading.remove()),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0,loading.remove(),_html+=loc.add_at_end(loc),loc.insert_placement(loc,_html))}})},Module_Menu.fn.make_add_embed=function(_target,loc){$(loc.parent);var _stamp,data_attr_add,is_twitter,is_reddit,is_instagram,is_pinterest,_html,entry=prompt("Enter embed code");entry&&(loc.shell_obj.undo_manager.is_paused=!0,_stamp=General.get_unique_id(),_html="",data_attr_add=new String,is_twitter=/twitter\.com/.test(entry),is_instagram=/instagram\.com/.test(entry),is_pinterest=/pinterest\.com/.test(entry),is_reddit=/reddit\.com/.test(entry),is_twitter?(entry=entry.split("<script")[0],data_attr_add=String.format("data-twitter-embed='{0}'",escape(entry)),_html+=String.format("<div contenteditable='false' class='embed_wrapper custom_embed twitter_embed' id='{0}' {1}>{2}</div>",_stamp,data_attr_add,entry)):is_instagram?_html+=String.format("<div contenteditable='false' class='embed_wrapper custom_embed' id='{0}' {1}>{2}</div>",_stamp,data_attr_add,entry):is_pinterest?(data_attr_add=String.format("data-pinterest-embed='{0}'",escape(entry)),_html+=String.format("<div contenteditable='false' class='embed_wrapper custom_embed pinterest_embed' id='{0}' {1}>{2}</div>",_stamp,data_attr_add,entry)):(is_reddit&&(data_attr_add=String.format("data-reddit-embed='{0}'","")),_html+=String.format("<p id='{0}' {1}>",_stamp,data_attr_add),_html=/vimeo\.com/.test(entry)?(is_instagram=entry.split("<p"),is_pinterest=(is_pinterest=String.format("<p{0}",is_instagram[1])).replace(/<\/?p>/gi,""),(_html+=is_instagram[0])+Module_Menu.generate_caption(is_pinterest).html):is_reddit?(_html+=entry.replace("amp-iframe","iframe"))+Module_Menu.generate_caption(Post_Base.defaults.text.caption).html:(_html+=entry)+Module_Menu.generate_caption(Post_Base.defaults.text.caption).html,_html+="</p>"),_html+=loc.add_at_end(loc),loc.insert_placement(loc,_html),loc.parent=$("#"+_stamp),loc.is_vimeo_kickstarter_youtube(loc),is_twitter)&&twttr.widgets.load()},Module_Menu.fn.make_add_portal=function(_target,loc){$(loc.parent);var _html=new String,_stamp=General.get_unique_id(),_html=(_html+="<div class='portal_wrapper gray clear_both'><p id='"+_stamp+"'><br/></p></div>")+loc.add_at_end(loc);loc.insert_placement(loc,_html),Selection.select_all_text(document.getElementById(_stamp)),loc.close_menu()},Module_Menu.fn.make_add_paragraph=function(_target,loc){$(loc.parent);var _html=new String,_stamp=General.get_unique_id(),_html=(_html+="<p data-ic-marker='"+_stamp+"'><br/></p>")+loc.add_at_end(loc);loc.insert_placement(loc,_html),Selection.select_all_text(document.getElementById(_stamp)),loc.close_menu()},Module_Menu.fn.make_add_gallery=function(_target,loc){var _p_id=loc.shell_obj.data.post_id,_loc=loc;$.post(GLOBALS.ROOT_PATH+"account/create_slideshow",{post_id:_p_id},function(data){var _stamp,_html,data=General.parse_json_if_needed(data);General.status_ok(data.status)&&($(_loc.parent),_stamp=General.get_unique_id(),data=$.parseJSON(data.data),_html=new String,_html=(_html+=String.format("<div class='gallery_wrapper grid gray clear_both' data-sli
1deshow-id='{1}' contenteditable='false'><ul class='slideshow_ul not_selectable' id='{0}'></ul></div>",_stamp,data.slideshow_id))+loc.add_at_end(loc),loc.insert_placement(loc,_html),(_html=new Gallery_Edit({$this:$("#"+_stamp).parent(),shell_obj:_loc.shell_obj,slideshow_id:data.slideshow_id})).init(),$("#"+_stamp).parent().data("instance",_html),_loc.close_menu(),$("#"+_stamp).parent().trigger("mouseover").find(".edit_module_prop").trigger("click").parents("body").find("#add_gallery_img").trigger("click"),setTimeout(function(){$("input#add_gallery_img").trigger("click")},1e3),(data=$(".gallery_menu_edit").data("gallery_menu_edit").instance).make_upload($(".gallery_menu_edit").find("input#add_gallery_img"),data))})},Module_Menu.fn.create_list_by_award_type=function(_list,pro_or_student,show_category){var _html="",winner_arr=(null==show_category&&(show_category=!1),["","Notable","Runner Up","Winner"]);return $.each(_list,function(index,val){_html=(_html=(_html=(_html=(_html+=String.format("<li data-post-id='{0}'><a href='{1}'>",this.id,this.permalink))+String.format("<div class='img_wrapper not_editable'><img src='{0}'></div>",this.lead_image_large_url)+"<div class='post_info_wrap not_editable'>")+String.format("<div class='award_honor_type'>{0}{1}</div>","Student"==pro_or_student?"Student ":"",winner_arr[this.winner_type]))+String.format("<h1><em>{0}</em></h1>",this.title))+String.format("<h3 class='author_info'>By {0}</h3></div></a></li>",this.designer_name)}),_html},Module_Menu.fn.callback_from_get_award_posts_by_category=function(_lists,is_mix,selected_categories,loc,menu_obj){var _html=new String,_stamp=General.get_unique_id();_html+=String.format("<div contenteditable='false' data-categories='{0}' class='award_winners_wrapper not_editable' id='{1}'>",selected_categories.toString(),_stamp),is_mix?_html=(_html=(_html+="<ul class='public_awards_separate_tiles'>")+loc.create_list_by_award_type(_lists.professionals,"Professional"))+loc.create_list_by_award_type(_lists.students,"Student")+"</ul>":(_stamp=AWARD_CATEGORIES_SERVICE.name_for(parseInt(selected_categories)).replace(/&/gi,"&amp;"),(0<_lists.professionals.length||0<_lists.students.length)&&(_html=_html+String.format("<h2 class='header_type solo'>{0} Award Honorees</h2>",_stamp)+"<ul class='public_awards_separate_tiles'>",0<_lists.professionals.length&&(_html+=loc.create_list_by_award_type(_lists.professionals,"Professional")),0<_lists.students.length&&(_html+=loc.create_list_by_award_type(_lists.students,"Student")),_html+="</ul>")),_html=(_html+="</div>")+loc.add_at_end(loc),loc.insert_placement(loc,_html),loc.close_menu(),menu_obj.close_menu()},Module_Menu.fn.make_add_formatted_c77da=function(_target,loc){var $parent=loc.$wrapper_node,menu_coords=new Coordinates,at_end=(menu_coords.set_property("x",$parent.offset().left),menu_coords.set_property("y",$parent.offset().top),null==$($parent).next()[0]);AWARD_CATEGORIES_SERVICE.load(function(){var award_cat_menu=new Choose_Award_Winner_Posts_Menu({actions:["categories","add_post_ids","add_to_page"],coords:menu_coords,parent:$parent,appendTo_id:"body",shell_obj:loc.shell_obj,menu_obj:loc,at_end:at_end});loc.shell_obj.add_menu(award_cat_menu),award_cat_menu.render()})},Module_Menu.fn.make_add_external_mp4=function(_target,loc){$(loc.parent);var _stamp,_html,data_attr_add,entry=prompt("Enter externally sourced(hosted) mp4 file only");entry&&(loc.shell_obj.undo_manager.is_paused=!0,_stamp=General.get_unique_id(),_html="",data_attr_add=new String,/\.mp4/.test(entry)?(data_attr_add=(data_attr_add=String.format("<video preload='auto' autoplay='autoplay' muted='muted' loop='loop' webkit-playsinline='' style='width: 100%; height: auto;'>"))+String.format("<source src='{0}' type='video/mp4'>",entry)+"</video>",_html=(_html+=String.format("<p id='{0}'>{1}</p>",_stamp,data_attr_add))+loc.add_at_end(loc),loc.insert_placement(loc,_html),loc.parent=$("#"+_stamp)):alert("Only mp4 video files that are externally sourced will work here"))},Module_Menu.fn.add_at_end=function(loc){return loc.at_end?"<p class='at_end'><br/></p>":""},Module_Menu.fn.insert_placement=function(loc,_html){$(_html).insertAfter(loc.parent),Selection.rangy_select_all_text({actual_element:loc.parent.get(0),is_default:!1}
1),loc.shell_obj.undo_manager.is_paused=!1},function(_obj){Menu.call(this,_obj),this.menu_type="choose_award_winner_posts_menu",this.menu_obj=_obj.menu_obj}),Collaboration_Menu=(Choose_Award_Winner_Posts_Menu.inherits(Menu),Choose_Award_Winner_Posts_Menu.fn.render=function(){var loc=this,_html=new String,draw_left=($(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),0<loc.coords.x-loc.$wrapper_node.width()-22);_html+=String.format("<li class='{0} '></li>",draw_left?"r_point":"l_point");for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],null,!0);$(_html).appendTo(loc.$wrapper_node);var draw_top=loc.coords.y-30+loc.$wrapper_node.outerHeight()<$(document).scrollTop()+$(window).height(),draw_left=(draw_left?draw_top?$("li.r_point").addClass("top"):$("li.r_point").addClass("bottom"):draw_top?$("li.l_point").addClass("top"):$("li.l_point").addClass("bottom"),draw_left?loc.coords.x-loc.$wrapper_node.width()-22:loc.coords.x+172),draw_top=draw_top?loc.coords.y-30:loc.coords.y-loc.$wrapper_node.outerHeight()+50;loc.$wrapper_node.css({top:draw_top,left:draw_left}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),$("#award_cats_for_widget").change(function(){var set_additions=loc.shell_obj.get_addition_box_nodes(loc.$wrapper_node.find(".addition_box"));loc.shell_obj.add_addition_box_node_via_select(loc.shell_obj,$(this),set_additions,$("#award_categories"))}),$(".addition_box .remove").live("click",function(e){$(this).parent().remove()})},Choose_Award_Winner_Posts_Menu.fn.create_categories_menu_item=function(_action,is_active){var html_created="<option value='0'></option>",result=($.each(AWARD_CATEGORIES_SERVICE.current||[],function(index,val){html_created+=String.format("<option value='{0}'>{1}</option>",this.id,this.name.replace(/&/gi,"&amp;"))}),"<label>Award Categories</label>");return result+String.format("<div class='drop_down'><select class='addition_box_select' id='award_cats_for_widget' name='program'>{0}</select><span class='dd_arrow c77_icon not_selectable'>\"</span></div>",html_created)+"<div id='award_categories' class='addition_box'></div>"},Choose_Award_Winner_Posts_Menu.fn.create_add_post_ids_menu_item=function(_action,is_active){return"<label>Filter by Post Id(s) <em>(optional) separate by comma</em></label><input type='text' id='post_ids_list'/>"},Choose_Award_Winner_Posts_Menu.fn.create_add_to_page_menu_item=function(_action,is_active){return"<div class='btn left'>Add Now</div>"},Choose_Award_Winner_Posts_Menu.fn.make_add_to_page=function(_target,_loc){for(var loc=_loc,selected_categories=loc.shell_obj.get_addition_box_nodes(loc.$wrapper_node.find(".addition_box")),selected_post_ids_csv=loc.$wrapper_node.find("#post_ids_list").val().replace(/\s/gi,""),selected_post_ids_list=selected_post_ids_csv.split(","),k=0;k<selected_post_ids_list.length;k++)selected_post_ids_list[k]=parseInt(selected_post_ids_list[k]);for(var award_post_list={professionals:[],students:[]},ajax_calls_left=selected_categories.length,k=0;k<selected_categories.length;k++){var _category=AWARD_CATEGORIES_SERVICE.name_for(parseInt(selected_categories[k])).replace(/&/gi,"&amp;");$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/get_award_winners_per_category"),{category_id:parseInt(selected_categories[k])},function(data){data=General.parse_json_if_needed(data);var list_type=["professionals","students"];if(General.status_ok(data.status)){for(var m=0;m<list_type.length;m++)$.each(data.data[list_type[m]],function(index,val){this.category=_category,(General.is_null_empty_undefined(selected_post_ids_csv)||selected_post_ids_list.contains(this.id))&&award_post_list[list_type[m]].push(this)});ajax_calls_left--}})}General.do_when(function(){return 0==ajax_calls_left},function(){var is_mix=!General.is_null_empty_undefined(selected_post_ids_csv)||1<selected_categories.length;loc.menu_obj.callback_from_get_award_posts_by_category(award_post_list,is_mix,selected_categories,loc.menu_obj,loc)},500)},function(_obj){Menu.call(this,_obj),this.menu_type="collaboration_menu",this.parent=_obj.parent,this.members=_obj.members}),Image_Collection_Item_Menu_Base=(Collaboration_Menu.inherits(Menu),Collaboration_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),_html+="<li class='r_point'></li>";for(var k=0;k<loc.members.length;k++)_html+=loc.create_collaborator(loc.members[k]);_html+="<li class='add_another'><form><input type='text' placeholder='Enter a name'></form></li>",$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.css({top:loc.coords.y-12,left:loc.coords.x-loc.$wrapper_node.width()-15}).fadeIn(),loc.members[0].name="holy shiezza"},Collaboration_Menu.fn.create_collaborator=function(user){var _html=new String;user.can_write;
1return(_html+=String.format("<li class='results' id='{0}'>",user.id))+String.format("<img src='{0}'>",user.avatar_url)+String.format("<span class='results_name'>{0}</span>",user.name)+String.format("<span class='results_handle'>{0}</span>",user.handle)+"<span class='c77_icon remove'>r</span>"+"</li>"},Collaboration_Menu.fn.change_collaborator_access=function(user){},Collaboration_Menu.fn.remove_collaborator=function(user){},function(_obj){Menu.call(this,_obj),this.menu_type="image_collection_item_menu_base",this.parent=_obj.parent,this.update_gallery_func=_obj.update_gallery_func,this.gallery_class=_obj.gallery_class,this.title=null!=_obj.title?_obj.title:"",this.image_id=null!=_obj.image_id?_obj.image_id:"",this.image_ids=null!=_obj.image_ids?_obj.image_ids:"",this.slideshow_id=_obj.slideshow_id}),Gallery_Image_Menu=(Image_Collection_Item_Menu_Base.inherits(Menu),Image_Collection_Item_Menu_Base.fn.create_title_menu_item=function(_action,is_active){return String.format("<label>Image Title</label><div class='{0}' contenteditable='true'>{1}</div>",_action,this.title)},Image_Collection_Item_Menu_Base.fn.create_apply_menu_item=function(_action,is_active){return"<span class='btn left'>Apply</span>"},Image_Collection_Item_Menu_Base.fn.create_remove_menu_item=function(_action,is_active){return String.format("<span class='c77_icon left {0}'>t</span>",_action)},Image_Collection_Item_Menu_Base.fn.make_remove=function(_target,loc){confirm("Removing this element can't be undone, are you sure you wish do delete?")&&(loc.update_gallery_func({action:"remove",gallery_class:loc.gallery_class}),$.post(GLOBALS.ROOT_PATH+"account/post_file_delete",{post_id:loc.shell_obj.data.post_id,file_ids:loc.image_ids,slideshow_id:loc.slideshow_id},function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&($(".gallery_zone > ul > li.add_new").removeClass("hide"),printf("gallery_image_removed"))},"json"),loc.close_menu())},Image_Collection_Item_Menu_Base.fn.make_title=function(_target,loc){},function(_obj){Image_Collection_Item_Menu_Base.call(this,_obj),this.menu_type="gallery_image_menu",this.caption=null!=_obj.caption?_obj.caption:"",this.credit=null!=_obj.credit?_obj.credit:"",this.input_mode=null!=_obj.input_mode?_obj.input_mode:Gallery_Image_Menu.input_mode.wysiwyg}),Gift_Guide_Image_Menu=(Gallery_Image_Menu.input_mode={wysiwyg:1,text_field:2},Gallery_Image_Menu.inherits(Image_Collection_Item_Menu_Base),Gallery_Image_Menu.fn.render=function(){var loc=this,_html=new String;"virtual_student_project_post"==loc.shell_obj.shell_type?$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().insertAfter(loc.parent):$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);_html+="<li class='l_point top'></li>";$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.css({top:+loc.coords.y,left:+loc.coords.x}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),loc.$wrapper_node.keydown(function(e){var _focus_node;KEYS.paste(e)?(_focus_node=Selection.get_focus_node(),loc.shell_obj.paste_handler(_focus_node,!0)):e.which!=KEYS.enter||KEYS.soft_return(e)||e.preventDefault()}),"virtual_student_project_post"==loc.shell_obj.shell_type&&(loc.$wrapper_node.live("mouseup",function(e){e.stopPropagation()}),$(".gallery_image_menu").live({mouseup:function(e){e.stopPropagation()},click:function(e){e.stopPropagation()},mousedown:function(e){e.stopPropagation()}})),loc.$wrapper_node.find("li div").live("mouseup",function(e){e="img"!=$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():"";Post_Base.defaults.is_default_text($(e).text().replace(/p$/,""))&&Selection.select_all_text_comments($(e).get(0))})},Gallery_Image_Menu.fn.create_title_menu_item=function(_action,is_active,parent,loc){return loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?String.format("<label>Image Title</label><div class='{0}
1' contenteditable='true'>{1}</div>",_action,this.title):String.format("<label>Image Title</label><input type='text' class='{0}' value='{1}' />",_action,this.title)},Gallery_Image_Menu.fn.create_caption_menu_item=function(_action,is_active,parent,loc){return loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?String.format("<label>Image Caption</label><div class='{0}' contenteditable='true'>{1}</div>",_action,this.caption):String.format("<label>Image Caption</label><input type='text' class='{0}' value='{1}' />",_action,this.caption)},Gallery_Image_Menu.fn.create_credit_menu_item=function(_action,is_active,parent,loc){return loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?String.format("<label>Image Credit</label><div class='{0}' contenteditable='true'>{1}</div>",_action,this.credit):String.format("<label>Image Credit</label><input type='text' class='{0}' value='{1}' />",_action,this.credit)},Gallery_Image_Menu.fn.make_caption=function(_target,loc){},Gallery_Image_Menu.fn.make_credit=function(_target,loc){},Gallery_Image_Menu.fn.make_apply=function(_target,loc){var _caption="",_title=(loc.actions.includes("caption")&&(_caption=(loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?$("ul."+loc.menu_type+" .caption").html():$("ul."+loc.menu_type+" .caption").val()).clean_white_space()),""),_credit=(loc.actions.includes("title")&&(_title=(loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?$("ul."+loc.menu_type+" .title").html():$("ul."+loc.menu_type+" .title").val()).clean_white_space()),""),_multi_edit_mode=(loc.actions.includes("credit")&&(_credit=(loc.input_mode==Gallery_Image_Menu.input_mode.wysiwyg?$("ul."+loc.menu_type+" .credit").html():$("ul."+loc.menu_type+" .credit").val()).clean_white_space()),1<loc.image_ids.split(",").length),_caption=Post_Base.defaults.is_default_text(_caption)?"":_caption,_title=Post_Base.defaults.is_default_text(_title)?"":_title,_credit=Post_Base.defaults.is_default_text(_credit)?"":_credit;loc.actions.contains("title")?_multi_edit_mode?confirm("Are you sure you want to edit multiple gallery images? The data you are about to save will overwrite all the data in all the gallery images selected with the new data you just entered.")&&(loc.shell_obj.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/gallery_image_info_update",{post_id:loc.shell_obj.data.post_id,image_ids:loc.image_ids,caption:_caption,title:_title,credit:_credit},function(data){loc.shell_obj.set_attributes_json_callback(data,loc.shell_obj,"gallery_image_info"),loc.shell_obj.save_callback_default("Your image info has been saved",loc.shell_obj,!1),loc.update_gallery_func({action:"update",gallery_class:loc.gallery_class,title:_title,credit:_credit,caption:_caption,multi_edit_mode:_multi_edit_mode})},"json")):(loc.shell_obj.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/gallery_image_info_update",{post_id:loc.shell_obj.data.post_id,image_ids:loc.image_ids,caption:_caption,title:_title,credit:_credit},function(data){loc.shell_obj.set_attributes_json_callback(data,loc.shell_obj,"gallery_image_info"),loc.shell_obj.save_callback_default("Your image info has been saved",loc.shell_obj,!1),loc.update_gallery_func({action:"update",gallery_class:loc.gallery_class,title:_title,credit:_credit,caption:_caption,multi_edit_mode:_multi_edit_mode})},"json")):(loc.shell_obj.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/image_caption_update",{post_id:loc.shell_obj.data.post_id,image_id:loc.image_id,caption:_caption},function(data){loc.shell_obj.set_attributes_json_callback(data,loc.shell_obj,"slideshow_image_info"),loc.shell_obj.save_callback_default("Your image info has been saved",loc.shell_obj,!1),loc.update_gallery_func({action:"update",gallery_class:loc.gallery_class,title:_title,credit:_credit,caption:_caption,multi_edit_mode:_multi_edit_mode})},"json")),loc.close_menu()},function(_obj){Image_Collection_Item_Menu_Base.call(this,_obj),this.menu_type="gift_guide_image_menu",this.description=null!=_obj.description?_obj.description:"",this.link=null!=_obj.link?_obj.link:"",this.price=null!=_obj.price?_obj.price:"",this.currency_abbreviation=null!=_obj.currency_abbreviation?_obj.currency_abbreviation:"",this.function_to_run_on_close="make_apply",this.post_type=_obj.post_type}),Time_Menu=(Gift_Guide_Image_Menu.inherits(Image_Collection_Item_Menu_Base),Gift_Guide_Image_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().insertAfter(loc.parent.parent()),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),loc.$wrapper_node.keydown(function(e){e.which!=KEYS.enter||KEYS.soft_return(e)||e.preventDefault()}),loc.$wrapper_node.find("li div").live("mouseup",function(e){e="img"!=$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():"";Post_Base.defaults.is_default_text($(e).text().replace(/p$/,""))&&Selection.select_all_text($(e).get(0))}),loc.$wrapper_node.live("mousedown",function(e){e.stopPropagation()});new Text_Counter({elem_id:"description_text_gg",mode:"character",max_count:300}
1).init(),loc.$wrapper_node.find("input[type=text]").bind(String.format("blur.{0}",loc.menu_type),function(e){loc.make_apply(e.target,loc,null,!1)}),loc.$wrapper_node.find("textarea").bind(String.format("blur.{0}",loc.menu_type),function(e){loc.make_apply(e.target,loc,null,!1)}),loc.$wrapper_node.find("select").bind(String.format("change.{0}",loc.menu_type),function(e){loc.make_apply(e.target,loc,null,!1)})},Gift_Guide_Image_Menu.fn.create_title_menu_item=function(_action,is_active){return String.format("<label>Name of Item</label><input class='{0}' type='text' value='{1}'/>",_action,this.title)},Gift_Guide_Image_Menu.fn.create_description_menu_item=function(_action,is_active){return String.format("<label>Description</label><textarea id='description_text_gg' class='{0}' >{1}</textarea>",_action,this.description)},Gift_Guide_Image_Menu.fn.create_link_menu_item=function(_action,is_active){return String.format("<label>Link</label><input class='{0}' type='text' value='{1}' />",_action,this.link)},Gift_Guide_Image_Menu.fn.create_price_menu_item=function(_action,is_active){return String.format("<label>Price</label><input class='{0}' type='text' value='{1}' />",_action,this.price)},Gift_Guide_Image_Menu.fn.create_currency_abbreviation_menu_item=function(_action,is_active){var loc=this,result="<label>Currency</label>";return result+=String.format("<div class='drop_down'><select class='{0}'>",_action),$.each(["USD","AUD","CAD","CNY","EUR","GBP","INR","JPY"],function(index,val){var _selected=loc.currency_abbreviation==this?"selected='selected'":"";result+=String.format("<option value='{0}' {1}>{2}</option>",this,_selected,this)}),result+="</select><span class='dd_arrow c77_icon not_selectable'>\"</span></div>"},Gift_Guide_Image_Menu.fn.create_replace_image_menu_item=function(){$(String.format("li[data-gallery-img-id={0}]",this.image_id)).find("input.replace_gift_guide_image").fileupload({dataType:"json",formData:{post_id:this.shell_obj.data.post_id,existing_image_id:this.image_id,use_filename:!0,slideshow_id:this.slideshow_id,post_type:this.post_type},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"account/receive_file",add:function(e,data){loading.create(),data.submit()},progressall:function(e,data){data=parseInt(data.loaded/data.total*100,10);loading.update_progress(data)},done:function(e,data){loading.remove(),data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?($(String.format("li[data-gallery-img-id={0}] img.thumb",data.image.id)).attr({src:data.image.thumbnail.url,"data-gallery-thumbnail-id":data.image.thumbnail.id}),$(String.format("li[data-gallery-img-id={0}] .slide_wrapper img",data.image.id)).attr({src:data.image.url,"data-gallery-img-width":data.image.width,"data-gallery-img-height":data.image.height}),$(this).val("")):alert(data.text)}})},Gift_Guide_Image_Menu.fn.make_description=function(_target,loc){},Gift_Guide_Image_Menu.fn.make_link=function(_target,loc){},Gift_Guide_Image_Menu.fn.make_price=function(_target,loc){},Gift_Guide_Image_Menu.fn.make_currency_abbreviation=function(_target,loc){},Gift_Guide_Image_Menu.fn.make_apply=function(_target,loc,_event,_hit_apply){var _hit_apply=null==_hit_apply,_title=$("ul."+loc.menu_type+" .title").val().clean_white_space(),_description=$("ul."+loc.menu_type+" .description").val().clean_white_space(),_link=$("ul."+loc.menu_type+" .link").val().clean_white_space(),_price=""==(_price=$("ul."+loc.menu_type+" .price").val().clean_white_space().replace(/[^\d.]/g,""))||"."==_price?0:_price,_currency_abbreviation=$("ul."+loc.menu_type+" .currency_abbreviation").val().clean_white_space();loc.update_gallery_func({action:"update_gift_guide_item",gallery_class:loc.gallery_class,title:_title,description:_description,link:_link,price:_price,currency_abbreviation:_currency_abbreviation}),loc.shell_obj.sending_count++,$.post(GLOBALS.ROOT_PATH+"account/gift_guide_update_item",{post_id:loc.shell_obj.data.post_id,image_id:loc.image_id,title:_title,description:_description,link:_link,price:_price,currency_abbreviation:_currency_abbreviation},function(data){loc.shell_obj.set_attributes_json_callback(data,loc.shell_obj,"gift_guide_image_info"),loc.shell_obj.save_callback_default("Your gift guide item info has been saved",loc.shell_obj,!1)},"json"),_hit_apply&&loc.close_menu()},function(_obj){Menu.call(this,_obj),this.menu_type="time_menu",this.parent=_obj.parent,this.hour_inc_dec_amount=General.is_null_empty_undefined(_obj.hour_inc_dec_amount)?1:_obj.hour_inc_dec_amount,this.minute_inc_dec_amount=General.is_null_empty_undefined(_obj.minute_inc_dec_amount)?1:_obj.minute_inc_dec_amount,this.actions.push("inc"),this.actions.push("dec")}
1),Post_Type_Menu=(Time_Menu.inherits(Menu),Time_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);$(_html).appendTo(loc.$wrapper_node),$("li[data-button=hour]").addClass("active"),loc.$wrapper_node.css({top:loc.coords.y-2,left:loc.coords.x}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},Time_Menu.fn.get_set_values=function(){var temp_val,result={hour:"12",minutes:"00",meridiem:"PM"};return General.is_null_empty_undefined($(this.parent).val())||(temp_val=$(this.parent).val().split(":"),result.hour=temp_val[0],temp_val=temp_val[1].split(" "),result.minutes=temp_val[0],result.meridiem=temp_val[1]),result},Time_Menu.fn.regulate_val_to_in_dec_amount=function(_cur_val,inc_dec,is_increment){return is_increment?0<_cur_val%inc_dec?_cur_val+(inc_dec-_cur_val%inc_dec)%inc_dec-inc_dec:_cur_val:0<_cur_val%inc_dec?_cur_val+(inc_dec-_cur_val%inc_dec)%inc_dec:_cur_val},Time_Menu.fn.increment=function(_min,_max,_val,inc_value){_max=_max<_val+inc_value?_min:_val+inc_value;return _max<10?"0"+_max:_max},Time_Menu.fn.decrement=function(_min,_max,_val,dec_value){_min=_val-dec_value<_min?_max:_val-dec_value;return _min<10?"0"+_min:_min},Time_Menu.fn.set_value=function($menu_parent,loc){var loc=$(loc.parent),_hour=$menu_parent.find("span.hour").text(),_minutes=$menu_parent.find("span.minutes").text(),$menu_parent=$menu_parent.find("span.curr").text();loc.val(String.format("{0}:{1} {2}",_hour,_minutes,$menu_parent))},Time_Menu.fn.create_hour_menu_item=function(_action){var init_num=this.get_set_values().hour;return String.format("<span contenteditable='{0}' class='{1}'>{2}</span>",this.directly_editable,_action,init_num)},Time_Menu.fn.create_inc_menu_item=function(_action){return String.format("<span class='{0}'>\"</span>",_action)},Time_Menu.fn.create_dec_menu_item=function(_action){return String.format("<span class='{0}'>\"</span>",_action)},Time_Menu.fn.create_minutes_menu_item=function(_action){var init_num=this.get_set_values().minutes;return String.format("<span contenteditable='{0}' class='{1}'>{2}</span>",this.directly_editable,_action,init_num)},Time_Menu.fn.create_meridiem_menu_item=function(_action){var init_num=this.get_set_values().meridiem;return String.format("<span class='AM {0}'>AM</span><span class='{1} PM'>PM</span>","AM"==init_num?"curr":"","PM"==init_num?"curr":"")},Time_Menu.fn.make_hour=function(_target,loc){loc.$wrapper_node.find("li.active").removeClass("active"),$(_target).addClass("active")},Time_Menu.fn.make_inc=function(_target,loc){var new_val,cur_val,_target=$(_target).parent();$("li[data-button=hour]").hasClass("active")?(cur_val=parseInt(_target.find("span.hour").text()),new_val=loc.increment(1,12,cur_val,loc.hour_inc_dec_amount),_target.find("span.hour").text(new_val)):$("li[data-button=minutes]").hasClass("active")&&(cur_val=parseInt(_target.find("span.minutes").text()),new_val=loc.increment(0,59,cur_val,loc.minute_inc_dec_amount),cur_val=loc.regulate_val_to_in_dec_amount(new_val,loc.minute_inc_dec_amount,!0),_target.find("span.minutes").text(cur_val)),loc.set_value(_target,loc)},Time_Menu.fn.make_dec=function(_target,loc){var cur_val,new_val,set_max,_target=$(_target).parent();$("li[data-button=hour]").hasClass("active")&&(cur_val=parseInt(_target.find("span.hour").text()),new_val=loc.decrement(1,12,cur_val,loc.hour_inc_dec_amount),_target.find("span.hour").text(new_val)),$("li[data-button=minutes]").hasClass("active")&&(cur_val=parseInt(_target.find("span.minutes").text()),set_max=60-loc.minute_inc_dec_amount,new_val=loc.decrement(0,set_max,cur_val,loc.minute_inc_dec_amount),set_max=loc.regulate_val_to_in_dec_amount(new_val,loc.minute_inc_dec_amount,!1),_target.find("span.minutes").text(set_max)),loc.set_value(_target,loc)},Time_Menu.fn.make_minutes=function(_target,loc){loc.$wrapper_node.find("li.active").removeClass("active"),$(_target).addClass("active")},Time_Menu.fn.make_meridiem=function(_target,loc){_target=$(_target).parent();(_target.find("span.PM").hasClass("curr")?(_target.find("span.PM").removeClass("curr"),_target.find("span.AM")):(_target.find("span.AM").removeClass("curr"),_target.find("span.PM"))).addClass("curr"),loc.set_value(_target,loc)},function(_obj){Menu.call(this,_obj),this.menu_type="post_type_menu",this.parent=_obj.parent}),Logged_In_Menu=(Post_Type_Menu.inherits(Menu),Post_Type_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.parent().addClass("slide_down")},Post_Type_Menu.fn.close_menu=function(){var loc=this;loc.$wrapper_node.fadeOut(0,function(){loc.$wrapper_node.parent().removeClass("slide_down"),loc.$wrapper_node.remove()})},Post_Type_Menu.fn.create_post_menu_item=function(_action){return"<a href='/account/create-blog-post' class='post'><span class='c77_icon left'>
1^</span><span class='post_type'>Blog Post</span></a>"},Post_Type_Menu.fn.create_gallery_menu_item=function(_action){return"<a href='/account/create-gallery-post' class='gallery'><span class='c77_icon left'>$</span><span class='post_type'>Gallery Post</span></a>"},Post_Type_Menu.fn.create_calendar_menu_item=function(_action){return"<a href='/account/create-calendar-post' class='calendar'><span class='c77_icon left'>%</span><span class='post_type'>Calendar Post</span></a>"},function(_obj){Menu.call(this,_obj),this.menu_type="logged_in_menu",this.parent=_obj.parent,this.is_fixed=!General.is_null_empty_undefined(_obj.is_fixed)&&_obj.is_fixed}),Edit_Channel_Menu=(Logged_In_Menu.inherits(Menu),Logged_In_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).appendTo($(loc.appendTo_id)),$("<div class='clear_overlay'></div>").appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);_html+="<li class='u_point right'></li>",$(_html).appendTo(loc.$wrapper_node);var _top_offset=loc.is_fixed?$(window).scrollTop():-25;loc.$wrapper_node.css({top:loc.coords.y-_top_offset,left:loc.coords.x-loc.$wrapper_node.outerWidth()/2-42}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),$(".clear_overlay").live("click",function(e){$(".clear_overlay").remove(),loc.close_menu(),$(".clear_overlay").die("click")})},Logged_In_Menu.fn.create_my_77_menu_item=function(_action){return String.format("<a href='{0}'><span>My 77</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/my-77"))},Logged_In_Menu.fn.create_plog_menu_item=function(_action){return String.format("<a href='{0}'><span>Public Profile</span>",GLOBALS.USER_SESSION.link)},Logged_In_Menu.fn.create_posts_menu_item=function(_action){return String.format("<a href='{0}'><span>Posts</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/posts"))},Logged_In_Menu.fn.create_profile_menu_item=function(_action){return String.format("<a href='{0}'><span>Edit Profile</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/edit-profile"))},Logged_In_Menu.fn.create_settings_menu_item=function(_action){return String.format("<a href='{0}'><span>Settings</span></a>",GLOBALS.PUBLISH_ROOT_PATH.append("account/settings"))},Logged_In_Menu.fn.create_log_out_menu_item=function(_action){return"<span class>Sign out</span>"},Logged_In_Menu.fn.create_manage_channels_menu_item=function(_action){return String.format("<a href='{0}'><span>Manage Channels</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/edit-channels"))},Logged_In_Menu.fn.create_manage_comments_menu_item=function(_action){return String.format("<a href='{0}'><span>Manage Comments</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/manage-comments"))},Logged_In_Menu.fn.create_manage_posts_menu_item=function(_action){return String.format("<a href='{0}'><span>Manage Posts</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/manage-posts#author_id=0&post_type_id=0&channel_id=0&number_of_days=90&status=0&role=0"))},Logged_In_Menu.fn.create_user_roles_menu_item=function(_action){return String.format("<a href='{0}'><span>User Roles</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/manage-users"))},Logged_In_Menu.fn.create_manage_core77_menu_item=function(_action){return String.format("<a href='{0}'><span>Manage Nav</span>",GLOBALS.PUBLISH_ROOT_PATH.append("account/manage-nav"))},Logged_In_Menu.fn.make_log_out=function(_target,loc){loc.shell_obj.proceed_log_out(loc.shell_obj),loc.close_menu()},function(_obj){Menu.call(this,_obj),this.menu_type="edit_channel_menu",this.parent=_obj.parent,this.channel_name=General.is_null_empty_undefined(_obj.channel_name)?"":_obj.channel_name,this.channel_id=General.is_null_empty_undefined(_obj.channel_id)?"":_obj.channel_id,this.channel_description=General.is_null_empty_undefined(_obj.channel_description)?"":_obj.channel_description,this.channel_manager=General.is_null_empty_undefined(_obj.channel_manager)?"":_obj.channel_manager,this.channel_manager_id=General.is_null_empty_undefined(_obj.channel_manager_id)?"":_obj.channel_manager_id,this.users_channel_manage=General.is_null_empty_undefined(_obj.users_channel_manage)?"":_obj.users_channel_manage,this.add_action_as_classname=!0}),Manage_Post_Menu_Base=(Edit_Channel_Menu.inherits(Menu),Edit_Channel_Menu.fn.html_for_manager_node=function(_id,_text){return String.format("<span data-id='{0}' class='added_user'>{1}<em data-button='remove' class='remove'>r</em></span>",_id,_text)},Edit_Channel_Menu.fn.add_user_via_autocomplete=function(placeholder_arg,loc,_text,_id){var _html=loc.html_for_manager_node(_id,_text),loc=loc.shell_obj.get_addition_box_nodes($("#user_box_selected"));""==_text||loc.contains(_id)||$(_html).appendTo($("#user_box_selected"))},Edit_Channel_Menu.fn.render=function(){var loc=this,_html=new String,fixed_addition_for_side_column=loc.parent.parent().parent().hasClass("fixed")?"fixed":"",fixed_addition_for_side_column=($(String.format("<ul class='{0} {1} {2}'></ul>",loc.style_class,loc.menu_type,fixed_addition_for_side_column)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),0<loc.coords.x-loc.$wrapper_node.width()-22);_html+=String.format("<li class='{0} '></li>",fixed_addition_for_side_column?"r_point":"l_point");for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);$(_html).appendTo(loc.$wrapper_node);var draw_top=loc.coords.y-30+loc.$wrapper_node.outerHeight()<$(document).scrollTop()+$(window).height(),fixed_addition_for_side_column=(fixed_addition_for_side_column?draw_top?$("li.r_point").addClass("top"):$("li.r_point").addClass("bottom"):draw_top?$("li.l_point").addClass("top"):$("li.l_point").addClass("bottom"),fixed_addition_for_side_column?loc.coords.x-loc.$wrapper_node.width()-22:loc.coords.x+215),draw_top=loc.parent.parent().parent().hasClass("fixed")?draw_top?loc.coords.y-30-$(window).scrollTop():loc.coords.y-loc.$wrapper_node.outerHeight()+50:draw_top?loc.coords.y-30:loc.coords.y-loc.$wrapper_node.outerHeight()+50;
1loc.$wrapper_node.css({top:draw_top,left:fixed_addition_for_side_column}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),$("#user_entry").autocompleter({json_url:GLOBALS.ROOT_PATH.append("account/autocomplete-users"),function_to_call_on_enter:loc.add_user_via_autocomplete,reference_to_carry_forward:loc,json_param:"terms",matching_obj:"_obj",matching_result_property:"text",extra_matching_result_property:"value",make_title_case:!1,min_chars:1,is_fixed_position:!0,enter_submit:!0,show_selected_value_in_elem:!1})},Edit_Channel_Menu.fn.set_users_channel_manage=function(){var loc=this;loc.users_channel_manage=new Array,$(".addition_box span").each(function(index,val){loc.users_channel_manage.push($(this).attr("data-id"))})},Edit_Channel_Menu.fn.create_channel_name_menu_item=function(_action,is_active){return String.format("<label>Name</label><input type='text' id='{0}' class='{1}' value='{2}' />",this.channel_id,_action,this.channel_name)},Edit_Channel_Menu.fn.create_channel_description_menu_item=function(_action,is_active){return String.format("<label>Description</label><textarea class='{0}'>{1}</textarea>",_action,this.channel_description)},Edit_Channel_Menu.fn.create_channel_manager_menu_item=function(_action,is_active){var loc=this,_html="";return $.each(this.users_channel_manage,function(i,item){_html+=loc.html_for_manager_node(item.user_id,item.first_name+" "+item.last_name)}),String.format("<label>Manager</label><div id='user_box_selected' class='addition_box autocomplete'>{0}</div><input type='text' id='user_entry' class='{1}' placeholder='Type to add users' value='' />",_html,_action)},Edit_Channel_Menu.fn.create_save_menu_item=function(_action,is_active){return"<span class='btn left'>Save</span>"},Edit_Channel_Menu.fn.create_edit_details_menu_item=function(_action,is_active){return String.format("<a target='_blank' href='{0}{1}' class='left'>Edit More Details</a>",GLOBALS.PUBLISH_ROOT_PATH.append("account/edit-channels#channel_id="),this.channel_id)},Edit_Channel_Menu.fn.make_channel_name=function(_target,loc){},Edit_Channel_Menu.fn.make_channel_description=function(_target,loc){},Edit_Channel_Menu.fn.make_channel_manager=function(_target,loc){},Edit_Channel_Menu.fn.make_save=function(_target,loc){var param={id:loc.channel_id,name:loc.$wrapper_node.find("input.channel_name").val(),description:loc.$wrapper_node.find("textarea.channel_description").val(),user_ids_for_manage:loc.shell_obj.get_addition_box_nodes($("#user_box_selected")).toString()};$.post(GLOBALS.ROOT_PATH+"account/channel_update_manage_nav",param,function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&$(String.format("li[data-channel-id={0}]",loc.channel_id)).find("h1").text(param.name)},"json"),loc.close_menu()},Edit_Channel_Menu.fn.make_remove=function(_target,loc){$(_target).parent().remove()},function(_obj){Menu.call(this,_obj),this.menu_type="manage_post_menu_base",this.post_id=General.is_null_empty_undefined(_obj.post_id)?"":_obj.post_id,this.channels=_obj.channels,this.parent=_obj.parent}),Unpublish_Post_Menu=(Manage_Post_Menu_Base.inherits(Menu),Manage_Post_Menu_Base.fn.update_channel_list_ui=function(_status,_channel,loc){var _html,loc=loc.parent;_status==CHANNEL_UPDATE_STATUS.ADD?(_html="",_channel.status==POST_STATUS_TYPES.PENDING?_html=String.format("<li class='SUBMITTED' data-channel-id='{0}'>{1}</li>",_channel.id,_channel.name):_channel.status==POST_STATUS_TYPES.PUBLISHED&&(_html=String.format("<li class='PUBLISHED' data-channel-id='{0}'>{1}</li>",_channel.id,_channel.name)),$(_html).appendTo(loc.find(".channel_list"))):_status==CHANNEL_UPDATE_STATUS.REMOVE&&loc.find(String.format(".channel_list li[data-channel-id={0}]",_channel.id)).remove()},Manage_Post_Menu_Base.fn.create_channel_html=function(){for(var _select_html="<option value='0'>Please Select a Channel</option>",_addition_nodes_feature_html=new String,_addition_nodes_must_read_html=new String,k=0;k<this.channels.length;k++){var item=this.channels[k];item.can_user_manage_channel&&item.status!=POST_STATUS_TYPES.REJECTED&&(_select_html+=String.format("<option value='{0}'>{1}</option>",item.id,item.name)),item.is_featured&&item.status!=POST_STATUS_TYPES.REJ
1ECTED&&(_addition_nodes_feature_html+=this.shell_obj.create_addition_box_via_values(item.id,item.name)),item.is_must_read&&item.status!=POST_STATUS_TYPES.REJECTED&&(_addition_nodes_must_read_html+=this.shell_obj.create_addition_box_via_values(item.id,item.name))}return{_select:_select_html,_featured:_addition_nodes_feature_html,_must_read:_addition_nodes_must_read_html}},Manage_Post_Menu_Base.fn.base_render=function(){var loc=this,_html=new String,draw_left=($(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),0<loc.coords.x-loc.$wrapper_node.width()-22);_html+=String.format("<li class='{0} '></li>",draw_left?"r_point":"l_point");for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k]);$(_html).appendTo(loc.$wrapper_node);var draw_top=loc.coords.y-30+loc.$wrapper_node.outerHeight()<$(document).scrollTop()+$(window).height(),draw_left=(draw_left?draw_top?$("li.r_point").addClass("top"):$("li.r_point").addClass("bottom"):draw_top?$("li.l_point").addClass("top"):$("li.l_point").addClass("bottom"),draw_left?loc.coords.x-loc.$wrapper_node.width()-22:loc.coords.x+172),draw_top=draw_top?loc.coords.y-30:loc.coords.y-loc.$wrapper_node.outerHeight()+50;loc.$wrapper_node.css({top:draw_top,left:draw_left}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)},function(_obj){Manage_Post_Menu_Base.call(this,_obj),this.menu_type="unpublish_post_menu"}),Feature_Post_Menu=(Unpublish_Post_Menu.inherits(Manage_Post_Menu_Base),Unpublish_Post_Menu.fn.render=function(){this.base_render()},Unpublish_Post_Menu.fn.create_channels_menu_item=function(_action,is_active){var html_created=this.create_channel_html(),result=String.format("<label>Unpublish From</label>",1==this.actions.length&&this.actions.contains("channels")?"ed":"");return(result+=String.format("<div class='drop_down'><select class='addition_box_select' id='program_select_0_' name='program'>{0}</select><span class='dd_arrow c77_icon not_selectable'></span></div>",html_created._select))+"<div id='channel_box' class='addition_box'>"+"</div>"},Unpublish_Post_Menu.fn.create_unpublish_menu_item=function(_action,is_active){return"<div class='btn left'>Unpublish</div>"},Unpublish_Post_Menu.fn.make_channels=function(_target,loc){},Unpublish_Post_Menu.fn.make_unpublish=function(_target,_loc){var loc=_loc,_channel_ids=loc.shell_obj.get_addition_box_nodes(loc.$wrapper_node.find(".addition_box")).toString(),_loc={post_id:loc.post_id,channel_ids:_channel_ids};$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"/account/post_channels_publish_delete",data:_loc,dataType:"json",success:function(data){if(data=General.parse_json_if_needed(data),General.status_ok(data.status)){message_slider(General.success_text.post_unpublished);var channel_id_list=_channel_ids.split(","),published_channel_list=[];if(loc.parent.find(".channel_list li.PUBLISHED").each(function(index,val){published_channel_list.push(new Channel({id:$(this).attr("data-channel-id"),name:$(this).text(),status:POST_STATUS_TYPES.PUBLISHED}))}),channel_id_list.length==published_channel_list.length){loc.parent.find(".channel_list li.PUBLISHED").each(function(index,val){$(this).removeClass("PUBLISHED").addClass("SUBMITTED")}),loc.parent.attr({"data-post-status":"SUBMITTED"}),loc.parent.find(".post_status").text("Pending");loc.parent.find(".post_actions").empty().append($("<li class='publish_action'><span>Publish</span></li>")),loc.parent.find(".date_published").remove().end().find("em").remove().end().find(".date").prepend($("<em>Submitted:</em>"))}else for(var k=0;k<channel_id_list.length;k++){var _channel=new Channel({id:channel_id_list[k],name:"",status:POST_STATUS_TYPES.NONE});loc.update_channel_list_ui(CHANNEL_UPDATE_STATUS.REMOVE,_channel,loc)}}}}),loc.close_menu()},Unpublish_Post_Menu.fn.make_omit_revert=function(_target,_loc){var param={post_id:_loc.post_id,channel_ids:_loc.shell_obj.get_addition_box_nodes(_loc.$wrapper_node.find(".addition_box")).toString()};$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"/account/post_channels_omit_revert",data:param,dataType:"json",success:function(data){data=General.parse_json_if_needed(data),General.status_ok(data.status)&&message_slider(General.success_text.post_unomit)}}),_loc.close_menu()},function(_obj){Manage_Post_Menu_Base.call(this,_obj),this.menu_type="feature_post_menu"}),Must_Read_Post_Menu=(Feature_Post_Menu.inherits(Manage_Post_Menu_Base),Feature_Post_Menu.fn.render=function(){this.base_render()},Feature_Post_Menu.fn.create_channels_menu_item=function(_action,is_active){var html_created=this.create_channel_html(),result=String.format("<label>Feature In</label>",1==this.actions.length&&this.actions.contains("channels")?"ed":"");return result+String.format("<div class='drop_down'><select class='addition_box_select' id='program_select_0_' name='program'>{0}</select><span class='dd_arrow c77_icon not_selectable'></span></div>",html_created._select)+"<div id='channel_box' class='addition_box'>"+html_created._featured+"</div>"},Feature_Post_Menu.fn.create_feature_menu_item=function(_action,is_active){return"<div class='btn left'>Save</div>"},Feature_Post_Menu.fn.make_channels=function(_target,loc){},Feature_Post_Menu.fn.make_feature=function(_target,_loc){var loc=_loc;loc.shell_obj.user_object_xref_add({success_message:General.success_text.post_feature,action_taken_text:"Featured",object_id:loc.post_id,object_id2:loc.shell_obj.get_addition_box_nodes(loc.$wrapper_node.find(".addition_box")).toString(),object_type:USER_OBJECT_XREF_TYPES.post_feature,success_callback:function(){message_slider(General.success_text.post_feature),loc.close_menu()}},loc)},function(_obj){Manage_Post_Menu_Base.call(this,_obj),this.menu_type="must_read_post_menu"}),Manage_Post_Time_Based_Functionality_Base=(Must_Read_Post_Menu.inherits(Manage_Post_Menu_Base),Must_Read_Post_Menu.fn.render=function(){this.base_render()},Must_Read_Post_Menu.fn.create_channels_menu_item=function(_action,is_active){var html_created=this.create_channel_html(),result=String.format("<label>Must Read In</label>",1==this.actions.length&&this.actions.contains("channels")?"ed":"");return result+String.format("<div class='drop_down'><select class='addition_box_select' id='program_select_0_' name='program'>{0}</select><span class='dd_arrow c77_icon not_selectable'></span></div>",html_created._select)+"<div id='channel_box' class='addition_box'>"+html_created._must_read+"</div>"},Must_Read_Post_Menu.fn.create_must_read_menu_item=function(_action,is_active){return"<div class='btn left'>Save</div>"},Must_Read_Post_Menu.fn.make_channels=function(_target,loc){},Must_Read_Post_Menu.fn.make_must_read=function(_target,_loc){var loc=_loc;loc.shell_obj.user_object_xref_add({success_message:General.success_text.post_feature,action_taken_text:"Must Read",object_id:loc.post_id,object_id2:loc.shell_obj.get_addition_box_nodes(loc.$wrapper_node.find(".addition_box")).toString(),object_type:USER_OBJECT_XREF_TYPES.must_read,success_callback:function(){message_slider(General.success_text.must_read),loc.close_menu()}},loc)},function(_obj){Manage_Post_Menu_Base.call(this,_obj),this.scheduled_date=General.is_null_empty_undefined(_obj.scheduled_date)?"":_obj.scheduled_date,this.scheduled_time=General.is_null_empty_undefined(_obj.scheduled_time)?"":_obj.scheduled_time,this.modified_for_add_channel=!General.is_null_empty_undefined(_obj.modified_for_add_channel)&&_obj.modified_for_add_channel}),Change_Post_Published_Date_Menu=(Manage_Post_Time_Based_Functionality_Base.inherits(Manage_Post_Menu_Base),Manage_Post_Time_Based_Functionality_Base.fn.get_date_time=function(){var _d=$("#publish_date").val(),_t=$("#publish_time").val();return{date_time:String.format("{0} {1}",new Date(_d).toDateString(),_t),date:_d,time:_t}},Manage_Post_Time_Based_Functionality_Base.fn.create_date_menu_item=function(_action,is_active){_curr_date=General.is_null_empty_undefined(this.scheduled_date)?(today=General.get_current_server_time(),String.format("{0}/{1}/{2}",today.getMonth()+1,today.getDate(),today.getFullYear())):this.scheduled_date;var _curr_date,today=new Date,today=today.dst()?"EDT":"EST",today=String.format("<label>Date <em>Enter date in {0}</em></label>",today);return today+=String.format("<input type='text' id='publish_date' class='datepicker' value='{0}'>",_curr_date)},Manage_Post_Time_Based_Functionality_Base.fn.create_time_menu_item=function(_action,is_active){var hours;hours=General.is_null_empty_undefined(this.scheduled_time)?(hours=(hours=12<(now=General.get_current_server_time()).getHours()?now.getHours()%12:now.getHours())<10?"0"+hours:hours,min=now.getMinutes()<10?"0"+now.getMinutes():now.getMinutes(),now=12<=now.getHours()?"PM":"AM",String.format("{0}:{1} {2}",hours,min,now)):this.scheduled_time;var min=(new Date).dst()?"EDT":"EST",now=String.format("<label>Time <em>Enter time in {0}</em></label>",min);return now+=String.format("<input type='text' id='publish_time' value='{0}'>",hours)},Manage_Post_Time_Based_Functionality_Base.fn.make_date=function(_target,loc){},Manage_Post_Time_Based_Functionality_Base.fn.make_time=function(_target,loc){},Manage_Post_Time_Based_Functionality_Base.fn.update_posts_data_channel_list=function(loc,_status,_channel){loc.parent;var index,accepted_channels=[],new_channel_id=($("#channel_box span").each(function(index,val){accepted_channels.push($(this).data("id"))}
1),parseInt(_channel.id));_status==CHANNEL_UPDATE_STATUS.REMOVE?accepted_channels.contains(new_channel_id)&&(index=accepted_channels.indexOf(new_channel_id),accepted_channels.splice(index,1)):_status!=CHANNEL_UPDATE_STATUS.ADD||accepted_channels.contains(new_channel_id)||accepted_channels.push(new_channel_id),$.post(GLOBALS.ROOT_PATH+"account/post_channel_update",{post_id:loc.post_id,channel_ids:accepted_channels.join(",")},function(data){General.status_ok(data.status)&&loc.update_channel_list_ui(_status,_channel,loc)},"json")},Manage_Post_Time_Based_Functionality_Base.fn.render=function(){var loc=this;loc.base_render(),$(".datepicker").datepicker(),$("#publish_time").focus(function(e){var $this=$(this),menu_coords=new Coordinates,menu_coords=(menu_coords.set_property("x",$this.offset().left),menu_coords.set_property("y",$this.offset().top),new Time_Menu({actions:["hour","minutes","meridiem"],coords:menu_coords,appendTo_id:"body",shell_obj:loc,parent:$this,minute_inc_dec_amount:5}));loc.shell_obj.add_menu(menu_coords),menu_coords.render()}),$("select#add_to_channels").change(function(){var $this=$(this),_channel=(loc.modified_for_add_channel||(_channel=new Channel({id:$this.val(),name:$this.find(String.format("option[value='{0}']",$this.val())).text(),status:POST_STATUS_TYPES.PENDING}),loc.update_posts_data_channel_list(loc,CHANNEL_UPDATE_STATUS.ADD,_channel)),loc.shell_obj.get_addition_box_nodes($("#channel_box")));loc.shell_obj.add_addition_box_node_via_select(loc.shell_obj,$this,_channel,$("#channel_box"))})},function(_obj){Manage_Post_Time_Based_Functionality_Base.call(this,_obj),this.menu_type="change_post_published_date_menu"}),Schedule_Post_Menu=(Change_Post_Published_Date_Menu.inherits(Manage_Post_Time_Based_Functionality_Base),Change_Post_Published_Date_Menu.fn.create_set_menu_item=function(_action,is_active){return"<div class='btn left'>Save</div>"},Change_Post_Published_Date_Menu.fn.make_set=function(_target,_loc){var loc=_loc,scheduled_date=loc.get_date_time(),_loc={post_id:loc.post_id,new_publish_date:scheduled_date.date_time};$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"account/post_change_publish_date",data:_loc,dataType:"json",success:function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider(General.success_text.post_date_changed),loc.parent.find("span.date_published").text(String.format("Published on: {0} {1}",scheduled_date.date,scheduled_date.time))):message_slider(data.text,!0)}}),loc.close_menu()},function(_obj){Manage_Post_Time_Based_Functionality_Base.call(this,_obj),this.menu_type="schedule_post_menu",this.remove_list=new Array}),Comment_Menu=(Schedule_Post_Menu.inherits(Manage_Post_Time_Based_Functionality_Base),Schedule_Post_Menu.fn.get_channel_data=function(authorized_channel_list){for(var _html=new String,k=0;k<this.channels.length;k++){var item=this.channels[k];authorized_channel_list.contains(item.id)&&(item.status!=POST_STATUS_TYPES.REJECTED?General.is_post_status_queued_scheduled_published(item.status)?_html+=String.format("<span data-id='{0}' data-status='{1}' class='channel accepted'>{2}<em class='accepted'>n</em></span>",item.id,item.status,item.name):_html+=String.format("<span data-id='{0}' data-status='{1}' class='channel'>{2}<em data-button='remove' class='remove'>r</em></span>",item.id,item.status,item.name):_html+=String.format("<span data-id='{0}' data-status='{1}' class='channel rejected'>{2}</span>",item.id,item.status,item.name))}return _html},Schedule_Post_Menu.fn.create_refresh_menu_item=function(_action,is_active){return"<span class='c77_icon'>E</span>"},Schedule_Post_Menu.fn.create_channels_menu_item=function(_action,is_active){var result,authorized_channel_list=new Array,_select_html=new String;return $("#filter_channel .drop_down select option").each(function(index,val){0<index?(authorized_channel_list.push(parseInt($(this).val())),_select_html+=String.format("<option value='{0}'>{1}</option>",$(this).val(),$(this).text())):_select_html+="<option value=''>Select Additional Channels</option>"}),result=this.modified_for_add_channel?"<label>Add to</label>":String.format("<label>Publish{0} to</label>",1==this.actions.length&&this.actions.contains("channels")?"ed":""),result+="<div id='channel_box' class='addition_box'>",this.modified_for_add_channel||(result+=this.get_channel_data(authorized_channel_list)),result=(result=result+"</div>"+"<div class='drop_down'><select id='add_to_channels' class='addition_box_select'>")+_select_html+"</select><span class='dd_arrow c77_icon not_selectable'>\"</span></div>"},Schedule_Post_Menu.fn.create_schedule_menu_item=function(_action,is_active){return this.modified_for_add_channel?"<div class='btn left'>Add Channel(s)</div>":"<div class='btn left'>Schedule</div>"},Schedule_Post_Menu.fn.make_remove=function(_target,loc){var channel_id=$(_target).parent().data("id");1<$("#channel_box span").length?(loc.remove_list.push(channel_id),$(_target).parent().remove(),loc.modified_for_add_channel||(_target=new Channel({id:channel_id}),loc.update_posts_data_channel_list(loc,CHANNEL_UPDATE_STATUS.REMOVE,_target))):alert("At least one channel is required to proceed. If you wish remove from all your managed channels please select the omit link on the post.")},Schedule_Post_Menu.fn.make_refresh=function(_target,loc){$("#channel_box").empty();var _html=loc.get_channel_data();$(_html).appendTo($("#channel_box")),loc.remove_list=new Array},Schedule_Post_Menu.fn.make_channels=function(_target,loc){},Schedule_Post_Menu.fn.make_schedule=function(_target,_loc){var scheduled_date,param,accepted_channels=new Array,loc=_loc,channel_list=[];$("#channel_box span").each(function(index,val){accepted_channels.push($(this).data("id")),loc.modified_for_add_channel&&channel_list.push(new Channel({id:$(this).data("id"),name:$(this).html().replace('<em data-button="remove" class="remove">
1r</em>',""),status:POST_STATUS_TYPES.PUBLISHED}))}),loc.modified_for_add_channel?(param={post_id:loc.post_id,channel_ids:accepted_channels.join(",")},$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"account/post_channels_publish_immediate",data:param,dataType:"json",success:function(data){data=General.parse_json_if_needed(data);if(General.status_ok(data.status)){message_slider(General.success_text.channel_added);for(var k=0;k<channel_list.length;k++)loc.update_channel_list_ui(CHANNEL_UPDATE_STATUS.ADD,channel_list[k],loc)}else message_slider(data.text,!0)}})):(scheduled_date=loc.get_date_time(),param={post_id:loc.post_id,channel_ids:accepted_channels.join(","),scheduled_date:scheduled_date.date_time},$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"account/post_channels_schedule",data:param,dataType:"json",success:function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(message_slider(General.success_text.post_scheduled),loc.parent.attr({"data-scheduled-time":scheduled_date.date,"data-scheduled-date":scheduled_date.time,"data-post-status":"SCHEDULED"}).find(".publish_action").text("Reschedule").end().find(".post_status").html(String.format("Scheduled For {0} {1}",scheduled_date.date,scheduled_date.time))):message_slider(data.text,!0)}})),loc.close_menu()},function(_obj){Menu.call(this,_obj),this.CONST_MAX_WIDTH=620,this.menu_type="comment_menu",this.parent=$("."+this.menu_type),this.tier_to_be=General.is_null_empty_undefined(_obj.tier_to_be)?1:_obj.tier_to_be,this.add_action_as_classname=!0,this.reply_to_name=General.is_null_empty_undefined(_obj.reply_to_name)?"":_obj.reply_to_name,this.coords,this.number_images_to_upload=0,this.number_images_uploaded=0,this.permalink_post_id=General.is_null_empty_undefined(_obj.permalink_post_id)?"":_obj.permalink_post_id,this.permalink_author_id=General.is_null_empty_undefined(_obj.permalink_author_id)?"":_obj.permalink_author_id,""===this.permalink_post_id&&(this.permalink_post_id=this.shell_obj.data.post_id),""===this.permalink_author_id&&(this.permalink_author_id=this.shell_obj.user_data.id),this.is_resource_post_reply=!1}),Reply_Comment_Menu=(Comment_Menu.inherits(Menu),Comment_Menu.fn.add_text_menu_listener=function(){var loc=this,__wrapper=($("."+loc.menu_type).die("mouseup."+loc.menu_type),$("."+loc.menu_type.append(" .comment_p")).die("mouseup."+loc.menu_type),$("."+loc.menu_type).live("mouseup."+loc.menu_type,function(e){var _focus_node=Selection.get_focus_node();$(_focus_node).parents(".c_metadata")&&loc.shell_obj.close_specific_menu(Menu_Use_Text_Menu)}),$("."+loc.menu_type.append(" .comment_p")).live("mouseup."+loc.menu_type,function(e){e.stopPropagation();var menu_coords,selected_dim,$this=$(e.target),e="img"!=$(e.target).context.nodeName.toString().toLowerCase()?Selection.get_focus_node():"",_selection=Selection.get_selection_info();General.is_null_empty_undefined(_selection.content,Text_Menu.previous_selection)||Selection.is_caret()||Post_Base.defaults.is_default_text($this.text())?Post_Base.defaults.is_default_text($this.text())?Selection.select_all_text_comments($(e).get(0)):loc.shell_obj.close_specific_menu(Menu_Use_Text_Menu):(Text_Menu.previous_selection=_selection.content,"post"!=$(e).attr("id")&&(selected_dim=Selection.get_selection_dimensions(),menu_coords=new Coordinates,$this=17<selected_dim.height?$this.width()/2+$this.offset().left:selected_dim.width/2+_selection.top_left.x,menu_coords.set_property("x",$this),menu_coords.set_property("y",_selection.top_left.y+$(document).scrollTop()),selected_dim=new Menu_Use_Text_Menu({actions:["bold","italic","link"],coords:menu_coords,parent:$(_selection.parent),focus_node:e,appendTo_id:"body"}),loc.shell_obj.add_menu(selected_dim),selected_dim.render()))}),String.format(".{0} .img_wrapper, .{0} .embed_wrapper",loc.menu_type));$(__wrapper).live({mouseenter:function(e){$("<span contenteditable='false' data-button='remove_media' class='edit_module_prop'>t</span>").prependTo($(this))},mouseleave:function(e){$(this).parent().find("span.edit_module_prop").remove()}}),$(".comment_wrap").live("keydown",function(e){var _focus_node=Selection.get_focus_node();Selection.is_start_end(_focus_node);$($(_focus_node).get(0)).hasClass("at_end")&&$($(_focus_node).get(0)).removeClass("at_end"),KEYS.paste(e)&&loc.shell_obj.paste_handler(_focus_node,!0)})},Comment_Menu.fn.create_comment_top_cap=function(){var _html=new String;return(_html+=String.format("<div class='c_metadata'><div class='avatar'><img src='{0}' /></div>",GLOBALS.USER_SESSION.avatar))+String.format("<div class='comment_from'><span>{0}</span></div>",GLOBALS.USER_SESSION.name)+"<div class='time action'></div></div>"},Comment_Menu.fn.logged_in_check=function(_clbk,loc,wrap){wrap=!General.is_null_empty_undefined(wrap)&&wrap;var _html=new String;return _html=GLOBALS.IS_LOGGED_IN?_clbk(loc):(_html=(_html=(_html=_html+(wrap?"<li>":"")+"<span data-cookie-return-url='true' data-button='login_modal' id='login_modal' ")+String.format(" data-overlay-header-join='{0}' data-overlay-message-join='{1}'",General.default_text.join_modal_header_comment,General.default_text.join_modal_message_comment))+String.format(" data-overlay-header-sign-in='{0}
1' data-overlay-message-sign-in='{1}'",General.default_text.sign_in_modal_header_comment,General.default_text.sign_in_modal_message_comment))+" >Log in to comment</span>"+(wrap?"</li>":"")},Comment_Menu.fn.create_add_image_menu_item=function(_action,is_active){return String.format("<span class='c77_icon {0}'>I</span><input id='add_post_image' type='file' name='fileData' multiple='true' accept='image/*'/>",_action)},Comment_Menu.fn.create_add_embed_menu_item=function(_action,is_active){return String.format("<span class='c77_icon {0}'>v</span>",_action)},Comment_Menu.fn.create_submit_comment_menu_item=function(_action,is_active){return String.format("<span data-button='{0}' class='btn {0}'>Make Comment</span>",_action)},Comment_Menu.fn.create_comment_p_zone=function(){return String.format('<p class="comment_p" contenteditable="true">{0}</p>',Post_Base.defaults.text.comment)},Comment_Menu.fn.make_remove_media=function(_target,loc){var img_url;_target.parent().hasClass("embed_wrapper")||(img_url=$(this).parent().find("img").attr("src"),$.post(GLOBALS.ROOT_PATH+"home/comment_file_delete",{post_id:loc.permalink_post_id,comment_id:0,file_url:img_url},function(data){},"json")),_target.parent().remove()},Comment_Menu.fn.make_add_image=function(_target,loc){$(loc.parent);$("input#add_post_image").fileupload({dataType:"json",formData:{post_id:loc.permalink_post_id},singleFileUploads:!0,replaceFileInput:!1,url:GLOBALS.ROOT_PATH+"home/comment_receive_file",add:function(e,data){0==loc.number_images_to_upload&&loading.create(),loc.number_images_to_upload++,data.submit()},done:function(e,data){var _html;loading.remove(),loc.number_images_uploaded++,data=General.parse_json_if_needed(data.result),General.status_ok(data.status)?(_html=new String,_html=(_html+=String.format("<div contenteditable='false' class='img_wrapper' style='max-width:{0}px;'> <img data-image-width='{0}' data-image-height='{1}' ",data.image.width,data.image.height))+String.format("data-image-id='{0}' src='{1}'/>",data.image.id,data.image.url)+"</div>",$(_html).insertBefore(loc.$wrapper_node.find(".comment_wrap p"))):alert(data.result.text),loc.number_images_uploaded==loc.number_images_to_upload&&(loc.number_images_uploaded=0,loc.number_images_to_upload=0)},progress:function(e,data){parseInt(data.loaded/data.total*100,10)},progressall:function(e,data){parseInt(data.loaded/data.total*100,10)}})},Comment_Menu.fn.make_add_embed=function(_target,loc,event){var _stamp,_html,data_attr_add,is_twitter,entry=prompt("Enter embed code");entry&&(_html=new String,_stamp=General.get_unique_id(),_html=new String,data_attr_add=new String,(is_twitter=/twitter\.com/.test(entry))&&(entry=entry.split("<script")[0],data_attr_add=String.format("data-twitter-embed='{0}'",entry)),_html=(_html+=String.format("<div contenteditable='false' id='{0}' class='embed_wrapper clear_both' {1}>",_stamp,data_attr_add))+entry+"</div>",$(_html).insertBefore(loc.$wrapper_node.find(".comment_wrap p")),loc.is_vimeo_kickstarter_youtube(loc,_stamp,new Dimensions({width:loc.CONST_MAX_WIDTH})),is_twitter)&&twttr.widgets.load()},Comment_Menu.fn.make_login_modal=function(_target,loc){$("#login_modal").trigger("click")},Comment_Menu.fn.get_comment_send_params=function(loc){var regexp_comment=new RegExp('contenteditable="true"',"g");return{post_id:loc.permalink_post_id,body_text:$("."+loc.menu_type+" .comment_wrap").html().replace(regexp_comment,""),post_user_id:loc.permalink_author_id}},Comment_Menu.fn.create_comment=function(cd){var is_author=this.permalink_author_id==GLOBALS.USER_SESSION.id?"is_author":"",ic_marker="0"!=cd.inline_comment_marker?Str
1ing.format("data-ic-from='{0}'",cd.inline_comment_marker):"",class_hide_if_needed="0"!=cd.inline_comment_marker?"public_hide":"",_html=(_html=(_html=(_html=new String)+String.format("<li class='{0} {1} {2}' {3} data-c-id='{4}'>","tier_"+cd.tier_number,is_author,class_hide_if_needed,ic_marker,cd.id)+"<div class='c_metadata'>")+String.format("<div class='avatar'><img src='{0}' /></div>",GLOBALS.USER_SESSION.avatar))+String.format("<div class='comment_from'><a href='{0}'>{1}</a></div>",GLOBALS.USER_SESSION.link,GLOBALS.USER_SESSION.name);return 1<cd.tier_number&&(_html+=String.format("<div class='comment_to'>{0}</div>",this.reply_to_name)),_html=(_html=(_html=_html+"<div class='time action'>Just Now</div>"+"<div class='actions_wrap'>")+String.format("<div class='voting down_vote action' data-dv='{0}'><a href='#' class='c77_icon'>Z</a></div>",cd.number_down_votes))+String.format("<div class='voting up_vote action'><span>{0}</span><a href='#' class='c77_icon'>Z</a></div>",cd.number_up_votes.toString().to_empty_string_if_zero()),cd.tier_number<3&&(_html+=String.format("<div class='reply action' data-this-post-id='{0}' data-this-author-id='{1}'><a href='#'>Reply</a></div>",this.permalink_post_id,this.permalink_author_id)),_html=(_html+="</div></div>")+String.format("<div class='comment_wrap'>{0}</div>",cd.comment),cd.tier_number<3&&(_html+="<ul class='public_hide'></ul>"),_html+="</li>"},Comment_Menu.fn.after_post_comment=function(loc){$("."+loc.menu_type+" li.comment_wrap").empty(),$(loc.create_comment_p_zone()).appendTo($("."+loc.menu_type+" li.comment_wrap"))},Comment_Menu.fn.make_submit_comment=function(_target,loc){var param;$("."+loc.menu_type+" .comment_wrap").html()!=loc.create_comment_p_zone()&&(param=loc.get_comment_send_params(loc),loading.create(),$.ajax({type:"POST",url:GLOBALS.ROOT_PATH+"home/comment_add",data:param,dataType:"json",success:function(data){var _keep_scroll,place_comment,_set_val,place_comment_also_in_postlet,_count_html,data=General.parse_json_if_needed(data);loading.remove(),General.status_ok(data.status)?loc.is_resource_post_reply?(message_slider(General.success_text.comment_make),(_keep_scroll=new Keep_Set_Scroll_Position).set_keep(),$("#comment_zone").remove(),$(data.data.rendered).insertAfter($("#post")),0<$(String.format("[data-c-id={0}]",data.data.comment_id)).length&&(_set_val=$(String.format("[data-c-id={0}]",data.data.comment_id)).offset().top,_keep_scroll.set_keep(_set_val),_keep_scroll.set_scroll_from_keep($(window).height()/2),General.flash_class_add($(String.format("[data-c-id={0}]",data.data.comment_id)),"flash_on",8e10)),$("#place_comment_enter_top .comment_wrap textarea").val(""),$("#place_comment_enter_bottom .comment_wrap textarea").val(""),loc.after_post_comment(loc)):(message_slider(General.success_text.comment_make),_set_val=loc.create_comment(new Comment_Data({id:data.id,tier_number:loc.tier_to_be,comment:param.body_text,inline_comment_marker:"inline_comment_menu"==loc.menu_type?loc.ic_marker:0})),1==loc.tier_to_be?(place_comment=$(String.format(".article_page_wrap[data-post-id={0}] #user_comments",loc.permalink_post_id)),place_comment_also_in_postlet=$(String.format(".postlet_list li[data-post-id={0}] #user_comments",loc.permalink_post_id))):(place_comment=$(String.format(".article_page_wrap[data-post-id={0}] li[data-c-id={1}] > ul",loc.permalink_post_id,loc.reply_to_id)),place_comment_also_in_postlet=$(String.format(".postlet_list li[data-post-id={0}] #user_comments li[data-c-id={1}] > ul",loc.permalink_post_id,loc.reply_to_id)),$(String.format(".article_page_wrap[data-post-id={0}] li[data-c-id={1}] > ul",loc.permalink_post_id,loc.reply_to_id)).removeClass("public_hide"),$(String.format(".postlet_list li[data-post-id={0}] li[data-c-id={1}] > ul",loc.permalink_post_id,loc.reply_to_id)).removeClass("public_hide")),loc.after_post_comment(loc),$(_set_val).prependTo(place_comment),$(_set_val).prependTo(place_comment_also_in_postlet),_keep_scroll=$(String.format(".article_page_wrap[data-post-id={0}] .comment_count_copy",loc.permalink_post_id)),place_comment=$(String.format(".postlet_list li[data-post-id={0}] .comment_count_copy",loc.permalink_post_id)),_set_val=parseInt(_keep_scroll.data("total-comment-count")),place_comment_also_in_postlet=parseInt(place_comment.data("total-comment-count")),_count_html="",0==_keep_scroll.find(".total_comment_count").length||0==place_comment.find(".total_comment_count").length?(0==place_comment.find(".total_comment_count").length&&(_count_html=String.format("<span class='c77_icon'>Q</span><span class='total_comment_count'>{0}</span>",place_comment_also_in_postlet+1),place_comment.append($(_count_html))),0==_keep_scroll.find(".total_comment_count").length&&(_count_html=String.format("<span class='c77_icon'>Q</span><span class='total_comment_count'>{0}</span>",_set_val+1),_keep_scroll.append($(_count_html)))):(_keep_scroll.find(".total_comment_count").text(_set_val+1),place_comment.find(".total_comment_count").text(place_comment_also_in_postlet+1)),$(String.format(".article_page_wrap[data-post-id={0}] .comment_trigger_block .this_ac_count",loc.permalink_post_id)).text(_set_val+1),$(String.format(".postlet_list li[data-post-id={0}] .comment_trigger_block .this_ac_count",loc.permalink_post_id)).text(place_comment_also_in_postlet+1),_keep_scroll.attr({"data-total-comment-count":_set_val+1}),place_comment.attr({"data-total-comment-count":place_comment_also_in_postlet+1})):(loc.after_post_comment(loc),message_slider(data.text,!0))}}))},Comment_Menu.fn.init=function(){this.$wrapper_node=$("."+this.menu_type),this.bind_namespaced_event("click",this.button_event_terminal,this),this.add_text_menu_listener()},Comment_Menu.fn.render=function(_selector_for_append_to){var loc=this,_html=new String,add_browser_block_class=2==loc.actions.length?"browser_block":"",_selector_for_append_to=(void 0===_selector_for_append_to?$(loc.appendTo_id):$(String.format("{0}",_selector_for_append_to))).find("ul#user_comments");$(String.format("<ul data-for-post-id='{3}' class='{0} {1} {2}'></ul>",loc.style_class,loc.menu_type,add_browser_block_class,loc.permalink_post_id)).hide().insertAfter(_selector_for_append_to),loc.$wrapper_node=$("."+loc.menu_type),_html+=loc.logged_in_check(function(loc){var _i_html=new String;if(GLOBALS.PROFILE_COMPLETE)for(var _i_html=(_i_html=_i_html+String.format("<li>{0}</li>",loc.create_comment_top_cap())+"<li class='comment_wrap'>")+loc.create_comment_p_zone()+"</li>",k=0;k<loc.actions.length;k++)_i_html+=loc.actions_terminal(loc.actions[k],null,!0);else _i_html=(_i_html+="<li><h3 style='text-transform:none;'>You need to complete your profile before you can contribute to the community.</h3>")+String.format("<a style='margin: 0 auto; width: 200px; display: block;'class='btn' href='{0}'>Complete profile now</a>",GLOBALS.PUBLISH_ROOT_PATH+"account/edit-profile")+"</li>";return _i_html},loc,!0),$(_html).appendTo(loc.$wrapper_node),loc.$wrapper_node.fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),loc.add_text_menu_listener()},function(_obj){Comment_Menu.call(this,_obj),this.menu_type="reply_comment_menu",this.reply_to_id=General.is_null_empty_undefined(_obj.reply_to_id)?0:_obj.reply_to_id,this.is_resource_post_reply=!General.is_null_empty_undefined(_obj.is_resource_post_reply)&&_obj.is_resource_post_reply}),Inline_Comment_Menu=(Reply_Comment_Menu.inherits(Comment_Menu),Reply_Comment_Menu.fn.get_comment_send_params=function(loc){var regexp_comment;return loc.is_resource_post_reply?{post_id:loc.permalink_post_id,body_text:$("."+loc.menu_type+" .comment_wrap textarea").val(),parent_comment_id:loc.reply_to_id,is_resource_post_comment:!0}:(regexp_comment=new RegExp('contenteditable="true"',"g"),{post_id:loc.permalink_post_id,body_text:$("."+loc.menu_type+" .comment_wrap").html().replace(regexp_comment,""),parent_comment_id:loc.reply_to_id})},Reply_Comment_Menu.fn.create_close_reply_menu_item=function(_action,is_active){return String.format("<span data-button='{0}' class='c77_icons {0}'>r</span>",_action)},Reply_Comment_Menu.fn.make_close_reply=function(_target,loc){loc.close_menu()},Reply_Comment_Menu.fn.render=function(){var loc=this,_html=new String,add_browser_block_class=2==loc.actions.length?"browser_block":"",add_browser_block_class=($(String.format("<ul class='{0} {1} {2}'></ul>",loc.style_class,loc.menu_type,add_browser_block_class)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),_html=(_html+="<li class='u_point point_icon abs_top'>\"</li>")+loc.logged_in_check(function(loc){var _html=new String;if(GLOBALS.PROFILE_COMPLETE){_html=_html+String.format("<li>{0}</li>",loc.create_comment_top_cap())+"<li class='comment_wrap'>",loc.is_resource_post_reply?_html+="<textarea class='comment_entered'></textarea>":_html+=String.format("<p class='comment_p' contenteditable='true'>{0}</p>",Post_Base.defaults.text.comment),_html+="</li>";for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],null,!0);_html+="<li class='close_reply_modal c77_icon'>x</li>"}else _html=(_html+="<li class='profile_not_complete'><h3>You need to complete your profile before you can contribute to the community.</h3>")+String.format("<a class='btn' href='{0}'>Complete profile now</a>",GLOBALS.PUBLISH_ROOT_PATH+"account/edit-profile")+"</li>";return _html},loc,!0),$(_html).appendTo(loc.$wrapper_node),loc.coords.x-loc.$wrapper_node.width()/2),_html=loc.coords.y+20;loc.$wrapper_node.css({top:_html,left:add_browser_block_class}).fadeIn(function(){loc.is_resource_post_reply&&loc.$wrapper_node.find("textarea").trigger("focus")}),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),loc.add_text_menu_listener()},Reply_Comment_Menu.fn.after_post_comment=function(loc){loc.close_menu()},function(_obj){Comment_Menu.call(this,_obj),this.menu_type="inline_comment_menu",this.parent=_obj.parent,this.comments=_obj.comments,this.ic_marker=_obj.ic_marker}),Awards_Set_Winner_Type_Menu=(Inline_Comment_Menu.inherits(Comment_Menu),Inline_Comment_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type);_html+="<li class='d_point point_icon abs_bottom'>\"</li>";for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],null,!0);$(_html).appendTo(loc.$wrapper_node);var _left=loc.coords.x+(loc.parent.width()/2-loc.$wrapper_node.outerWidth()/2),_top=loc.coords.y-loc.$wrapper_node.outerHeight()-20;
1loc.$wrapper_node.css({top:_top,left:_left}).fadeIn(),$(loc.shell_obj.container_id).addClass("unlight"),Selection.select_all_text(loc.parent.get(0)),loc.parent.addClass("ic_p_highlight"),loc.bind_namespaced_event("click",loc.button_event_terminal,loc),loc.add_text_menu_listener()},Inline_Comment_Menu.fn.create_comment_list_menu_item=function(_action,is_active){var _html=new String;_html+="<ul id='ic_list' >";for(var k=0;k<this.comments.comments.length;k++)_html=(_html=(_html=(_html+=String.format("<li data-c-id='{0}'><div class='c_metadata'><div class='avatar'><img src='{1}' /></div>",this.comments.comments[k].id,this.comments.comments[k].user.avatar))+String.format("<div class='comment_from'><a href='{0}'>{1}</a></div>",this.comments.comments[k].user.link,this.comments.comments[k].user.name))+String.format("<div class='time action'>{0}</div></div>",this.comments.comments[k].date_relative))+String.format("{0}</li>",this.comments.comments[k].comment);return _html+="</ul>"},Inline_Comment_Menu.fn.create_new_comment_menu_item=function(_action,is_active){var loc=this,_html=new String;return _html+=loc.logged_in_check(function(){var _i_html=new String;return(_i_html+=loc.create_comment_top_cap())+String.format("<div class='comment_wrap'><p class='comment_p' contenteditable='true'>{0}</p></div>",Post_Base.defaults.text.comment)+"<span class='submit_comment' data-button='submit_comment'>Make Comment</span>"},loc)},Inline_Comment_Menu.fn.get_comment_send_params=function(loc){var regexp_comment=new RegExp('contenteditable="true"',"g");return{post_id:loc.shell_obj.data.post_id,body_text:$("."+loc.menu_type+" .comment_wrap").html().replace(regexp_comment,""),inline_marker_id:loc.ic_marker,parent_comment_id:0}},Inline_Comment_Menu.fn.after_post_comment=function(loc){loc.close_menu();var _html,curr_count="p"==(curr_count=$(String.format("div[data-ic-get={0}]",loc.ic_marker)).removeClass("make_new").find("span.ic_count").text())?0:parseInt(curr_count);0==$(String.format("div[data-ic-get={0}]",loc.ic_marker)).length?(_html=String.format("<div data-ic-get='{0}' class='ic_cc_wrap not_selectable'><span class='ic_count'>1</span></div>",loc.ic_marker),$(_html).appendTo($(String.format("p[data-ic-marker={0}]",loc.ic_marker)))):$(String.format("div[data-ic-get={0}]",loc.ic_marker)).removeClass("make_new").find("span.ic_count").text(curr_count+1),$("#post").removeClass("unlight"),$("#post p").removeClass("ic_p_highlight")},function(_obj){Menu.call(this,_obj),this.menu_type="awards_set_winner_type_menu",this.post_id=_obj.post_id,this.parent=_obj.parent});Awards_Set_Winner_Type_Menu.inherits(Menu),Awards_Set_Winner_Type_Menu.fn.set_type=function(param){$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-winner-type-update"),param,function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)&&message_slider("Success!")})},Awards_Set_Winner_Type_Menu.fn.create_assign_notable_menu_item=function(_action){return String.format("<span class='{0}'>Select as Notable</span>",_action)},Awards_Set_Winner_Type_Menu.fn.create_assign_runner_up_menu_item=function(_action){return String.format("<span class='{0}'>Select as Runner Up</span>",_action)},Awards_Set_Winner_Type_Menu.fn.create_assign_winner_menu_item=function(_action){return String.format("<span class='{0}'>Select as Winner</span>",_action)},Awards_Set_Winner_Type_Menu.fn.create_remove_from_winner_menu_item=function(_action){return String.format("<span class='{0}'>Remove from Circle</span>",_action)},Awards_Set_Winner_Type_Menu.fn.make_assign_notable=function(_target,loc){loc.set_type({post_id:loc.post_id,winner_type:1}),loc.parent.find(".winner_type").text("Notable").attr({"data-winner-type":"Notable"}),loc.close_menu()},Awards_Set_Winner_Type_Menu.fn.make_assign_runner_up=function(_target,loc){loc.set_type({post_id:loc.post_id,winner_type:2}),loc.parent.find(".winner_type").text("Runner Up").attr({"data-winner-type":"Runner Up"}),loc.close_menu()},Awards_Set_Winner_Type_Menu.fn.make_assign_winner=function(_target,loc){loc.set_type({post_id:loc.post_id,winner_type:3}),loc.parent.find(".winner_type").text("Winner").attr({"data-winner-type":"Winner"}),loc.close_menu()},Awards_Set_Winner_Type_Menu.fn.make_remove_from_winner=function(_target,loc){$.post(GLOBALS.PUBLISH_ROOT_PATH.append("account/award-entry-winner-circle-add-remove"),{post_id:loc.post_id,add:!1},function(data){data=General.parse_json_if_needed(data);General.status_ok(data.status)?(1==loc.parent.parents("ul").find("li").length&&loc.parent.parents("ul").addClass("empty_list"),loc.parent.remove()):message_slider(data.text,!0)}),loc.close_menu()},Awards_Set_Winner_Type_Menu.fn.render=function(){var loc=this,_html=new String;$(String.format("<ul class='{0} {1}'></ul>",loc.style_class,loc.menu_type)).hide().appendTo($(loc.appendTo_id)),loc.$wrapper_node=$("."+loc.menu_type),_html+="<li class='u_point point_icon abs_top'>\"</li>";for(var k=0;k<loc.actions.length;k++)_html+=loc.actions_terminal(loc.actions[k],null,!0);$(_html).appendTo(loc.$wrapper_node);var _left=loc.coords.x-loc.$wrapper_node.width()/2,_top=loc.coords.y+25;
1loc.$wrapper_node.css({top:_top,left:_left}).fadeIn(),loc.bind_namespaced_event("click",loc.button_event_terminal,loc)};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.