var HCW = {
	Config : {
		sClassIEHover : "ie-hover"
		,sHTMLtag : "can-has-js"
		,sPathImg : "/-/img/"
		,sPathSwf : "/-/swf/"
		,sSelIEHover : "#lang-toggle, li.region, #find-prgxpert li.find"
		,sSelPNG : "img, #site, #global, #global a, #lang-toggle div, #sections a, #primary h1, #home-features .feat h2, #find-prgxpert li.find h4, #find-prgxpert div.menu, #find-prgxpert div.menu div, .press i, .splash, .splash p, li.region h2 a, li.region a b, li.region div, li.region div ul, #footer"
	}

	/*
		STOP EDITING HERE
	*/
	,init : function() {
		var c = HCW;
		var p = c.Project;

		$(document).ready(function() {
			// List function(s) to fire onload here
			p.historyTag();
			p.labelSearch();
			p.labelText();
			p.printLink();
			p.tagIt();
			if (typeof DD_belatedPNG != "undefined") {
				DD_belatedPNG.fix(c.Config.sSelPNG);
				p.ieHover(c.Config.sSelIEHover)
			}
		});

		p.loadSIFR();
	}

	,Project : {
		ieHover : function(sSel) {
			var c = HCW;
			var sClass = c.Config.sClassIEHover;
			$(sSel).hover(function() {
				$(this).addClass(sClass);
			}, function() {
				$(this).removeClass(sClass);
			})
		}
		,historyTag : function() {
			$("ul.history li:last").addClass("last");
		}
		,labelSearch : function() {
			$("#search label b").remove();
			if ($("#txt-search").attr("value").length == 0) {
				var sText = $("#search label b").text();
				$("#txt-search").attr("value", sText);
			}
		}
		,loadSIFR : function() {
			var c = HCW;

			/*
				Register the fonts
			*/
			var archer = {
				src: c.Config.sPathSwf + 'archer.swf'
			}
			var gotham = {
				src: c.Config.sPathSwf + 'gotham.swf'
			}
			var gothamBold = {
				src: c.Config.sPathSwf + 'gotham-bold.swf'
			}
			var gothamBook = {
				src: c.Config.sPathSwf + 'gotham-book.swf'
			}
			var gothamMed = {
				src: c.Config.sPathSwf + 'gotham-med.swf'
			}

			/*
				Activate the fonts
			*/
			sIFR.activate(archer);
			sIFR.activate(gothamBold);
			sIFR.activate(gothamBook);
			sIFR.activate(gotham);
			sIFR.activate(gothamMed);

			/*
				Hi, we're the replacements
			*/
			sIFR.replace(gothamBold, {
				selector: '#primary h1'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 18px; letter-spacing: 4; text-align: center; text-transform: uppercase; }'
				]
				,filters: {
					DropShadow: {
						angle: 90
						,blurX: 0
						,blurY: 0
						,distance: 1
						,color: '#FFFFFF'
						,strength: 2
						,alpha: .5
					}
				}
				,wmode: 'transparent'
			});
			sIFR.replace(gothamBold, {
				selector: '#section-intro .main h1'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 24px; letter-spacing: 2; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamBold, {
				selector: 'ul.areas h2 b'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #33732E; font-size: 12px; text-transform: uppercase; }'
					,'a:link { color: #33732E; text-decoration: none; }'
					,'a:hover { color: #000000; text-decoration: none; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamBook, {
				selector: 'h2.main'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 32px; leading: 2; letter-spacing: 0; text-align: center; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#feat-perspectives h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #000000; font-size: 12px; leading: 0; letter-spacing: 3; text-align: center; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#feat-perspectives h3'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 22px; leading: 0; text-align: center; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#feat-about h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #000000; font-size: 13px; leading: 0; text-align: center; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '#feat-about h3'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-family: "Archer Bold"; font-weight: normal; font-size: 20px; leading: -1px; text-align: center; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '#feat-about div p'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 15px; leading: 3px; }'
					,'a { color: #3E8C39; text-decoration: none; }'
					,'a:hover { color: #000000; text-decoration: none; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.profile cite.fn'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 18px; leading: 6; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.office-info .title b'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #4C4D4D; font-size: 12px; letter-spacing: 3; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#countries h2 b'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #4C4D4D; font-size: 13px; letter-spacing: 3; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#additional h2:first'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #4C4D4D; font-size: 13px; letter-spacing: 3; text-align: center; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.positions .title'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 13px; letter-spacing: 1.5; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.roster h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #4C4D4D; font-size: 13px; letter-spacing: 3; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.caption'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #15590F; font-size: 14px; leading: 3; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.stories h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 14px; leading: 3; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.profile .more-info h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 14px; leading: 3; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.profile .perspectives .title b'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #000000; font-size: 12px; leading: 1; letter-spacing: 1; text-align: center; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '.press i, .perspectives .title b'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #000000; font-size: 12px; leading: 1; letter-spacing: 1; text-transform: uppercase; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '.story h3'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #428D38; font-size: 17px; leading: 3; }'
				]
				,tuneHeight : "-3px"
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: 'body.layout-3col #primary .inner h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #15590F; font-size: 15px; leading: 1; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '.perspectives .story cite'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #15590F; font-size: 15px; leading: -1; }'
					,'a { color: #15590F; text-decoration: none; }'
					,'a:hover { color: #000000; text-decoration: none; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: '#additional blockquote'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #15590F; font-size: 13px; font-family: Gotham-Medium; leading: 3; text-align: right; }'
					,'strong { font-family: Gotham-Bold; font-weight: normal; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '.dual blockquote'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #428D38; font-family: "Archer Bold"; font-size: 16px; font-weight: normal; leading: 2; text-align: right; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(gothamMed, {
				selector: 'div.email form h2'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 14px; leading: 2; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '.full-article blockquote.excerpt'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #428D38; font-size: 16px; leading: 3; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: 'blockquote.excerpt'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #428D38; font-size: 17px; leading: 2; text-align: right; }'
				]
				,wmode: 'transparent'
			});
			sIFR.replace(archer, {
				selector: '#related h3'
				,css: [
					'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 17px; leading: 2; text-align: left; }'
				]
				,wmode: 'transparent'
			});
		}
		,labelText : function() {
			$("input[type=text]").each(function() {
				$(this).attr("default", $(this).attr("value"));

				$(this).focus(function() {
					if ($(this).attr("value") == $(this).attr("default")) {
						$(this).attr("value", "");
					}
				}).blur(function() {
					if ($(this).attr("value") == "") {
						$(this).attr("value", $(this).attr("default"));
					}
				});
			});
		}
		,printLink : function() {
			$("ul.tools").append('<li class="print last"><a href="javascript:window.print();">Print</a></li>');
		}
		,tagIt : function() {
			var c = HCW;
			$("html").addClass(c.Config.sHTMLtag);
		}
	}
};

HCW.init();
