﻿/*!
* Simple function to dynamically style the menu
* (Requires jQuery)
*/
$(document).ready(function() {
	var baseUrl = 'http://www.criticalnursestaffing.com/';
	var currentUrl = window.location.href;
	if (currentUrl == baseUrl || currentUrl == baseUrl + 'default.aspx') {
		$("#link01").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) 0 -56px no-repeat' });
	}
	else if (currentUrl.search(/\/about\//i) > -1) {
		$("#link02").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -116px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/eeoicpa\//i) > -1) {
		$("#link03").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -232px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/nurses\//i) > -1) {
		$("#link04").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -348px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/contracts\//i) > -1) {
		$("#link05").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -464px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/resources\//i) > -1) {
		$("#link06").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -580px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/hospitals\//i) > -1) {
		$("#link07").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -696px -56px no-repeat' });
	}
	else if (currentUrl.search(/\/contact\//i) > -1) {
		$("#link08").css({ 'background': 'transparent url(/_resources/images/menu_sprite.jpg) -812px -56px no-repeat' });
	}
});