// JavaScript Document
$(document).ready(function(){

	var url = window.location.pathname; // get url path
	var _ReturnURL = url.substring(url.lastIndexOf('/')+1); // get filename from url path

	$("a.atc").each(function() { // for every anchor tag with class="cart" do the following
		var _href = $(this).attr("href"); // get href attribute of anchor tag
	   	$(this).attr("href", _href + '&ReturnURL=/' + _ReturnURL ); // modify href attribute of anchor tag with variables
	});
	$("a.camp").each(function() { // for every anchor tag with class="cart" do the following
		var _href = $(this).attr("href"); // get href attribute of anchor tag
	   	$(this).attr("href", _href + '?campaign=' + _Campaign); // modify href attribute of anchor tag with variables
	});
	$("a.chapman").each(function() { // for every anchor tag with class="cart" do the following
		var _href = $(this).attr("href"); // get href attribute of anchor tag
	   	$(this).attr("href", _href + '&portal=CU'); // modify href attribute of anchor tag with variables
	});
	$("a.adams").each(function() { // for every anchor tag with class="cart" do the following
		var _href = $(this).attr("href"); // get href attribute of anchor tag
	   	$(this).attr("href", _href + '&portal=ASC'); // modify href attribute of anchor tag with variables
	});	
 });
