(function($){
	$.fn.extend(
	{
		fixPng: function( gif_file, attr, noreplace )
		{
			if( navigator.appVersion.match('MSIE 6') )
			{
				if( typeof gif_file == "undefined" )
				{
					gif_file = "gfx/pixel.gif";
				}
				
				if( typeof noreplace == "undefined" )
				{
					noreplace = "noreplace";
				}
				
				if( typeof attr == "undefined" )
				{
					attr = "rel";
				}
				
				$("img").each(function()
				{
					var src = $(this).attr("src");
					var width = $(this).attr("width");
					var height = $(this).attr("height");
					var atributo = $(this).attr(attr);
					
					if( typeof atributo == "undefined" )
					{
						atributo = "rel";
					}
					
					if (src.indexOf(".png") != -1 && atributo.indexOf(noreplace) == -1 )
					{
						$(this).attr("src", gif_file);
						$(this).attr("width", width);
						$(this).attr("height", height);
						$(this).css("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ src + "',sizingMethod='scale')");
					}
				});
			}
		}
	});
})(jQuery);

 $(document).ready(function(){ $("body").fixPng(); });



/*
var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
if(IE6){

	$(function(){
		
		$("<div>")
			.css({
				'position': 'absolute',
				'top': '0px',
				'left': '0px',
				backgroundColor: 'black',
				'opacity': '0.75',
				'width': '100%',
				'height': '1200px',
				//'height': $(window).height(),
				zIndex: 5000
			})
			.appendTo("body");
			
		$("<div><img src='usr/no-ie6.png' alt='' style='float: left;'/><p style='font-family: tahoma; font-size: 10pt;'><br /><strong>Przepraszamy, ale Internet Explorer 6 jest już PRZESTARZAŁY!<br /><br /><span style='color: red'>Twoja przeglądarka ma prawie 10 LAT!!!</span></strong><br /><br />Aby kontynuować, musisz <a href='http://mozilla.com'>zaktualizować przeglądarkę</a>, zapewni to bezpieczne zakupy.</p>")
			.css({
				backgroundColor: 'white',
				'top': '50%',
				'left': '50%',
				marginLeft: -210,
				marginTop: -100,
				width: 410,
				paddingRight: 10,
				height: 200,
				'position': 'absolute',
				zIndex: 6000
			})
			.appendTo("body");
	});		
}
*/

/*

*/

$(document).ready(function() {    
   
     //select all the a tag with name equal to modal  
     $('a[name=modal]').click(function(e) {  
         //Cancel the link behavior  
         e.preventDefault();  
         //Get the A tag  
         var id = $(this).attr('href');  
      
        //Get the screen height and width  
         var maskHeight = $(document).height();  
         var maskWidth = $(window).width();  
       
         //Set height and width to mask to fill up the whole screen  
         $('#mask').css({'width':maskWidth,'height':maskHeight});  
           
         //transition effect       
        //$('#mask').fadeIn(1000);      
         $('#mask').fadeTo("normal",0.6);    
       
         //Get the window height and width  
         var winH = $(window).height();  
         var winW = $(window).width();  
                 
         //Set the popup window to center  
         $(id).css('top',  winH/2-$(id).height()/2);  
         $(id).css('left', winW/2-$(id).width()/2);  
       
         //transition effect  
         $(id).fadeIn(500);   
       
     });  
       
     //if close button is clicked  
     $('.window .close').click(function (e) {  
         //Cancel the link behavior  
         e.preventDefault();  
         $('#mask, .window').hide();  
     });       
       
     //if mask is clicked  
     $('#mask').click(function () {  
        $(this).hide();  
         $('.window').hide();  
     });           
       
});  


$(function() {
	$(".window").draggable();
	$("#tabs").tabs();
	$('a[rel*=lightbox]').lightBoxClone();
	$('a[rel*=plans]').lightBoxClone();
	$('a[rel*=plans2]').lightBoxClone();

});

$(function() {
	$("#tabs").tabs();
});

