/**
 * Default jQuery Scripts
 */
$(document).ready(function() {
	var clearMePrevious ='';

	// clear input on focus
	$('.clearMeFocus').focus(function()
	{	
		if($(this).val()==$(this).attr('title'))
		{			
			clearMePrevious = $(this).val();
			$(this).val('');
		}
						
	});

	// if field is empty afterward, add text again
	$('.clearMeFocus').blur(function()
	{				
		if($(this).val() == '')
		{
			$(this).val(clearMePrevious);
		}
	});
	
	
	// assuming all checkboxes are unchecked at first
	$("span[class='checkbox']").addClass("unchecked");

		$(".checkbox").click(function(){

			if($(this).children("input").attr("checked")){
				// uncheck
				$(this).children("input").removeAttr('checked');
				$(this).removeClass("checked");
				$(this).addClass("unchecked");
			}else{
				// check
				$(this).children("input").attr({checked: "checked"});
				$(this).removeClass("unchecked");
				$(this).addClass("checked");
			}

	});
	
});

