$(document).ready(function() {
    
    $(".social a[title]").tooltip({
       // tweak the position
       offset: [-10, 2]
    });
 
  $("body#homepage #featured-nav").tabs(".slides > div", {
  	// enable "cross-fading" effect
  	effect: 'fade',
  	fadeOutSpeed: "slow",
  	// start from the beginning after the last tab
  	rotate: true
  // use the slideshow plugin. It accepts its own configuration
  }).slideshow({ autoplay: true, interval: 5000, clickable: false, autopause:false});

  
  // making first-child and last-child pseudo css stuff work
  $(":first-child").addClass('first-child');
  $(":last-child").addClass('last-child');
  
  $(".news-ticker").scrollable({circular: true, vertical: true, easing: 'linear' }).navigator().autoscroll({
    interval: 5000		
  });
	
	$("#testimonials").tabs("#testimonials > div", {
  	// enable "cross-fading" effect
  	effect: 'fade',
  	fadeOutSpeed: "slow",
  	// start from the beginning after the last tab
  	rotate: true
  // use the slideshow plugin. It accepts its own configuration
  }).slideshow({ autoplay: true, interval: 5000, clickable: false, autopause:false});
  
  
  $("#contactForm").validator({ 
  	position: 'center left', 
  	offset: [-5, -230]
	});
	
	$("#contact-page-form").validator({ 
  	position: 'top left', 
  	offset: [-15, 58]
	});
	
	$("#cform").validator({ 
        position: 'top left', 
      	offset: [-10, 140]
   	});
	
	
	

$("#changeFont a").click(function() {
    $('#changeFont a.active').each(function() {
        $(this).removeClass("active");
    });
    $(this).addClass("active");
});
  
	
$(".increaseFont").click(function()
 {
    $('body .column-main').each(function() {
        $(this).css({
            'font-size': '16px',
            'line-height': '24px'
        });
    });
    $('body .column-main .column-right').each(function() {
        $(this).css({
            'font-size': '14px',
            'line-height': '22px'
        });
    });
});


$(".increaseFont2").click(function()
 {
    $('body .column-main').each(function() {
        $(this).css({
            'font-size': '20px',
            'line-height': '30px'
        });
    });
    $('body .column-main .column-right').each(function() {
        $(this).css({
            'font-size': '14px',
            'line-height': '22px'
        });
    });
});

	
  // Reset Font Size
  var originalFontSize = $('body .column-main').css('font-size');
  var originalLineHeight = $('body .column-main').css('line-height');
    $(".resetFont").click(function(){
    $('body .column-main').css('font-size', originalFontSize);
    $('body .column-main').css('line-height', originalLineHeight);
  });



  
});
