﻿/*
	jQuery Blend v1.3
	(c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com
	Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
(function($){$.fn.blend=function(options,callback){if($.browser.mozilla&&(parseFloat($.browser.version)<1.9)){return this}var settings=$.extend({},$.fn.blend.settings,options);$(this).each(function(){var $this=$(this),$target=$(settings.target?settings.target:this),$hover,target=[],i,length,style={},active=false,out=0,opacity=settings.opacity,bg='background-',properties=[bg+'color',bg+'image',bg+'repeat',bg+'attachment',bg+'position',bg+'position-x',bg+'position-y'];length=properties.length;if($target[0].style.position!=='absolute'){$target.css({position:'relative'})}if(!$target.hasClass('hover')){$target.wrapInner('<div style="position:relative" />')}for(i=0;i<length;i++){target[i]=$target.css(properties[i])}$target.addClass("hover");style={};style.position='absolute';style.top=0;style.left=0;style.width=$target.width();style.height=$target.height();for(i=0;i<length;i++){style[properties[i]]=$target.css(properties[i])}if($target.find(".jsblend").length===0){$hover=$('<div class="jsblend" />').css(style);if(settings.top){$hover.appendTo($target)}else{$hover.prependTo($target)}}else{$hover=$target.find(".jsblend")}style={};for(i=0;i<length;i++){style[properties[i]]=target[i]}$target.css(style);$hover.css({opacity:out});$this.hover(function(){$hover.stop().fadeTo(settings.speed,opacity)},function(){$hover.stop().fadeTo(settings.speed,out)})});return this};$.fn.blend.settings={speed:500,opacity:1,target:false,active:false,top:false}}(jQuery));
