				$(document).ready(function() {
					var options = { path: '/', expires: 30 };
					//check if ppp ac cookie exists, if not check URL variables and create if found
					if ($(document).getUrlParam("campaign")){
							if ((!$.cookie('ppp_ac')) || ($.cookie('ppp_ac_val') != $(document).getUrlParam("campaign"))) {
								$.cookie('ppp_ac', 'campaign', options); //set cookie variable
								$.cookie('ppp_ac_val', $(document).getUrlParam("campaign"), options); //set cookie variable value	
							}
							var campaign_name = $(document).getUrlParam("campaign"); 
					}else{
							var campaign_name = ($.cookie('ppp_ac')=='campaign' && $.cookie('ppp_ac_val'))?$.cookie('ppp_ac_val'):'default'; 						
					}
					var campaign = {
								"campaign1": {'intro-text':'AXA PPP healthcare provide private medical insurance. We have a range of products and benefits to allowing you to choose what\'s best for you, your family and your budget.<br /><br />Don\'t forget, buy before 20&nbsp;September&nbsp;2010 and get our online double discount of up to 15%*, plus 1 months\' cover FREE.', 'li-text':'A range of plans to suit your budget, get our online double discount of up to 15%*, plus 1 months\' cover FREE ', 'bottom-text':'*Your first months cover of your new annual policy will be free of charge. Offer is valid until 19&nbsp;September&nbsp;2010 and applies to all new UK Individual PMI Plans. One month free offer cannot be used in conjunction with any other offers other than up to 15% discount for buying online (10% online discount and 5% annual payment discount) or 5% discount for annual payment if purchased offline.',  'img':'campaign1.jpg' },
								"campaign2": {'intro-text':'AXA PPP healthcare provide private medical insurance. We have a range of products and benefits to allowing you to choose what\'s best for you, your family and your budget.<br /><br />Don\'t forget, we\'re offering 12 months\' cover for the price of 9* on our private medical insurance, when you buy online.', 'li-text':'A range of plans to suit your budget, plus get 12 months\' cover for the price of 9*<br /><br />', 'bottom-text':'*The 3 month\'s cover free (or 12 months cover for the price of 9) offer cannot be used in conjunction with any other offer. Your first three months cover on your new annual policy will be free of charge; your first payment will be taken on the fourth month of cover.', 'img':'campaign2.jpg'},
								"default": {'intro-text':'AXA PPP healthcare provide private medical insurance. We have a range of products and benefits to allowing you to choose what\'s best for you, your family and your budget.<br /><br />Don\'t forget, buy before 20&nbsp;September&nbsp;2010 and get our online double discount of 10%*, plus 1 months\' cover FREE.', 'li-text':'A range of plans to suit your budget, get our online double discount of 10%*, plus 1 months\' cover FREE ', 'bottom-text':'*Your first months cover of your new annual policy will be free of charge. Offer is valid until 20&nbsp;September&nbsp;2010 and applies to all new UK Individual PMI Plans. One month free offer cannot be used in conjunction with any other offers other than up to 15% discount for buying online (10% online double discount and 5% annual payment discount) or 5% discount for annual payment if purchased offline.',  'img':'default-campaign.gif' }
								};
					var campaign_data = {
						   "8216Keywordactivity": "default",
						   "8111Websitemori": "default",
						   "8102coldemailaugdouble": "campaign1" ,
						   "8093coldemailaug3mth": "campaign2" ,
						   "8094coldemailaug3mths": "campaign2"
					};
					if($.cookie('ppp_ac')=='campaign' && $.cookie('ppp_ac_val')!=''){
						if(campaign_data[campaign_name]){
							$('#intro-text').html(campaign[campaign_data[campaign_name]]['intro-text']);
							$('#li-text').html(campaign[campaign_data[campaign_name]]['li-text']);
							$('#bottom-text').html(campaign[campaign_data[campaign_name]]['bottom-text']);
							$('#campaign-content').css('background-image','url(/assets/modules/personal-get-quote-widget/images/'+campaign[campaign_data[campaign_name]]['img']+')');
						}
					}
					if(campaign_data[campaign_name]){	
							$('#our-cover-link').attr('href',$('#our-cover-link').attr('href')+'?campaign='+campaign_name);
							$('#find-more-link').attr('href',$('#find-more-link').attr('href')+'?campaign='+campaign_name);
							$('#learn-more-link').attr('href',$('#learn-more-link').attr('href')+'?campaign='+campaign_name);
							$('#retrieve-quote-link').attr('href',$('#retrieve-quote-link').attr('href')+'?campaign='+campaign_name);
							$('.button-quote-big').attr('href',$('.button-quote-big').attr('href')+'?campaign='+campaign_name);
					 }
				});
