	/* glp cookies */						
	/* if the user has a cookie set already from a previous visit, redirect them now */
	/*
	var userLocation = $.cookies.get('international_location');
	if (userLocation == "us") {
		location="us_homepage.shtml";
	} else if (userLocation == "uk") {
		location="uk/uk_homepage.shtml";
	} else if (userLocation == "ca") {
		location="http://www.pyramis.ca";
	} else if (userLocation == "hk") {
		location="hk/ch/hk_homepage.shtml";
	} 
	*/
     
	/* listen for link clicks and set the location cookie appropriately */ 
	$(document).ready(function() {  
			
		$('#glp-hover-us2').click(function(event) {
			if (userLocation == null) {
				if ($('#location_chkbx').attr("checked") == true) {
					$.cookies.set('international_location','us',{hoursToLive: 9999});
					var userLocation = $.cookies.get('international_location');
				}
				location="../us_homepage.shtml";
			}
						
		});
		
		$('#glp-hover-uk2').click(function(event) {
			if (userLocation == null) {
				if ($('#location_chkbx').attr("checked") == true) {
					$.cookies.set('international_location','uk',{hoursToLive: 9999});
					var userLocation = $.cookies.get('international_location');
				}
				location="../uk/uk_homepage.shtml";
			}
		});
		
		$('#glp-hover-ca2').click(function(event) {
			if (userLocation == null) {
				if ($('#location_chkbx').attr("checked") == true) {
					$.cookies.set('international_location','ca',{hoursToLive: 9999});
					var userLocation = $.cookies.get('international_location');
				}
				location="http://www.pyramis.ca";
			}
		});
		
		$('#glp-hover-hk2').click(function(event) {
			if (userLocation == null) {
				if ($('#location_chkbx').attr("checked") == true) {
					$.cookies.set('international_location','hk',{hoursToLive: 9999});
					var userLocation = $.cookies.get('international_location');
				}
				location="hk/en/hk_homepage.shtml";
			}
		});
		
		$('#glp-hover-other2').click(function(event) {
			if (userLocation == null) {
				if ($('#location_chkbx').attr("checked") == true) {
					$.cookies.set('international_location','us',{hoursToLive: 9999});
					var userLocation = $.cookies.get('international_location');
				}
				location="../us_homepage.shtml";
			}
		});
		
							
	});
	/* end glp functionality */

