$(document).ready(function(){

	$("#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: "961px",

	
		height: "253px",
		duration: 800,
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext" // must be class, use . sign
	});


	$(".thumbpop").thumbPopup({
		imgSmallFlag: "/m/",
		imgLargeFlag: "/ml/"
	});

			$("a.poplightbox").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});


	$('a.slide').slide();

	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/search/ajax_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);
});



var testresults
function checkemail(str) {
	var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str))
		testresults=true
	else{
		testresults=false
	}
	return (testresults)
}
