var load = "<div class='load' id='load'></div>";
	
$(document).ready(function (){
	$('.LightBoxLink').click(function (){
		LightBoxShow();
		$('#LightBox').html(load);
		$('#LightBox').load(this.href);
		return false;
	});
	
	$('a').click(function (){
		if(this.className == 'news' || this.className == 'more'){
			return true;
		}
		var patrn = /^http:\/\/www|it|de|fr|www.puntersrealm.com\//;
		if(!patrn.exec(this.href)){
			if(country == 'US'){
				LightBoxShow();
				$('#LightBox').html(load);
				$('#LightBox').load('/form/books/');
				return false;
			}
		}
	});
	var options = { 
        target:        '#LightBox',
        beforeSubmit:  showRequest,
        success:       showResponse
    }; 
	$('.LightBoxForm').ajaxForm(options);
	$("a[@href*=/pm/]").click(function(){ 

		var regx = /pm\/(.*)/i;

		var partner = regx.exec( this.href );

		if ( partner && partner[1] )
		{
			partner_name = partner[1];
		}

		s.linkTrackVars = "events,products";
		s.linkTrackEvents="purchase";
		s.events="purchase";
		s.products=";" + partner_name + ";1;1.0";
		s.referrer=document.location.href;

		s.tl(this,'e',partner_name);

		s.linkTrackVars = "";
		s.linkTrackEvents = "";
		s.events = "";
		s.products= "";
		
		s.pageName = this.pathname.toLowerCase()+this.search;

		void(s.t());
	
		window.open( this.href );
		return false;
	});

});
function showRequest(formData, jqForm, options) {
	if($('#LightBox').css('display') == 'none'){
		$('#LightBox').show('slow');
	}
	$('#LightBox').html(load);
}
 
// post-submit callback 
function showResponse(responseText, statusText)  { 
    $('#LightBox').html(responseText);
}
function LightBoxShow()
{
	if($('#LightBox').css('display') == 'none'){
		$('#LightBox').show('slow');
	}else{
		$('#LightBox').hide('slow');
	}
}