$(document).ready(function() {
	$('a.iframe').fancybox({
		'frameHeight': $(window).height() - 100, 'frameWidth': $(window).width() - 100
	});
	$('a[rel^="fancybox"]').fancybox();
	$('a[rel^="fancybox-m"]').fancybox({
		'frameHeight':180, 'frameWidth':530,
		'hideOnContentClick':false, 'hideOnOverlayClick':false,
		'callbackOnShow': function() { $('#fancy_right').hide(); $('#fancy_left').hide(); }
	});
	$('a[rel^="fancybox-noarrow"]').fancybox({
		'callbackOnShow': function() { $('#fancy_right').hide(); $('#fancy_left').hide(); }
	});
	$('.link, .list a, .pages a').hover(
		function() { $(this).animate({ backgroundColor:'#a80f2e' }, 100) },
		function() { $(this).animate({ backgroundColor:'#750a20' }, 500) }
	);
	$('a[rel^="top"]').click(function() { $('html, body').animate({ scrollTop: $('#top').offset().top }, 'slow'); return false; });
	$('div#install, div#faqs').hide();
	$('a[rel^="install"]').click(function() {
		if($('#install:first').is(':hidden')) {
			$('#install').show('slow');
			$('#faqs').hide('slow');
			$('html, body').animate({ scrollTop: $('#install').offset().top }, 1500);
		}
		else {
			$('#install').hide('slow');
		}
		return false;
	});
	$('a[rel^="faqs"]').click(function() {
		if($('#faqs:first').is(':hidden')) {
			$('#faqs').show('slow');
			$('#install').hide('slow');
			$('html, body').animate({ scrollTop: $('#faqs').offset().top }, 1500);
		}
		else {
			$('#faqs').hide('slow');
		}
		return false;
	});
});