/***********************
*  Site Specific JS   *
************************/

// Custom JavaScript Document


$(document).ready(function(){  
  if ($('body').attr('id') == 'page-not-found') {
    $('#error').addClass('container well-large text-center');
    $('#header').prependTo('body');
  } else {
    $('page-not-found').remove();
  }
$('#peelback').remove();
$('.main-nav').appendTo('nav');
$('#logo').html('<a href="/"><img src="http://cdn.myld.com.au/2/318/action-driver-training_0b27df9a33.png" alt="" /></a>').appendTo('.logo2').addClass('fadeInLeft animated');

  //********Windows IE8 and below popup*********//   		     		
	$("body").browserDetect( {     	
		name: "Action Driver Training",     
		logo: "http://cdn.myld.com.au/2/318/web_action-driver-training_0b27df9a33.png",      
		phone: "0402 023 351",     //optional
		fax: "",      //optional
		email: "iananthonyturner@gmail.com",      //optional
		address: "PO Box 2232 Noosa Qld 4567",  //optional	
		ldprofile: "http://www.localdirectories.com.au/Sunshine-Coast,QLD/Action-Driver-Training/profile/JsQA"  
	});  


  var images = [
    "http://cdn.myld.com.au/2/318/action-driver-training_601a92d4c6.jpg",
		"http://cdn.myld.com.au/2/318/action-driver-training_4e84f90fb0.jpg",
		"http://cdn.myld.com.au/2/318/action-driver-training_c295ef7440.jpg"
    ];
    
 // Get three random numbers between 0 and the number of images
 var randomNumber = Math.floor( Math.random() * images.length );
 var randomNumber2 = Math.floor( Math.random() * images.length );
 var randomNumber3 = Math.floor( Math.random() * images.length );
 
$('#slider').backstretch([
images[randomNumber],
images[randomNumber2],
images[randomNumber3]
], {duration: 3000, fade: 750});

$('#welcome').backstretch("http://cdn.myld.com.au/2/318/action-driver-training_1ecd49ae40.jpg");
	
	
	// Contact Us map
	$('#map').gmap3({
	 marker:{
		 address: "7 Helm Court, Noosaville, Queensland" //place Your address here
	 },
	 map:{
		 options:{
			 zoom: 15
		 }
	 }
 });
 
 
 
});


$(document).ready(function(){  
  mobileTel(402023351); //business phone number  
});