$(function() {
    $('#slideshow').simpleslider({
		transition : 'fade', //slide, fade, cut
        easing : 'linear', //swing, linear
        direction : 'horizontal', //horizontal, veretical
        speed : 1500, //duration of the transition (in milliseconds)
        auto : true,
        interval : 6000, // Milliseconds between each animation, if Auto is set to TRUE.
        hoverPause : true, // When Auto is set to TRUE ...
        buttons : false,
        prevText  : 'Previous',
        nextText : 'Next',
        loop  : true	
	});
});

$(document).ready(function() {
  $("#fma-tagline-1").animate({
	left: '+=500'
  }, 1000, function() {
	$("#fma-tagline-2").animate({
		left: '-=500'
	  }, 1000, function() {
		// Animation Complete
	  });
  });
});

jQuery(document).ready(
	function() {
		$("a.more-testimonial").click(
			function() {
				$(this).hide();
				$(this).next().fadeIn("fast");
				$(this).next().next().show();
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("a.less-testimonial").click(
			function() {
				$(this).hide();
				$(this).prev().hide();
				$(this).prev().prev().show();
			}
		);
	}
);

$(document).ready(function() {

	$("a[rel=gallery]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'overlayShow'		: true,
		'overlayColor'		: '#000',
		'overlayOpacity'	: 0.5,
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

});


// SAMPLE CODE -------------------------------------------------------------

/*
$(document).ready(function() {
	$("#mask_hide").click(function() {
	  $(this).hide();
	  $("#mask").animate({
		top: '-=370'
	  }, 1000, function() {
		// Animation Complete
	  });
	});
	$("#mask_show").click(function() {
	  $("#mask").animate({
		top: '+=370'
	  }, 1000, function() {
		$("#mask_hide").show();
	  });
	});
});

jQuery(document).ready(
	function() {
		$('ul#mainmenu li').hover(
			function() {
				$(this).find("div.positioner").fadeIn("fast");
			},
			function () {
				$(this).find("div.positioner").hide();
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("ul#needsmenu a").click(
			function() {
				$("div.dropdown").slideUp("fast");
				$("ul#needsmenu a").attr("class", "");
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("ul#mainmenu li#about_li").hover(
			function() {
				$("a#about").css({"background-position" : "0px -86px"});
			},
			function () {
				if($("a#about").attr("class") == "mainbutton current") {
					$("a#about").css({"background-position" : "0px -43px"});
				}
				else if($("a#about").attr("class") != "mainbutton current") {
					$("a#about").css({"background-position" : "0px 0px"});

				};
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("ul#mainmenu li#process_li").hover(
			function() {
				$("a#process").css({"background-position" : "-86px -86px"});
			},
			function () {
				if($("a#process").attr("class") == "mainbutton current") {
					$("a#process").css({"background-position" : "-86px -43px"});
				}
				else if($("a#process").attr("class") != "mainbutton current") {
					$("a#process").css({"background-position" : "-86px 0px"});

				};
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("ul#needsmenu a#security_a").click(
			function() {
				$(this).attr("class", "current");
				$("div#needs").find("div#security").slideDown("fast");
			}
		);
	}
);

jQuery(document).ready(
	function() {
		$("a.year").click(
			function() {
				$(this).next().toggle("fast");
			}
		);
	}
);
*/
