/*
 *
 * Copyright (c) 2006 Sam Collett (http://www.texotela.co.uk)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * Modified by Elliot (http://ilovecolors.com.ar):
 * 20/03/2009
 * Changed triggering classes and applied classes to avoid conflicts.
 * Added one div for an icon.
 * Modified to use jQuery 1.2.6
 * Modified to run in safe mode with WordPress
 */

/*
 * Converts image and link elements to thumbnails
 *
 * @name     jThumb
 * @author   Joan Piedra (http://www.joanpiedra.com)
 * @example  jQuery("a.ilctb, img.ilctb").thumbs();
 *
 */
jQuery.fn.thumbs = function()
{
	return this.wrap('<div class="ilc-thumb-img"><div class="ilc-thumb-inner">' + '</div><div class="ilc-thumb-zoom"></div></div>');
}

/*
 * Absolute positions the image in the middle of the thumbnail frame
 *
 * @name     jThumbImg
 * @author   Joan Piedra (http://www.joanpiedra.com)
 * @example  jQuery("a.ilctb img, img.ilctb").thumbsImg();
 *
 */
jQuery.fn.thumbsImg = function()
{
	return this.each(
		function()
		{
			jQuery(this).css('position','absolute');
			//jQuery(this).css('left' , '-' + (	parseInt( jQuery(this).width()  ) / 2 ) + 'px' );
			//jQuery(this).css('top', '-' + ( 	parseInt( jQuery(this).height() ) / 2 ) + 'px' );
			jQuery(this).css('margin-left', '0' );
			jQuery(this).css('margin-top', '0' );
		}
	)
}