// JavaScript Document
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

$(document).ready(function() {
	MM_preloadImages('images/Nav/NavCareersOff.gif',
					 'images/Nav/NavFindOff.gif',
					 'images/Nav/NavFindOn.gif',
					 'images/Nav/NavHistoryOff.gif',
					 'images/Nav/NavHistoryOn.gif',
					 'images/Nav/NavHomeOff.gif',
					 'images/Nav/NavHomeOn.gif',
					 'images/Nav/NavPeopleOff.gif',
					 'images/Nav/NavPeopleOn.gif',
					 'images/Nav/NavCareersOn.gif',
 					 'images/Kicker/KickerCareersOff.gif',
					 'images/Kicker/KickerCareersOn.gif',
					 'images/Kicker/KickerFindOff.gif',
					 'images/Kicker/KickerFindOn.gif',
					 'images/Kicker/KickerHistoryOff.gif',
					 'images/Kicker/KickerHistoryOn.gif',
					 'images/Kicker/KickerHomeOn.gif',
					 'images/Kicker/KickerHomeOff.gif',
					 'images/Kicker/KickerPeopleOff.gif',
					 'images/Kicker/KickerPeopleOn.gif');
	// TODO : FINISH PRELOADER!

});





function initFitHovers()
{
	MM_preloadImages( 'images/Fit/FastPacedOn.gif',
					 'images/Fit/ChallengeOn.gif',
					 'images/Fit/CommunicatorOn.gif',
					 'images/Fit/PersonalityOn.gif',
					 'images/Fit/FitPersonalityMore.gif',
					 'images/Fit/FitPersonalitySearch.gif',
					 'images/Fit/FitCommunicatorMore.gif',
					 'images/Fit/FitCommunicatorSearch.gif',
					 'images/Fit/FitChallengeMore.gif',
					 'images/Fit/FitChallengeSearch.gif',
					 'images/Fit/FitFastPacedMore.gif',
					 'images/Fit/FitFastPacedSearch.gif');
	$('#FitPersonalityContainer').hover(
		function() {
			$('#FitPersonalityContent').css("display","block");
			$('#FitPersonalityContainer').css("background-image","url(images/Fit/PersonalityOn.gif)");			
		}, 
		function() {
			$('#FitPersonalityContent').css("display","none");
			$('#FitPersonalityContainer').css("background-image","url(images/Fit/PersonalityOff.gif)");						
		}
	);
	$('#FitCommunicatorContainer').hover(
		function() {
			$('#FitCommunicatorContent').css("display","block");
			$('#FitCommunicatorContainer').css("background-image","url(images/Fit/CommunicatorOn.gif)");			
	}, 
		function() {
			$('#FitCommunicatorContent').css("display","none");
			$('#FitCommunicatorContainer').css("background-image","url(images/Fit/CommunicatorOff.gif)");			
		}
	);
	$('#FitChallengeContainer').hover(
		function() {
			$('#FitChallengeContent').css("display","block");
			$('#FitChallengeContainer').css("background-image","url(images/Fit/ChallengeOn.gif)");
		}, 
		function() {
			$('#FitChallengeContent').css("display","none");
			$('#FitChallengeContainer').css("background-image","url(images/Fit/ChallengeOff.gif)");
		}
	);
	$('#FitFastPacedContainer').hover(
		function() {
			$('#FitFastPacedContent').css("display","block");
			$('#FitFastPacedContainer').css("background-image","url(images/Fit/FastPacedOn.gif)");
		}, 
		function() {
			$('#FitFastPacedContent').css("display","none");
			$('#FitFastPacedContainer').css("background-image","url(images/Fit/FastPacedOff.gif)");
		}
	);
	$('#TB_overlay').live('click',function(){self.parent.tb_remove();});
}


