$(document).ready(function() {
	// Customised radio & checkbox
	$('input').customInput();
	$("#subscribe").css("visibility", "hidden");
	$("#unsubscribe").css("visibility", "hidden");
	
	//Assign default value to form fields
//	$('input[type=text], textarea').focus(function() {
//		if($(this).val() == $(this).attr('defaultValue')) {
//			$(this).val('');
//		}
//	})
//	$('input[type=text], textarea').blur(function() {
//		if($(this).val().length == 0) {
//			$(this).val($(this).attr('defaultValue'));
//		}
//	});
	
	$('input[type="text"], textarea').each(function() {
    var default_value = this.value;
		$(this).focus(function() {
			if(this.value == default_value) {
				this.value = '';
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
				this.value = default_value;
			}
		});
	});
	
	// Tooltips
	$("#main_nav ul li a[title]").tooltip({
		effect: "slide",
		slideOffset: 10,
		direction: "up",
		delay: 30,
		position: "top center",
		opacity: 1,
        tipClass: 'tooltip_1'
	});
	$("#side-nav ul li a[title]").tooltip({
		effect: "slide",
		direction: "right",
		delay: 30,
		position: "right center",
		offset: [65, 130],
		opacity: 1,
        tipClass: 'tooltip_2'
	});
});
