10 $.fn.hoverClass = function(c) {
11 return this.each(function(){
13 function() { $(this).addClass(c); },
14 function() { $(this).removeClass(c); }
19 function init_menus() {
21 function(){ $("ul", this).fadeIn("fast"); },
25 $("#menu li").hoverClass("sfHover");
28 function init_checkboxes() {
29 $(".checkbox").change(function(){
30 if($(this).is(":checked")){
31 $(this).next("label").addClass("checkbox-selected");
33 $(this).next("label").removeClass("checkbox-selected");
37 function init_radiobuttons() {
38 $(".radio").change(function(){
39 if($(this).is(":checked")){
40 $(".radio-selected:not(:checked)").removeClass("radio-selected");
41 $(this).next("label").addClass("radio-selected");
45 function init_datatables() {
46 /* lazy test to see if exists,
47 * setup proper routing in document ready */
48 if ($("#sidebar table").length) {
49 $("#sidebar table").dataTable({
51 "bLengthChange": false,
58 if ($("#recent-games").length) {
59 $("#recent-games").dataTable({
61 "bLengthChange": false,
71 if ($("table.scoreboard").length) {
72 $("table.scoreboard").dataTable({
74 "bLengthChange": false,
81 if ($("table.accuracy").length) {
82 $("table.accuracy").dataTable({
84 "bLengthChange": false,
91 if ($(".recent_game_box").length) {
92 $("").colorbox({width:"80%", height:"80%", iframe:true});
94 //$("#recent-games_filter input").attr("placeholder","filter names");