function flash(nazwa,width,height,tryb,bgcolor)
	{
	if (AC_FL_RunContent == 0) 
		{
		alert("This page requires AC_RunActiveContent.js.");
		} 
	else 
		{
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', width,
			'height', height,
			'src', 'flash/'+nazwa,
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', tryb,
			'bgcolor', bgcolor,
			'devicefont', 'false',
			'id', nazwa,
			'name', nazwa,
			'menu', 'false',
			'allowFullScreen', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'flash/'+nazwa,
			'salign', ''
			); //end AC code
		}
	}

function showGoogleMap(var_id,var_gps_x,var_gps_y,var_title,var_zoom)
{
	var myLatlng = new google.maps.LatLng(var_gps_x,var_gps_y);
	var myOptions = {
		zoom: var_zoom,
		center: myLatlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	var map = new google.maps.Map(document.getElementById(var_id), myOptions);
	
	if(var_title!=false)
	{
		var contentString = var_title;
      
		var infowindow = new google.maps.InfoWindow({
			content: contentString
		});
	}
	
	var marker = new google.maps.Marker({
		position: myLatlng,
		map: map
	});
	
	if(var_title!=false)
	{
		google.maps.event.addListener(marker, 'click', function() {
			infowindow.open(map,marker);
		});
	}
}

function write_mhref(user, domain, text)
{
	var at = '@';
	var mail = user + at + domain;
	document.write("<a href='mailto:" + mail + "' title='Napisz do nas'>" + ( text == undefined ? mail : text ) + "</a>");
}

$(function() {
	$("a.lightbox").fancybox();
	$('.img').each(function() {
		$(this).hover(function() {
			$(this).stop().animate({ opacity: 0.6 }, 200);
			},
		function() {
			$(this).stop().animate({ opacity: 1.0 }, 500);
		});
	});
});

$(function () {
	$('marquee').marquee('pointer').mouseover(function () {
		$(this).trigger('stop');
	}).mouseout(function () {
		$(this).trigger('start');
	}).mousemove(function (event) {
		if ($(this).data('drag') == true) {
			this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
		}
	}).mousedown(function (event) {
		$(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
	}).mouseup(function () {
		$(this).data('drag', false);
	});
	
	$("#button").click(function(){
		$("body")
			.animate({scrollTop: 400}, 1000, "bounceout")
			.animate({scrollTop: 0}, 1500, "bounceout");
	});
	
});

function ramowka()
{
	$.fancybox({'href':'box.php/ramowka','type':'iframe','height':485,'width':650,'hideOnOverlayClick':false});
}