 $(document).ready(function(){  // rounded corners  $(".left_nav ul li:first-child").corner("8px cc:#fff top"); $(".left_nav ul li:last-child").corner("8px cc:#fff bottom"); $(".desc_wrapper").corner("8px cc:#fff top"); $(".image").corner("8px keep"); $(".order_form_btm").corner("8px keep cc:#fff bl"); $(".contact_ad_wrapper").corner("8px cc:#fff bottom");  // sub nav animation /*    $("#main_nav li").hover(function () {		$("#sub_nav ul").css("display","none");			var main_nav_el = this.id;		var idArr = main_nav_el.split("_");		var dropdown_id = "dropdown_" + idArr[3];		if(document.getElementById(dropdown_id)){		dropdown_id = document.getElementById(dropdown_id);		$(dropdown_id).css("display","block");		}    });*/// faq animationif(document.getElementById("faq_content")){	$("#faq_content .faq").css("display","none");	$("#faq_content h3").css("cursor","pointer");		$("#faq_content h3").click(function(){		var h3_id = $(this).attr("id");	var id = h3_id.split("_");	var faq_div = "#a_" + id[1];	$(faq_div).slideToggle("slow");		});	}  }); function loadXMLDoc(product_id,option_name_id,option_value_id)    {    if (window.XMLHttpRequest)      {// code for IE7+, Firefox, Chrome, Opera, Safari      xmlhttp=new XMLHttpRequest();      }    else      {// code for IE6, IE5      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");      }    xmlhttp.onreadystatechange=function()      {      if (xmlhttp.readyState==4 && xmlhttp.status==200)        {        document.getElementById("exvatPrice_"+product_id).innerHTML=xmlhttp.responseText;        }      }    xmlhttp.open("GET","/templates/emo/includes/change_fluid_price.php?product_id="+product_id+"&option_name_id="+option_name_id+"&option_value_id="+option_value_id+"",true);    xmlhttp.send();}function loadXMLDocVAT(product_id,option_name_id,option_value_id, vat){        if (window.XMLHttpRequest)      {// code for IE7+, Firefox, Chrome, Opera, Safari      xmlhttp1=new XMLHttpRequest();      xmlhttp2=new XMLHttpRequest();      }    else      {// code for IE6, IE5      xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");      xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");      }    xmlhttp1.onreadystatechange=function()      {      if (xmlhttp1.readyState==4 && xmlhttp1.status==200)        {            document.getElementById("exvatPrice_"+product_id).innerHTML=xmlhttp1.responseText;        }      }      xmlhttp2.onreadystatechange=function()      {      if (xmlhttp2.readyState==4 && xmlhttp2.status==200)        {            document.getElementById("exvatPriceVAT_"+product_id).innerHTML=xmlhttp2.responseText;        }      }    xmlhttp1.open("GET","/templates/emo/includes/change_fluid_price.php?product_id="+product_id+"&option_name_id="+option_name_id+"&option_value_id="+option_value_id,true);    xmlhttp2.open("GET","/templates/emo/includes/change_fluid_price_inc_vat.php?product_id="+product_id+"&option_name_id="+option_name_id+"&option_value_id="+option_value_id+"&vat="+vat,true);    xmlhttp1.send();    xmlhttp2.send();} function changeFluidsOption(option_to_product_id, option_value_id, option_name_id, product_id, vat){var el_id = 'option_' + option_name_id + '_' + product_id;var oil_only_el = 'oil_only_' + product_id;var all_fluids_el = 'all_fluids_' + product_id;document.getElementById(el_id).value = option_to_product_id;if(option_value_id == '1'){loadXMLDocVAT(product_id,option_name_id,option_value_id,vat);document.getElementById(oil_only_el).src = document.getElementById(oil_only_el).src.replace(/_off.png/,"_on.png");document.getElementById(all_fluids_el).src = document.getElementById(all_fluids_el).src.replace(/_on.png/,"_off.png");}if(option_value_id == '2'){loadXMLDocVAT(product_id,option_name_id,option_value_id,vat);document.getElementById(oil_only_el).src = document.getElementById(oil_only_el).src.replace(/_on.png/,"_off.png");document.getElementById(all_fluids_el).src = document.getElementById(all_fluids_el).src.replace(/_off.png/,"_on.png");}}function disable_billing_address(){if(document.getElementById('billing_address').checked == true){document.getElementById('billing_title').disabled = true;document.getElementById('billing_name').disabled = true;document.getElementById('billing_address_l1').disabled = true;document.getElementById('billing_address_l2').disabled = true;document.getElementById('billing_address_l3').disabled = true;document.getElementById('billing_post_code').disabled = true;document.getElementById('billing_country').disabled = true;document.getElementById('billing_telephone').disabled = true;document.getElementById('billing_title').value = document.getElementById('delivery_title').value;document.getElementById('billing_name').value = document.getElementById('delivery_name').value;document.getElementById('billing_address_l1').value = document.getElementById('delivery_address_l1').value;document.getElementById('billing_address_l2').value = document.getElementById('delivery_address_l2').value;document.getElementById('billing_address_l3').value = document.getElementById('delivery_address_l3').value;document.getElementById('billing_post_code').value = document.getElementById('delivery_post_code').value;document.getElementById('billing_country').value = document.getElementById('delivery_country').value;document.getElementById('billing_telephone').value = document.getElementById('delivery_telephone').value;}else{document.getElementById('billing_title').disabled = false;document.getElementById('billing_name').disabled = false;document.getElementById('billing_address_l1').disabled = false;document.getElementById('billing_address_l2').disabled = false;document.getElementById('billing_address_l3').disabled = false;document.getElementById('billing_post_code').disabled = false;document.getElementById('billing_country').disabled = false;document.getElementById('billing_telephone').disabled = false;}}sfHover = function() {	var sfEls = document.getElementById("sub_nav").getElementsByTagName("LI");	for (var i=0; i<sfEls.length; i++) {		sfEls[i].onmouseover=function() {			this.className+=" sfhover";		}		sfEls[i].onmouseout=function() {			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");		}	}}if (window.attachEvent) window.attachEvent("onload", sfHover);
