$(function(){		$.history.init(function(hash){		var hashparts = hash.split('/');		current_hash=hashparts;				if(typeof(hashViewer) != "undefined") {			hashViewer(hash);		}				if(hash == "" || hash == '!/' || hash == '!' || hash == '/') {			if($('#page').length || $('#center').length) {				if($('.piece .flowh-maker').length) {					filters="all";					build_events(filters,views);					addSelected('');					cleanUp();				}				else {					$('#doc').load('/', {ajx:1}, function() {						filters="all";						build_events(filters,views);						addSelected('');						cleanUp();					});				}			}			else {				cleanUp();			}		}		else if(hashparts.length > 2 || hashparts[1] == "flowhs" || hashparts[1] == "activity") {			switch(hashparts[1]) {				case "flowhs":					if($('.piece .flowh-maker').length) {						filters=hashparts[2];						build_events(filters,views);						addSelected(hash);						cleanUp();					}					else {						$('#doc').load('/', {ajx:1}, function() {							filters=hashparts[2];							build_events(filters,views);							addSelected(hash);							cleanUp();						});					}					break;				case "activity":					act_page=0;					if($('.piece .flowh-maker').length) {						$('#items').empty();						$.post("/scripts/activity/build", {}, function(data) {							act_page++;							$('#items').html(data);						});						addSelected(hash);						cleanUp();					}					else {						$('#doc').load('/', {ajx:1}, function() {							$('#items').empty();							$.post("/scripts/activity/build", {}, function(data) {								act_page++;								$('#items').html(data);							});							addSelected(hash);							cleanUp();						});					}					break;				case "event":					$('#doc').load(hash.substring(1), {ajx:1}, function() {						cleanUp();					});					break;				case "settings":					if($('.settings-candy').length == 0) {						$('#doc').load(hashparts[1], {ajx:1}, function() {							$('.settings-piece').hide();							$('#'+hashparts[2]+'-piece.settings-piece').show();							addSelected(hash);							cleanUp();						});					}					else {						$('.settings-piece').hide();						$('#'+hashparts[2]+'-piece.settings-piece').show();						addSelected(hash);						cleanUp();					}					break;				case "search":					if(hashparts[2]=='users') {						$('#doc').load(hashparts[1], {ajx:1,s:hashparts[3],t:'u'}, function() {							addSelected('!/search/users');							$('.stream-loader').addClass('done');							cleanUp();						});					}					else {						$('#doc').load(hashparts[1], {ajx:1,s:hashparts[2],t:'e'}, function() {							addSelected('!/search');							$('.stream-loader').addClass('done');							cleanUp();						});					}					break;				case "about":					$('#doc').load(hash.substring(1), {ajx:1}, function() {						cleanUp();						addSelected(hash);					});					break;				default:					$('#doc').load('/'+hashparts[1], {ajx:1}, function() {						if($('.stream').length && hashparts.length < 2) {							build_events(filters,views);						}						if(hashparts[2] == 'friends' || hashparts[2] == 'following' || hashparts[2] == 'followers') {							$('#filters .nav a:eq(0)').parent().addClass('selected');							$('#items').empty();							$('#items').load(hash.substring(1), {ajx:1}, function() {});							$('.stream-loader').addClass('done');						}						addSelected(hash);						cleanUp();					});			}		}		else if(hashparts[1] == "search") {			$('#doc').load(hash.substring(1), {ajx:1}, function() {				addSelected(hash);				cleanUp();			});		}		else {			if($('.settings-candy').length && hashparts[1] == "settings") {				$('.settings-piece').hide();				$('#'+hashparts[1]+'-piece.settings-piece').show();				addSelected(hash);				cleanUp();			}			else {				$('#doc').load(hash.substring(1), {ajx:1}, function() {					if($('.stream').length) {						filters='my flowh';						build_events(filters,views);					}					addSelected(hash);					cleanUp();				});			}		}		$(window).scrollTop(0);		if(typeof(_gaq) != "undefined") {			var gaqHash = location.hash.replace('#!','') || '';			var gaqQueryString = location.search || '';			if(typeof(userId) != "undefined") {				_gaq.push(['_setCustomVar', 1, 'UserId', userId],['_trackPageview',location.pathname + gaqQueryString + gaqHash]);			}			else {				_gaq.push(['_trackPageview',location.pathname + gaqQueryString + gaqHash]);			}		}		if(current_hash[2] == 'friends' || current_hash[2] == 'following' || current_hash[2] == 'followers' || current_hash[1] == 'search') {			$('.stream-loader').addClass('done');		}		else {			$('.stream-loader').removeClass('done');		}		if(current_hash[1] == 'search') {			if($('#search input[name="q"]').val() == 'Search') {				var srch = current_hash[2];				if(current_hash[2] == 'users') {					srch = current_hash[3];				}				$('#search input[name="q"]').val(srch);			}		}		else {			$('#search input[name="q"]').val('Search');		}	},{ unescape: "/!" });	scrollStick();	resizeFacts();		$(window).bind("scroll resize", function() {		scrollStick();		resizeFacts();	});		$('.item:not(.results-end)').live('click',function(e) {		if(!$(e.target).is('a')) {			if($(this).is('.selected')) {				closeFacts();				$(this).removeClass('selected');			}			else {				$('.item.selected').removeClass('selected');				openFacts();				$(this).addClass('selected');				$.post('/water/ajax/facts-pieces.php', { user:$(this).attr('data-user-id') }, function(data) {					$('.facts').html(data);					resizeFacts();				});			}		}	});		$('.event').live('click',function(e) {		if(!$(e.target).is('a') && !$(this).is('.facts-pieces')) {			if($(this).is('.selected')) {				closeFacts();				$(this).removeClass('selected');			}			else {				$('.event.selected').removeClass('selected');				openFacts();				$(this).addClass('selected');				$.post('/water/ajax/facts-pieces.php', { event:$(this).attr('data-event-id') }, function(data) {					$('.facts').html(data);					resizeFacts();				});			}		}	});		$('.stream .event a').live('click',function(e) {		if($(this).attr('href')!='#') {			if($(this).attr('href').indexOf('#!/event/') > -1) { /* TODO */				var $event = $(this).closest('.event');				if($event.is('.selected')) {					closeFacts();					$event.removeClass('selected');				}				else {					$('.event.selected').removeClass('selected');					openFacts();					$event.addClass('selected');					$.post('/water/ajax/facts-pieces.php', { event:$event.attr('data-event-id') }, function(data) {						$('.facts').html(data);						resizeFacts();					});				}			}			else if($(this).attr('data-user-id')) {				$('.event.selected').removeClass('selected');				openFacts();				$.post('/water/ajax/facts-pieces.php', { user:$(this).attr('data-user-id') }, function(data) {					$('.facts').html(data);					resizeFacts();				});			}			else if($(this).attr('data-url')) {				window.open($(this).attr('href'), '_blank');			}			return false;		}	});		$('.event .flowh-actions').live('click', function() {		return false;	});		$('.facts-close').live('click',function() {		closeFacts();		return false;	});		$(".flo_embed_button").click(function() {		var event_id = document.location.pathname.split("/")[2];		popbox("Embed", '<textarea rows="5" style="width:100%" onClick="this.select()"><div id="flowh_event"></div>\n'+'<script type="text/javascript" src="http://flowh.com/widgets/build_event_html.js"></script>\n'+'<script type="text/javascript" src="http://flowh.com/flowhs/event.php?id='+event_id+'"></script></textarea><br /><span class="caption">We recommend placing the &lt;div /&gt; anywhere on your page and place the scripts before &lt;/body&gt;.</span>');		return false;	});		$('#invite').live('click',function() {		var uname = $(this).attr('data-user-name');		var ulogin = $(this).attr('data-user-login');		popbox('Invite Friends', '<h1>Message:</h1><p style="margin:0 0 1em 0; line-height:18px;">Your friend, <strong>'+uname+'</strong>, has invited you to check out <a href="http://flowh.com/" style="color:#59D" target="_blank">flowh.com</a>.<br />Visit <a href="http://flowh.com/signup/'+ulogin+'" style="color:#59D" target="_blank">http://flowh.com/signup/'+ulogin+'</a> to sign-up and also go to <a href="http://flowh.com/'+ulogin+'" style="color:#59D" target="_blank">http://flowh.com/'+ulogin+'</a> to see your friends flowh!</p><span class="caption">Separate multiple email addresses with a "," (comma)</span><textarea rows="3" style="width:436px" id="invt_message"></textarea><span class="caption">We\'ll send to the first 25 supplied email addresses.</span>','<div id="popbox_ok" class="button">Send</div> <div id="popbox_cancel" class="button">Cancel</div>');		$("#popbox_cancel").click(function() {			popbox_close();		});		$("#popbox_ok").click(function() {			var user_id = $("#viewer_id").val();			var parent = $(this).parent().parent();			var message = $('#invt_message').val();			popbox_close();			if(message.length > 6) {							$.post("/scripts/user/invite", { user_id:user_id, message:message }, function(data) {					if(data==1) {						popbox("Success", "Your invites were successfully sent.");					}					else {						popbox("Oops", "There was a problem trying to send your invite, please try again.");					}				});			}			else {				popbox("Oops", "Please provide an email address to send an invite to.");				$('#popbox .pfoot a').click(function() {					$('#invite').click();				});			}		});		return false;	});		$('.add-date-event').live('click', function() {		$('#simp_when_in').val($(this).prev('.date').text().split(', ')[1]).blur().prev().hide();		$('.piece .flowh-maker .dummy').focus();		return false;	});		$('#search form input').focus(function() {		if($(this).val() == 'Search') {			$(this).val('');		}	}).blur(function() {		if($(this).val() == '') {			$(this).val('Search');		}	});		$('#search form').submit(function() {		window.location = '#!/search/'+encodeURIComponent($('input',this).val());		return false;	});		$('.profile-actions .button.friend').live('click', function() {		if($(this).text() == 'Friend') {			friend($(this));		}		else {			un_friend($(this));		}		return false;	});		$('.profile-actions .button.follow').live('click', function() {		if($(this).text() == 'Follow') {			follow($(this));		}		else {			un_follow($(this));		}		return false;	});		$('.items .item-button .friend.accept').live('click', function() {		if($(this).text() == 'accept') {			accept_friend($(this));		}		else {			ignore_friend($(this));		}		return false;	});	});function build_events(filters, views, offset) {	if($('#page').length) {		var bld_filters=filters;		if(bld_filters=='friends' || bld_filters=='following' || bld_filters=='all') {			bld_filters+=' flowhs';		}		else {			bld_filters='my flowh';		}		var user_id = $('#user_id').val();		var timezone = viewerTimeZone;		$('#items').empty();		$.post("/scripts/events/build", { user_id: user_id, filter: bld_filters, view: views, timezone: timezone, offset:offset }, function(data) {			if(user_id == $('#user_id').val() && $('#page').length) {				$('#items').html(data);				if($('.stream-loader:eq(0)').offset().top <= $(window).height()+200 && !loading_more) {					loadMore();				}			}		});	}}function submit_event() {	$.post("/scripts/event/add", $("#eventForm").serialize(), function(data) {		location.reload(true);	});}function submit_event_simple() {	if($("#eventForm_simple").data('submit') != 1 && $("#eventForm_simple").data('submit-enter') != 1) {		$("#eventForm_simple").data('submit',1);		var disabled = $('#repeat_weekly input[type="checkbox"][disabled]').removeAttr('disabled');		$.post("/scripts/event/add", $("#eventForm_simple").serialize(), function(data) {			if(data==1) {				reset_flowhmaker();				build_events(filters); //filters, views, offset			}			else {				popbox("Oops", data);				$("#eventForm_simple").data('submit',0).data('submit-enter',1);				$(disabled).attr('disabled','disabled');			}		});	}}function accept_friend(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/friends/approve", { creator_id: creator_id, user_id: user_id }, function(data) {		if(data) {			$(obj).parent().remove();		}	});}function ignore_friend(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/friends/ignore", { creator_id: creator_id, user_id: user_id }, function(data) {		if(data) {			$(obj).parent().remove();		}	});}function friend(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/friends/add", { creator_id: creator_id, user_id: user_id }, function(data) {		$(obj).parent().next().hide();		$(obj).parent().replaceWith('<em>pending friend request</em>');	});}function un_friend(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/friends/delete", { creator_id: creator_id, user_id: user_id }, function(data) {		$(obj).parent().next().show();		$(obj).text('Friend');		$('.recent-friends .heading .count').text(parseInt($('.recent-friends .heading .count').text())-1);	});}function follow(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/follows/add", { creator_id: creator_id, user_id: user_id }, function(data) {		$(obj).text('Unfollow');		$('.recent-followers .heading .count').text(parseInt($('.recent-followers .heading .count').text())+1);	});}function un_follow(obj) {	var creator_id = $(obj).attr('data-creator-id');	var user_id = $(obj).attr('data-user-id');	$.post("/scripts/user/follows/delete", { creator_id: creator_id, user_id: user_id }, function(data) {		$(obj).text('Follow');		$('.recent-followers .heading .count').text(parseInt($('.recent-followers .heading .count').text())-1);	});}function logout() {	$.post("/scripts/user/logout", function(data) {		location.href="/";	});}function comment(event_id) {	var comment_text = $('#comment_text').val();	var viewer_id = $('#viewer_id').val();	var timezone = $('#viewer_timezone').val();	$.post("/scripts/event/comment/add", { text:comment_text, event_id:event_id, timezone:timezone, commenter_id:viewer_id }, function(data) {		//location.reload(true);		$('#comments').html(data);	});}function fbs_click_custom(url) {	if(url) {		u=url;	}	else {		u=location.href;	}	t=document.title;	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');	return false;}function init_events() {	$(".day .count").each(function() {		$(this).appendTo($('.heading',$(this).parent()));	});	$(".event .flowh-actions .delete").die().live('click',function() {		var user_id = $("#user_id").val();		var event_id = $(this).closest('.event').attr('data-event-id');		var instance=false;		var instance_btn='';		if($(this).attr('rel')) {			instance = $(this).attr('rel');			instance_btn = '<a href="#" id="popbox_ok_inst" class="button">Remove Instance</a>';		}		var event_div = $(this).closest('.event');		var instanceID = $(event_div).attr('date-event-instance-id');		popbox("Delete Event", "Are you sure you want to delete this event?<br />This can't be undone.", '<a href="#" id="popbox_ok" class="button">Delete Event</a>'+instance_btn+'<a href="#" id="popbox_cancel">Cancel</a>');		$("#popbox_cancel").click(function() {			popbox_close();			return false;		});		$("#popbox_ok").die().live('click',function() {			$.post("/scripts/event/delete", { user_id: user_id, event_id: event_id }, function(data) {				if(data==1) {					$('.event[data-event-id="'+event_id+'"]').fadeOut(function() {						$(window).scroll();					});					if($('#edit_event').val(event_id)) {						reset_flowhmaker();					}					if($('.facts-bar a[href="#!/event/'+event_id+'"]').length) {						closeFacts();					}				}				else {					popbox("Oops", "There was a problem trying to delete this event.");				}			});			popbox_close();			return false;		});		$("#popbox_ok_inst").die().live('click',function() {			$.post("/scripts/event/delete", { user_id: user_id, event_id: event_id, instance: instance }, function(data) {				if(data==1) {					$(event_div).add('.event[date-event-instance-id="'+instanceID+'"]').fadeOut(function() {						$(window).scroll();					});					if($('#edit_event').val(event_id)) {						reset_flowhmaker();					}					if($('.facts-bar a[href="#!/event/'+event_id+'"]').length) {						closeFacts();					}				}				else {					popbox("Oops", "There was a problem trying to delete this instance.");				}			});			popbox_close();			return false;		});	});	$(".event .flowh-actions .edit").die().live('click',function() {		var user_id = $("#user_id").val();		var event_id = $(this).closest('.event').attr('data-event-id');		$(this).hide();		$('.event[data-event-id="'+event_id+'"] .flowh-actions .edit').hide();		$.post("/scripts/event/edit", { user_id: user_id, event_id: event_id }, function(data) {			if(data) {				edit_event(data);				closeFacts();			}			else {				popbox("Oops", "There was a problem trying to load this event to edit.");			}		}, 'json');	});	$(".event .flowh-actions .follow").die().live('click',function() {		var user_id = $("#viewer_id").val();		var event_id = $(this).closest('.event').attr('data-event-id');		$(this).hide();		$.post("/scripts/event/follow", { user_id: user_id, event_id: event_id }, function(data) {			if(data==1) {				popbox("Success", "This event has been added to your flowh.");				$('.event[data-event-id="'+event_id+'"] .flowh-actions .follow').addClass('unfollow').removeClass('follow').html('<i></i>unfollow').show();			}			else {				popbox("Oops", "There was a problem trying to follow this event, please try again or refresh your page.");			}		});	});	$(".event .flowh-actions .unfollow").die().live('click',function() {		var user_id = $("#user_id").val();		var event_id = $(this).closest('.event').attr('data-event-id');		popbox("Unfollow Event", "Are you sure you want to stop following this event?", '<a href="#" id="popbox_ok" class="button">Unfollow</a> <a href="#" id="popbox_cancel">Cancel</a>');		$("#popbox_cancel").die().live('click',function() {			popbox_close();			return false;		});		$("#popbox_ok").die().live('click',function() {			$.post("/scripts/event/delete", { user_id: user_id, event_id: event_id, follow: 1 }, function(data) {				if(data==1) {					//$('.event[data-event-id="'+event_id+'"]').fadeOut();					$('.event[data-event-id="'+event_id+'"] .flowh-actions .unfollow').addClass('follow').removeClass('unfollow').html('<i></i>follow').show();					if($('.facts-bar a[href="#!/event/'+event_id+'"]').length) {						closeFacts();					}				}				else {					popbox("Oops", "There was a problem trying to unfollow this event.");				}			});			popbox_close();			return false;		});	});}function fetch() {	$.post("/scripts/activity/fetch", {}, function(data) {		if(data.messages) {			if($("#messages_count").length > 0) {				$("#messages_count").text(data.messages);			}			else {				$("#messages_bar").append('<div id="messages_count">'+data.messages+'</div>');			}		}		if(data.alerts) {			if($("#alerts_count").length > 0) {				$("#alerts_count").text(data.alerts);			}			else {				$("#alerts_bar").append('<div id="alerts_count">'+data.alerts+'</div>');			}		}	}, "json");}var loading_more=false;function loadMore() {	if(current_hash[1]=="flowhs" || current_hash[1]===undefined || current_hash[1]==="") {		loading_more=true;		var user_id = $('#user_id').val();		var timezone = viewerTimeZone;		var bld_filters=filters;		if(bld_filters=='friends' || bld_filters=='following' || bld_filters=='all') {			bld_filters+=' flowhs';		}		else {			bld_filters='my flowh';		}		if($('#items .item.results-end').length==0) {			$.post("/scripts/events/build", { user_id: user_id, filter: bld_filters, view: views, offset:offset, timezone: timezone, begin: 1, repeaters: 1 }, function(data) {				if(user_id == $('#user_id').val()) {					$('#items').append(data);					loading_more=false;					//if($('.stream-loader:eq(0)').offset().top <= $(window).height()+200 && !loading_more) {					if($('.stream-loader:eq(0)').length && $('.stream-loader:eq(0)').offset().top - $(window).scrollTop() <= $(window).height()+200 && !loading_more) {						loadMore();					}				}			});		}		else {			loading_more=false;		}	}	else if(current_hash[1]=="activity" && act_page!=0) {		loading_more=true;		$.post("/scripts//activity/build", {page:act_page}, function(data) {			$('#items').append(data);			act_page++;			loading_more=false;			if($('.stream-loader:eq(0)').offset().top <= $(window).height()+200 && !loading_more) {				loadMore();			}		});	}	else if(current_hash[2] != 'friends' && current_hash[2] != 'following' && current_hash[2] != 'followers' && current_hash[1] != 'search' && current_hash[1] != 'settings') {		loading_more=true;		var user_id = $('#user_id').val();		var timezone = viewerTimeZone;		bld_filters='my flowh';		if($('#items .item.results-end').length==0) {			$.post("/scripts/events/build", { user_id: user_id, filter: bld_filters, view: views, offset:offset, timezone: timezone, begin: 1, repeaters: 1 }, function(data) {				$('#items').append(data);				loading_more=false;				//if($('.stream-loader:eq(0)').offset().top <= $(window).height()+200 && !loading_more) {				if($('.stream-loader:eq(0)').length && $('.stream-loader:eq(0)').offset().top - $(window).scrollTop() <= $(window).height()+200 && !loading_more) {					loadMore();				}			});		}		else {			loading_more=false;		}	}	if(current_hash[2] == 'friends' || current_hash[2] == 'following' || current_hash[2] == 'followers' || current_hash[1] == 'search' || $('#items .item.results-end').length) {		$('.stream-loader').addClass('done');	}	else {		$('.stream-loader').removeClass('done');	}}function addSelected(hash) {	var hashparts = hash.split('/');	if(hashparts[1] == 'flowhs' || hashparts[1] == 'settings' || hashparts[1] == 'search' || hashparts[1] == 'about' || hashparts.length==1) {		$('#top .nav .selected').removeClass('selected');				$('#filters .nav .selected').removeClass('selected');	}	if(hashparts[1] == 'flowhs') {		$('#top .nav a[href="#"]').parent().addClass('selected');				$('#filters .nav a[href="#"]').parent().addClass('selected');	}	else if(hashparts[1] == 'settings') {		$('#filters .nav a[href="#!/settings"]').parent().addClass('selected');	}	else if(hashparts[1] == 'about') {		$('#filters .nav a[href="#!/about"]').parent().addClass('selected');	}	else if(hashparts[1] == 'search') {		$('#filters .nav a[href="#!/search"]').parent().addClass('selected');				if(hashparts[2]=='users') {			$('#filters .sub-nav a:eq(1)').parent().addClass('selected');		}		else {			$('#filters .sub-nav a:first').parent().addClass('selected');		}	}	$('a[href="#'+hash+'"]').each(function() {		if($(this).parent().is('li')) {			$('.selected',$(this).parent().parent()).removeClass('selected');			$(this).parent().addClass('selected');		}		else {			$('.selected',$(this).parent()).removeClass('selected');			$(this).addClass('selected');		}	});}function scrollStick() {	/*	if($('.day .heading').length) {		$('.day .heading').each(function() {			if($(this).offset().top - $(window).scrollTop() < 114) {				$(this).css({'position':'fixed','top':114,'width':589});				$(this).parent().css('padding-top',32);			}			else if($(this).parent().offset().top - $(window).scrollTop() >= 114) {				$(this).css({'position':'relative','top':0,'width':'auto'});				$(this).parent().css('padding-top',0);			}		});	}	*/	if($('.pieces').length && $(window).height() >= $('.pieces').height()+42) {		if($(window).scrollTop() > 21) {			$('.pieces').css({'position':'fixed','top':42,'width':376});		}		else if($(window).scrollTop() < 21) {			$('.pieces').css({'position':'static','top':0,'width':'auto'});		}	}	else {		$('.pieces').css({'position':'static','top':0,'width':'auto'});	}	/*	if($('#filters').length) {		if($(window).scrollTop() > 21) {			$('#filters').parent().css('padding-top',72);			$('#filters').css({'position':'fixed','top':42,'width':609, 'height':71});		}		else if($(window).scrollTop() < 21) {			$('#filters').parent().css('padding-top',0);			$('#filters').css({'position':'static','top':0,'width':'auto','height':'auto'});		}	}	*/	if($('.stream-loader:eq(0)').length && $('.stream-loader:eq(0)').offset().top - $(window).scrollTop() <= $(window).height()+200 && !loading_more) {		loadMore();	}}function openFacts() {	$('.facts-o-o').show();	$('.facts').animate({right:0},350);}function resizeFacts() {	var h = $(window).height()-142;	if($('#page').height()-79 < h) {		h = $('#page').height()-79;	}	$('.facts-o-o').height(h);	$('.facts').height(h-2);	$('.facts-pieces').height(h-33);}function closeFacts() {	$('.event.selected').removeClass('selected');	$('.facts').animate({right:400},350,function() {		$('.facts-o-o').hide();		$('.facts').html('<div class="facts-bar"><a class="facts-close" href="#">close <i></i></a><div class="clr"></div></div><div class="facts-pieces"><div class="stream-loader"></div></div>');	});}function cleanUp() {	closeFacts();	$('.tipsy').remove();	$('#doc').show();}
