// remap jQuery to $
(function($){
	
	// Copyright script - found in the plugins.js file
	// To use, replace the '#copyright' id with the
	// id of the element that holds your copyright date
	$('#copyright').copyright();
	
	// Email defuscator - found in the plugins.js file
	$('.email').defuscate();	
	
	// User defined functions go here
	
	// Infield Labels
	$('#subscribe label').inFieldLabels();
	
	// Clickable block
	$('.clickable').click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
	// Adding first/last classes to the pagination:
   	$("ul#PostPager li:nth-child(1)").addClass("next");
	$("ul#PostPager li:nth-last-child(1)").addClass("prev");
	
	// Tipsy
	$('.tipsy').tipsy({gravity: 'e'});
	$('.formtip').tipsy({gravity: 'w', html: true});
	
	
	
	// Home billboard fader
	var rand = Math.floor(Math.random()*3);
	$('#billboard .items').prepend($('.items div').eq(rand));
	$('.slidetabs').tabs('.items > div', {
		effect: 'fade',
		fadeOutSpeed: 'slow',
		rotate: true
	}).slideshow({
		autoplay:true,
		interval: 10000
	});
	
	
	
	
	
	
})(this.jQuery);
