$(document).ready(function () {	cycleFocus();	setActivePage();	if($('body.gallery').length > 0){		$('#photoGallery a').lightBox();	}});function isHomePage(){	if($("body.home").length > 0){		return true;	}	else{		return false;	}}function setActivePage(){  if(!isHomePage()){		$("#mainNav a#mainLink_"+$("body").attr("class")).addClass('active');	}}function cycleFocus(){	if(isHomePage()){		// redefine Cycle's updateActivePagerLink function 		$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 			$(pager).find('a').removeClass('active') 				.filter('a:eq('+currSlideIndex+')').addClass('active'); 		}; 			$('#focusImage').cycle({				// fx:     'fade',				speed:  600,				speedOut: 1,				speedIn: 599,				timeout: 4000,				pager:  '#focusNav',				pagerAnchorBuilder: function(idx, slide) {					return '<a id="box'+eval(idx+1)+'" href="'+slide+'"><img src="images/homeMenuText_'+eval(idx+1)+'.gif" /></a>'; 				},				pagerEvent: 'mouseover',				pauseOnPagerHover: true,				clickEnabled: true,				before: function() { if (window.console) console.log(this.src);			 }		});	}	else{ // Inside pages		// redefine Cycle's updateActivePagerLink function 		$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 				$(pager).find('img').removeClass('active') 						.filter('img:eq('+currSlideIndex+')').addClass('active'); 		}; 		$('#focusImage').cycle({//						fx:     'fade',// startingSlide: 4,// delay: -4000,				speed:  600,				speedOut: 1,				speedIn: 599,				timeout: 4000,				pager:  '#focusPager',				pagerAnchorBuilder: function(idx, slide) {					return '<img src="images/spacer.gif" />'; 				},				before: function() { if (window.console) console.log(this.src);			 }		});				$("#focusPager img").each(function(n){			thisClass = (n==0) ? 'pagerBox active' : 'pagerBox';			$(this)				.attr("id","box"+eval(n+1))				.attr("class",thisClass)				.hover(					function(){						$(this).css("borderColor" , "#685C53");					},					function(){						$(this).css("borderColor" , "#fff");					}				);					});		$("#box1").addClass('active');	}}