
var LiveBar={};LiveBar.window_location_search=window.location.search;LiveBar.window_location_host=window.location.host;LiveBar.get_tenant_id=function()
{return'357362488';};LiveBar.set_session_id=function(session_key,session_id){LiveBar.create_cookie('session_key',session_key);LiveBar.create_cookie('session_id',session_id);LiveBar.default_url_builder_options.append_callback=function(){return LiveBar.get_session_key()+"="+LiveBar.get_session_id();}}
LiveBar.get_session_id=function(){return LiveBar.read_cookie('session_id');}
LiveBar.get_session_key=function(){return LiveBar.read_cookie('session_key');}
LiveBar.Tenant={tenant_id:LiveBar.get_tenant_id(),livebar_server_domain:'lb1.livebar.com',livebar_server_port:'',jsonp_callback_function:'livebar_jc',livebar_server_base_url:'',get_livebar_server_base_url:function(){return'http://ucscrecreation.lb1.livebar.com';}};LiveBar.create_cookie=function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else{var expires="";}
document.cookie=name+"="+value+expires+"; path=/";};LiveBar.read_cookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}
return null;}
LiveBar.default_url_builder_options={};LiveBar.Tenant.livebar_server_base_url=LiveBar.Tenant.get_livebar_server_base_url();LiveBar.url_builder=function(options){var formed_url=(typeof options.host!='undefined')?options.host:LiveBar.Tenant.livebar_server_base_url;formed_url+=(options.path)?options.path:'';formed_url+='?tenant_id='+LiveBar.Tenant.tenant_id;if(false){formed_url+='&'+LiveBar.get_session_key()+'='+LiveBar.get_session_id();}
for(i in LiveBar.default_url_builder_options){if(options[i]==undefined){options[i]=LiveBar.default_url_builder_options[i];}}
if(options.append_callback!=undefined&&typeof options.append_callback=='function'){formed_url+='&'+options.append_callback();delete options.append_callback;}
if(options.query){if(typeof options.query=='string'||typeof options.query=='number'){formed_url+='&'+options.query;}else{for(i in options.query){formed_url+='&'+i+'='+options.query[i];}}}
return formed_url;}
LiveBar.Config={strip_www:true,strip_index:true,init_added:false,page_url:'',bundle_url:'',set_page_url:function(){this.page_url=decodeURIComponent(document.location.href).split("?")[0]
this.page_url=(this.strip_www)?this.page_url.replace(/\/\/www\./,'//'):this.page_url;this.page_url=(this.strip_index)?this.page_url.replace(/index\.(html|htm|php|asp|aspx|jsp|cfm)/,''):this.page_url;if(typeof LiveBarBundleURL!=='undefined'){this.bundle_url=encodeURIComponent(LiveBarBundleURL);}else{this.bundle_url=encodeURIComponent(this.page_url);}}};LiveBar.Config.set_page_url();LiveBar.is_IE6=false;LiveBar.is_IE8=false;LiveBar.is_FF2_Mac=false;LiveBar.quirks_mode=false;LiveBar.patch_fixed_position=false;LiveBar.widget_id=0;LiveBar.init=function(){LiveBar.test_for_patch_fixed_position();LiveBar.load_css();LiveBar.add_jQuery();}
LiveBar.load_css=function(){var livebar_stylesheets=new Array('livebar_packaged');if(LiveBar.is_IE8){livebar_stylesheets[livebar_stylesheets.length]='ie8';}
if(LiveBar.patch_fixed_position){if(LiveBar.is_IE6){livebar_stylesheets[livebar_stylesheets.length]='ie6';}
if(LiveBar.quirks_mode){livebar_stylesheets[livebar_stylesheets.length]='ie_quirks';if(LiveBar.is_IE6){livebar_stylesheets[livebar_stylesheets.length]='ie6_quirks';}}}
var timestamp=parseInt(new Date().getTime()/86400000);var livebar_css_node;for(i=0;i<livebar_stylesheets.length;i++){livebar_css_node=document.createElement('link');livebar_css_node.type='text/css';livebar_css_node.rel='Stylesheet';livebar_css_node.href=LiveBar.url_builder({path:'/stylesheets/'+livebar_stylesheets[i]+'.css',query:timestamp});document.getElementsByTagName("head")[0].appendChild(livebar_css_node);}
livebar_css_node=document.createElement('link');livebar_css_node.type='text/css';livebar_css_node.rel='Stylesheet';livebar_css_node.href=LiveBar.url_builder({path:'/shared/'+LiveBar.Tenant.tenant_id+'/stylesheets/tenant.css',query:timestamp});document.getElementsByTagName("head")[0].appendChild(livebar_css_node);livebar_css_node=document.createElement('link');livebar_css_node.type='text/css';livebar_css_node.rel='Stylesheet';livebar_css_node.href=LiveBar.url_builder({path:'/shared/'+LiveBar.Tenant.tenant_id+'/stylesheets/tenant_images.css',query:timestamp});document.getElementsByTagName("head")[0].appendChild(livebar_css_node);};LiveBar.add_jQuery=function(){var livebar_jquery_node=document.createElement('script');livebar_jquery_node.type='text/javascript';livebar_jquery_node.src=LiveBar.url_builder({path:'/javascripts/lib/jquery.js'});if(livebar_jquery_node.addEventListener){livebar_jquery_node.addEventListener("load",LiveBar.load_js,false);}else if("onreadystatechange"in livebar_jquery_node){livebar_jquery_node.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){LiveBar.load_js();}};}
document.getElementsByTagName('head')[0].appendChild(livebar_jquery_node);}
LiveBar.load_js=function(){LiveBar.additional_loads=0;LiveBar.jQuery=livebar_jQuery.noConflict(true);LiveBar.jQuery.ajaxSettings.cache=true;LiveBar.jQuery('#livebar').addClass('livebar_minimized');LiveBar.scripts_loaded_counter=0;var timestamp=parseInt(new Date().getTime()/86400000);LiveBar.jQuery.getScript(LiveBar.url_builder({path:'/javascripts/livebar_packaged.js',query:timestamp}),function(){if(LiveBar.local_livebar_javascripts){LiveBar.scripts_to_load=(LiveBar.local_livebar_javascripts.length)+LiveBar.additional_loads;for(i=0;i<LiveBar.local_livebar_javascripts.length;i++){LiveBar.jQuery.getScript(LiveBar.url_builder({path:'/javascripts/'+LiveBar.local_livebar_javascripts[i]+'.js',query:timestamp}),LiveBar.script_loaded());}}else{LiveBar.scripts_to_load=(1+LiveBar.additional_loads);LiveBar.script_loaded();}});}
LiveBar.script_loaded=function(){LiveBar.scripts_loaded_counter++;var url_builder_query={};url_builder_query.url=LiveBar.Config.bundle_url;url_builder_query[LiveBar.Tenant.jsonp_callback_function]='?';if(LiveBar.get_session_key()!=null){url_builder_query[LiveBar.get_session_key()]=LiveBar.get_session_id();}
if(LiveBar.scripts_loaded_counter==LiveBar.scripts_to_load){LiveBar.jQuery.getJSON(LiveBar.url_builder({path:LiveBar.get_livebar_link(),query:url_builder_query}),function(request){LiveBar.request=request;LiveBar.check_dom_intervals=[];LiveBar.check_dom();});}}
LiveBar.check_dom=function(){if(LiveBar.jQuery('#livebar').length<1){if(LiveBar.check_dom_intervals.length>20){LiveBar.clear_dom_intervals();}else{LiveBar.check_dom_intervals.push(setInterval('LiveBar.check_dom()',1000));}}else{LiveBar.render_bar();}}
LiveBar.render_bar=function(){LiveBar.clear_dom_intervals();LiveBar.jQuery('#livebar').html(LiveBar.request);LiveBar.browser_specific_fixes();}
LiveBar.clear_dom_intervals=function(){for(i in LiveBar.check_dom_intervals){clearInterval(i);}}
LiveBar.browser_specific_fixes=function(){LiveBar.is_FF2_Mac=LiveBar.detectMacXFF2();if(LiveBar.patch_fixed_position){LiveBar.Fixed_Position_Patch.fixed_position_patch();}
if(LiveBar.is_FF2_Mac)setTimeout('LiveBar.fix_ff2_mac_flash()',1000);}
LiveBar.login_via_facebook=function()
{LiveBar.jQuery.ajax({url:LiveBar.url_builder({path:'/facebook_sessions'}),data:{cookies:document.cookie,_method:'post'},dataType:'jsonp'});};LiveBar.get_livebar_link=function()
{var regex=new RegExp("livebar_link=([^&]*)");var results=regex.exec(decodeURIComponent(LiveBar.window_location_search));if(results==null){return"";}else{return results[1];}};LiveBar.get_goto_url_link=function()
{var regex=new RegExp("goto_url=([^&]*)");var results=regex.exec(decodeURIComponent(LiveBar.window_location_search));if(results==null){return"";}else{return results[1];}};LiveBar.widget=function(resource,options){if(!options)options={};options.widget_action=options.widget_action?('/'+options.widget_action):'';options.query=options.query?(options.query):'';options.css_classname=(options.css_classname)?' '+options.css_classname:'';options.data_livebar_properties=options.data_livebar_properties?''+options.data_livebar_properties:'';if(options.data_livebar_properties&&!options.data_livebar_properties==''){options.data_livebar_properties=' data-livebar-properties="'+options.data_livebar_properties+'"';}
var url_builder_query={};if(options.query!=''){var key_pair=[];if(options.query.indexOf('&')>-1){query_pairs=options.query.split('&');for(i=0;i<query_pairs.length;i++){key_pair=query_pairs[i].split('=');url_builder_query[key_pair[0]]=key_pair[1];}}else{key_pair=options.query.split('=');url_builder_query[key_pair[0]]=key_pair[1];}}
if(options.title){attribute_title='title="'+options.title+'"';}else{attribute_title='';}
url_builder_query.url=LiveBar.Config.bundle_url;url_builder_query[LiveBar.Tenant.jsonp_callback_function]='?';widget_lang_attribute=LiveBar.url_builder({host:'',path:'/widgets/'+resource+options.widget_action,query:url_builder_query});document.write('<div class="livebar_widgets livebar_widgets_'+resource+options.css_classname+'" '+'id="livebar_widget_'+LiveBar.widget_id+'" '+attribute_title+'lang="'+widget_lang_attribute+'"'+options.data_livebar_properties+'></div>');};LiveBar.widgetDefer=function(resource,options){if(!options)options={};options.widget_action=options.widget_action?('/'+options.widget_action):'';options.query=options.query?('&'+options.query):'';options.css_classname=(options.css_classname)?' '+options.css_classname:'';options.data_livebar_properties=options.data_livebar_properties?''+options.data_livebar_properties:'';if(options.data_livebar_properties&&!options.data_livebar_properties==''){options.data_livebar_properties=' data-livebar-properties="'+options.data_livebar_properties+'"';}
var url_builder_query={};if(options.query!=''){var key_pair=[];if(options.query.indexOf('&')>-1){query_pairs=options.query.split('&');for(i=0;i<query_pairs.length;i++){key_pair=query_pairs[i].split('=');url_builder_query[key_pair[0]]=key_pair[1];}}else{key_pair=options.query.split('=');url_builder_query[key_pair[0]]=key_pair[1];}}
if(options.title){attribute_title='title="'+options.title+'"';}else{attribute_title='';}
url_builder_query.url=LiveBar.Config.bundle_url;url_builder_query[LiveBar.Tenant.jsonp_callback_function]='?';widget_lang_attribute=LiveBar.url_builder({host:'',path:'/widgets/'+resource+options.widget_action,query:url_builder_query});var returnValue='<div class="livebar_widgets livebar_widgets_'+resource+options.css_classname+'" '+'id="livebar_widget_'+LiveBar.widget_id+'" '+attribute_title+'lang="'+widget_lang_attribute+'"'+options.data_livebar_properties+'></div>';return returnValue;};LiveBar.Widget=function(resource,options){return LiveBar.widget(resource,options);};LiveBar.WidgetDefer=function(resource,options){LiveBar.widgetDefer(resource,options);};LiveBar.add_load_event=function(){if(arguments.callee.done)return;arguments.callee.done=true;if(_timer)clearInterval(_timer);LiveBar.init();};if(/MSIE/i.test(navigator.userAgent)){document.write('<s'+'cri'+'pt id="__ie_onload" defer="true" src="javascript:void(0)"><\/script>');var script=document.getElementById("__ie_onload");script.onreadystatechange=function(){if(this.readyState=="complete"){LiveBar.add_load_event();}};LiveBar.Config.init_added=true;}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",LiveBar.add_load_event,false);LiveBar.Config.init_added=true;};if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){LiveBar.add_load_event();}},10);LiveBar.Config.init_added=true;};if(!LiveBar.Config.init_added){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}
LiveBar.add_load_event();};LiveBar.fix_ff2_mac_flash=function(){if(LiveBar.is_FF2_Mac){htmlObjects=document.getElementsByTagName('object');for(i=0;i<htmlObjects.length;i++){if(htmlObjects[i].getAttribute('codebase').indexOf('flash')>-1){htmlObjects[i].style.visibility='hidden';}}
htmlIFrames=document.getElementsByTagName('iframe');for(i=0;i<htmlIFrames.length;i++){if(htmlIFrames[i].id!='everett_iframe'&&htmlIFrames[i].id!='livebar_iframe'){htmlIFrames[i].style.visibility='hidden';}}}}
LiveBar.detectMacXFF2=function(){var userAgent=navigator.userAgent.toLowerCase();if(/firefox[\/\s](\d+\.\d+)/.test(userAgent)){var ffversion=new Number(RegExp.$1);if(ffversion<3&&userAgent.indexOf('mac')!=-1){return true;}}}
LiveBar.toggle_select_menus=function(visiblity_to_set){var select_menus_to_toggle=document.getElementsByTagName('select');for(i=0;i<select_menus_to_toggle.length;i++){select_menus_to_toggle[i].style.visibility=visiblity_to_set;}}
LiveBar.Fixed_Position_Patch={fixed_scroll_position:'0px',livebar_height:'0px',get_livebar_height:function(){LiveBar.Fixed_Position_Patch.livebar_height=parseInt(LiveBar.jQuery('#livebar').height());},set_fixed_scroll_position:function(){if(LiveBar.patch_fixed_position){LiveBar.Fixed_Position_Patch.get_livebar_height();LiveBar.Fixed_Position_Patch.fixed_scroll_position=(LiveBar.jQuery(window).height()+LiveBar.jQuery(document).scrollTop())-LiveBar.Fixed_Position_Patch.livebar_height+'px';}},fix_scroll_position:function(){if(LiveBar.patch_fixed_position){LiveBar.Fixed_Position_Patch.set_fixed_scroll_position();LiveBar.jQuery('#livebar').css('bottom','auto');LiveBar.jQuery('#livebar').css('top',LiveBar.Fixed_Position_Patch.fixed_scroll_position);LiveBar.has_scrolled_quirks=true;}},fix_resize_position:function(){LiveBar.Fixed_Position_Patch.get_livebar_height();LiveBar.Fixed_Position_Patch.set_fixed_scroll_position();if(LiveBar.patch_fixed_position){LiveBar.jQuery('#livebar').css('bottom','auto');LiveBar.jQuery('#livebar').css('top',LiveBar.Fixed_Position_Patch.fixed_scroll_position);LiveBar.jQuery('#livebar').css('width',LiveBar.jQuery(window).width());}},fixed_position_patch:function(){if(LiveBar.patch_fixed_position){LiveBar.Fixed_Position_Patch.fix_resize_position();LiveBar.jQuery(window).bind('scroll',function(){LiveBar.Fixed_Position_Patch.fix_scroll_position()});LiveBar.jQuery(window).bind('resize',function(){LiveBar.Fixed_Position_Patch.fix_resize_position()});}}}
LiveBar.test_for_patch_fixed_position=function(){LiveBar.is_IE6=(navigator.appName=='Microsoft Internet Explorer')&&(navigator.appVersion.indexOf('MSIE 6')>0);LiveBar.quirks_mode=(document.body.clientWidth!=document.body.offsetWidth&&navigator.appName=='Microsoft Internet Explorer');LiveBar.patch_fixed_position=(LiveBar.quirks_mode||LiveBar.is_IE6);LiveBar.is_IE8=(navigator.appVersion.indexOf('MSIE 8')>0);}