// Van Leasing Quotes


$(document).ready(function() {
	
// Email Series Checkbox

	
// Add button style to Small Product view	
 $('.link-bottom a').addClass('more-btn_small').addClass('ir');
 $('div.sale-list .link-bottom a').removeClass('more-btn_small').addClass('more-btn_smaller');
 	

// Model landing list view
$('.mid-box-mid div#vehicle-model-list p').hide(); // hides <p>{tag_make} {tag_model}</p>

// Create View-van / find out more buttons in list view
$('span.van-link a').addClass('view-van ir');
$('span.find-more a').addClass('find-out-more_btn ir');

// Van Sale pages
$('.content .van-small').hide();
$('.content .large-van-view').show();

$('div.results-box-mid span.spec, div.results-box-mid span.list-link').hide();

//Web App Search Results
$('.webappsearchresults div.van-small ').addClass('hide');
$('.webappsearchresults .search-result').show();


// Manufacturer Landing Views
$('.manufacturer .list-result').hide();
$('.manufacturer .manufacturer-info').show();
	

// Remove duplicate links from list-view
	var seen = {};
$('.list-result p a').each(function() {
    var link = $(this).attr('href');
    if (seen[link]) {
        $(this).remove();		
	} else {
        seen[link] = true;
	}
});


// Change URLs to lowercase

$('.list-result p a, div.link-bottom a').each(function() {
    var href = $(this).attr("href");
    href = href.toLowerCase();
    $(this).attr('href', href);
    //alert(href);

});


}); // end





// UI Date Picker

$(function() {
		$( ".datepicker" ).datepicker({
            dateFormat:" d M, yy",
			showOn: "both",
			buttonImage: "/images/calendar.png",
			buttonImageOnly: true
		});
	});




// UI Accordian

$(function() {
		$( "#accordion" ).accordion();
	});
	
	
	//Sidebar faq
	
$(document).ready(function($) {
       $('.faq-side ul li span').hide();
	   
       $('.faq-side ul li a').click(function(){
               $('.faq-side ul li span').slideUp('fast');
               $(this).parent().next().slideDown('slow');
               return false;
       });
});
		
		
		
		// Get url and hide main navigation on quote page

$(document).ready(function() {
    var pathname = window.location.pathname;
	
	if (pathname === '/customised_quote.html') {
		
		$('#nav ul').hide();
		$('#nav').css('height', 1);
		
		}
		
		//alert(pathname);
});

	  
	  
// Terms Rollovers

$(document).ready(function(){
	
	$("div.term").hover(
  function () {
    $(this).addClass('term-hover');
  }, 
  function () {
    $(this).removeClass("term-hover");
  }
);

});


// Fade cycles
jQuery(document).ready(function(){	
$('.player-small , ol.blogsitesummary').cycle();
});

// disable right-click on images
$(document).ready(function(){	
$('div.container_12 img').attr("oncontextmenu", "return false;");

});

		// Blog post formatting
		
	$(function(){
		
		$(".post-body img").removeAttr("style");
			
				});
			