var Less1909 = "Ablan Leon opens a small store in the working class area of Welland Ontario... <a href='#' onclick='return Expand(\"1909\");'>more &raquo;</a>";
var Less1900 = "Immigration levels were steadily rising and many of these new Canadians had difficulty obtaining credit of any kind... <a href='#' onclick='return Expand(\"1900s\");'>more &raquo;</a>";
var LessDirections = "When Ablan's daughter was to be married, he decided to purchase the couple a mattress from a local department store... <a href='#' onclick='return Expand(\"Directions\");'>more &raquo;</a>";
var Less1942 = "Ablan Leon died and the operation of his now thriving business became the responsibility of his 11 children... <a href='#' onclick='return Expand(\"1942\");'>more &raquo;</a>";
var Less1973 = "Leon's opened the first warehouse showroom in all of Canada... <a href='#' onclick='return Expand(\"1973\");'>more &raquo;</a>";
var Less1980 = "The company saw a need for Leon's showrooms in smaller towns across Canada... <a href='#' onclick='return Expand(\"1980s\");'>more &raquo;</a>";
var LessToday = "Leon's Furniture Limited has grown to become one of Canada's most highly respected retailers... <a href='#' onclick='return Expand(\"Today\");'>more &raquo;</a>";
var More1909 = "Ablan Leon opens a small store in the working class area of Welland, Ontario selling merchandise such as pants, blankets, shoes, linens and other soft goods. His fair prices attract a growing list of customers who appreciate the honest, honourable and caring reputation the A. Leon Company establishes. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var More1900 = "Immigration levels were steadily rising and many of these new Canadians had difficulty obtaining credit of any kind. The A. Leon policy of providing credit to customers who were unable to receive it elsewhere allowed the store's reputation to grow and establish a wide base of loyal customers. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var MoreDirections = "When Ablan's daughter was to be married, he decided to purchase the couple a mattress from a local department store. When the mattress was delivered, it was leaned against the store's outside wall. Soon after, someone came into the store wanting to buy it. Because it wouldn't be needed immediately by his son, Ablan added a few dollars to his cost and sold the mattress. Considering that most of his sales provided only pennies in profit, he was amazed how much could be made on larger items. The rest, they say, is history. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var More1942 = "Ablan Leon died and the operation of his now thriving business became the responsibility of his 11 children. As sales grew additions were put on the store to accommodate a bigger selection of merchandise. It soon became apparent that in order to grow even further, the business had to expand to other centres. Stores soon began appearing throughout Southern Ontario, all bearing the Leon's name. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var More1973 = "Leon's opened the first warehouse showroom in all of Canada. This massive 150,000-square-foot building was the first example of \"big box\" retailing in the country. This bold new retail initiative was promoted heavily on television through a series of commercials, including one that used a helicopter to show off the immense size of the store. The buying public accepted this radical new approach with open arms and the company began erecting huge new showrooms across Canada. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var More1980 = "The company saw a need for Leon's showrooms in smaller towns across Canada. The business was consolidating to the point where smaller independent operators were finding it more and more difficult to compete with the larger retailers. Many of Leon's customers drove great distances to shop at the large metropolitan sites and expressed their wish of having a local Leon's in their area. The idea of Leon's franchise stores was born. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";
var MoreToday = "Today Leon's Furniture Limited has grown to become one of Canada's most highly respected retailers. Leon's consistent growth of sales and profit is the envy of other retailers across the land.<br /><br />Even with consistent growth, the Company has not lost sight of its beginnings or the reasons for its success. Leon's continues to sell high quality brand name furniture, appliances and electronics at guaranteed lowest prices. Leon's take great pride in its after sale service, and relies on the professionalism and support of thousands of associates across Canada. This team of associates is Leon's greatest asset. <a href='#' onclick='return ShrinkAll();'>&laquo; less </a>";


