$(function(){if(document.getElementById("hour1")!=undefined&&location.href.indexOf("entrycomplete")==-1){UpdateTime2();setInterval("UpdateTime2()",1000)}if(document.getElementById("hour1q")!=undefined&&location.href.indexOf("entrycomplete")==-1){UpdateTime3();setInterval("UpdateTime3()",1000)}if(document.getElementById("hours")!=undefined&&location.href.indexOf("entrycomplete")==-1&&location.href.indexOf("dailyprize")==-1){UpdateTime();setInterval("UpdateTime()",1000)}if(typeof hyphenate!=="undefined"){$(".top-prize p").hyphenate()}AlignContent()});$(function(){$(".language").click(function(){$("#fldLanguage").val($(this).next().val())})});function UpdatePrize(){if(spanPr!=undefined){if(currentItem==items-1){currentItem=0}else{currentItem+=1}spanPr.innerHTML='<a href="'+competitionUrl+prizes[currentItem].url+'">'+prizes[currentItem].callToAction+"</a>";ScrollIn()}}function ScrollOut(){var a=parseInt(spanPr.style.left);a-=3;spanPr.style.left=a+"px";if(a>-284){if(timeoutTime>30){timeoutTime-=5}setTimeout("ScrollOut()",timeoutTime)}else{spanPr.style.left="284px";UpdatePrize()}}function ScrollIn(){var a=parseInt(spanPr.style.left);a-=3;spanPr.style.left=a+"px";if(a>0){if(timeoutTime<100&&a<50){timeoutTime+=2}setTimeout("ScrollIn()",timeoutTime)}else{timeoutTime=100;spanPr.style.left="0px";window.setTimeout("ScrollOut()",5000)}}var newwindow;function popup(a){newwindow=window.open(a,"name","height=700,width=700");if(window.focus){newwindow.focus()}}function UpdateTime2(){ss-=1;if(ss<0){ss=59;mm-=1}if(mm<0){mm=59;hh-=1}if(hh<0){hh=23}var a=document.getElementById("hour1");var b=document.getElementById("hour2");var c=document.getElementById("minute1");var d=document.getElementById("minute2");var e=document.getElementById("second1");var f=document.getElementById("second2");if(a!=undefined){a.style.backgroundPosition=-20*getNumber(hh,0)+"px";b.style.backgroundPosition=-20*getNumber(hh,1)+"px";c.style.backgroundPosition=-20*getNumber(mm,0)+"px";d.style.backgroundPosition=-20*getNumber(mm,1)+"px";e.style.backgroundPosition=-20*getNumber(ss,0)+"px";f.style.backgroundPosition=-20*getNumber(ss,1)+"px"}}function UpdateTime3(){ss-=1;if(ss<0){ss=59;mm-=1}if(mm<0){mm=59;hh-=1}if(hh<0){hh=23}var a=document.getElementById("hour1q");var b=document.getElementById("hour2q");var c=document.getElementById("minute1q");var d=document.getElementById("minute2q");var e=document.getElementById("second1q");var f=document.getElementById("second2q");if(a!=undefined){a.style.backgroundPosition=-25*getNumber(hh,0)+"px";b.style.backgroundPosition=-25*getNumber(hh,1)+"px";c.style.backgroundPosition=-25*getNumber(mm,0)+"px";d.style.backgroundPosition=-25*getNumber(mm,1)+"px";e.style.backgroundPosition=-25*getNumber(ss,0)+"px";f.style.backgroundPosition=-25*getNumber(ss,1)+"px"}}function getNumber(d,c){var a=parseInt(d);if(c==0&&a<10){return 0}else{if(a<10){return a}}var b=parseInt((d+" ").substr(c,1));return isNaN(b)?0:b}function UpdateTime(){ss-=1;if(ss<0){ss=59;mm-=1}if(mm<0){mm=59;hh-=1}if(hh<0){hh=23}var a=document.getElementById("hours");var b=document.getElementById("minutes");var c=document.getElementById("seconds");if(a!=undefined){if(hh<10){a.innerHTML="0";a.innerHTML+=hh}else{a.innerHTML=hh}if(mm<10){b.innerHTML="0";b.innerHTML+=mm}else{b.innerHTML=mm}if(ss<10){c.innerHTML="0";c.innerHTML+=ss}else{c.innerHTML=ss}}}$(function(){$(".customRad").addClass("customEnabled");$(".customRad input").after("<div></div>");var a=function(){$(this).parent().parent().children().children("div").removeClass("checked");$(this).parent().children("div").addClass("checked");$(this).parent().children("input").attr("checked","checked")};$(".customRad div").click(a);$(".customRad label").click(a)});$(document).ready(function(){$.extend($.expr[":"],{currentPage:function(a){return a.href&&(a.href===window.location.href||(a.href.match(/-competitions$/)&&window.location.href.match(/-competitions$/)))}});$(".nav-wrap ul li a:currentPage").addClass("selected")});function AlignContent(){var a=$(".col");var c=0;for(var b=0;b<a.length;b++){if(a.eq(b).height()>c){c=a.eq(b).height()+parseInt(a.eq(b).css("padding-top"))+parseInt(a.eq(b).css("padding-bottom"))}}for(var b=0;b<a.length;b++){a.eq(b).css("min-height",c-parseInt(a.eq(b).css("padding-top"))-parseInt(a.eq(b).css("padding-bottom")))}}function FormatDate(a){return a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getYear()};
