var callCost = 0;
var callAddCost = 0;
var commCost = 0;
var meetCost = 0;
var diarCost = 0;

function display(ele)
{
	if (ele.attr('name') == "submitted[how_many_calls_do_you_expect_per_day]")
	{
		var callsTxt;
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-I-don't-need-phone-/-fax-numbers")
		{
			callsTxt = "<strong>No Virtual Office Services</strong><br />You have elected not to have call handling or phone and fax numbers. Even if you rarely receive calls, we recommend at least the Ultra Lite package since you are only charged as calls are received. You will however be given a phone and fax number for your business which can demonstrate professionalism to your customers. We will answer calls to your phone number in your company name and use any greeting you would like.";
			callCost = 0;
			callAddCost = 0;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-I-want-an-address-only")
		{
			callsTxt = "<strong>Address Only</strong><br />The Address Only service enables you to use our capital city business address as your own for business cards, letter head and invoices and projects a very professional image to your business associates. We handle and sort your mail, and onsend standard letters within Australia. Often times, business startups will use a PO Box address on their stationery however its a well known fact that a business' credibility is far more enhanced by having a professional street address.";
			callCost = 15;
			callAddCost = 0;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-None-but-I-would-like-a-phone-and-fax-no.")
		{
			callsTxt = "<strong>The Ultra Lite Package</strong><br />The Ultra Lite package allows you to have a virtual office and accept ad hoc calls at a super competitive weekly rate. This is a good package if you are just starting a business or if you interact with very few customers, partners and associates. This basic package includes a phone and fax number for your business which you can use on your stationery and marketing materials. Calls will be answered in your company name with your required greeting.";
			callCost = 10;
			callAddCost = 2.5;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-Up-to-5")
		{
			callsTxt = "<strong>The Lite 5 Package</strong><br />The Lite 5 package gives you 5 professionally handled inbound calls per day included in the weekly fee. This package is useful for micro businesses and some smaller consulting firms. This package includes a phone and fax number for your business which you can use on your stationery and marketing materials. ";
			callCost = 20;
			callAddCost = 2.5;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-Up-to-10")
		{
			callsTxt = "<strong>The Lite 10 Package</strong><br />The Lite 10 package provides you with up to 10 professionally answered calls each business day. The package naturally includes a phone and fax number for your business which you can use on your stationery and marketing materials. This package may be of use to small businesses or larger businesses who need to cater for overflow at their own reception. Note that if you have multiple staff or departments in your business, we can route calls any way you like. You will have total flexibility in how you set up your account. ";
			callCost = 35;
			callAddCost = 2.25;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-Up-to-20")
		{
			callsTxt = "<strong>The Frequent Package</strong><br />The Frequent package is, as the name suggests, for those organisations who have more frequent calls during the business day. Typical users of this service include busy consultancies, hairdressers, therapists. The Frequent package offers you a phone and fax number, up to 20 professionally answered calls per day as well as an excellent rate on your call answering services. ";
			callCost = 60;
			callAddCost = 2;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-Up-to-30")
		{
			callsTxt = "<strong>The Commercial Package</strong><br />If you're getting a high volume of calls each day (30 or greater), the commercial package is for you. This package can be used by busy medical practices, booming small businesses, high traffic therapy, beauty and hairstyling businesses. The package is also popular with our large business customers who use the service as a way of coping with a busy reception or while receptionist staff are on leave or at lunch.  ";
			callCost = 75;
			callAddCost = 1.75;
		}
		if (ele.attr('id') == "edit-submitted-how-many-calls-do-you-expect-per-day-Up-to-50")
		{
			callsTxt = "<strong>The Industrial Package</strong><br />If you're getting a high volume of calls each day (50 or greater), the Industrial Package is for you. This package can be used by busy medical practices, booming small businesses, high traffic therapy, beauty and hairstyling businesses. The package is also popular with our large business customers who use the service as a way of coping with a busy reception or while receptionist staff are on leave or at lunch.   ";
			callCost = 112.5;
			callAddCost = 1.75;
		}
		$("#callsDiv").html(callsTxt);
		$("#callsDiv").css("display","block");
		updateTotal();
	}
	if (ele.attr('name') == "submitted[will_you_need_an_office_address]")
	{
		if (ele.attr('id') == "edit-submitted-will-you-need-an-office-address-Yes")
		{
			$("#officeDiv").html("You have chosen to use our office address service which enables you to use our capital city business address as your own for business cards, letter head and invoices and projects a very professional image to your business associates. We handle and sort your mail, and onsend standard letters within Australia. Business startups often use a PO Box address on their stationery because it’s quick and cheap. This is not the most recommended as it can damage the perceived validity & credibility of the business.");
			commCost = 10;
		}
		else
		{
			$("#officeDiv").html("<strong>Option</strong>: You can also choose to use our office address if you wish to further enhance the image of your business. For just $10pw, you will be given a license to use our business address on all of your stationery, invoices and marketing collateral. ");
			commCost = 0;
		}
		$("#officeDiv").css("display","block");
		updateTotal();
	}
	if (ele.attr('name') == "submitted[will_you_require_meeting_rooms]")
	{
		if (ele.attr('id') == "edit-submitted-will-you-require-meeting-rooms-Yes")
		{
			$("#meetingDiv").html("We will include 2 hours per week of meeting room rental for an additional $15p week. Rooms can accommodate between 2 and 12 people. If you would like to order tea, coffee, food, audio visual equipment or anything else you might need, please don't hesitate to ask us to organise that for you. ");
			meetCost = 15;
		}
		else
		{
			$("#meetingDiv").html("<strong>Option</strong>: If you need to do business in Sydney and you would like to avail of a boardroom or meeting room, we would be delighted to help. We provide meeting room facilities for between 2 and 12 people and can also provide you with tea, coffee, food, audio visual equipment or anything else you might need.");
			meetCost = 0;
		}
		$("#meetingDiv").css("display","block");
		updateTotal();
	}
	if (ele.attr('name') == "submitted[would_you_like_us_to_manage_your_diary__book_your_appointments]")
	{
		if (ele.attr('id') == "edit-submitted-would-you-like-us-to-manage-your-diary--book-your-appointments-Yes")
		{
			$("#diaryDiv").html("You have chosen the Diary Management option. This is perfect for service based businesses and busy executives and ensures you'll never miss an appointment. A personal calendar/diary is made available online so that both you and our call operators can access it. Our call operators can create appointments for you and can even confirm appointments with your clients by phone or SMS. You can access the diary to see what you have on or to block out time as required.  ");
			diarCost = 16.5;
		}
		else
		{
			$("#diaryDiv").html("<strong>Option</strong>: Online Diary Management. This is perfect for service based businesses and busy executives and ensures you'll never miss an appointment. A personal calendar/diary is made available online so that both you and our call operators can access it. Our call operators can create appointments for you and can even confirm appointments with your clients by phone or SMS. You can access the diary to see what you have on or to block out time as required.   ");
			diarCost = 0;
		}
		$("#diaryDiv").css("display","block");
		updateTotal();
	}
	if (ele.attr('name') == "submitted[will_you_need_photocopying_faxing_administrative_or_secretarial_support]")
	{
		if (ele.attr('id') == "edit-submitted-will-you-need-photocopying-faxing-administrative-or-secretarial-support-Yes")
		{
			$("#supportDiv").html("Office support services, including photocopying, faxing, laser printing, as well as secretarial and administrative support available. We can also bind your documents or manuals.  ");
		}
		else
		{
			$("#supportDiv").html("<strong>Option</strong>: Office support services, including photocopying, faxing, laser printing, as well as secretarial and administrative support available. We can also bind your documents or manuals.  ");
		}
		$("#supportDiv").css("display","block");
	}	
}


function updateTotal()
{
	totalCost = (callCost + commCost + meetCost+diarCost).toFixed(2);
	$("#totalWeeklyCost").value = totalCost;
	$("#total").html("<strong>Total Weekly Cost:</strong> $" + totalCost);
	if (callAddCost > 0)
	{
		$("#total").html("<strong>Total Weekly Cost:</strong> $" + totalCost + "<br /><strong>Additional Call Costs:</strong> $" + callAddCost.toFixed(2) + " / call<br /><br /><em>Pricing depends on actual usage therefore this is a best estimate only. Please contact us for accurate costs.</em>");
		$("#additionalCallCost").value = callAddCost.toFixed(2);
	}
	$("#total").css("display","block");
}
