// Runs this code when the DOM is ready to be manipulated
$(document).ready(function ()
{
	//Setup productFinder
	var products = 
	{
		0:
		{
			name:"Emdeon Office",
			desc:"Emdeon Office utilizes the power of the internet to enable healthcare providers to conduct everyday transactions more easily, more efficiently, more accurately, and less expensively than ever before.",
			url:"/office"
		},
		1:
		{
			name:"Emdeon Assistant",
			desc:"Emdeon Assistant is the choice for providers interested in automating workflows and simplifying access to critical patient registration information, saving staff-time and resources.",
			url:"/assistant"
		},
		2:
		{
			name:"Emdeon Application and Imaging Manager",
			desc:"Emdeon Application & Imaging Manger helps streamline and accelerate the Medicaid application process and provides efficient tools to ensure applications are accurate from the beginning.",
			url:"/imaging"
		},
		3:
		{
			name:"Emdeon Revenue & Reimbursement Analytics",
			desc:"Emdeon Revenue and Reimbursement Analytics deliver automated batch screenings of patient account information so providers capture more revenue both before and after patient visits.",
			url:"/reimbursement"
		},
		4:
		{
			name:"Emdeon Point-Of-Service",
			desc:"The Emdeon POS (Point-of-Service) terminals are easy to use for patient eligibility verification and are ideal for front-end locations such as registration areas, emergency rooms, admitting, and other areas where space is a consideration.",
			url:"/pos"
		},
		5:
		{
			name:"Emdeon Clinician",
			desc:"Emdeon Clinician simplifies clinical ordering, reporting and document distribution with hospitals and labs through one communication solution.  Advanced reporting tools, such as historical trending, improve patient evaluation and education, making Clinician a compelling choice for providers.",
			url:"/clinician"
		},
		6:
		{
			name:"Emdeon Claim Master",
			desc:"Emdeon Claim Master, a web-based billing management solution, can save time and money by providing one interface for managing claims for virtually all government and commercial payers from start to finish.",
			url:"/claimmaster"
		},
		7:
		{
			name:"Emdeon Denial Manager",
			desc:"Denial Manager enables providers to streamline the denial management process by determining root causes, patterns and process breakdowns responsible for denials and establish corrective steps to prevent future revenue loss or delay.",
			url:"/denialmanager"
		},
		8:
		{
			name:"Emdeon Payment Manager",
			desc:"Emdeon Payment Manager is an electronic payment and reconciliation solution that increases visibility of remittance data and facilitates the electronic transfer of funds from the largest payer network in the industry.",
			url:"/paymentmanager"
		},
		9:
		{
			name:"Emdeon AccuPost",
			desc:"Emdeon AccuPost accelerates the revenue cycle by automatically posting payments for virtually any payer that provides electronic payment files. Its flexible, automated features make it an ideal solution for hospitals and large physician practices with high transaction volumes. ",
			url:"/accupost"
		},
		10:
		{
			name:"Emdeon Medicare Manager",
			desc:"Emdeon Medicare Manager / DDE Plus simplifies claims management for Medicare Part A providers. Its effectiveness stems from the ability to view, prioritize, and sort claims by numerous methods and easily move directly to claims within the DDE system for easy correction.",
			url:"/medicaremanager"
		},
		11:
		{
			name:"Emdeon Patient Connect",
			desc:"Emdeon Patient Connect delivers comprehensive billing and payment solutions that enable providers to automate the patient payment process.",
			url:"/patientconnect"
		},
		12:
		{
			name:"Emdeon Return Mail Manager",
			desc:"Emdeon uses NCOALink technology licensed by the United States Postal Service, to search all address changes filed with the USPS within the last eighteen months. This service prevents re-mailing to incorrect addresses, reduces undeliverable mail by using the most current address information available from the USPS and speeds collections.",
			url:"/returnmail"
		},
		13:
		{
			name:"Emdeon Patient Pay Online",
			desc:"Emdeon Patient Pay Online is a self-service patient application that provides comprehensive and secure online billing and payment management. Emdeon Patient Pay Online will yield faster collection of patient-owed amounts, improved cash flow, and reduced billing costs, all with less effort and paperwork.",
			url:"/patientpayonline"
		},
		14:
		{
			name:"Emdeon eCashiering",
			desc:"Emdeon eCashiering provides an integrated view of all patient payment activity and web-based access to the entire patient account enabling real-time processing of all credit card, check card, and ACH transactions.",
			url:"/ecashiering"
		},
		15:
		{
			name:"Emdeon Document Archive",
			desc:"Emdeon Document Archive streamlines your patient response time, reduces file maintenance and saves space. Through Emdeon Document Archive’s 24/7 desktop file retrieval and viewing capabilities, you will easily see statements and documents online that mirror those sent to your patients.",
			url:"/documentarchive"
		},
		16:
		{
			name:"Emdeon Electronic Lockbox Services",
			desc:"Emdeon's electronic payment processing capabilities dramatically improve billing efficiencies. With Emdeon Electronic Lockbox Services, your staff no longer wastes time sorting mail, opening and posting payments, creating deposit tickets or making bank deposits.",
			url:"/patientlockbox"
		},
		17:
		{
			name:"Emdeon Patient Communications",
			desc:"Through Emdeon Patient Communications, Emdeon offers custom statement explanation inserts that can be used either when a client has recently started using a new statement format or when current Emdeon statement formats have changed. ",
			url:"/patientcommunications"
		}
	}
	var questions =
	{
		0:
		{
			text:"I want help with (check all that apply):",
			type:"checkbox",
			isDriller:false,
			answers:
			{
				0:"Eligibility checking, referral processing, or claim status inquiry",
				1:"Claim submission and claim tracking",
				2:"Patient billing and payment",
				3:"Electronic Funds Transfer (EFT)",
				4:"Electronic Remittance Advice (ERA)",
				5:"Secondary claims submission",
				6:"Managing denied claims",
				7:"Automating clinical orders and results delivery for Laboratory, Radiology, and other clinical departments",
				8:"Interfacing with multiple EMR/I systems used in my community",
				9:"Automated posting",
				10:"Managing Medicare Part A claims and DDE access",
				11:"Managing financial program inventory"
			},
			productMatrix:
			{
				 0:[1,1,0,1,1, 0, 0,0,0,0,0, 0,0,0,0,0,0,0],
				 1:[1,0,0,0,0, 0, 1,0,0,0,0, 0,0,0,0,0,0,0],
				 2:[0,0,0,0,0, 0, 0,0,0,0,0, 1,0,0,0,0,0,0],
				 3:[0,0,0,0,0, 0, 0,1,1,0,0, 0,0,0,0,0,0,0],
				 4:[0,0,0,0,0, 0, 0,1,1,1,0, 0,0,0,0,0,0,0],
				 5:[1,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0],
				 6:[1,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0],
				 7:[0,0,0,0,0, 1, 0,0,0,0,0, 0,0,0,0,0,0,0],
				 8:[0,0,0,0,0, 1, 0,0,0,0,0, 0,0,0,0,0,0,0],
				 9:[0,0,0,0,0, 0, 0,0,0,1,0, 0,0,0,0,0,0,0],
				10:[0,0,0,0,0, 0, 0,0,0,0,1, 0,0,0,0,0,0,0],
				11:[0,0,1,0,0, 0, 0,0,0,0,0, 0,0,0,0,0,0,0]
			},
			applicability:[1,1,1,1,1, 1, 1,1,1,1,1, 1,1,1,1,1,1,1]
		},
		1:
		{
			text:"How many providers are in your office?",
			type:"radio",
			isDriller:true,
			answers:
			{
				0:"1-15",
				1:"16+",
				2:"Does Not Apply"
			},
			productMatrix:
			{
				0:[1,0,0,0,1, 0, 0,0,1,0,0, 1,1,1,1,1,1,1],
				1:[0,1,1,1,0, 0, 1,1,1,1,1, 1,1,1,1,1,1,1],
				2:[0,1,1,1,0, 0, 1,1,1,1,1, 1,1,1,1,1,1,1]
			},
			applicability:[1,1,1,1,1, 0, 1,1,1,1,1, 1,1,1,1,1,1,1]
		},
		2:
		{
			text:"Which claim types do you submit?",
			type:"radio",
			isDriller:true,
			answers:
			{
				0:"HCFA 1500s only",
				1:"UB92s only",
				2:"HCFA 1500s and UB92s"
			},
			productMatrix:
			{
				0:[1,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0],
				1:[0,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0],
				2:[0,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0]
			},
			applicability:[1,0,0,0,0, 0, 1,1,1,0,0, 0,0,0,0,0,0,0]
		},
		3:
		{
			text:"Do you or does your facility have internet access?",
			type:"radio",
			isDriller:true,
			answers:
			{
				0:"Yes",
				1:"No"
			},
			productMatrix:
			{
				0:[1,1,1,1,0, 1, 1,1,1,1,1, 1,1,1,1,1,1,1],
				1:[0,0,0,0,1, 0, 0,0,0,0,0, 0,0,0,0,0,0,0]
			},
			applicability:[1,1,1,1,1, 1, 1,1,1,1,1, 1,1,1,1,1,1,1]
		}
	};	
	var contactUrl = "/contactform/index.php"; //"/ProviderSolutions/product_finder_contact2.php";
	// Start Product Finder v2.0
	$('#productFinder').productFinder(products, questions, contactUrl);
	// Content swapping
	$('.sub-content .left .chunk:nth-child(1)').show();
	$('.sub-content .right a:nth-child(1)').addClass('active');
	$('.sub-content .right a').each(function(i)
	{
		$(this).click(function()
		{
			$('.sub-content .right a').removeClass('active');
			$(this).addClass('active');
			$('.sub-content .left .chunk').hide();
			$('.sub-content .left .chunk:nth-child('+(i+2)+')').show();
		});
	});
	//
	$('.content .right .slide:nth-child(1)').show();
	$('.content .right #slideButtons a:nth-child(1)').addClass('active');
	$('.content .right #slideButtons a').each(function(i)
	{
		$(this).click(function()
		{
			$('.content .right #slideButtons a').removeClass('active');
			$(this).addClass('active');
			$('.content .right .slide').hide();
			$('.content .right .slide:nth-child('+(i+3)+')').show();
		});
	});
	// Jump Menu
	$('#findProductByExpertise').change(function()
	{
		$("#findProductByExpertise option:selected").each(function () 
		{
        	window.location = $(this).val();
        });
	});
	$('#findProductByType').change(function()
	{
		$("#findProductByType option:selected").each(function () 
		{
        	window.location = $(this).val();
        });
	});
	$('#findProductByName').change(function()
	{
		$("#findProductByName option:selected").each(function () 
		{
        	window.location = $(this).val();
        });
	});
});
// Run this code after all the images are ready	
$(window).load(function(){});
function rotate(transition, slideNum)
{
	if(slideNum >=3)
	{
		slideNum = 1;
	}
	else
	{
		slideNum++;
	}
	$('.content .right #slideButtons a').removeClass('active');
	$('.content .right #slideButtons a:nth-child('+slideNum+')').addClass('active');
	$('.content .right .slide').hide();
	$('.content .right .slide:nth-child('+(slideNum+2)+')').show();
	setTimeout("rotate("+transition+", "+slideNum+")",transition);
}
rotate(10000, 0);