1 /* some code to highlight the current trick and to switch between different tricks */
2 /* which trick is currently highlighted*/
5 /* do the higlighting */
8 for(i=0;i<14;i++){ $("#trick"+i).hide(); $("#tricks"+i).removeClass('active'); }
9 $("#trick"+num).css('display', 'block');
10 $("#tricks"+num).addClass('active');
13 if(document.getElementById("tricks0"))
18 if(document.getElementById("tricks13"))
24 $("#prevtr").addClass('disabled');
26 $("#prevtr").removeClass('disabled');
28 $("#nexttr").addClass('disabled');
30 $("#nexttr").removeClass('disabled');
34 /* highlight the last trick, useful when a page is called the first time*/
36 if(document.getElementById){
39 if(document.getElementById("trick"+i))
49 /* highlight the next trick */
52 if(document.getElementById("trick"+(current+1)))
56 /* highlight the previous trick */
59 if(document.getElementById("trick"+(current-1)))
63 /* check for swipes */
67 /* advance trick according to swipe direction */
70 if ((down_x - up_x) > 50) { hl_prev(); }
71 if ((up_x - down_x) > 50) { hl_next(); }
78 $("#ScoreTable").tablesorter({ widgets: ['zebra']});
80 $(".gameshidesession").click( function () {
81 $(this).parent().children(".gamessession").hide(300);
82 $(this).parent().children(".gamesshowsession").show();
86 $(".gamesshowsession").click( function () {
87 $(this).parent().children(".gamessession").show(300);
88 $(this).parent().children(".gameshidesession").show();
92 $(".gameshowall").click( function () {
93 $(".gamessession").show(300);
94 $(".gamesshowsession").hide();
95 $(".gameshidesession").show();
97 $(".gamehideall").click( function () {
98 $(".gamessession").hide(300);
99 $(".gamesshowsession").show();
100 $(".gameshidesession").hide();
103 $(".message div div").parent().click ( function() { $(this).hide(); });
105 /* look for swipes left/right */
106 $("div.table").mousedown(function(e){
109 $("div.table").mouseup(function(e){
113 $("div.table").bind('touchstart', function(e){
114 down_x = e.originalEvent.touches[0].pageX;
116 $("div.table").bind('touchmove', function(e){
117 up_x = e.originalEvent.touches[0].pageX;
119 $("div.table").bind('touchend', function(e){