var downloadUrl;
var WRInitTime=(new Date()).getTime();
$(document).ready(function(){
//$.unblockUI();
downMessage.init();
});
var popMsgDiv=$('
');
function popMessage(o,onClose){
var m=o.message||o.responseText;
if(m){
var div=popMsgDiv.clone();
div.find('p').html(m).addClass(o.type);
$.blockUI({ message:div, onUnblock:onClose });
}else{
onClose();
}
}
function getURL(u){document.location=u;}
function popURL(u){window.open(u);}
var promoRotator=new function(){
var i=0, ps, l;
this.start=function(els){
ps=els;
l=ps.length;
promoRotator.nxt2();
};
this.next=function(){
ps.eq(i).fadeOut(500,promoRotator.nxt1);
i=i==l-1?0:i+1;
};
this.nxt1=function(){
ps.eq(i).fadeIn(500,promoRotator.nxt2);
};
this.nxt2=function(){
setTimeout(promoRotator.next,4000);
};
}
function gotoPlay(){
var u=getPlayerInfo()?playUrl:siUrl;
getURL(u);
return false;
}
function expClick(e){
var a=$(this),
cont=a.closest('.expandable').find('.exp-cont'),
t=a.attr('title').split('/');
a.text( cont.is(':visible')?t[0]:t[1] );
cont.slideToggle();
return false;
}
var downMessage=new function(){
var t1=25000, t2=180000, to1=null, to2=null;
var div; //=$('click \'Yes\' to download our free Casino while browsing the site
');
this.init=function(){
getDwnldUrl();
if(getPlayerInfo())return;
div=$('#downPop');
if(div.length==0)return;
div.find('.x, .no').click(function(){$.unblockUI(); }); //window.open('http://casinorewardsclub.com/offers/','_blank'); return false;});
div.find('.yes').click(function(){$.unblockUI();startDwnld();});
var ct=new Date().getTime(),
et=$.cookie('enterTime');
if(!et){
$.cookie('enterTime', ct);
et=ct;
}
var t=ct-et;
if(t 1 && String(value) !== "[object Object]") {
options = $.extend({}, options);
if (value === null || value === undefined) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = String(value);
return (document.cookie = [
encodeURIComponent(key), '=',
options.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
options = value || {};
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
};
String.prototype.toQueryParams = function(separator){
var match = $.trim(this).match(/([^?#]*)(#.*)?$/);
if (!match) return { };
var arr=match[1].split(separator || '&'), hash={};
$.each(arr, function(i, pair) {
if ((pair = pair.split('='))[0]) {
var key = decodeURIComponent(pair.shift()),
value = pair.length > 1 ? pair.join('=') : pair[0];
if (value != undefined) value = decodeURIComponent(value);
if (key in hash) {
if (!$.isArray(hash[key])) hash[key] = [hash[key]];
hash[key].push(value);
}else
hash[key] = value;
}
});
return hash;
};