
$(document).ready(function(){

	$("a[rel=group]").fancybox({
		'padding'			: 5,
		'margin'			: 0,
		'overlayOpacity'	: 0.8,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	$("a.group").fancybox({
		'padding'			: 0,
		'margin'			: 0,
		'width'				: 900,
		'height'			: 460,
		'autoScale'			: false,
		'autoDimensions'	: false,
		'titleShow'			: false,
		'overlayOpacity'	: 0.8,
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade'
	});
	
	$("table#toplinks td.inactive").hover(
		function () {
			$(this).css("background-color","#4f7c39");
		}
	);

	$("table#toplinks td.inactive").mouseleave(
		function () {
			$(this).css("background-color","#84c341");
		}
	);

	$("#menu-about-us").hover(
		function () {
			$(this).css("background-color","#4f7c39");
			$("#sublinks-about-us").show();
		}
	);

	$("#menu-about-us.inactive").mouseleave(
		function () {
			$(this).css("background-color","#84c341");
			$("#sublinks-about-us").hide();
		}
	);

	$("#menu-about-us.active").mouseleave(
		function () {
			$("#sublinks-about-us").hide();
		}
	);

	$("#menu-products").hover(
		function () {
			$(this).css("background-color","#4f7c39");
			$("#sublinks-products").show();
		}
	);

	$("#menu-products.inactive").mouseleave(
		function () {
			$(this).css("background-color","#84c341");
			$("#sublinks-products").hide();
		}
	);

	$("#menu-products.active").mouseleave(
		function () {
			$("#sublinks-products").hide();
		}
	);

	$("#menu-services").hover(
		function () {
			$(this).css("background-color","#4f7c39");
			$("#sublinks-services").show();
		}
	);

	$("#menu-services.inactive").mouseleave(
		function () {
			$(this).css("background-color","#84c341");
			$("#sublinks-services").hide();
		}
	);

	$("#menu-services.active").mouseleave(
		function () {
			$("#sublinks-services").hide();
		}
	);

	$("table.sl-menu td").hover(
		function () {
			$(this).css("opacity","1");
		}
	);

	$("table.sl-menu td").mouseleave(
		function () {
			$(this).css("opacity","0.8");
		}
	);

});
