// labelOver
/* 1. put label over input, 2. empty input on focus (hide label), 3. fill it back on blur if left empty (show label) */
jQuery.fn.labelOver = function(overClass) {
	return this.each(function(){
		var label = jQuery(this);
		var f = label.attr('for');
		if (f) {
			var input = jQuery('#' + f);
			
			this.hide = function() {
			  label.css({ textIndent: -10000 })
			}
			
			this.show = function() {
			  if (input.val() == '') label.css({ textIndent: 0 })
			}

			// handlers
			input.focus(this.hide);
			input.blur(this.show);
		   label.addClass(overClass).click(function(){ input.focus() });
			
			if (input.val() != '') this.hide();
		}
	})
}
labelOver = function(elt) {
	if (jQuery(elt).size() < 1) return 0;
	jQuery(elt).labelOver('over-apply');
	return jQuery(elt).size();
}

centerBigDailyPhoto = function(elt) {
    if (jQuery(elt).size() < 1) return 0;
	imgWidth = jQuery(elt+" img").width()+2;
	jQuery(elt+" .credits").width(imgWidth);
	return jQuery(elt).size();
}


/* Only initialize functions for all pages if needed */
jQuery(document).ready(function() {
	initLabelOver = labelOver(".labelOver"); //alert(initLabelOver);
});














//END 
