jQuery(function($){
	$('#mode-everything').change(function(a){
		if ( $('#mode-everything').is(':checked') ){
			$('#row-inclusion-list').hide();
			$('#row-exclusion-list').show();
		} else {
			//It appears no event is fired when the checkbox is unchecked, so 
			//there's no point in handling this case.
		}
	});
	
	$('#mode-selective').change(function(a){
		if ( $('#mode-selective').is(':checked') ){
			$('#row-exclusion-list').hide();
			$('#row-inclusion-list').show();
		} else {

		}
	});
	
	$('#tweak_google_analytics').change(function(a){
		if ( $('#tweak_google_analytics').is(':checked') ){
			$('#tracker_prefix').removeAttr("disabled");
		} else {
			$('#tracker_prefix').attr("disabled", "disabled");
		}	
	});
	
	$('#autolink_enable_css').change(function(a){
		if ( $('#autolink_enable_css').is(':checked') ){
			$('#autolink_css_rules').removeAttr("disabled");
		} else {
			$('#autolink_css_rules').attr("disabled", "disabled");
		}	
	});
	
	//Init the tabbed interface
	$('#lcp-tabs').tabs();	
	
	$('#conversion-tracker-code').focus(function(){
		$(this).select();	
	});
});