// JavaScript Document

$(document).ready(function(){
  // Navigation rollovers
  $("img.nav-image-living").hide();
  $("img.nav-image-calendar").hide();
  $("img.nav-image-home").hide();
  
  $("a.nav-living").mouseover(function()
  {
    $("img.nav-image-living").fadeIn(300);
	$("#wrapper-head ul a:not('a.nav-living')").css("color","rgb(144,83,33)");
  });
  $("a.nav-living").mouseout(function()
  {
    $("img.nav-image-living").fadeOut(300);
	$("#wrapper-head ul a:not('a.nav-living')").css("color","");
  });
  
  $("a.nav-calendar").mouseover(function()
  {
    $("img.nav-image-calendar").fadeIn(300);
	$("#wrapper-head ul a:not('a.nav-calendar')").css("color","rgb(144,83,33)");
  });
  $("a.nav-calendar").mouseout(function()
  {
    $("img.nav-image-calendar").fadeOut(300);
	$("#wrapper-head ul a:not('a.nav-calendar')").css("color","");
  });
  
  $("a.nav-home").mouseover(function()
  {
    $("img.nav-image-home").fadeIn(300);
	$("#wrapper-head ul a:not('a.nav-home')").css("color","rgb(144,83,33)");
  });
  $("a.nav-home").mouseout(function()
  {
    $("img.nav-image-home").fadeOut(300);
	$("#wrapper-head ul a:not('a.nav-home')").css("color","");
  });
  
  $("a.nav-findyourway").mouseover(function()
  {
	$("#wrapper-head ul a:not('a.nav-findyourway')").css("color","rgb(144,83,33)");
  });
  $("a.nav-findyourway").mouseout(function()
  {
	$("#wrapper-head ul a:not('a.nav-findyourway')").css("color","");
  });
  
  $("a.nav-questions").mouseover(function()
  {
	$("#wrapper-head ul a:not('a.nav-questions')").css("color","rgb(144,83,33)");
  });
  $("a.nav-questions").mouseout(function()
  {
	$("#wrapper-head ul a:not('a.nav-questions')").css("color","");
  });
  
  var originalFontSize = $('body').css('font-size');
    $(".resetFont").click(function(){
    $('body').css('font-size', originalFontSize);
	$('.increaseFont-img').attr("src","images/img-settext-lg-d.png");
	$('.resetFont-img').attr("src","images/img-settext-sm.png");
  });
  // Increase Font Size
  $("a.increaseFont").click(function(){
	$('.resetFont-img').attr("src","images/img-settext-sm-d.png");
	$('.increaseFont-img').attr("src","images/img-settext-lg.png");
    var currentFontSize = $('body').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*1.2;
    if ( newFontSize < 13 ) {
	$('body').css('font-size', newFontSize);
	}
    return false;
  });
  // Decrease Font Size
  /*$("a.decreaseFont").click(function(){
    var currentFontSize = $('body').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*0.8;
    $('body').css('font-size', newFontSize);
    return false;
  });*/
  
 /* $("#ticker").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible: 1,
		auto:5000,
		speed:1000
	});*/
  
  //remove comment to activate ticker
  //$('#ticker').cycle('fade');
  
  $('#slide-show').cycle('fade');

	
});
