jQuery.noConflict();
jQuery(window).bind('hashchange', function() {
	var hash = window.location.hash, href = window.location.href, path = window.location.pathname;
	if ('undefined'!==typeof(pageTracker)) { pageTracker._trackPageview(path+hash); }
});
jQuery(document).ready(function($){
	jQuery('select:has(.freetext)').live('change', function(evt){
		var n = $(this).attr('name').replace(/\[type\]$/, '')+'[freetext]', i = $(this).attr('id')+'_freetext', ft = $(this).next('input[name="'+n+'"]');
		if (!ft.length) {
			ft = $('<input class="validate[\'required\']" />').attr('name', n).attr('id', i);
			$(this).attr('name', $(this).attr('name')+'[type]').after(ft);
			$('#fancybox-wrap').height(parseInt(jQuery('#fancybox-wrap').height()) + parseInt(ft.height()) +5);
		}
		switch($(this).val().toLowerCase()){
			case 'email': ft.attr('class', "validate['required','email']"); break;
			case 'telefon': case 'phone': ft.attr('class', "validate['required','phone']"); break;
		}
		if ('undefined' !== typeof formCheck) { formCheck.initialize(formCheck.form, formCheck.options) } 
	});
});