function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


jQuery(function($) {

			var counter = { value: 5 };
			var $inputs = $('#order input[type="text"][name^="pole"]');
			var $select = $('select#vat option:selected');
			var $counter = $('#brutto');
			var vat = $('select.target option:selected').val() / 100;
			
	$('.target').change(function() {
				
                vat = $('select.target option:selected').val() / 100;
count($inputs, counter);
});
			var count = function(e, c) {
				c.value = 0;
				e.each(function() {
					var count = parseFloat(this.value, 10);
					c.value += !isNaN(count) ? count : 0;
					c.value = (c.value * vat) + c.value;
					c.value = Math.round(c.value*100)/100;
				});
				$counter.val(c.value);
				
			};
			count($inputs, counter);
			$inputs.keyup(function() {
								   
				count($inputs, counter);
			});

		});
		$(document).ready(function(){
			$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'facebook',slideshow:2000});
			$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000});
		});
$(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.info").toggle().animate({opacity: "0"}, 0);
		$("div.info").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);
							}
							
					});
											   
											  
						   
 });
$(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');
 });

});
$().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;
			});
			
		});
