// tweets
showTweetLinks='all';
// cufon
Cufon.replace('h1', { fontFamily: 'Memorandum' });
Cufon.replace('h2', { fontFamily: 'Memorandum' });
Cufon.replace('h3', { fontFamily: 'Memorandum' });
Cufon.replace('a.bolheading', { fontFamily: 'Memorandum' });
Cufon.replace('h5', { fontFamily: 'Aachen-Light' });
Cufon.replace('h6', { fontFamily: 'Aachen-Light' });

$(document).ready(function() {

	// toggle months
	$(".st").click(function () {
		$(this).parent().children('.stc').slideToggle();
	});

	// Overlay
	$("a.boxlink[rel]").overlay();

	// fb
	$("a[rel=media_grp]").fancybox();

	// enable tabs
	$(".sliderradios").tabs(".slide-wrapper", {
		effect: 'fade',
		fadeOutSpeed: "fast",
		rotate: true
	}).slideshow();

	/*
	$(".slide-wrapper").hover(function() {
		$('.slide-info-panel', this).stop(true, true).animate({opacity: 1}, 200, function() {});
		$('.slider-meer-info', this).hide();
    }, function() {
		$('.slide-info-panel', this).stop(true, true).animate({opacity: 0}, 200, function() {});
		$('.slider-meer-info', this).show();
    });
	*/
	if ($('div').hasClass('sliderradios')) {
		$(".sliderradios").data("slideshow").play();
    }
	// Twitter 
    $("#tweet_container").tweet({
        username: ["cameretten"],
        count: 30,
        loading_text: "..."
    });
    
	// Informatie bol
	/*
	var tquotations = $('.quotations ul li').length;
	alert(tquotations);
	*/
    $('#quotations div p').each(function() {
		qh = $('#quotations div p').height();
		$('#quotations div p').css('marginTop', ((164/2)-(qh/2)-20) );
    });
	var ticker = function() {
		setTimeout(function(){
			$('#quotations ul li:first').animate({
				opacity: 0
			}, 800, function() {
				$(this).detach().appendTo('#quotations ul').removeAttr('style');	
			});
			ticker();
		}, 4000);
	};
	ticker();
	
	// Tooltip
	$(".deelnemer-image img[title]").tooltip({
	   offset: [30, 2],
	   effect: 'slide'
	}).dynamic({ bottom: { direction: 'down', bounce: true } });	

	$(".logo-na[title]").tooltip({
	   offset: [30, 2],
	   effect: 'slide'
	}).dynamic({ bottom: { direction: 'down', bounce: true } });	

	// Events pro
	$("table.tec-calendar tbody tr").each(function(index) {
		// add a class of "right" to Friday & Saturday so tooltips stay onscreen
		$(this).find("td:gt(3)").addClass("tec-right");
	});
	$("table.tec-calendar:not(.tec-calendar-widget) .tec-event a").hover(function() {
		// one for IE6, one for everybody else
		if ($.browser.msie && $.browser.version == 6) {
			var bottomPad = $(this).parents("td").outerHeight() + 5;
		}
		else {
			var bottomPad = $(this).outerHeight() + 18;
		}
		$(this).next(".tec-tooltip").css('bottom', bottomPad).fadeIn(300);
	}, function() {
		$(this).next(".tec-tooltip").fadeOut(100);
	});
	$("table.tec-calendar-widget .tec-event:has(a)").hover(function() {
		if ($.browser.msie && $.browser.version == 6) {
			var bottomPad = $(this).outerHeight();
		}
		else {
			var bottomPad = $(this).outerHeight() + 3;
		}
		$(this).find(".tec-tooltip").css('bottom', bottomPad).fadeIn(300);
	}, function() {
		$(this).find(".tec-tooltip").fadeOut(100);
	});
	$(".tec-events-dropdown").change(function() {
		baseUrl = $(this).parent().attr("action");
		location.href = baseUrl + $('#tec-events-year').val() + '-' + $('#tec-events-month').val();
	});
	//masonery for Pers
	//$(".page_pers").masonry();
});

