/* Creates tabs */

$(document).ready(function() {
	$("#sidebar_tabs > ul").tabs();
	$("#sidebar_misc > ul").tabs();
});

/* Makes the li element clickable for IE */

$(document).ready(function() {
	$("#sidebar_tabs > .sidebar_header > li").addClass('clickable');
	$("#sidebar_misc > .sidebar_header > li").addClass('clickable');
});


/* Clears the last bottom border in the sidebar panels for IE */

$(document).ready(function() {
	$('.sidebar_widget > ul > li:last-child').css('border', 'none');
});

/* Clears text inside when user clicks on text area */

$(document).ready(function() {
	$('#comment').click(function() {
		if (this.value == 'What you want to say...') {
			this.value = '';
		}
	});
	
	$('#comment').blur(function() {
		if (this.value == '') {
			this.value = 'What you want to say...';
		}
	});
	
	$('#author').click(function() {
		if (this.value == 'Your name') {
			this.value = '';
		}
	});
	
	$('#author').blur(function() {
		if (this.value == '') {
			this.value = 'Your name';
		}
	});
	
	$('#email').click(function() {
		if (this.value == 'Your email') {
			this.value = '';
		}
	});
	
	$('#email').blur(function() {
		if (this.value == '') {
			this.value = 'Your email';
		}
	});
	
	$('#url').click(function() {
		if (this.value == 'Your website (Optional - But we do follow)') {
			this.value = '';
		}
	});
	
	$('#url').blur(function() {
		if (this.value == '') {
			this.value = 'Your website (Optional - But we do follow)';
		}
	});
	
	$('form').submit(function() {
		if ($('#url').value == 'Your website (Optional - But we do follow)') {
			$('#url').value = '';
		}
	});
	
});
