$(document).ready(function(){
var margin = $("#ukash").width()/2;
var width=$("#ukash").width();
var height=$("#ukash").height();
$("#paysafe").stop().css({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'});
	$("#ukash,#b_paysafe,#sb_paysafe,#sw_paysafe").click(function(){
		$("#ukash").stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$("#paysafe").stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		$("#ex_from").text("paysafecard");
		$("#b_paysafe").addClass("logo_act");
		$("#b_ukash").removeClass("logo_act");
		$("#sb_ukash").toggleClass("act");
		$("#sb_paysafe").toggleClass("act");
		$("#sw_paysafe").css("display","none");
		$("#sw_ukash").css("display","block");
		$("#d_paysafe").css("display","block");
		$("#d_ukash").css("display","none");
		$("#d_confirm").css("display","none");
		$(".rates.ukash").css("display","none");
		$(".rates.psc").css("display","block");
		$(".b_left").css("height","270px");
		$(".b_right").css("height","270px");
		},500);
	});
	$("#paysafe,#b_ukash,#sb_ukash,#sw_ukash").click(function(){
		$("#paysafe").stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$("#ukash").stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		$("#ex_from").text("ukash");
		$("#b_paysafe").removeClass("logo_act");
		$("#b_ukash").addClass("logo_act");
		$("#sb_ukash").toggleClass("act");
		$("#sb_paysafe").toggleClass("act");
		$("#sw_paysafe").css("display","block");
		$("#sw_ukash").css("display","none");
		$("#d_paysafe").css("display","none");
		$("#d_confirm").css("display","none");
		$("#d_ukash").css("display","block");
		$(".rates.ukash").css("display","block");
		$(".rates.psc").css("display","none");
		$(".b_left").css("height","390px");
		$(".b_right").css("height","390px");
		},500);
	});
});
