/*
	Class:    	dwIMageProtector
	Author:   	David Walsh
	Website:    http://davidwalsh.name
	Version:  	1.0.0
	Date:     	08/09/2008
	Built For:  jQuery 1.2.6
*/

jQuery.fn.protectImage = function(settings)
{
	//$("img[name=blank]").remove(); 

	settings = jQuery.extend(
	{
		image: 'http://www.ssftokyo.co.jp/wp-content/themes/fallon/img/blank.gif',
		zIndex: 100
	}, settings);
	
	return this.each(function()
	{
		var position = $(this).position();
		var height = $(this).height() + 22;
		var width = $(this).width() +22;
		
		$('<img class="blankImage" />').attr({
			width: width,
			height: height,
			src: settings.image,
			name : "blank"
		}).css({
			//border: '1px solid #f00',
			top: position.top,
			left: position.left,
			position: 'absolute',
			zIndex: settings.zIndex,
			background: 'transparent'
		}).appendTo('body')
	});
};

/* sample usage 

$(window).bind('load', function() {
	$('img.protect').protectImage();
});

*/

