$(document).ready(function()
{
	$(".list #primary .item img").lazyload({ 
    placeholder : "http://static.eighthundredships.com/images/store/common/grey.gif",
    threshold : 100,
    effect : "fadeIn"
	});
});

$(function(){
    $("#keyword").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()
{
	$('.news dl').jScrollPane();
});

$(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(){
    $(".index_banners a img,.item img.product, .pickup img, .hurry img, rearrival img, #brands a img,#categories a img,#material img,.banner_nb a img,#secondary .recommend img,.pages img.on").hover(
    function(){
       $(this).fadeTo("normal", 0.7);
    },
    function(){
       $(this).fadeTo("normal", 1.0);
    });
});

