jQuery(document).ready(function() {
    jQuery('.fVat').click(function(){
		jQuery('.NIP').show();
		jQuery('.imie').hide();
		jQuery('.imie > td > input').removeClass("required");
		jQuery('.NIP > td > input').addClass("required");
	});
	jQuery('.par').click(function(){
		jQuery('.NIP').hide();
		jQuery('.imie').show();
		jQuery('.imie > td > input').addClass("required");
		jQuery('.NIP > td > input').removeClass("required");
	});
});

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
    	wrap: 'circular',
		auto: 5,
		scroll: 1
    });
});

	$(function() {
		$( "#datepicker" ).datepicker({
			dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
			dayNamesMin: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'Sb'],
			dayNamesShort: ['Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'],
			monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'],
			nextText: 'Dalej',
			prevText: 'Wstecz'
		});
	});
	$(document).ready(function(){	
	$("a[rel=fancybox]").fancybox({
			'autoScale' : false,
			'titlePosition'		: 'inside',
				'titleShow'		: true,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
			});
});
jQuery(document).ready(function() {
    jQuery('.logRadio').click(function(){
		jQuery('.logBox').show('slow');
		jQuery('.regBox').hide('slow');
	});
	
	jQuery('.regRadio').click(function(){
		jQuery('.logBox').hide('slow');
		jQuery('.regBox').show('slow');
	});
});

$(document).ready(function() {
      $("#category tr").hover(function() 
       { 
        $(this).addClass("cateHover"); 
       }, function() 
       {
        $(this).removeClass("cateHover");
       });
	  
	  	 	  	 	$("div.error3").toggle().animate({opacity: "0"}, 0);
		$("div.error3").animate({opacity: "1"}, 2000);
		
		
		$("div.info2").toggle().animate({opacity: "0"}, 0);
		$("div.info2").animate({opacity: "1"}, 2000);
		

 });
$(document).ready(function() {
						   
				$("#download2").click(
					function()
					{
						if ($('#download2:checked').val() != null)
						{
							$("#nameInvoice").val($("#neme").val());
							$("#lostnameInvoice").val($("#lostname").val());
							$("#businessInvoice").val($("#business").val());
							$("#streetInvoice").val($("#street").val());
							$("#namberInvoice").val($("#namber").val());
							$("#codeInvoice").val($("#code").val());
							$("#cityInvoice").val($("#city").val());
						}
						else
						{
							$("#nameInvoice").val("");
							$("#lostnameInvoice").val("");
							$("#businessInvoice").val("");
							$("#streetInvoice").val("");
							$("#namberInvoice").val("");
							$("#codeInvoice").val("");
							$("#cityInvoice").val("");
						}
					});
	$("#password1").val("");
	
	$('input[type="radio"][name^="fv"]').click(
		function()
					{
						if($(this).val() == 1)
							{
								$("#VAT").css('display', 'none');
							}
						else
							{
								$("#VAT").css('display', 'block').animate({opacity: "0"}, 0);
								$("#VAT").animate({opacity: "1"}, 1000);
							}
							
					});
											   
											  
						   
 });
$().ready(function()
		{
			$("#menu-panels li a").click(function()
			{
				$("#menu-panels .active").removeClass("active");
				$(this).parent().addClass("active");
 
				var classname = $(this).attr("class");
				$("#contentPanel div.text:visible").hide();
				$("#contentPanel div#"+classname).show();
 
				return false;
			});
			
		});
$(document).ready(function(){
	
	$(".accordion h3:first").addClass("active");
	$(".accordion div#author:not(:first)").hide();
 
	$(".accordion h3").click(function(){
			$("input[name=addType]:checked").val(); 
		$(this).next("div#author").slideToggle("slow")
		.siblings("div#author:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
 
      $('ul#nav').children("li").mouseover( function() {
      $(this).children("a").addClass('fifth');
    } ).mouseout(function(){
         $(this).children("a").removeClass('fifth');
 });

});

