// by herick@mac.com

function gotoStep1(promo,skin) {
	$('#dialogue_content').load('../forms/step1?p='+promo+'&s='+skin);
	showDialog();
};

function sendStep1() {
	$(document).ready(function() {
 		var options = { 
        	target: '#dialogue_content'
     	}; 		
		$('#step1').ajaxSubmit(options); 
	});
};

function sendStep2() {
	$(document).ready(function() {
 		var options = { 
        	target: '#dialogue_content'
     	}; 		
		$('#step2').ajaxSubmit(options); 
	});
};

function showDialog() {
	$('#dialogue').show();
};

function hideDialog() {
	$('#dialogue').hide();
};

function gotoDownload(key) {
	$('#dialogue_content').load('../forms/download?k='+key);
	showDialog();
};

function stopRKey(evt) { 
  var evt = (evt) ? evt : ((event) ? event : null); 
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); 
  if ((evt.keyCode == 13) && (node.type=='text'))  {return false;}
} 

document.onkeypress = stopRKey; 

$(document).ready(function() {
    $('#carousel-small').jcarousel({
        vertical: true,
        scroll: 2,
        visible: 2
    });
});

$(document).ready(function() {
    $('#carousel-big').jcarousel({
        vertical: true,
        scroll: 5,
        visible: 5
    });
    cbb.init();
});
