jQuery(document).ready(function($) {

	$("#countdown").countdown({
		date: "july 1, 2012 10:30",
		htmlTemplate: "%{d} Days : %{h} Hours : %{m} Minutes : %{s} Seconds"
		});
    
	$('#sponsor-banner').cycle({
		fx: 'fade',
		timeout: 17000,
		speed: "slow",
		random:  1 
	});

	$('.scroll-pane').jScrollPane();
	
	$('#post-wrapper').jScrollPane();	
	
	jQuery(function($) {
		$('#page-menu a').attr('href', setAltText);
		
		function setAltText( index, attributeValue ) {
		return (this.href + '#pagecontent');
	  }
		$('#main-menu a').attr('href', setAltText);
		
		function setAltText( index, attributeValue ) {
		return (this.href + '#top');
	  }
	});

	jQuery(function($) {
		if(!$.support.placeholder) { 
			var active = document.activeElement;
			$(':text').focus(function () {
				if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) {
					$(this).val('').removeClass('hasPlaceholder');
				}
			}).blur(function () {
				if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) {
					$(this).val($(this).attr('placeholder')).addClass('hasPlaceholder');
				}
			});
			$(':text').blur();
			$(active).focus();
		}
	});

	$(".comp").validate( {
		rules: {
			Answer: {
			required: true,
			maxlength: 75
			}	
		}
	});	
});




