$(document).ready(function(){

	Cufon.replace('.cu, h1, h2, h3, h4, h5, h6, .side_heading, .main_heading, .main_sub_heading', {
		hover: true
	}); // Works without a selector engine
	
	$("#myController").jFlow({
		slides: "#slides",
		controller: ".jFlowControl", // must be class, use . sign
		slideWrapper : "#jFlowSlide", // must be id, use # sign
		selectedWrapper: "jFlowSelected",  // just pure text, no sign
		auto: true,		//auto change slide, default true
		width: "786px",
		height: "290px",
		duration: 400,
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext" // must be class, use . sign
	});

	$(function() {
		$(".product_slider_products").jCarouselLite({
			btnNext: ".next",
			btnPrev: ".prev",
			//auto: 2400,
			speed: 1000,
			 circular: false
		});
	});
	
	$('a.slide').slide();
	

	$(".thumbpop").thumbPopup({
		imgSmallFlag: "/m/",
		imgLargeFlag: "/ml/"
	});


	jQuery('.float').keyup(function () { 
	    this.value = this.value.replace(/[^0-9\.]/g,'');
	});

	jQuery('.whole').keyup(function () { 
	    this.value = this.value.replace(/[^0-9]/g,'');
	});

	jQuery('.filename').keyup(function () { 
	    this.value = this.value.replace(/[^0-9a-zA-Z\-\_]/g,'');
	});

	jQuery('.sku').keyup(function () { 
	    this.value = this.value.replace(/[^0-9a-zA-Z\-\_ ]/g,'');
	});
	
	$(".searchdata").keydown(function(){
		$("#suggestions").load("../_inc/store/suggest.php", $("#searchform").serialize() );
	});
	
});

$(function() {

	var bd_options =
	{
		zoomWidth: 376,
		zoomHeight: 461,
		xOffset: 15,
		title: false
	}
	$(".jqzoom").jqzoom(bd_options);


	var bdtt_options =
	{

	}
	$('span.tooltip').hoverbox(bdtt_options);
	$('img.tooltip').hoverbox(bdtt_options);
});


function showpasswords($val) {

	if ($val == 1) {
		document.getElementById('sign1').style.display = '';
		document.getElementById('sign2').style.display = '';
		document.getElementById('sign3').style.display = '';
		document.getElementById('passwordinput').value = '';
		document.getElementById('passwordconfirminput').value = '';
	} else {
		document.getElementById('sign1').style.display = 'none';
		document.getElementById('sign2').style.display = 'none';
		document.getElementById('sign3').style.display = 'none';
		document.getElementById('passwordinput').value = '';
		document.getElementById('passwordconfirminput').value = '';
	}

}
