// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){

	// your functions go here

});


/* optional triggers

$(window).load(function() {
	
});

$(window).resize(function() {
	
});

*/



// Focus search field
$(document).ready(function(){
	// Get the text from the label element
	var labelTxt = $('#searchform label').text();
	// Put the text from the label element into the search field's value	
	$('#s').attr('value',labelTxt);
	// Focus & blur effects
	$('#s').focus(function(){
		if ((this.value == '') || (this.value == labelTxt)) {
			$(this).val('');
		}
	});
	$('#s').blur(function(){
		if (this.value == '') {
			$(this).val(labelTxt);
		}
	});
	// On submit change the value while server side code is run
	$("#submit").click(function(){
		$('#s').attr('value','Searching...');		
	});
});


// Thumbnail Rollovers
	$(".post-thumbnail").hover(function(){
		$(this).find('div').fadeIn(300);
		$(this).find('img').addClass("selected");
	}, function(){
		$(this).find('div').fadeOut(200)
		$(this).find('img').removeClass("selected");
	});
	
	$(".post-thumbnail").click(function(){
		window.location = $(this).find('a').attr('href');
});

