$(document).ready(function(){
	$(".image-gallery a,#event-image a,.event-images a").fancybox();
	
	$(".lb_video").fancybox({
		scrolling: "no"
	});
	
	$("#event-image").cycle({
		fx:     'scrollHorz', 
		speed:  'fast', 
		timeout: 0, 
		next:   '#next', 
		prev:   '#prev', 	
        before: function(curr, next, opts) { 
            var alt = $(next).children('img').attr('alt'); 
            $('#caption').html(alt); 
        } 	
	});
	
	$(".fb_share").click(function(){
		$(".fb_share_count_nub_top").css("backgroundImage","none");
		// $(".fb_share_count_nub_top").css("backgroundColor","#ECEFF5");
	});
	
	$("#qrcodes span").hide();
	$("#qrcodes a").toggle(function(){
		$(this).siblings().slideDown();
	},function(){
		$(this).siblings().slideUp();
	});
	

	$("#address_same_check").change(function(){
		if ($(this).attr("checked")) 
		{
		
			$("input[name=term_line_1]").val($("input[name=home_line_1]").val());
			$("input[name=term_line_2]").val($("input[name=home_line_2]").val());
			$("input[name=term_city]").val($("input[name=home_city]").val());
			$("input[name=term_post_code]").val($("input[name=home_post_code]").val());
			$("input[name=term_phone_number]").val($("input[name=home_phone_number]").val());
			return;	
			
		}
		else
		{
			$("input[name=term_line_1]").val('');
			$("input[name=term_line_2]").val('');
			$("input[name=term_city]").val('');
			$("input[name=term_post_code]").val('');
			$("input[name=term_phone_number]").val('');
			return;	
		}
		
	});		$("#medical_condition_check .radio").change(function(){		if(this.value == 'yes')		{			$("#medical_condition_block").slideDown();		}		else		{			$("#medical_condition_block").slideUp();		}	});	$("#medical_condition_block").hide();	
	
});


