$(document).ready(function(){
   $('a.button').corner('3px');
   $('div.box  h3.h3-buttons-rent-page a').corner('3px');
 
   
   $('#fonts a').click(function(event){
		var font  = $(this).attr('title');
		$('#wrap-grey').css('font-family', font);
   });
   
   $('.question').click(function(event){
		if($(this).hasClass('selected')){
			$(this).removeClass('selected');
			$('div.answer').hide();
		}else{
			$('div.question').removeClass('selected');
			$('div.answer').hide();
			$(this).addClass('selected'); 
			$(this).children().show(); 
		}
   });
   
   $('div.specification-content').load('http://www.gvct.co.uk/wp-content/themes/wp-gvct/specifications/dryvan20-spec.html');
   
   $('div.specifications-links a').click(function(event){
		event.preventDefault();
		$('div.specifications-links a').removeClass('selected');
		$(this).addClass('selected');
		var link = $(this).attr('rel');
		link = 'http://www.gvct.co.uk/wp-content/themes/wp-gvct/specifications/' + link;
		$('div.specification-content').html('<img src="http://www.gvct.co.uk/wp-content/themes/wp-gvct/images/ajax-loader.gif" alt="loader" />');
		//$('div.specification-content').load(link);
		$.get(link, function(data){
			  $('div.specification-content').hide();
			  $('div.specification-content').html(data);
			  $('div.specification-content').fadeIn();
			  
		});
   
   });
   
   $('.banner-wrap').cycle({ 
    fx:     'scrollLeft', 
    timeout: 8000, 
    pager:  '#nav' });
	
   $('#banner-home-new').cycle({ 
    fx:     'scrollLeft',
    pager:  '#nav',
    timeout: 4000 });

   
   $('#name').mouseover(function() {
		var name = $("#name").val()
		if(name == "") { $("#name").val('Name'); }	
	});
	
	$('#cfphone').mouseover(function() {
		var name = $("#cfphone").val()
		if(name == "") { $("#cfphone").val('Phone'); }	
	});
	
	$('#email').mouseover(function() {
		var name = $("#email").val()
		if(name == "") { $("#email").val('E-mail'); }	
	});

	$('#company').mouseover(function() {
		var name = $("#company").val()
		if(name == "") { $("#company").val('Company'); }	
	});
	
	$('#telephone').mouseover(function() {
		var name = $("#telephone").val()
		if(name == "") { $("#telephone").val('Telephone'); }	
	});
	
	$('#message').mouseover(function() {
		var name = $("#message").val()
		if(name == "") { $("#message").val('Message'); }	
	});



     $('#name').click(function() {
		var name = $("#name").val()
		if(name == "Name") { $("#name").val(''); }
	});
	
	 $('#cfphone').click(function() {
		var name = $("#cfphone").val()
		if(name == "Phone") { $("#cfphone").val(''); }
	});
	
	$('#email').click(function() {
		var name = $("#email").val()
		if(name == "E-mail") { $("#email").val(''); }
	});
	
	$('#message').click(function() {
		var name = $("#message").val()
		if(name == "Message") { $("#message").val(''); }
	});
})
