$(document).ready(function() {
	// Add Opacity when document is ready
	$('.box h2 a').css({'opacity': '0.88'});
	
	// Clear default text in fields. (Field need default title)
	$('input.field').focus(function () {
		def_val = this.title;
		if (this.value==def_val) {
			this.value = '';
		}
	}).blur(function () {
	    def_val = this.title;
	    if (this.value=='') {
			this.value = def_val;
		}
	});
});
	
$(function() {
	$('#recent-news .box').hover(function() {
		if ($(this).hasClass('adv')) {
			return;
		};
		$(this).addClass('hover-box');
		// Remove Opacity on hover
		$(this).find('h2 a').css({'opacity': '1'});
	}, function() {
		// Add Opacity on release
		$(this).find('h2 a').css({'opacity': '0.88'});
		$(this).removeClass('hover-box');
	});
	$('#sidebar .latest .tabs a').click(function() {
		var content = $(this).attr('id')+'-content';
		$('#sidebar .latest .tabs a').removeClass('active');
		$(this).addClass('active');
		$(this).parents('.latest:eq(0)').find('.tab-content').hide();
		$('#'+content).show();
		return false;
	});
	$('#topbar .archives').hover(function() {
		$(this).find('.dropdown').show('normal');
	}, function() {
		$(this).find('.dropdown').hide('fast');
	});
});