$(document).ready(function(){

	// frame killer
	if(window.name == 'resultframe'){
		$('table a').attr('target','_top');
		$(window).load(function(){
			$('#resultlist', parent.document).show().css({height:h});
			var h = $('#partnerlist').height() + 20;
			//$('#resultframe', parent.document).animate({height: h}, 750);
			$('#resultframe', parent.document).height(h);
		});
		$(window).unload(function(){
			//$('#resultframe', parent.document).animate({height: 0}, 100);
		});
	}
	else if(top.location != location){
		top.location.href = document.location.href;
	}
	
	$('#resultlist').hide();
	$('#resultframe').attr({'frameborder':"0", 'scrolling':"no"});

	//linki zewnętrzne
	$("a[href^=http]").not("a[href*=programfurora.pl]").click(function(){
		this.target = "_blank";
	});
	$('a[rel=_blank]').click(function(){
		this.target = "_blank";
	});

	//$('a[rel=_blank]').attr('target','_blank');
	// dodaj do ulubionych
	$('a[rel=sidebar]').click(function(e){
		if(window.external && typeof(window.external.AddFavorite) != 'undefined' ){
			window.external.AddFavorite(this.href, $(this).attr('title')); return false
		}
	});

	$('input.text, textarea').focus(function(){
		this.style.background = "#ffffff";
	});
	$('input.text, textarea').blur(function(){
		this.style.background = "#ffffff";
	});

	DD_belatedPNG.fix('.fixPNG');

});