$(function() {
	// Search Box Menu
	$('.nav-search a').click(function() {
		if ($('.nav-search .search-box').css('display') == 'none') {
			$(this).addClass('selected');
			$(this).next('.search-box').fadeIn('fast');
		} else {
			$(this).removeClass('selected');
			$(this).next('.search-box').fadeOut('fast');
		}
	});

	$(".side-ad").appendTo("#main_sidebar");
	$(".zipcode").mask("99999", { placeholder: " " });
	$(".zipcode").Watermark("Zip Code");
	$(".locationsearch-go").click(function() {
		if ($(".zipcode").val() == "Zip Code") {
			alert("Zip Code is required.");
			return false;
		} else {
			var searchUrl = $(this).attr("href") + "?zipcode=" + $(".zipcode").val() + "&radius=" + $(".mileradius").val()
			if ($("input:radio[name=category]:checked").val() != "on") {
				searchUrl = searchUrl + "&category=" + $("input:radio[name=category]:checked").val();
			}
			$(this).attr("href", searchUrl);
		}
	});


	$("label[for='ctl00_ContentPlaceHolder1_rblLocationCategoryList_0']").addClass("AccreditedCenters-label");
	$("label[for='ctl00_ContentPlaceHolder1_rblLocationCategoryList_1']").addClass("PreferredCenters-label");

	$(".contact #phonenumbers").after('<a href="https://www.i711.com/i711v2/ctc.html?refid=but.1.0&phone=407-521-5789" onClick="window.open(this, \'callwindow\', \'width=750, height=450, scrollbars=no\'); return false;"><img src="/ClientResources/Images/textrelay.gif" border="0" /></a>');

	$(".about-mediacenter-aaucminthenews #main_content h1").html("AAUCM In The News");

	$('.designby a').attr("target", "_blank");
});
