function refreshTicketCount(immediate) {

	var ticketCount = $('#amount').val();
	
	$('.ticket-block').hide();
	
	if(ticketCount > 1) {
		for (var i = 2; i <= ticketCount; i++) {
			$('.ticket-block-' + i).show();
		}
	}
}

$(document).ready(function() {

	/* flappe */
	$('div#flappe').hover(
	  function () {
		$(this).animate({
			left: '0px'
		});
	  },
	  function () {
		$(this).animate({
			left: '-625px'
		});
	  }
	); 
	
	$('#amount').bind('change', function() {
		refreshTicketCount(true);
	});
	
	$('#agreement').bind('change', function() {
		if($('#agreement').is(':checked')) {
			$('#submit').removeAttr('disabled'); 
		}
		else {
			$('#submit').attr('disabled', true);
		}
	});
	

	/* twitter	follower */
	$('div.flappe-twitter').twitterFriends({
         debug:1
         ,username:'the_meshed'
		 ,header:'<a href=\'_tp_\' target="_blank"><img class="twitter-logo" src="' + base_path + '/wp-content/themes/modicus-remix/modicus-remix/images/socialmedia_Twitter_twitterLogo.jpg" /></a><a href=\'_tp_\' class="follow-link" target="_blank"><img src="' + base_path + '/wp-content/themes/modicus-remix/modicus-remix/images/socialmedia_Twitter_FollowMe.png" /></a><div style="clear: both;"></div>'
		 ,users:32
		 ,user_image:25
		 ,info:''
		 ,loop:0
		 ,user_change:0
		 ,user_swap:500000
    });	
});
