// Coda-like tab sliders
$(document).ready(function() {
 		$('#coda-slider-1').codaSlider({
   		dynamicArrows: false,
   		dynamicTabs: false,
   		autoHeight: false
	});
// Portfolio images catptions	
$('.boxgrid.captionfull').hover(function(){
        $(".cover", this).stop().animate({top:'551px'},{queue:false,duration:400});
    }, function() {
        $(".cover", this).stop().animate({top:'600px'},{queue:false,duration:400});
    });
});

// Preload the portolio images 
$(function () {
    $('.preload').hide();//hide all the images on the page
});

var i = 0;//initialize
var int=0;//Internet Explorer Fix
$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
    var int = setInterval("doThis(i)",300);//500 is the fade in speed in milliseconds
});

function doThis() {
    var imgs = $('.preload').length;//count the number of images on the page
    if (i >= imgs) {// Loop the images
        clearInterval(int);//When it reaches the last image the loop ends
    }
    $('.preload:hidden').eq(0).fadeIn(300);//fades in the hidden images one by one
    i++;//add 1 to the count
}
