$(document).ready(function() {
									
	$(".rollover").hover(function() {
		$('img', this).attr('src', $('img', this).attr('src').replace(/\./g, "_h."));
	}, function() {
		$('img', this).attr('src', $('img', this).attr('src').replace(/\_h/g, ""));
	});
	
	$(".ttop span, .btns input, .agree span").hover(function() { $(this).addClass('hover'); }, function() { $(this).removeClass('hover'); })
	$(".ttop span").click(function() { $("html, body").animate({ scrollTop: 0 }, 'slow'); });
	
	$(".agree span input").click(function() { agree();	});
	$(".agree span").click(function() { agree(); });
	
	$(".sbtn").click(function() {
		$("#sform").submit();
		return false;
	});
});

function agree() {
	if($(".agree input").is(':checked')) {
		$(".agree input").attr('checked', false);
		$("form.inq").append('<div class="fade"></div>');
		$("div.fade").css("height", $("form.inq").height() + "px");
		$("form.inq select").attr('disabled', true);
	} else {
		$(".agree input").attr('checked', true);
		$("form.inq div.fade").remove();
		$("form.inq select").attr('disabled', false);
	}
}

function resets(form) {
	$(':input', form).not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
}

function swf(m, d, w, h, p) {
	var sw = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+w+'" height="'+h+'" align="middle">';
	sw += '<param name="allowScriptAccess" value="sameDomain" />'; sw += '<param name="wmode" value="transparent" />';
	sw += '<param name="movie" value="'+m+'" />'; sw += '<param name="quality" value="high" />';
	sw += '<param name="menu" value="false" />'; sw += '<param name="Flashvars" value="'+p+'" />'; 
	sw += '<embed src="'+m+'" wmode="transparent" menu="false" align="middle" quality="high" '; sw += 'Flashvars="'+p+'" '; 
	sw += 'width="'+w+'" height="'+h+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	$("#" + d).html(sw);
}
