


 
 
 
 
 
 
 
 






function track(what){
 try{pageTracker._trackPageview("'+GASTUB+'/'+what+'/")}catch(x){}; try{_pageTracker._trackPageview("'+GASTUB+'/'+what+'/")}catch(x){}
}

function videoPlay(){
 track("videoPlay");
}



$(function(){



$("#media").fanTabulous();




var $screen = $("#screen > img");
var screenshotsTracked = false;

$("#screenPrev").click(function(){
 currentScreen--;
 if(currentScreen < 0){//>
  currentScreen = numScreen-1;
 }
 return screenSwitch(currentScreen);
});

$("#screenNext").click(function(){
 currentScreen++;
 if(currentScreen >= numScreen){
  currentScreen = 0;
 }
 return screenSwitch(currentScreen);
});

function screenSwitch(currentScreen){

 $screen
 .hide()
  .slice(currentScreen,currentScreen+1)
  .show();

 if(!screenshotsTracked){
  screenshotsTracked = true;
  track("screenshotsNav");
 }

 return false;
}




var flashVer = "8.0.0";
var flashvars = {
 strURL:    "https://secure.jagex.com/m=create/g=kickabout/create_account.ws"
};


if (swfobject.hasFlashPlayerVersion(flashVer)){

 swfobject.embedSWF(
  "http://www.jagex.com/img/jgs/minisites/kickabout/splash/trailer.swf",
  "trailer",
  "410",
  "304",
  flashVer,
  "",
  {
   trailerPath: "http://www.jagex.com/img/jgs/minisites/kickabout/splash/",
   skinPath: "http://www.jagex.com/img/jgs/minisites/splash/"
  },
  {allowScriptAccess: "always"},
  {wmode:"opaque"}
 );

 
 
  swfobject.embedSWF(
  "http://www.jagex.com/img/jgs/minisites/kickabout/splash/Create_Btn.swf",
   "createButton",
   "418",
   "55",
   flashVer,
   "",
   flashvars,
   {allowScriptAccess: "always"},
   {wmode:"opaque"}
  );
 

 if(media == 0){
  $("#trailerTab").click();
 }

}




function setCookie(name, value, host) {
 var date = new Date();
 date.setTime(date.getTime() + 315360000000);
 var expires = date.toGMTString();
 document.cookie = name + "=" + value + "; expires=" + expires + "; path=/; domain=" + host;
}

function getCookie(name){
 var cookies = document.cookie.split('; ');
 var regex = '';
 regex = new RegExp("^" + name + "=(.*)");
 for(var i in cookies){
  if(t = cookies[i].match(regex)){
   return t[1];
  }
 }
 return null;
}





var skip = false;

var nS = $("#noSplash.pretty").addClass("js");
var cookieCount = getCookie(cookieName) || 0;
if(cookieCount == cookieLimit){
 nS.addClass("checked");
 skip = true;
 cookieCount = 0;
}

nS.click(function(){
 if(skip){
  $(this).removeClass("checked");
  setCookie(cookieName, cookieCount, cookieHost);
 }else{
  $(this).addClass("checked");
  setCookie(cookieName, cookieLimit, cookieHost);
 }
 skip = !skip;
 return false;
});


})

