$(function() {

	$('#stickybar').stickybar({
		animation: 'slide',
		animationSpeed: 'slow',
		height: 33
	});
	
	$("a[rel~=external]").attr('target', "_blank");
});

function icon_over(element) 
{
	if($.browser.msie) 
	{
		var found = $(element).find('#icondiv');
		
		
		if(found.length == 0)
		{
		var img = $(element).find('img');
		var img_pos = img.position();
		var img_height = img.height();
		var img_width = img.width();
		
		$(element).append('<div id="icondiv" style= "background: #4b4b4b; height: '+img_height+'px; width: '+img_width+'px; position: absolute; top:'+img_pos['top']+'px; left: '+img_pos['left']+'px; display:none;" />');
		
		$divje= $(element).find('#icondiv');
		$divje.position(img_pos.top, img_pos.left);
		}
		
		$element = $(element).find('#icondiv');
	} 
	else 
	{
		$element = $(element).find('.sticky-img');
	} 
	
	$element.stop().fadeTo(500, 0.5);
}

function icon_out(element)
{
	if($.browser.msie) 
	{
		$element = $(element).find('#icondiv');
		$element.stop().fadeTo(500, 0);
	} 
	else 
	{
		$element = $(element).find('.sticky-img');
		$element.stop().fadeTo(500, 1);
	}
	
}
