var cart_url = 'http://www.generic4all.com/basket.dhtml';
var affiliate_pageID = '13225';
var basedomain = 'http://www.generic4all.com';
var product_images = basedomain +'/upload_files/product_images/'

if (!affiliate_pageID || parseInt(affiliate_pageID) == NaN)
{
	affiliate_pageID = gup('refID');
}

if (!affiliate_pageID || parseInt(affiliate_pageID) == NaN)
{
		affiliate_pageID = 0;
}

//Replacing links.
$('a[href*={refID}]').each(function(){
		this.href = this.href.replace(/{refID}/gi, affiliate_pageID);
		this.href = this.href.replace(/%7BrefID%7D/gi, affiliate_pageID);
});


function gup(name)
{
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null ) return "";
	else return results[1];
}


var product_selects = {
	0: {
		elm_id: 'product-options-1',
		productID: 4
	},
	1: {
		elm_id: 'product-options-2',
		productID: 1
	},
	2: {
		elm_id: 'product-options-3',
		productID: 173
	},
	3: {
		elm_id: 'product-options-4',
		productID: 7
	},
	4: {
		elm_id: 'product-options-5',
		productID: 218
	},
	5: {
		elm_id: 'product-options-6',
		productID: 191
	},
	6: {
		elm_id: 'product-options-7',
		productID: 41
	},
	7: {
		elm_id: 'product-options-8',
		productID: 242
	},
	8: {
		elm_id: 'product-options-9',
		productID: 326
	},
	9: {
		elm_id: 'product-options-10',
		productID: 172
	},
	10: {
		elm_id: 'product-options-11',
		productID: 327
	},
	11: {
		elm_id: 'product-options-12',
		productID: 373
	},
	12: {
		elm_id: 'product-options-13',
		productID: 196
	},
	13: {
		elm_id: 'product-options-14',
		productID: 325
	},
	14: {
		elm_id: 'product-options-15',
		productID: 219
	},
	15: {
		elm_id: 'product-options-16',
		productID: 5
	},
	16: {
		elm_id: 'product-options-17',
		productID: 115
	},
	17: {
		elm_id: 'product-options-18',
		productID: 396
	},
	18: {
		elm_id: 'product-options-19',
		productID: 390
	},
	19: {
		elm_id: 'product-options-20',
		productID: 391
	}
};
