var obj_top=150;
var payment_method_checked=false;
//------------------------------
$(document).ready(function() {
	var obj_left=(document.body.clientWidth/2)-250;
	$("#lay_001").css('left',obj_left).css('top','-250px');
	setTimeout('animate_to_left()',2850);
	//-------
	$(window).scroll(function() {
		$("#lay_001").css('top',(obj_top+document.body.scrollTop)+'px');
	});
	$('#lay_001').mouseup(function() {
		obj_top=parseInt($(this).css('top').replace('px',''))-document.body.scrollTop;
	});
	//-------
	$('#lay_001').jqDrag();
	$('#lay_001').mouseover(function() {
		$(this).css('cursor','move');
	});
	$('#lay_001_x').mouseover(function() {
		$(this).css('cursor','pointer');
	});
	//-------
	$('#lay_001_x').click(function() {
		$("#lay_001").animate({left: document.body.clientWidth}, 1000);
		$("#lay_001").fadeOut('fast');
	});
	//-------
	$('#order_table_ad_02_checkbox').click(function() {
		if(!$(this).attr('checked')) {
			$(this).attr('checked','true');
		}
	});
	//-------
	$(".order_table_steps_header>td").css('color','red').css('font-size','24px').css('font-weight','bold');
	$(".order_table_steps_header").each(function() {
		$(this).find('td').eq(0).css('color','black');
	});
	//-------
	$("#go_to-checkout").mouseover(function() {
		$(this).css('border-color','green').css('cursor','pointer');
	});
	$("#go_to-checkout").mouseout(function() {
		$(this).css('border-color','red');
	});
	//-------
	$("#go_to-checkout").click(function() {
		if(payment_method_checked && select_download_or_cd_checked) {
			if(check_country_select()) {
				switch(payment_method) {
					case 'pp':
					send_data('pp');
					break;
					case 'cc':
					send_data('cc');
					break;
					case 'ml':
					send_data('ml');
					break;
				}
			}
		} else {
			alert('Please, select download or CD\'s and select Your payment method.');
		}
	});
	//-------
	$(".step_03_payment_method").click(function() {
		payment_method=$(this).val();
		payment_method_checked=true;
	});
	//-------
});
//------------------------------
function animate_to_left() {
	$("#lay_001").fadeIn("fast").animate({top: obj_top}, 1000).css('z-index','999');
}
//------------------------------

