﻿$(document).ready(function() {
    // Isle showcase slider
    $('.showcaseList li span').show();
    $('.showcaseList li span').css('opacity', 1);
    $('.showcaseList li').find('span').animate({top:'86px'},{queue:false,duration:0});
    $('.showcaseList li').hover(function(){
	$(this).find('span').animate({top:'4px'},{queue:false,duration:500});
    }, function(){
	    $(this).find('span').animate({top:'86px'},{queue:false,duration:500});
    });
    
    // Isle Contact map rollover
    $('a.mapLink span').show();
    $('a.mapLink span').css('opacity', 0.85);
    $('a.mapLink').find('span').animate({top:'208px'},{queue:false,duration:0});
    $('a.mapLink').hover(function(){
	$(this).find('span').animate({top:'173px'},{queue:false,duration:500});
    }, function(){
	    $(this).find('span').animate({top:'208px'},{queue:false,duration:500});
    });
    
    // Isle padded sub navigation
    var Duration = 150;
    $('ul.subNav li').hover(function() {
    $(this).animate({ paddingLeft: '10px' }, Duration);
    }, function() {
    $(this).animate({ paddingLeft: '0px' }, Duration);
    });
    
    // Isle Sidebar Project List Swap
	$('.projList li a.thumb').hover(function(){
		$('img', this).stop().animate({top:'-66px'},{queue:false,duration:200});
	}, function() {
		$('img', this).stop().animate({top:'0px'},{queue:false,duration:200});
	});
    
    // Isle animated bookmark links
    $('.addthis_toolbox a').hover(function() {
    $(this).animate({ marginTop: '-5px' }, Duration);
    }, function() {
    $(this).animate({ marginTop: '0px' }, Duration);
    });
    
    //Load the Quote Fader
	quoteFader();
});


//Isle Quote Fader
function quoteFader() {
	$('div#headQuote #quoteLoader').hide();
	$('div#headQuote blockquote').show();
	$('div#headQuote blockquote').css({opacity: 0.0});
	$('div#headQuote blockquote:first').css({opacity: 1.0});
	setInterval('fader()',6000);
}
function fader() {	
	var current = ($('div#headQuote blockquote.current')?  $('div#headQuote blockquote.current') : $('div#headQuote blockquote:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('current')) ? $('div#headQuote blockquote:first') :current.next()) : $('div#headQuote blockquote:first'));	
	next.css({opacity: 0.0})
	.addClass('current')
	.animate({opacity: 1.0}, 1000);
	current.animate({opacity: 0.0}, 1000)
	.removeClass('current');
};
  
