/*
 *
 * Copyright (c) 2006 Sam Collett (http://www.texotela.co.uk)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 */

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

jQuery.fn.banner = function()
{
	return this.wrap('<div class="banner-img"><div class="cover-inner">' + '</div></div>');
}

jQuery.fn.cover = function()
{
	return this.wrap('<div class="cover-img"><div class="cover-inner">' + '</div></div>');
}

/*
 * Absolute positions the image in the middle of the thumbnail frame
 *
 * @name     jThumbImg
 * @author   Joan Piedra (http://www.joanpiedra.com)
 * @example  $("a.thumb img, img.thumb").thumbsImg();
 *
 */
jQuery.fn.centerImg = function()
{
	return this.each(
		function()
		{
   			jQuery(this).css('position','relative');
            jQuery(this).css('display', 'block' );
            jQuery(this).css('margin-left', 'auto' );
            jQuery(this).css('margin-right', 'auto' );
		}
	)
}