jQuery( function($) {
	$(".game a.crossword").fancybox({
		'type'			: 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'		: 0,
		'width'			: 600,
		'height'		: 865,
		'titleShow'		: false
	});
	
	$(".game a.doublepuzzle").fancybox({
		'type'			: 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'		: 0,
		'width'			: 700,
		'height'		: 865,
		'titleShow'		: false
	});
	
	$(".game a.cryptogram").fancybox({
		'type'          : 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'       : 0,
		'width'			: 600,
		'height'		: 865,
		'titleShow'		: false
	});
	
	$(".game a.jumble").fancybox({
		'type'          : 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'       : 0,
		'width'			: 600,
		'height'		: 730,
		'titleShow'		: false
	});
	
	$(".game a.fallen").fancybox({
		'type'          : 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'       : 0,
		'width'			: 650,
		'height'		: 450,
		'titleShow'		: false
	});
	
	$(".game a.sliding").fancybox({
		'type'          : 'iframe',
		'scrolling'		: 'no',
		'autoDimensions': false,
		'autoScale'     : false,
		'padding'       : 0,
		'width'			: 470,
		'height'		: 650,
		'titleShow'		: false
	});
	
	$("a.wufoo-form").fancybox({
		'type'			: 'iframe',
		'width'			: 700,
		'height'		: 550,
		'titleShow'		: false,
		'padding'		: 0
	});
	
	$("a.answerquestion").fancybox({
		'type'			: 'iframe',
		'width'			: 420,
		'height'		: 420,
		'titleShow'		: false
	});
	
	$('a.fancybox').fancybox({
		'autoDimensions': false,
		'width': 400,
		'height': 450
	});
	
	if( !$.support.placeholder ) {
		$('input[placeholder]').placeholder();
	}

});

jQuery.support.placeholder = (function(){
    var i = document.createElement('input');
    return 'placeholder' in i;
})();

jQuery.fn.placeholder = function() {
	return this.each( function() {
		el = $(this);
		el.focus( function() {
			var input = $(this);
			if( $.trim( input.val() ) == input.attr('placeholder') ) {
				input.val('').removeClass('placeholder');
			}
		}).blur( function() {
			var input = $(this);
			if( $.trim( input.val() ) == '' ) {
			 	input.addClass('placeholder').val( input.attr('placeholder') );
			}
		}).blur().parents('form').first().submit( function() {
			$('[placeholder]', this).each( function() {
				var input = $(this);
				if( $.trim( input.val() ) == input.attr('placeholder') ) {
					input.val('');
				}
			});
		});
	});
}

