jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

// Copyright 2007 Bontrager Connection, LLC
// http://BontragerConnection.com/
//
// Type the domain name for the cookie.
// These examples use domain name example.com. Use your own 
//    domain name instead.
// To cookie can be applied to the www.example.com and/or 
//    the example.com versions of URL. Decide which you 
//    want (or both) and specify the domain below.
//       "www.example.com" (sets cookie for 
//                          http://www.example.com/)
//       "example.com"     (sets cookie for 
//                          http://example.com/)
//       ".example.com"    (sets cookie for both 
//                          http://www.example.com/ and 
//                          http://example.com/ -- and also
//                          http://anything.example.com)

var CookieDomain = ".primemarkets.co.uk/";


// Specify the directory the cookie is set for.
// To apply the cookie to the entire domain, specify "/"
// To apply the cookie to only a certain directory (and its 
//    subdirectories), specify "/directoryname"

var CookieDirectory = "/";


// Specify the cookie name. The name may have only letters 
//    and numbers.
// The name matters only to make sure no other cookie with 
//    the same name is set for this domain and directory.

var CookieName = "disclaimeragree";


// Specify how many days the cookie shall last. Use the 
//    number 0 to make it a session cookie (a cookie that 
//    will self-delete when the browser closes).

var DaysCookieShallLive = 365;


//
// No other customization needs to be done in this JavaScript.
//
////  ////  ////  ////

function GiveCookie() {
var d = parseInt(DaysCookieShallLive);
var exp = '';
if(d > 0) {
	var now = new Date();
	then = now.getTime() + (d * 24 * 60 * 60 * 1000);
	now.setTime(then);
	exp = '; expires=' + now.toGMTString();
	}
document.cookie = CookieName+'=set; path='+CookieDirectory+'; domain='+CookieDomain+exp;
}

function HasCookie() {
var cookiecontent = new String();
if(document.cookie.length > 0) {
	var cookiename = CookieName+'=';
	var cookiebegin = document.cookie.indexOf(cookiename);
	var cookieend = 0;
	if(cookiebegin > -1) {
		cookiebegin += cookiename.length;
		cookieend = document.cookie.indexOf(";",cookiebegin);
		if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
		cookiecontent = document.cookie.substring(cookiebegin,cookieend);
		}
	}
if(cookiecontent.length > 0) { return true; }
return false;
}



$(document).ready(function(){ 
if(HasCookie()) { return; }
		GiveCookie();
	$.cookie('disclaimeragree', 'disclaimer', {expires:365, path: '/'});

	setTimeout("initit()",100);
	initit = function() {
		
		
		 $('#activateme').trigger('click'); 
		}

});



