			var flashvars = {};
			var params = {wmode: "transparent"};
			var attributes = {};
			swfobject.embedSWF("dat/flash/home.swf", "flashHome", "936", "250", "9.0.0","dat/flash/expressInstall.swf", flashvars, params, attributes);
			swfobject.embedSWF("dat/flash/cusgal.swf", "flashCusGal", "274", "158", "9.0.0","dat/flash/expressInstall.swf", flashvars, params, attributes);


function chgimg(m, d, b)
{
	$("#big_desc").html(d);
	$("#big_href").attr('href', b);
	$("#big").attr('src', m);
}

function chgvrnt(e)
{
	var i = $(e).find("option:nth-child(" + (e.selectedIndex+1) + ")").attr('value');
	if ( i ) {
		$('#master_options_place').load('index.php?do=Product&a=loadAjaxMasterOptions&id=' + i);
	}
	else {
		$('#master_options_place').html('');
	}
}

function chgopt(e)
{
	var p = $(e).find("option:nth-child(" + (e.selectedIndex+1) + ")").attr('title');
	var dp = parseFloat(p) + parseFloat($('#raw_rrp_price_id').text());
	$('#rrp_price_id').html(dp.toFixed(2));

	var sp = parseFloat(p) + parseFloat($('#raw_special_price_id').text());
	if ( sp > p ) {
		$('#special_price_id').html(sp.toFixed(2));
	}
}

function clrFld(e,v) {
	if ( e && v ) {
		if ( e.value == v ) e.value = "";
	}
}

function pause(ms)
{
	var now = new Date();
	var exitTime = now.getTime() + ms;
	while (true)
	{
		now = new Date();
		if (now.getTime() > exitTime) return;
	}
} 

function add_sth_done(loc)
{
	pause(1000);
	$.prettyPhoto.close();
	if ( loc ) document.location = loc;
}

$(document).ready(function(){

	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
	// $('#contactmessage').prettyComments({animate: true, maxHeight:500});	
	$('.mycarousel').jcarousel();

	if ( $('#show_welcome_feedback_form').length > 0 ) {
		$.prettyPhoto.open('?do=VisitorFeedback?iframe=true&width=500&height=220','','');
	}

});