function Expand(Section)
{
	$("#History1909Content").html(Less1909); $("#History1909Content").css("background-color","");  
	$("#History1900sContent").html(Less1900); $("#History1900sContent").css("background-color","");   
	$("#HistoryDirectionsContent").html(LessDirections); $("#HistoryDirectionsContent").css("background-color","");  
	$("#History1942Content").html(Less1942); $("#History1942Content").css("background-color","");  
	$("#History1973Content").html(Less1973); $("#History1973Content").css("background-color","");  
	$("#History1980sContent").html(Less1980); $("#History1980sContent").css("background-color","");  
	$("#HistoryTodayContent").html(LessToday); $("#HistoryTodayContent").css("background-color","");
	if (Section == "1909") {  $("#History1909Content").html(More1909); $("#History1909Content").css("background-color","#E2E8F1"); } 
	if (Section == "1900s") { $("#History1900sContent").html(More1900); $("#History1900sContent").css("background-color","#E2E8F1");  } 
	if (Section == "Directions") { $("#HistoryDirectionsContent").html(MoreDirections); $("#HistoryDirectionsContent").css("background-color","#E2E8F1");  } 
	if (Section == "1942") { $("#History1942Content").html(More1942); $("#History1942Content").css("background-color","#E2E8F1");  } 
	if (Section == "1973") { $("#History1973Content").html(More1973); $("#History1973Content").css("background-color","#E2E8F1");  } 
	if (Section == "1980s") { $("#History1980sContent").html(More1980); $("#History1980sContent").css("background-color","#E2E8F1");  } 
	if (Section == "Today") { $("#HistoryTodayContent").html(MoreToday); $("#HistoryTodayContent").css("background-color","#E2E8F1");  } 
	return false;
}

function ShrinkAll()
{
	$("#History1909Content").html(Less1909); $("#History1909Content").css("background-color","");  
	$("#History1900sContent").html(Less1900); $("#History1900sContent").css("background-color","");   
	$("#HistoryDirectionsContent").html(LessDirections); $("#HistoryDirectionsContent").css("background-color","");  
	$("#History1942Content").html(Less1942); $("#History1942Content").css("background-color","");  
	$("#History1973Content").html(Less1973); $("#History1973Content").css("background-color","");  
	$("#History1980sContent").html(Less1980); $("#History1980sContent").css("background-color","");  
	$("#HistoryTodayContent").html(LessToday); $("#HistoryTodayContent").css("background-color","");
	return false;
}


var lessTestimonial1 = '"I love the structure of the company...  the room for growth and tremendous opportunities beyond management make me feel grateful each time I drive by one of our stores."<br /><a href="#" onclick="return ShowTestimonial(\'Testimonial1\');" >read more &raquo;</a>';
var lessTestimonial2 = '"Learning and training in each department gives me an understanding of the entire store... I know it will be big benefit when I finish the program."';
var lessTestimonial3 = '"Being paid on how much I deliver does it for me. That\'s a huge motivator."<br /><a href="#"  onclick="return ShowTestimonial(\'Testimonial3\');" >read more &raquo;</a>';
var lessTestimonial4 = '"The opportunity to work with different people, whether its customers, management or financing companies always keeps me interested and learning." <br /><a href="#"  onclick="return ShowTestimonial(\'Testimonial4\');" >read more &raquo;</a>';
var lessTestimonial5 = '"I love the challenge of working in Service. Finding solutions for our customers makes this position very enjoyable."<br /><a href="#" onclick="return ShowTestimonial(\'Testimonial5\');" >read more &raquo;</a>';
var lessTestimonial6 = '"It really is all about the interaction with the customers... the company is 100 years old which tells me something about how well it is run...and about the way they treat each associate...it really is a family company."<br /><a href="#"  onclick="return ShowTestimonial(\'Testimonial6\');" >read more &raquo;</a>';
var lessTestimonial7 = '"I have had the opportnity to work with associates country wide, especially here in the warehouse...there is plenty of room to grow and plenty of opportunities to learn new things."<br /><a href="#"  onclick="return ShowTestimonial(\'Testimonial7\');" >read more &raquo;</a>';

