var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version < 7)) 
{
	window.location.replace('http://www.textilwerkstatt.net/versionIncompatible.html'); 
}

function openPopup(url) {
	new_window = window.open(url, "Titel", "width=680,height=500,status=yes,scrollbars=yes,resizeable=yes");
	new_window.focus();
	return false;
}

$(function(){
	
	//von hier
	 /*$(document).ready(function(){
         $('A[rel="_blank"]').each(function(){
              $(this).attr('target', '_blank');
         });
    });

	 $(document).ready(function(){
         $('A[rel="_blank"]').click(function(){
              window.open($(this).attr('href'));
              return >false;
         });
    });

	 */
	//bis hier
	

	// Dialog einrichten
	$('#dialog').dialog({
		autoOpen: false,
		width: 850,
		height: 500,
		title: '',
		modal: true,
		position: '100'
	});

	// FAQ-Box
	$('.cRightButton_More').click(function(){
		var rel = $(this).parent().attr('href');
		$('#dialog').load(rel.replace('help/', 'help/ajax/'));
		$.ajax({
			  url: rel.replace('help/', 'help/gettitle/'),
			  cache: false,
			  success: function(html){
			    $('#dialog').data('title.dialog', html); 
			  }
			});
	    $('#dialog').dialog('open');
	    return false;
	});
	
	// Produktpreis ver�ndern
	$("#js_anzahl").change( function() {
		// Einzelpreis ermitteln
		var ep = $("#js_einzelpreis").val();
		var anzahl = $("#js_anzahl").val();
		
		var gp = (ep * anzahl).toFixed(2);
		// Preis anzeigen
		$("#price").html(gp.replace('.', ',')+' &euro;');
		// check input ($(this).val()) for validity here
	});

});



