function init()
{
	if (DropDownMenu && $('pulldown-menu')) 
	{
		var elementsMenu = new DropDownMenu($('pulldown-menu'));

		var pulldownMenu = $('pulldown-menu');
		var menuItems = pulldownMenu.getElementsByTagName('ul');
		for (var i=0; i<menuItems.length; i++)
		{
			menuItems[i].style.display = "block";
		}
	}
	
}

/*************************************************************************
  Declarations
*************************************************************************/

transclients = new Image();
transclients.src ="https://www.theauditor.com/stock/trans-clients.gif";
squareclients = new Image();
squareclients.src="https://www.theauditor.com/stock/clients-off.gif";
squareclientson = new Image();
squareclientson.src="https://www.theauditor.com/stock/clients-on.gif";

transservices = new Image();
transservices.src ="https://www.theauditor.com/stock/trans-services.gif";
squareservices = new Image();
squareservices.src="https://www.theauditor.com/stock/services-off.gif";
squareserviceson = new Image();
squareserviceson.src="https://www.theauditor.com/stock/services-on.gif";

transcompany = new Image();
transcompany.src ="https://www.theauditor.com/stock/trans-company.gif";
squarecompany = new Image();
squarecompany.src="https://www.theauditor.com/stock/company-off.gif";
squarecompanyon = new Image();
squarecompanyon.src="https://www.theauditor.com/stock/company-on.gif";

transfees = new Image();
transfees.src ="https://www.theauditor.com/stock/trans-fees.gif";
squarefees = new Image();
squarefees.src="https://www.theauditor.com/stock/fees-off.gif";
squarefeeson = new Image();
squarefeeson.src="https://www.theauditor.com/stock/fees-on.gif";

/*************************************************************************
  Functions
*************************************************************************/

function showtrans(section)
{
	var squiggles = document.getElementById("squiggles");
	var thisSquare = document.getElementById("square-" + section);
	thisSquare.src = "https://www.theauditor.com/stock/" + section + "-on.gif";
	squiggles.style.backgroundImage = "url('https://www.theauditor.com/stock/trans-" + section + ".gif')";
	activeTitle = document.getElementById("holder-" + section + "-title").innerHTML;
	activeTeaser = document.getElementById("holder-" + section + "-teaser").innerHTML;
	var sectionTitle = document.getElementById("section-title");
	var sectionTeaser = document.getElementById("section-teaser");
	sectionTitle.innerHTML = activeTitle;
	sectionTeaser.innerHTML = activeTeaser;
}

function returntrans(activesection, currentsection)
{
	var squiggles = document.getElementById("squiggles");
	var thisSquare = document.getElementById("square-" + activesection);
	thisSquare.src = "https://www.theauditor.com/stock/" + activesection + "-off.gif";
	squiggles.style.backgroundImage = "url('https://www.theauditor.com/stock/trans-" + currentsection + ".gif')";
	currentTitle = document.getElementById("holder-current-title").innerHTML;
	currentTeaser = document.getElementById("holder-current-teaser").innerHTML;
	var sectionTitle = document.getElementById("section-title");
	var sectionTeaser = document.getElementById("section-teaser");
	sectionTitle.innerHTML = currentTitle;
	sectionTeaser.innerHTML = currentTeaser;
}

/*************************************************************************
Pinball Effect
*************************************************************************/

var W3CDOM = (document.createElement && document.getElementsByTagName);
window.onload = pinballEffect;

function pinballEffect()
{
	if (!W3CDOM) return;
	var allElements = document.getElementsByTagName('*');
	var originalBackgrounds=new Array();
	for (var i=0; i<allElements.length; i++)
	{
		if (allElements[i].className.indexOf('pinball-scoop') !=-1)
		{
			allElements[i].onmouseover = mouseGoesOver;
			allElements[i].onmouseout = mouseGoesOut;
			allElements[i].onclick = mouseGoesClick;
		}
	}
}

function mouseGoesOver()
{
	originalClassNameString = this.className;
	this.className += " pinball-on";
	this.style.cursor = "pointer";
	this.style.cursor = "hand";

}

function mouseGoesOut()
{
	this.className = originalClassNameString;
}

function mouseGoesClick()
{
	var allThisAreasElements = this.getElementsByTagName('*');
	for (var j=0; j<allThisAreasElements.length; j++)
	{
		if (allThisAreasElements[j].className.indexOf('pinball-sinkhole') != -1)
		{
			var url = allThisAreasElements[j].href;
			window.location = url;
		}
	}
}

pinballEffect();

jQuery.noConflict();

jQuery(document).ready(function($)
{

	/*************
	Testimonials Cycle
	**************/
	
	$('#random-quote').cycle({
		fx: 'turnDown',
		easeIn:  'easeInOutExpo', 
	    easeOut: 'easeInOutExpo'
	});

});

// bless you the bees and the children