/* 

Spin Logo Plugin v1.2
 
Include like this:

$.require('jquery.spinlogo', {jsbase:'/libraries', onload:function(){
		$('#spin').spinlogo({color:'#eee'});
	}
});

*/

(function($){
 	$.fn.spinlogo = function(settings) {
		settings = jQuery.extend({
			color: "#eee"
		}, settings);
 	
 		$(this).each(function(){
 			$(this).css({
				overflow: 'hidden', 
				height: '21px', 
				width: '19px'
			})
			.append('<a href="http://www.spin-webdesign.com/">by spin-webdesign</a>')
			.hover(function(){
				$(this).animate({'width': 115}, 300);
			}, function(){
				$(this).animate({'width': 19}, 300);
			});
 			
 			$("a", this).css({
				position: 'absolute',
				left: 0,
				top: 0,
				display: 'block',
				color: settings.color,
				textDecoration: 'none',
				textAlign: 'left',
				fontSize: '10px',
				backgroundImage: 'url("/images/spinlogo.png")',
				backgroundPosition: 'left top',
				backgroundRepeat: 'no-repeat',
				padding: '3px 8px 5px 24px',
				width: '96px'
 			}).click(function(){
 				return !window.open(this);
 			});
 			
 			if ($.browser.msie && $.browser.version < 7) {
 				var link = $("a", this).get(0);
 				link.style.backgroundImage = "";
				link.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/images/spinlogo.png', sizingMethod='crop')";
			}
 		});
 		
 		return this;
 	};
})(jQuery);