
//document.ready
JQ(function () {
	
	if(nikefootball.GLOBAL_VARIABLES.user && nikefootball.GLOBAL_VARIABLES.user.isEliteCodeUser){
		JQ("#gotTheBoot").remove();
	}

	//use cufon
	var cufonDataHelvetica = [
		{selector: '#nikeFootballPlusDescr'},
    	{selector: '#masterWrap p'}
	];
	nikefootball.training.cufonise(cufonDataHelvetica, 'HelveticaNeueCondensed', 'HelveticaNeueLTProMediumCondensed');
	
	var cufonDataRhode = [
		{selector: 'h2'},
		{selector: 'h3'},
		{selector: '.nikeFootballPlusRepl'},
		{selector: '.nikeSoccerPlusRepl'},
		{selector: '#shopunlock a', options: {hover: true}},
		{selector: '#masterWrap span.avail'},
		{selector: '#goelite #gotTheBoot #eliteCardBlock p'},
		{selector: '#watchTheVideo a', options: {hover: true}}
	];
	nikefootball.training.cufonise(cufonDataRhode, 'Rhode-MediumCondensed', 'HelveticaNeueLTProBoldCondensed');

    JQ("#shopunlock").click(function(e){
      document.location.href = JQ('#shopunlock a').attr('href'); //grab the value which will come from the ftl template and make the whole visual area of the button look and act clickable    
    });
    
    // modify width of the Master Control / Accuracy / Speed link texts when cufon is applied
    if (JQ("#masterWrap span.avail span").hasClass("cufon")) {
      JQ("#masterWrap span.avail").css("width","142px");
      JQ("#masterWrap span.avail").attr("rel","generated");
    }
    //update font-size when cufon is applied
    if (JQ("#shopunlock a span").hasClass("cufon")) {JQ("#goelite #shopunlock").css("font-size","2.4em");}
  
})

JQ(window).load(function(){
  
    //elite code card group box background
     JQ('#gotTheBootGradient').liquidCanvas("[shadow {width: 1; color: #e5e5e5; shift:1;} gradient{from:#ebebeb; to:#f6f6f6;}] => roundedRect{radius:9}");
	 
	if(nikefootball.GLOBAL_VARIABLES.user && nikefootball.GLOBAL_VARIABLES.user.isTrainingUser){
		var newHref = "/nikefootball/training/mytraining";
		JQ("#gotTheBoot a").attr("href",newHref);
	}
     
})
     
