﻿/*
 * ====================================
 *   Lancaster Regional Medical Center
 * ------------------------------------
 *   Internal Javascript
 * ====================================
 */
var urlParams = {};
(function () {
	var e,
		a = /\+/g,  // Regex for replacing addition symbol with a space
		r = /([^&=]+)=?([^&]*)/g,
		d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
		q = window.location.search.substring(1);

	while (e = r.exec(q))
		urlParams[d(e[1])] = d(e[2]);
})();

$(function () {
	$('#eventDetail_wrap #eventDetail_right').append('<a href="Register.aspx?Id=' + urlParams['Id'] + '" class="button button-register">Register for this Event &raquo;</a>');
	$('.events #main_content .literalContent #ctl00_ContentPlaceHolder1_lblDescription p').text('The following is a list of upcoming Lancaster Regional Medical Center events we are hosting or with which we are actively involved.');

//	// EEO Format
	$('#resumewizard div[id$=pnlDemographicInfo] .formsection td:nth-child(3)').remove();
	$('#resumewizard div[id$=pnlDemographicInfo] p:eq(0)').text('Anti-Discrimination Notice: It is an unlawful employment practice for an employer to fail or refuse to hire or discharge any individual, or otherwise to discriminate against any individual with respect to the individual\'s terms and conditions of employment, because of such individual\'s race, color, religion, sex, national origin, citizenship, age, disability, veteran status or other protected category.');
	$('#resumewizard div[id$=pnlDemographicInfo] p:eq(2)').text('Submission of this information is voluntary, and refusal to provide it will not subject you to any adverse treatment. The information will be kept confidential and will only be used in accordance with the provisions of applicable laws, executive orders, and regulations, including those that require the information to be summarized and reported to the federal government for civil rights enforcement.');
});

$(document).ready(function(){
	// Services Navigation
	if ($('body.services').length > 0) {
		if (jQuery.url.segment(1).toLowerCase() != 'default.aspx') {
			var _path = '/' + jQuery.url.segment(0) + '/' + jQuery.url.segment(1) + '/Default.aspx';
			var _nav = $('#sidemenu ul li a[href="' + _path + '"]').parent('li');
			var _innernav = $('#sidemenu ul li a[href="' + _path + '"]').parent('li').children('ul');
			if (_innernav.length > 0) {
				$('#litContent').prepend('<div class="service-innernav">'  + _nav.html() + '</div>');
			}
		}
	}
});

