//autotab
	$(document).ready(function() {
		$('#area_code').autotab({ target: 'number1', format: 'numeric' });
		$('#number1').autotab({ target: 'number2', format: 'numeric', previous: 'area_code' });
		$('#number2').autotab({ previous: 'number1', format: 'numeric' });
	});

// popups

			$().ready(function() {
				var t = $('#popup .popupContent')
  				$('#popup').jqm({
    			trigger: 'a.popupTrigger',
    			ajax: '@href',
    			onHide: function(h) { 
      				h.o.remove(); // remove overlay
      				h.w.fadeOut(888); // hide window
      				},
    			overlay: 40, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */
    			modal: true,
    			target:t,
    			overlayClass: 'popupOverlay'})
    			.jqDrag('.jqDrag'); /* make dialog draggable, assign handle to title */
  
  				// Close Button Highlighting. IE doesn't support :hover. Surprise?
  				$('input.jqmdX')
  					.hover(
    				function(){ $(this).addClass('jqmdXFocus'); }, 
    				function(){ $(this).removeClass('jqmdXFocus'); })
  					.focus( 
    				function(){ this.hideFocus=true; $(this).addClass('jqmdXFocus'); })
  					.blur( 
    				function(){ $(this).removeClass('jqmdXFocus'); });

			});