
///////////////////////
// SmoothMenu
///////////////////////
jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
};

function mainmenu(){
$(" #primary-nav ul ").css({display: "none"}); // Opera Fix
$(" #primary-nav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400); //.slideFadeToggle(500); //.fadeIn(600); //.slideDown(500); // show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}

///////////////////////
// font resize
//http://www.shopdev.co.uk/blog/text-resizing-with-jquery/
///////////////////////
function fontresize(){
   // Reset Font Size
   var originalFontSize = $('html').css('font-size');
   $(".resetFont").click(function(){
      $('html').css('font-size', originalFontSize);
      return false;
   });
  // Increase Font Size
   $(".increaseFont").click(function(){
      var currentFontSize = $('html').css('font-size');
      var currentFontSizeNum = parseFloat(currentFontSize, 10);
      var newFontSize = currentFontSizeNum*1.2;
    $('html').css('font-size', newFontSize);
      return false;
   });
   // Decrease Font Size
   $(".decreaseFont").click(function(){
      var currentFontSize = $('html').css('font-size');
      var currentFontSizeNum = parseFloat(currentFontSize, 10);
      var newFontSize = currentFontSizeNum*0.8;
      $('html').css('font-size', newFontSize);
      return false;
   });
}

///////////////////////
// jquery.cycle.lite
///////////////////////
function cycleLite() {
    $('#promo_home').cycle({
        delay: 3000,
        timeout: 10000,
        speed: 3000
    });
}

///////////////////////
// tell-a-friend toggle
///////////////////////
function tellafriend() {
   $('#toggleit').click( function() {
       $('div#tellafriend').toggle();
       return false;
  });
   $('#closeit').click( function() {
       $('div#tellafriend').toggle();
       return false;
  });
}

///////////////////////
// document->ready
///////////////////////
 $(document).ready(function(){
   mainmenu();
   cycleLite();
   fontresize();
   tellafriend();
});


 


