function getstock(){
		var html = $.ajax({
  			url: "process.asp?p=product&product=" + $("#product-type").val(),
  			async: false
 		}).responseText;
		
		$("#quantity").html(html)
}


function sameDetails(){
	if (document.checkout.samedetails.checked != false){
		document.checkout.shippingfname.value = document.checkout.billingfname.value
		document.checkout.shippinglname.value = document.checkout.billinglname.value
		document.checkout.shippingaddress1.value = document.checkout.billingaddress1.value
		document.checkout.shippingaddress2.value = document.checkout.billingaddress2.value
		document.checkout.shippingcity.value = document.checkout.billingcity.value
		document.checkout.shippingpostcode.value = document.checkout.billingpostcode.value
		document.checkout.shippingcountry.value = document.checkout.billingcountry.value
		document.checkout.shippingtelephone.value = document.checkout.billingtelephone.value
		document.checkout.shippingemail.value = document.checkout.billingemail.value
	}
	else {
		document.checkout.shippingfname.value = ""
		document.checkout.shippinglname.value = ""
		document.checkout.shippingaddress1.value = ""
		document.checkout.shippingaddress2.value = ""
		document.checkout.shippingcity.value = ""
		document.checkout.shippingpostcode.value = ""
		document.checkout.shippingcountry.value = "UK"
		document.checkout.shippingtelephone.value = ""
		document.checkout.shippingemail.value = ""	
	}
}

$(document).ready(function(){
						   
	//MENU ACCORDION
	$(".subcategorys").hide()
	
	$(".category-header.expandable").click(function(){
		if ( $(this).hasClass("expanded") ){
			$(this).next().slideUp("fast")
			$(this).removeClass("expanded")
		}
		else {
			$(".subcategorys").slideUp("fast")
			$(this).addClass("expanded")
			$(this).next().slideDown("fast")
		}
	})
	
	
	
	$("#createyourowncats").hide()
	$("#createyourown").click(function(){
		$("#createyourowncats").slideToggle("fast")
	})
	
	//LIGHTBOX
	$("a#single_image").fancybox();
	
	$("#search").focus(function(){
		if($(this).val() == "Search Here..." ){
			$(this).val("")
		}
	})
	
	$("#search").blur(function(){
		if($(this).val() == ""){
			$(this).val("Search Here...")		
		}
	})
	
})

