

( function($) {// bodyguard function
	$(document).ready(function() { 

		$('.site-country a').click(function (){
			if ($('#countyCodes').html() == ''){	//checkif #countyCodesisloadedthroughajax,if notthenGet
				$('#countyCodes').load('/standimg/_RESOURCE/modules/countryCodes.html',function (response,status,xhr){
					if (status == "error"){
						var msg = "Sorrybuttherewasanerror:";
						$("#error").html(msg+xhr.status+""+xhr.statusText);
					}else{
		myStatus('$countryCode>aclickedfirsttimeandloadsuccess');
					}
				});
				$('#countyCodes').fadeToggle('slow');
			}else{
			//	myStatus('countryCode.htmlnotloaded');
				$('#countyCodes').fadeToggle('slow');
			}
		});

	});// bodyguard function
}) (jQuery);

//***old scripts not needed *//

//from SBHelpMeDecide.jsp
//	function openPage(url) {
//		var index = eval(document.guideform.guidelinks.selectedIndex - 1);
//		if (index != null && index >= 0) {
//			var target = eval('document.guideform.targetHid' + index + '.value');
//			if (target == 'URL') {
//				window.open(url, '', 'width=570,height=600,status=no,location=no,scrollbars=yes');
//				void(0);
//			} else {
//				document.location.href = url;
//			}
//		}
//		return true;
//	}
////till here
//
////from SBSectionList.jsp
//	function extPage(url) {
//		document.location.href = url;
//		return true;
//	}
//	function newPage(url){
//		window.open(url);
//		return true;
//	}

