summaryrefslogtreecommitdiffstats
path: root/webroot/js/functions.js
blob: 5f7d7ae29fa3440c3a0b5102570b3167f9fd8094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
jQuery(document).ready(function($) {
	var login = $("a[href='/login']");
	login.attr('href', '#login');
	login.fancybox();

	$('.tooltip').tipsy({fade: true});
	$('.tooltip.north').tipsy({fade: true, gravity: 's'});
	$('.tooltip.east').tipsy({fade: true, gravity: 'w'});
	$('.tooltip.west').tipsy({fade: true, gravity: 'e'});
	$('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'});

	setTimeout(function() {
		$('.flash-message').fadeOut('slow', function () {
			$('.flash-message').remove();
		});
	}, 2000);
});

function toggleCast() {
	var table = $('#cast table');
	if (table.css('display') == 'block') {
		table.css('display', 'none');
		$('#cast > p > a').text('Cast ↓');
		$('#castlink').css('display', 'none');
	} else {
		table.css('display', 'block');
		$('#cast > p > a').text('Cast ↑');
		$('#castlink').css('display', 'block');
	}
	return false;
}