$(window).load(function(){$("#logo").attr('src','http://imgs.wikibingo.co.uk/logo_image.png ');$("body").css('background','#30a112 url(\'http://imgs.wikibingo.co.uk/BGSetnewyear.jpg\') top fixed repeat-x');$('#thinking').attr('onclick','closeMsg()');if ( banners.length > 0 ){$.each(banners, function(index, val) {var img = new Image();var link = document.createElement('a');switch( index ){case 3:{var redirect = 'bet365-bingo';break;} case 2:{var redirect = 'wink-bingo';break;} case 1:{var redirect = 'red-bus-bingo';break;} case 0:{var redirect = 'bingo-hollywood';break;}} link.setAttribute('href', '/redirect/'+redirect);link.setAttribute('target', '_blank');$(img).attr('src',val);$(img).attr('width',522);$(img).attr('height',194);$(link).append($(img));$('#slider').append(link);});$('#slider').nivoSlider({effect:'fade', animSpeed:300, pauseTime:4000, directionNav:false});} $(".play-bingo").each(function(index,el){$(el).replaceWith('<a class=play-bingo href="/redirect/'+$(el).attr('id')+'" target="_blank"></a>');});$(".play-bingo-route").each(function(index,el){$(el).replaceWith('<a class=play-bingo-route onclick="route(\''+$(el).attr('id')+'\')"></a>');});$(".mplay-bingo").each(function(index,el){$(el).replaceWith('<a class=mplay-bingo href="/redirect/'+$(el).attr('id')+'" target="_blank"></a>');});$(".mplay-bingo-route").each(function(index,el){$(el).replaceWith('<a class=mplay-bingo-route onclick="route(\''+$(el).attr('id')+'\')"></a>');});$(".bingo_logo_loader").each(function(index,el){$(el).css('display','none');$(el).css('background','url(\'http://imgs.wikibingo.co.uk/blank.png\')');$(el).attr('src',images[index]);$(el).fadeIn();});$("#facebook").hover(function(){$(this).css('height','30px');$('#twitter').css('margin-top','7px');$('#rss').css('margin-top','7px');}, function(){$(this).css('height','23px');$('#twitter').css('margin-top','0px');$('#rss').css('margin-top','0px');});$("#twitter").hover(function(){$(this).css('height','30px');$('#facebook').css('margin-top','7px');$('#rss').css('margin-top','7px');}, function(){$(this).css('height','23px');$('#facebook').css('margin-top','0px');$('#rss').css('margin-top','0px');});$("#rss").hover(function(){$(this).css('height','30px');$('#twitter').css('margin-top','7px');$('#facebook').css('margin-top','7px');}, function(){$(this).css('height','23px');$('#twitter').css('margin-top','0px');$('#facebook').css('margin-top','0px');});});function openJackpot(id){if ( document.getElementById(id).style.display == "none" ){document.getElementById(id).style.display = "block";document.getElementById("open_"+id).innerHTML = "Close";}else{document.getElementById(id).style.display = "none";document.getElementById("open_"+id).innerHTML = "More Details";}} function openMessage(){$('#flash').hide();$('#msg_body').html('');$('#message').css('top',( $(document).scrollTop() + (document.documentElement.clientHeight/2-100)));$('#thinking').height($('body').height()+19);$('#message').css('background','url(http://imgs.wikibingo.co.uk/message.png)');$('#thinking').fadeIn('slow');$('#message').fadeIn('fast');} function route(id){$('#msg_body').html('');$('#message').css('width','770px');$('#message').css('margin-left','-385px');$('#message').css('height','300px');$('#message').css('top',( $(document).scrollTop() + (document.documentElement.clientHeight/2-150)));$('#thinking').height($('body').height()+19);$('#message').css('background','white url(http://imgs.wikibingo.co.uk/popup-logo.png) bottom right no-repeat');$('#thinking').fadeIn('slow');$('#message').fadeIn('fast');$('#msg_title').html('<h7>Before you proceed, we wanted to let you know there are far better offers available on these online bingo rooms:</h7>');$('#msg_body').attr('id','msg_route');$('h7').css('background','url(http://imgs.wikibingo.co.uk/blank.png) no-repeat');$.post("/routebody/"+id,function(data){$('#msg_route').html(data);});} function registerNewsletter(location ){openMessage();$('#msg_title').html('<h7>Newsletter Registration</h7>');$.post("/newsletter", {name:$("input[name=name]").val(), email:$("input[name=email]").val(), terms:$("input[type=checkbox]:checked").length}, function(data){$('h7').css('background','url(http://imgs.wikibingo.co.uk/blank.png) no-repeat');if ( data[0] == '1' ){$('#msg_body').css('top','50%');$('#msg_body').css('margin-top','-70px');$('#msg_body').css('text-align','left');$('#msg_body').html('<strong style="color:#ad0069;">Congratulations! </strong><br><strong>' + data.substr(1) + '</strong>');$('#newsletter').fadeOut('fast');} else {$('#msg_body').html('<strong style="color:#ad0069">Oops... </strong> <strong>' + data + '</strong>');}});} function leaveComment(location){openMessage();$('#msg_title').html('<h7>Leave Comment</h7>');$.post("/comment", {type_id:$("input[name=type_id]").val(), parent_id:$("input[name=parent_id]").val(), name:$("input[name=comment_name]").val(), email:$("input[name=comment_email]").val(), website:$("input[name=website]").val(), comment:$("textarea[name=user_comment]").val()}, function(data){$('h7').css('background','url(http://imgs.wikibingo.co.uk/blank.png) no-repeat');if ( data[0] == '1' ){$('#msg_body').css('top','50%');$('#msg_body').css('margin-top','-70px');$('#msg_body').css('text-align','left');$('#msg_body').html('<strong style="color:#ad0069;">Thank you for contributing! </strong><br><strong>' + data.substr(1) + '</strong>');} else {$('#msg_body').html('<strong style="color:#ad0069">Oops... </strong> <strong>' + data + '</strong>');}});} function remindMe(el,id){openMessage();$('#msg_title').html('<h7>Jackpot Reminder</h7>');$('#msg_body').attr('id','msg_reminder');$('h7').css('background','url(http://imgs.wikibingo.co.uk/blank.png) no-repeat');$.post("/reminderBody/"+id,function(data){$('#msg_reminder').html(data);});} function createRemind(id){$("#err").html('');$('h7').css('background','url(http://imgs.wikibingo.co.uk/think.gif) right no-repeat');$.post("/createreminder", {jackpot_id:id, email:$("input[name=reminder_email]").val(), name:$("input[name=reminder_name]").val(), terms:$("input[name=reminder_terms]").is(':checked'), over:$("input[name=reminder_over]").is(':checked')}, function(data){if ( data[0] != '1' ) $("#err").html(data);else{$('#msg_reminder').attr('id','msg_body');$('#msg_body').css('margin-top','-50px');$('#msg_body').html('<strong style="color:#ad0069">Congratulations! </strong><br><strong>' + data.substr(1) + '</strong>');} $('h7').css('background','url(http://imgs.wikibingo.co.uk/blank.png) no-repeat');});} function closeMsg(){$('#flash').show();$('#thinking').fadeOut('slow');$('#message').fadeOut('fast');$('#msg_reminder').html('');$('#msg_reminder').attr('id','msg_body');}

