	
	function dropDown()
	{
		$('#manufacturer').change(function(){
			if(this.value!=''){
				Populate();
				//alert (this.value);
			}else{
				alert ('Everything looks so dark');
			}
		});
		
		$('#manufacturerForm').change(function(){
			if(this.value!=''){
				PopulateForm();
				//alert (this.value);
			}else{
				alert ('Everything looks so dark');
			}
		});

	}

	
	function Populate()
	{
		$("#populate_menu").load("/includes/ajax/populate_menu.php?manufacturer="+$('#manufacturer').val());
		//$("#populate_model_menu").load("/includes/ajax/populate_model_menu.php?manufacturer="+$('#manufacturer').val());
	}
	
	function PopulateForm()
	{
		$("#populate_menu_form").load("/includes/ajax/populate_menu.php?manufacturer="+$('#manufacturerForm').val());
	}	
	function imageCycle(selector)
	{
		$(selector).cycle({fx: 'fade',pause: 1});
	}
	
	function cornerzSetup(selector)
	{
		$(selector).cornerz({
			corners: 'tl',
			radius: 10, 
			background: '#8C8C8C'
		})	
	}
	
	function cornerzFooter(selector)
	{
		$(selector).cornerz({
			corners: 'bl br',
			radius: 10, 
			background: '#333'
		})	
	}	
	
	function offerHeights()
	{
		//In order to try and keep the special offer boxes the same height (designer input)
		//Only works with two text boxes would need amending if we wanted to increase the amount of special offers
		var TextHeight;
		var TextHeights = ['one','two'];
		
		//Work out the which of the two boxes are taller
		if($('.number.one .text').innerHeight()<$('.number.two .text').innerHeight())
		{
			var largerHeight = 'two';
			var smallerHeight ='one';
		}else{
			var largerHeight = 'one';
			var smallerHeight = 'two';
		}
		
		//set the height of each box to that of the taller value
		$.each(TextHeights, function(f,c) {
			//altered the height as one image was smaller, 
			//TextHeight = $('.number.'+largerHeight+' .text').innerHeight();
			
			TextHeight = $('.number.'+c+' .text').innerHeight();
			$('#offer .number.'+c+' .image-wrapper').height(TextHeight);
			//$('#offer .number.'+smallerHeight+' .text').height(TextHeight-20);				
		 });
	}
	
	function fancyBox()
	{
		$("a.group").fancybox({
			'speedIn'		:	600, 
			'speedOut'		:	200
		})
	}
	
	function lookupModel(inputString,fieldID,manufacturer)
	{
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions_'+fieldID).hide();
		} else {
			$.post("/includes/ajax/autoModel.php", {queryString: ""+inputString+"", Manu: ""+manufacturer+""}, function(data){
				if(data.length >0) {
					$('#suggestions_'+fieldID).show();
					$('#autoSuggestionsList_'+fieldID).html(data);
				}
			});
		}
	} // lookup

	function lookupType(inputString,fieldID)
	{
		//alert(inputString);
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions_'+fieldID).hide();
		} else {
			$.post("/includes/ajax/autoType.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions_'+fieldID).show();
					$('#autoSuggestionsList_'+fieldID).html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue,fieldID) {
		//alert(fieldID);
		$('#'+fieldID).val(thisValue);
	   $('#suggestions_'+fieldID).hide();
	}
	
	function hoverSELECT() {		
		$(function() {	
			var expand   = function(){ $(this).width('auto') }
			var contract = function(){ if (!this.noHide) $(this).width(155) }
			var focus    = function(){ this.noHide = true }
			var blur     = function(){ this.noHide = false; contract.call(this) }
			$('#populate_menu')
                .hover(expand, contract)
                .focus(focus)
                .click(focus)
                .blur(blur)
                .change(blur)
		});
	}
	<!-- begin hiding
	function expandSELECT(sel) {
	//sel.style.width = '';
		$('#populate_menu').css('zIndex', 1000).width('auto').focus(focus).click(focus);
		//$('#populate_menu').css('zIndex', 1000).width('auto');
	}
	
	
	function contractSELECT(sel) {
	//sel.style.width = '100px';
		$('#populate_menu').width(sel+'px');
	}
	// end hiding -->
	