var moreTestimonial1 = '"I love the structure of the company...  the room for growth and tremendous opportunities beyond management make me feel grateful each time I drive by one of our stores."<br /><br />"The opportunity to run my own multi-million dollar store gives me an enormous sense of pride."<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
var moreTestimonial2 = '"Learning and training in each department gives me an understanding of the entire store... I know it will be big benefit when I finish the program."';
var moreTestimonial3 = '"Being paid on how much I deliver does it for me. That\'s a huge motivator."<br /><br />"I\'ve never been a 9-5 guy. I love being on the road and this job gives me that freedom."<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
var moreTestimonial4 = '"The opportunity to work with different people, whether its customers, management or financing companies always keeps me interested and learning." <br /><br />"The employee discounts make Leon\'s a great place to work."<br /><br />"Leon\'s is close to my home which makes it easy to work after school." (Part Time Employee)<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
var moreTestimonial5 = '"I love the challenge of working in Service. Finding solutions for our customers makes this position very enjoyable."<br /><br />"The opportunities for advancement and support of the managers."<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
var moreTestimonial6 = '"It really is all about the interaction with the customers... the company is 100 years old which tells me something about how well it is run...and about the way they treat each associate...it really is a family company."<br /><br />"Great communication with the Management team makes my job easy since we are all on the same team."<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
var moreTestimonial7 = '"I have had the opportunity to work with associates country wide, especially here in the warehouse...there is plenty of room to grow and plenty of opportunities to learn new things."<br /><br />"The opportunity to learn the business in various departments has helped me to grow...the environment makes it all the more worthwhile."<br /><a href="#" onclick="return ShowTestimonial(\'close\');">&laquo; less</a>';
function ShowTestimonial(Section)	
{
	$("#Testimonial1").html(lessTestimonial1); $("#Testimonial1").css("background-color","");  
	$("#Testimonial2").html(lessTestimonial2); $("#Testimonial2").css("background-color","");   
	$("#Testimonial3").html(lessTestimonial3); $("#Testimonial3").css("background-color","");  
	$("#Testimonial4").html(lessTestimonial4); $("#Testimonial4").css("background-color","");  
	$("#Testimonial5").html(lessTestimonial5); $("#Testimonial5").css("background-color","");  
	$("#Testimonial6").html(lessTestimonial6); $("#Testimonial6").css("background-color","");  
	$("#Testimonial7").html(lessTestimonial7); $("#Testimonial7").css("background-color","");
	if (Section == "Testimonial1") {  $("#Testimonial1").html(moreTestimonial1); $("#Testimonial1").css("background-color","#E2E8F1"); } 
	if (Section == "Testimonial2") { /* do nothing */ } 
	if (Section == "Testimonial3") { $("#Testimonial3").html(moreTestimonial3); $("#Testimonial3").css("background-color","#E2E8F1");  } 
	if (Section == "Testimonial4") { $("#Testimonial4").html(moreTestimonial4); $("#Testimonial4").css("background-color","#E2E8F1");  } 
	if (Section == "Testimonial5") { $("#Testimonial5").html(moreTestimonial5); $("#Testimonial5").css("background-color","#E2E8F1");  } 
	if (Section == "Testimonial6") { $("#Testimonial6").html(moreTestimonial6); $("#Testimonial6").css("background-color","#E2E8F1");  } 
	if (Section == "Testimonial7") { $("#Testimonial7").html(moreTestimonial7); $("#Testimonial7").css("background-color","#E2E8F1");  } 
	return false;


}

var AnalyticsArray=new Array();
function catchAnalyticEvent(args)
{
	var today       = new Date();
	var strYear     = today.getFullYear();
	var iMonth      = today.getMonth() + 1; // +1, we do NOT want zero-based month index
	var iDay		= today.getDate();
	var iHour		= today.getHours();
	var iMin		= today.getMinutes();
	var iSec		= today.getSeconds();
	//2008-07-08 22:45:03
	var Timestamp = strYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMin + ":" + iSec;
	AnalyticsArray.push(args + ","+Timestamp);
}
function uploadAnalytics()
{
	if (AnalyticsArray.length != 0)
	{
		var URL = "analytics.php"; 
		
		$.get(URL, {Analytics: $.toJSON(AnalyticsArray)}, function(x)
		{
			if (x.indexOf("ok") == -1) 	
			{
				alert("Analytics Update Failed!\n" + x);
			} 
		});	
	}
	AnalyticsArray.length=0;
}

function ok()
{
	// do nothing;
}

function Failed()
{
	// do nothing;
}


