$(function() {
$('a.lightbox').lightBox();
//footer kreski pomiedzy a bez ostatniego
$('#footernav  li:not(:last-child)').append(' | ')
	
	//------------
	if($('#topintro1').length == 0)
	{
	}
	else
	{
		var flashvars1 = {anim:swf};
		var params1 = {wmode:"transparent"};
		var attributes1 = {}; 
		swfobject.embedSWF("/gfx/flash/top-podstrona.swf", "topintro1", "960", "220", "9.0.0",'',flashvars1, params1, attributes1);
	}
	
	if($('#topintro').length == 0)
	{
	}
	else
	{
		var flashvars = {anim:swf};
		var params = {wmode:"transparent"};
		var attributes = {}; 
		swfobject.embedSWF("/gfx/flash/top-strgl.swf", "topintro", "960", "475", "9.0.0",'',flashvars, params, attributes);
	}
	//-------------
	
	$('#formularz').append('<iframe id="commentiframe" />');
	$('#commentiframe').attr('src', '/form/form.php'); 
	$('#commentiframe').attr('width', '100%');
	$('#commentiframe').attr('height', '650px');
	$('#commentiframe').css('border', 'none');
	$('#commentiframe').attr('frameborder', '0');
	$('#commentiframe').attr('border', '0');

	//----------------------
	$('#zamow-katalog').append('<iframe id="commentiframe1" />');
	$('#commentiframe1').attr('src', '/form/katalog.php'); 
	$('#commentiframe1').attr('width', '100%');
	$('#commentiframe1').attr('height', '650px');
	$('#commentiframe1').css('border', 'none');
	$('#commentiframe1').attr('frameborder', '0');
	$('#commentiframe1').attr('border', '0');
	//-----------------------
	var tempb = $('#drewno ul li a');
	tempb.each(function(index) {
		
		var tmp = $(this).attr("href");
		var stemp = $(this).text();
		//$(this).html('<img src="/images/gatunki'+tmp+'.jpg" /><br/>'+stemp);
		$(this).html('<img alt="'+stemp+'" src="/images/gatunki'+tmp+'.jpg" /><br/>');
	});
	
});

function pobPart(a)
{
	
	$('#partnerzy').empty().load("/gate.php?act=woj&woj="+a)

}


var site = function() {
	this.navLi = $('#nav li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 	$("#nav li:last-child").css("background","none")

 	$.each(this.navLi, function() {
 		if ( $(this).children('ul')[0] ) {
 			//$(this).append('<span class="hasChildren" />');
		

 		}
 	});
 	
 		this.navLi.hover(function() {
 			// mouseover
			//$(this).find('> ul').css('display','block')
			$(this).find('> ul').stop(true, true).slideDown('fast');
 		}, function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).hide(); 		
		});
 		
 	}
 
}


new site();




