
jQuery.noConflict();


/*
- - - - - - - - - -[ BEGIN - javascript counter logic
*/

// a function to increment our ticker
// this increment isn't accurate, but the starting number is.
// just a way to make the ticker look like it's working.
function count()
{
	// where to display our count
	var displayCounter = document.getElementById('counterSmall');

	// starting number
	var currentNumber =	parseFloat(displayCounter.innerHTML);
	displayCounter.innerHTML = currentNumber+1;
}



jQuery(window).load(function()
{


// number of jobs per day
	var numberOfJobs = 59900362;
// milliseconds per day day (86,400,000)
	var millisecondsPerDay = 1000*60*60*24;


	// start date - Date(year, month, day, hours, minutes, seconds, milliseconds)Month are 0-11 in JavaScript
	var startDate = new Date(2010, 0, 0);

	// todays date
	var today = new Date();

	// number of days since start date
	var numberOfDays = Math.ceil((today.getTime()-startDate.getTime())/(millisecondsPerDay));

	// number of milliseconds since start date
	var numOfMilliseconds = Math.ceil(today.getTime()-startDate.getTime());

	// jobs per milisecond
	var jobsPerMillisecond = numberOfJobs/millisecondsPerDay;

	// jobs to date by millisecond
	var jobsToDate = Math.ceil(jobsPerMillisecond*numOfMilliseconds);

	var smallDivToWrite = document.getElementById('counterSmall');
	smallDivToWrite.innerHTML=jobsToDate;

	var timer;
	timer = setInterval(count,100); /* 1000 = 1 sec. */
});
/*
- - - - - - - - - -[ END - javascript counter logic
*/







/*
BEGIN
- - - - - - - - - -[ BEGIN jQuery document ready
*/
jQuery(document).ready(function()
{









/*
- - - - - - - - - -[ BEGIN - counter pop-over trigger - requires jquery 1.3.2
*/
jQuery(".jsCounterSmallWrapper").click(function()
{
	jQuery("#counterPopUp").slideDown(350);
});

jQuery("#closeCounter").click(function()
{
	jQuery("#counterPopUp").slideUp(150);
});
/*
- - - - - - - - - -[ END - counter pop-over trigger - requires jquery 1.3.2
*/









/*
- - - - - - - - - -[ BEGIN - counter pop-over trigger animation - requires jquery 1.3.2
*/
var newsitems;
var curritem=0;
jQuery(document).ready(function(){
    newsitems = jQuery(".jsCounterSmall li").hide().size();
    jQuery(".jsCounterSmall li:eq("+curritem+")").show();
    setInterval(ticknews,4000); //time in milliseconds
});

function ticknews() {
    jQuery(".jsCounterSmall li:eq("+curritem+")").hide();
    curritem = ++curritem%newsitems;
    jQuery(".jsCounterSmall li:eq("+curritem+")").show();
}
/*
- - - - - - - - - -[ END - counter pop-over trigger animation - requires jquery 1.3.2
*/








// **********NOTE, THESE TIMERS ARE IN THE 1xx RANGE ***************
/*
- - - - - - - - - -[ BEGIN - timers - requires timer plugin
*/
// timers
	var navTimer101 = {};
	var navTimer102 = {};
	var navTimer103 = {};
/*
- - - - - - - - - -[ END - timers - requires timer plugin
*/


/*
- - - - - - - - - -[ BEGIN - index page callouts - requires jquery 1.3.2
*/
// REQUIRES A TIMER TO BE SET - SEE TIMERS ABOVE

// - - - - -Callout One
jQuery("#calloutOneTrigger").mouseover(function()
{
	jQuery.clearTimer(navTimer101);
	navTimer101 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanOne").slideDown(150);
	});
});

jQuery("#calloutOneTrigger").mouseout(function()
{
	jQuery.clearTimer(navTimer101);
	navTimer101 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanOne").slideUp(150);
	});
});

// - - - - -Callout Two
jQuery("#calloutTwoTrigger").mouseover(function()
{
	jQuery.clearTimer(navTimer102);
	navTimer102 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanTwo").slideDown(150);
	});
});

jQuery("#calloutTwoTrigger").mouseout(function()
{
	jQuery.clearTimer(navTimer102);
	navTimer102 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanTwo").slideUp(150);
	});
});

// Callout Three
jQuery("#calloutThreeTrigger").mouseover(function()
{
	jQuery.clearTimer(navTimer103);
	navTimer103 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanThree").slideDown(150);
	});
});


jQuery("#calloutThreeTrigger").mouseout(function()
{
	jQuery.clearTimer(navTimer103);
	navTimer103 = jQuery.timer(350,function() // Delay .35 second
	{
		jQuery("#calloutPanThree").slideUp(150);
	});
});
/*
- - - - - - - - - -[ END - index page callouts - requires jquery 1.3.2
*/









/*
- - - - - - - - - -[ BEGIN callout AJAX
*/
//5 reasons why
jQuery("#ajax1-1").click(function()
{
	jQuery("#calloutOneAjax").load("ajax/reason1.html");
});
jQuery("#ajax1-2").click(function()
{
	jQuery("#calloutOneAjax").load("ajax/reason2.html");
});
jQuery("#ajax1-3").click(function()
{
	jQuery("#calloutOneAjax").load("ajax/reason3.html");
});
jQuery("#ajax1-4").click(function()
{
	jQuery("#calloutOneAjax").load("ajax/reason4.html");
});
jQuery("#ajax1-5").click(function()
{
	jQuery("#calloutOneAjax").load("ajax/reason5.html");
});


// 6 ways to cut costs
jQuery("#ajax2-1").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost1.html");
});
jQuery("#ajax2-2").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost2.html");
});
jQuery("#ajax2-3").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost3.html");
});
jQuery("#ajax2-4").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost4.html");
});
jQuery("#ajax2-5").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost5.html");
});
jQuery("#ajax2-6").click(function()
{
	jQuery("#calloutTwoAjax").load("ajax/cutcost6.html");
});

// success stories
jQuery("#ajax3-1").click(function()
{
	jQuery("#calloutThreeAjax").load("ajax/success1.html");
});
jQuery("#ajax3-2").click(function()
{
	jQuery("#calloutThreeAjax").load("ajax/success2.html");
});
jQuery("#ajax3-3").click(function()
{
	jQuery("#calloutThreeAjax").load("ajax/success3.html");
});
/*
- - - - - - - - - -[ END callout AJAX
*/









/*
- - - - - - - - - -[ END jQuery document ready
*/
});
