$(document).ready(function(){			
	//calendar
	function onCalendarClick(){
		//handle calendar click
	}
			
	if($("#calendarapp").length>0){
		Calendar.setup(
		{
			flat : 'calendarapp',
			flatCallback: onCalendarClick,
			weekNumbers: false,
			ifFormat : '%d/%m/%Y'	
		}
		);
	}
	
	// print button
	$("#print").click(function(event){
		event.preventDefault();
		print();
	});
	
	//text sizer
	$("#largetext").fontscale("body", "up", {cookie:true,unit:"em"});
	$("#smalltext").fontscale("body", "down", {cookie:true,unit:"em"});
	$("#largetext").click(function(event){
		event.preventDefault();
	});
	$("#smalltext").click(function(event){
		event.preventDefault();
	}); 
	
	
	//search result clickable
	$(".clickable").click(function(event) {
  	event.preventDefault();
  	window.location = $(this).find('a').attr("href");
	});
	
	$(".clickable").hover(
		function () {
			$(this).addClass("hover");
		},
		function () {
			$(this).removeClass("hover");
		}
	);
	
	//hide empty .extra	
	if(jQuery.trim($('.extra').text()) == ""){
		$('.extra').remove();
	};
});
