$(document).ready(function(){
	/* BIG BUTTON ANIMATION */
	$('a.bigbutton').mouseenter(function(){
		$(this).stop(true, false).animate({ backgroundColor: "#98b73c", marginLeft: "7px", marginRight: "0px" }, 200)
	})
	$('a.bigbutton').mouseleave(function(){
			$(this).stop(true, true).animate({ backgroundColor: "#8aa43c", marginLeft: "0px", marginRight: "7px" }, 100, fix);
			function fix() {
				if ($('a.bigbutton').mouseleave) {
					$(this).animate({ backgroundColor: "#8aa43c" }, "fast")
				}
			}
	})
	/* COPYRIGHTS OPACITY */
	$('#copyrights').mouseenter(function(){
		$(this).removeClass("op40").addClass("op70");
	})
	$('#copyrights').mouseleave(function(){
		$(this).removeClass("op70").addClass("op40");
	})
	// ANIMATED TOOLTIPS
	$(".tooltip").mouseenter(function(){
		var tt_title = $(this).attr("title");
		if (tt_title) {
			var tt_id = 'tt_id' + Math.floor(Math.random()*999);
			$(this).attr('title','');
			$("body").append('<div id="' + tt_id + '" class="tt_wrap"><div class="ttbox"><span>' + tt_title + '</span></div></div>');
			offset = $(this).offset();
			width = $(this).outerWidth() / 2;
			tt_left = offset.left - 90 + width;
			tt_top = offset.top - 250;
			tt_wrap_id = '#' + tt_id;
			var tt_box_id = tt_wrap_id + '> div';
			$(tt_wrap_id).css({left: tt_left, top: tt_top});
			$(tt_box_id).css({bottom:15, opacity:0}).animate({bottom:5, opacity:1}, 300);
		}
		$(this).mouseleave(function(){
			$(tt_box_id).stop().animate({bottom:30, opacity:0}, 300, rem);
				function rem() {
					$(this).parent().remove();
				}
			$(this).attr('title',tt_title);
		})
	})
});

