$(document).ready(function() {
    $('#speakers').jcarousel({scroll: 1});
    $('#photo_video_thumbs').jcarousel({scroll: 1});
			
	
	
	$('a#facebook_feed_swap').click(
		function () {
			$("div#fb_feed").animate({opacity:0},400,"linear",function(){
				$(this).animate({opacity:1},400);
				$('div#fb_feed').show();
				$('div#tw_feed').hide();
				$('div#facebook_feed').addClass('active');
				$('div#twitter_feed').removeClass('active');
			});
		}
	);
	
	$('a#twitter_feed_swap').click(
		function () {
				$("div#tw_feed").animate({opacity:0},400,"linear",function(){
				$(this).animate({opacity:1},400);
				$('div#fb_feed').hide();
				$('div#tw_feed').show();
				$('div#facebook_feed').removeClass('active');
				$('div#twitter_feed').addClass('active');
			});
		}
	);
	
        /* select boxes */
	$("#country_select").selectbox();
	$("#year_select").selectbox();

        $("#registration_salutation").selectbox();
        $("#registration_country").selectbox();

        /* youtube videos popup */  
	$("a[rel^='video']").prettyPhoto();

        /* image galleries */  
	$("a[rel^='gallery']").prettyPhoto();

        /* hover for caption */
			
	$('.default-value').each(function() {
		var default_value = this.value;
		$(this).focus(function() {
			if(this.value == default_value) {
			this.value = '';
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
			this.value = default_value;
			}
		});
	});	

	
	
});

