$(document).ready(function() {

	calcpreis();

	$('.submitbtn').click(function() {
		if ($(this).val() == "telorder") {
			$('#formular').append('<input type="hidden" name="telorder" value="1">');
		}
		$('#formular').submit();
	});
	
	$.fn.qtip.styles.dktip = {
		width: 270,
		background: '#F1F1F1',
		color: 'black',
		textAlign: 'left',
		border: {
			width: 1,
			radius: 2,
			color: '#000000'
		},
		tip: 'rightMiddle'
	};

	$(".qtipinfo").each( function(){
		$(this).qtip({
			content: {
				url: 'ajax/tooltip.php',
				data: { id: $(this).attr("alt") },
				method: 'get'
			},
			position: { corner: { target: 'leftMiddle', tooltip: 'rightMiddle' } },
			style: { name: 'dktip' },
			show: { solo: true, when: { event: 'click' } },
			hide: { when: { event: 'mouseout' } },
			api: {
				beforeShow: function() {
					this.elements.target.parents('table').find('tr').removeClass("highRow");
					this.elements.target.parents('tr').addClass("highRow");
				}
			}
		});
	});


});

