// chatjs.js
//
// Just does a few things for the chat window
//
// Written by Jeff Parker - jeffreyp(at)aplus.net
//
// Props to the jQuery community for guidance and support
//
// $Id: chatjs.js 5868 2011-06-08 16:41:25Z mjaning $

$(document).ready(function() {
	// shows extra fields for codero customers
	$('#checkyes').click(function() {
		//$("#pop-download").show('slow');
		var k = $(this).attr("checked");
		if(k) {
			$('#checkno').attr('checked', false);
			$('#regnum').attr('disabled', false);
			$('.needIfCustomer').addClass('required');
			$('#regspan').show('slow');
			$('#passspan').show('slow');
			return true;
		}
		return false;
	});

	// hide fields for non codero customers
	$('#checkno').click(function() {
		var k = $(this).attr("checked");
		if(k) {
			$('#checkyes').attr('checked', false);
			$('#regnum').attr('disabled', true);
			$('.needIfCustomer').removeClass('required');
			$('#regspan').hide('slow');
			$('#passspan').hide('slow');
			return true;
		}
		//$("#pop-download").hide();
		return false;
	});

	/* 20110608 by Marcelino - liveperson chat is being redirected to their servers
	 * iframe resizing not needed anymore
	 *
	 * resize purposes is solely rezise the IFRAME where live chat resides right now.
	 * due to ParDot requirements we cannot run the chat 100% as an external URL
	 * It must be enclosed in IFRAME running under our server
  $(window).resize(function(){
		$('iframe#livechat').width($(window).width());
		$('iframe#livechat').height($(window).height());
	});
	 */
	
	return false;
});

