$(document).ready(function() {
	$('#s3slider').s3Slider({
		timeOut: 7000 
	});
});

jQuery(function($) {
	var slide = false;
	var height = $('#footer_content').height();
	$('#footer_button').click(function() {
		var docHeight = $(document).height();
		var windowHeight = $(window).height();
		var scrollPos = docHeight - windowHeight + height;
		$('#footer_content').animate({ height: "toggle"}, 1000);
		if(slide == false) {
			if($.browser.opera) {
				$('html').animate({scrollTop: scrollPos+'px'}, 1000);
			} else {
				$('html, body').animate({scrollTop: scrollPos+'px'}, 1000);
			}
			slide = true;
		} else {
			slide = false;
		}
	});
});

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('#attr a').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(250, 1);
		} else {
			fade.fadeIn(250);
		}
	}, function () {
		var fade = $('> .hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(250, 0);
		} else {
			fade.fadeOut(250);
		}
	});
 
	// get rid of the text
	$('#attr a > .hover').empty();
})

$(function() {
	$('#attr a').tipsy(
	{
		gravity: 's', // nw | n | ne | w | e | sw | s | se
		fade: true
	}); 
});

