$(function(){
    $("#s").focus(function() {
        if($(this).val() == $(this).attr('defaultValue'))
            $(this).css('color', '#868686').val('');
    }).blur(function() {
        if(jQuery.trim($(this).val()) == "") {
            $(this).css('color', '#868686').val($(this).attr('defaultValue'));
        }
    });
});


$(function(){
	var conf = {
	className : 'hover',
	postfix : '_hover'
	};
	$('.'+conf.className).each(function(){
		this.originalSrc = this.src;
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1");
		preloadImage(this.rolloverSrc);
	}).hover(function(){
		this.src = this.rolloverSrc;
	},function(){
		this.src = this.originalSrc;
	});
  
});

preloadedImages = [];
function preloadImage(url){
	var p = preloadedImages;
	var l = p.length;
	p[l] = new Image();
	p[l].src = url;
}

$(function(){
    $(".banner_nb img").hover(
    function(){
       $(this).fadeTo("normal", 0.7);
    },
    function(){
       $(this).fadeTo("normal", 1.0);
    });
});

$(function(){
	$("abbr.timeago").timeago();
});$(function(){
    $("#s").focus(function() {
        if($(this).val() == $(this).attr('defaultValue'))
            $(this).css('color', '#868686').val('');
    }).blur(function() {
        if(jQuery.trim($(this).val()) == "") {
            $(this).css('color', '#868686').val($(this).attr('defaultValue'));
        }
    });
});


$(function(){
	var conf = {
	className : 'hover',
	postfix : '_hover'
	};
	$('.'+conf.className).each(function(){
		this.originalSrc = this.src;
		this.rolloverSrc = this.originalSrc.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1");
		preloadImage(this.rolloverSrc);
	}).hover(function(){
		this.src = this.rolloverSrc;
	},function(){
		this.src = this.originalSrc;
	});
  
});

preloadedImages = [];
function preloadImage(url){
	var p = preloadedImages;
	var l = p.length;
	p[l] = new Image();
	p[l].src = url;
}

$(function(){
    $(".banner_nb a img").hover(
    function(){
       $(this).fadeTo("normal", 0.7);
    },
    function(){
       $(this).fadeTo("normal", 1.0);
    });
});

$(function(){
	$("abbr.timeago").timeago();
});

$(function(){
	$(".figure a").fancybox({
		'padding': 20,
		'overlayOpacity': 0.8,
		'overlayColor': "#000",
		'titlePosition': 'over',
	});
});

$(function(){

    $('a#copy-button').zclip({
        path:'http://blog.eighthundredships.com/wordpress/wp-content/themes/sandbox/eighthundredships/scripts/ZeroClipboard.swf',
        copy:$('pre#description').text()
    });

});
