// JavaScript Document
var disableBook = false;
var emailpre = 'mailto:info';
var emailsuf = 'goodskillstraining.co.uk';

$(window).load(function () {
	

	if(isFontFaceSupported() == false){
		$('#alien').hide();
	}
	
	/** Cloaks email address of head email link **/
	$('#head-email > a').each(function(){
		$(this).attr('href',emailpre + '@' + emailsuf);	
	});
	
	/** javascript replacement of target="_blank" **/
	$('.tb').each(function(){
		$(this).click(function(e){
				e.preventDefault();
				window.open(this.href);
				
		});
	
	});
	
	
	$('#go-button').click(function(e){
		e.preventDefault();
		$('#searchform').submit();
	});
	
	 $('#passentry').hide();
	$('#changepass').click(function(){ $('#passentry').toggle(); });
	
/**
	$('.book-btn').each(function(){
		$(this).click(function(e){
			if(disableBook == true){
				e.preventDefault();
				alert("Online ordering is Currently Suspended\r\nPlease call\r\n01279 254 150\r\nto enquire about booking this course");
			}
		});
	});**/
			
	
});

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8117633-17']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
