1
// Javascript written by Tyler Mulligan
2
// http://www.detrition.net
5
Shadowbox.loadSkin('classic', '/js/skin'); // use the "classic" skin
7
$(document).ready(function() {
11
if (window.location.hash!="#how_to_install") {
12
$('#how_to_install .info_content').hide();
13
$('#how_to_install .info_content p').hide();
14
$('#how_to_install .info_content code').hide();
15
$('#how_to_install .info_header h2 a').text("Click here to learn how to install games from PlayDeb");
17
// Cookie to determine showing of info
19
// If the cookie is set, hide the welcome messages
20
if($.cookie('pd_how_to_install')=='true') {
21
$('#how_to_install').hide();
22
$('#hide_install').hide();
23
// Null or the user wants to see it again
24
} else if ($.cookie('pd_to_install')=='false') {
32
function(){ $('ul', this).fadeIn('fast'); },
36
$('#genre li').hoverClass ('sfHover');
43
handleUnsupported: 'remove',
47
Shadowbox.init(options);
50
$('.the_stars :radio.star').rating();
54
$('.add_new_tag').click(function () {
55
$(this).parent().children('.add_tag').fadeIn();
58
$('.add_tag_submit').click(function () {
59
//$(this).parent('.tags_container').children('.tags').fadeOut();
60
$(this).parent().parent('.tags_container').children('.tags').fadeOut();
61
$(this).parent().fadeOut();
62
// Database requery - then:
63
var newtag = $(this).parent().children('.add_tag_box').val()
64
if (newtag=="") { newtag="new tag!" }
65
$(this).parent().parent('.tags_container').children('.tags').append(", " + newtag );
66
$(this).parent().parent('.tags_container').children('.tags').fadeIn();
69
// User Action Click Cookie
70
$("#hide_install").click(function(e){
71
// Kept incase of future changes
72
/* if($.cookie('pd_to_install')=='true') {
74
} else if ($.cookie('pd_to_install')==null || $.cookie('pd_to_install')=='false') {
77
hide_info("#how_to_install");
83
$.fn.hoverClass = function(c) {
84
return this.each(function(){
86
function() { $(this).addClass(c); },
87
function() { $(this).removeClass(c); }
92
// Vertically-center thumbnails
93
$(window).load(function(){
94
$('.game .thumb').each(function(){
95
var imageheight = $(this).height();
96
var margin = (209-imageheight)/2;
97
$(this).css('margin-top',margin-5); // -5 because there's 5px to the top