function toggle(id) {
	$('#' + id).toggle('slow');
}

function show(id) {
	$('#' + id).show();
}

function hide(id) {
	$('#' + id).hide();
}

function swap(id,text) {
	$('#' + id).html(text);
}

function swap_c(id,text,colour) {
	$('#' + id).html(text);
	$('#' + id).css('color',colour);
}

function swap_bg_img(id,img) {
	$('#' + id).css('background','url(images/' + img + ') no-repeat 0% 100%');
}

function light(id, col) {
	$(id).css('background-color',col);
}

function unlight(id) {
	$(id).css('background-color','#EEEEEE');
}

function load_bling() {
	if (window.location.hash == "#bling") {
		$("#flickr_photos").show();
		$("#twitters").show();
		$("#flickr_photos").load("flickr.html");
		$("#twitters").load("twitter.html");
	}
}

function toggle_bling() {
	$("#flickr_photos").toggle();
	$("#twitters").toggle();
	if (window.location.hash == "#bling") {
		$("#flickr_photos").empty();
		$("#twitters").empty();
		window.location.hash = "nobling";
	}
	else {
		$("#flickr_photos").load("flickr.html");
		$("#twitters").load("twitter.html");
		window.location.hash = "bling";
	}
	//attach_hashes();
}

function attach_hashes() {
	$('a').attr("href",window.location.hash); 
}

$(document).ready(function() {
	$('span.appearing').hide();
	$('div.appearing').hide();
	$('div.hiding').show();
	load_bling();
	//attach_hashes();
});
