jQuery(document).ready(function($) {
	$('.hide-if-no-js').removeClass('hide-if-no-js');
	$('.hide-if-js').hide();
	
	init_inline_labels('.inline-label');
});

function init_inline_labels(selector) {
	var $inputs = jQuery(selector);
	
	$inputs.bind('focus', function(e) {
		var $this = jQuery(this);
		$this.addClass('active');
		
		if(this.value == this.title) this.value = '';
	});
	$inputs.bind('blur', function(e) {
		var $this = jQuery(this);
		$this.removeClass('active');
		
		if( !this.value || this.value == '' ) this.value = this.title;
	});
}
