/**
 * Code by Travis Scheidegger
 * 
 * CUSTOM SITE JS
 *
 *
 *
 *
 */

Shadowbox.init({
    players: ["img","iframe","html"]
});

$(document).ready(function() {
/* 	arrange(); */

	/*************************************************** GRID */
	/**************************************************/
	
	$('.grid-item').css('opacity',0.7);
	$('.grid-item').hover(function() {
		$(this).css('opacity',1);
		$(this).addClass('active');
	},function() {
		$(this).css('opacity',0.5);
		$(this).removeClass('active');
	});
	$('.grid-item img').load(function(){
		arrange();
	});
	
	/*************************************************** SCROLLABLE */
	/**************************************************/
	
	$("div.scrollable").scrollable({
		size:1
	});
	
	/*************************************************** RECENT POSTS */
	/**************************************************/
	
	$('.widget_recent_entries li a').append(' <span>-> read more</span>');
	
	
	/*************************************************** BOTTOM BAR WIDGET */
	/**************************************************/
	
	$('#bottom-bar-wrapper .widget').append('<span class="widget-bottom"></span>');
	
	
	/*************************************************** POST NAVIGATION */
	/**************************************************/
	
	$('.navigation div.left a').prepend('&larr; ');
	$('.navigation div.right a').append(' &rarr;');
	$('.navigation div a').addClass('button').append('<span class="button-end"></span>');
	$('.navigation.grid-item a').addClass('button').append('<span class="button-end"></span>');
	
	/*************************************************** CONTACT FORM */
	/**************************************************/
	
	$(".shadowbox-button[rel]").overlay({effect: 'apple'}); 
		
	/*************************************************** TWITTER */
	/**************************************************/
	
	$('.twitter-timestamp').append(' ]').prepend('[ ');
	
	/*************************************************** COMMENTS */
	/**************************************************/
	
	$('cite.fn a').each(function() {
		$(this).replaceWith('<span>' + $(this).text() + '</span>');
	});
});