$(document).ready(function() {

	$('#due_date').datepicker({
		showButtonPanel: true, 
		showOn: 'button', 
		dateFormat: 'm/d/yy',
		buttonImage: 'images/calendar.gif', 
		buttonImageOnly: true, 
		numberOfMonths: 3
	});

	$("#accordion").accordion({
		collapsible: true,
		fillSpace: true,
		active: 2
	});

	$(function(){
		$("input").filter(":checkbox,:radio").checkbox();
		$("#ui-test3, #ui-radio3").checkbox("disable");
		$("#ui-test4").parent(".ui-checkbox").addClass("ui-state-highlight");
		$("#ui-radio4").parent(".ui-radio").addClass("ui-state-highlight");
		$("#ui-test5").parent(".ui-checkbox").addClass("ui-state-error");
		$("#ui-radio5").parent(".ui-radio").addClass("ui-state-error");
		//$("form#default input").filter(":checkbox,:radio").addClass("ui-checkbox");
		$("#default-test3, #default-radio3").attr("disabled","disabled");
		$("#toggle").click(function() {
			var jq = $("#ui-test3, #ui-radio3");
			if (jq.filter(":disabled").length)
				jq.checkbox("enable");
			else
				jq.checkbox("disable");
			return false;
		});
	});
	$('.growImage').mouseover(function(){
	//moving the div left a bit is completely optional
	//but should have the effect of growing the image from the middle.
		$(this).stop().animate({"width": "100%","left":"0px","top":"0px", "opacity": "1.0"}, 400,'swing');
	}).mouseout(function(){ 
		$(this).stop().animate({"width": "90%","left":"0px","top":"5px", "opacity": "0.7"}, 200,'swing');
	});;

});
function jAlert(title, message){
	$("<div title='" + title + ":'>" + message + "</div>").dialog({
		bgiframe: true,
		height: 140,
		modal: true,
		resizable: false,
		buttons: { "Ok": function() { $(this).dialog("close"); } }
	});
}


$(document).ready(function() {
	
	$("div#privacy").dialog({
		autoOpen: false,
		bgiframe: true,
		/*height: 140,*/
		width: 500,
		modal: true,
		resizable: false,
		buttons: { "Close": function() { $(this).dialog("close"); } }
	});

	$("div#terms").dialog({
		autoOpen: false,
		bgiframe: true,
		/*height: 140,*/
		width: 500,
		modal: true,
		resizable: false,
		buttons: { "Close": function() { $(this).dialog("close"); } }
	});
});

