	
	var is_ie6 = false;
	var is_ie7 = false;
	var is_ie8 = false;
	jQuery.each(jQuery.browser, function(i, val) {
		if(i=="msie" && jQuery.browser.version.substr(0,3)=="6.0"){is_ie6 = true;}
		if(i=="msie" && jQuery.browser.version.substr(0,3)=="7.0"){is_ie7 = true;}
		if(i=="msie" && jQuery.browser.version.substr(0,3)=="8.0"){is_ie8 = true;}
	});
	
	
	// Auto hide/show label on text field
	$(document).ready(function() {
		$('.autolabel').focus(function () {
			if ($(this).attr('defaultValue') && $(this).attr('defaultValue') == $(this).val()) {
				$(this).val('')
			}
		});
		$('.autolabel').blur(function () {
			if ($(this).attr('defaultValue') && $(this).val() == '') {
				$(this).val($(this).attr('defaultValue'));
			}
		});
	});
	
	
	// FAQ
	$(document).ready(function() {
		$('dl.faq dt span').click(function(){
			if($(this).parent().hasClass('expanded')) {
				$(this).parent().next().slideUp(300);
				$(this).parent().removeClass('expanded');
			} else {
				$('dl.faq dd:visible').slideUp(300);
				$('dl.faq dt').removeClass('expanded');
				$(this).parent().next().fadeIn(0);
				dd_height = $(this).parent().next().height();
				$(this).parent().next().css({'height':'0px'});
				$(this).parent().next().animate({height: dd_height}, 300);
				$(this).parent().addClass('expanded');
			}
			return false;
		});
	});
	
	
	// Corners
	$(document).ready(function() {
		var corners = '<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>';
		$('table.corners div.bg').each(function(){
			$(this).append(corners);
			div_margin = parseFloat($(this).css('margin-bottom'));
			div_height = $(this).height();
			td_height = $(this).parent().height();
			if (td_height > (div_margin + div_height)) {
				div_height = td_height - div_margin;
				$(this).css({'height':div_height});
			}
		});
		$('.feedback-new-window').click(function() {
			window.open(this.href, 'feedback', 'height=320,width=250');
			return false;
		});
	});

	// Order
	function OnOff() {
		var typeElement = document.getElementById('type');
		if(typeElement) {
			if(typeElement.selectedIndex == 1) {
				document.getElementById('companyblock').style.display = "";
			}
			else {
				document.getElementById('companyblock').style.display = "none";
			}
		}
	}
