// JavaScript Document
$(document).ready(function(){
						   
						   
//Woman movement on advert index
	$(window).ready(function(){
		$(".ind").slideDown(1000).animate({left: "-460px"}, 1000);
		$(".contact").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".installers").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".login").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".register").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".scheme").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".offers").slideDown(1000).animate({left: "-467px"}, 1000);
		$(".orders").slideDown(1000).animate({left: "-490px"}, 1000);
		$(".chance").animate({left: "0px"}, 1000);
		$(".prise").delay(500).animate({right: "20px"}, 1000).css({"z-index" : 100});
		$(".how").delay(1000).animate({right: "20px"}, 1000).css({"z-index" : 100});
	});	


//Change colour and remove wording in the product search bar	
	$('.txtProduct').each(function() {
		var txtProduct = this.value;
		$(this).css('color', '#ccc'); // this could be in the style sheet instead
		$(this).focus(function() {
			if(this.value == txtProduct) {
				this.value = '';
				$(this).css('color', '#333');
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
				$(this).css('color', '#ccc'); // this could be in the style sheet instead
				this.value = txtProduct;
			}
		});
	});
	
	
//Product drop down control
	var hl = 600;
	$("#header1").click(function(){
		$("#productBox1").slideToggle(hl);
	});
	$("#header2").click(function(){
		$("#productBox2").slideToggle(hl);
	});
	$("#header3").click(function(){
		$("#productBox3").slideToggle(hl);
	});
	$("#header4").click(function(){
		$("#productBox4").slideToggle(hl);
	});
	$("#header5").click(function(){
		$("#productBox5").slideToggle(hl);
	});
	$("#header6").click(function(){
		$("#productBox6").slideToggle(hl);
	});
	$("#header7").click(function(){
		$("#productBox7").slideToggle(hl);
	});

		
});


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function hyperlink(d){
	location.href = d;
	//window.open(d,'_blank');
}
