// Insert the Canvas Object into the div with id #MyDiv 
$(document).ready(function() 
{
	$("#expenditure").backgroundCanvas();
	$("#results").backgroundCanvas();
	$("#income").backgroundCanvas();
	$("#how_much").backgroundCanvas();	
	$("#payment_calc").backgroundCanvas();	
	$("#calculator").backgroundCanvas();
	$("#find_consultant").backgroundCanvas();		
});

// Helper function to draw background for convienience
function DrawBackground() 
{	
    // Paints on the background canvas with the PaintFunction you must provide! 
    $("#expenditure").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#results").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#income").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#how_much").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#payment_calc").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#calculator").backgroundCanvasPaint(MyBackgroundPaint30); 
	$("#find_consultant").backgroundCanvasPaint(MyBackgroundPaint30); 
}

// Draw the background  on load and resize
$(window).load(function () { DrawBackground(); });
$(window).resize(function() { DrawBackground(); });


