$(document).ready(
    function(){
    	$("a.popup").popup();
    }
);

jQuery.fn.popup = function() {
	$(this).click(
    	function(e) {
    		if($(this).href()){
				win_name=window.open($(this).href(),$(this).name(),'toolbar=no,location=no,scrollbars=yes,resizable=no,width=720,height=550,status=no,left=50,top=50,screenX=50,screenY=50');
				win_name.focus();
				if(e.target){
					e.preventDefault();
				}else{
					e.returnValue = false;
				}
			}
			return false;
    	}
	); 
	return this;
}

$(document).ready(
    function(){
    	$("a.addpartner").click(
    		function(e){
	    		if($(this).href() && confirm(confirmText.replace('?Cargoagent',$(this).name()))){
	   				$(this).removeClass('addpartner');
	   				$(this).addClass('JT_loader');
    				$(this).parent().load($(this).href());
				}
				if(e.target){
					e.preventDefault();
				}else{
					e.returnValue = false;
				}
				return false;
    		}
    	);
		$("a.addpartners").click(
			function(e){
				$('#JT').remove();
				JT_show(this.href,this.id,this.name);
				if(e.target){
					e.preventDefault();
				}else{
					e.returnValue = false;
				}
				return false;
			}
		);
		$("#langSel").click(
			function(){
				$("div.langSel").toggle();
				return false;
			}
		);
    }
);

