<style>
.call-window {margin-bottom: 0px; position: absolute; display: block; top: auto; z-index: 1050; bottom: 0px;right: 20px;}
</style>

<div class="call-window aside-lg panel panel-primary" id="call_window">
	<header class="panel-heading">
		<span class="text-u-c"><?=$vis_language['TXTINCOMINGCALLON']?> <span id="twilio_incoming_number"><?=$operation['incoming_call_to']?></span>
		<button class="btn btn-link btn-sm pull-right m-t-n-xs" data-toggle="class:hide" data-target="#call">
			<span class="text-active">
			  <i class="vh vh-angle-down text-white"></i>
			</span>
			<span class="text">
			  <i class="vh vh-angle-up text-white"></i>
			</span>
		</button>
	</header>
	<div id="call" class="panel-body">
		<?php if($client_details!=-1){
			$href = '#/client/client_details/'.$client_details[0]['first_name'].' '.$client_details[0]['last_name'].'/'.$client_details[0]['client_id'];
			$client_img = $client_details[0]['domain_url'].'awatar/'.VIS_PATH_PROFILE;
			$client_img .= ($client_details[0]['image_path']=='')?'default.jpg':$client_details[0]['image_path'];
		}else{
			$href = '#';
			$client_img = VIS_PATH_PROFILE.'default.jpg';
		}?>
  <a href="<?=$href?>" >
  <? if($client_details[0]['image_path']=='' || $client_details[0]['image_path']=='default.jpg'){?>
<div class="l-avatar pull-left m-r">
<? if($client_details[0]['first_name']!=''){
	$firstname=preg_split('//u', $client_details[0]['first_name'], -1, PREG_SPLIT_NO_EMPTY);
$lastname=preg_split('//u', $client_details[0]['last_name'], -1, PREG_SPLIT_NO_EMPTY);
	?>
   <div class="md" id="twilio_profile_img"><? echo ucfirst($firstname[0]).ucfirst($lastname[0]);?></div>
    <? }else{ ?>
    <img id="twilio_profile_img" class="md img-circle b-a b-3x b-white" src="<?= VIS_PATH_PROFILE.'default.jpg';?>">
    <? }?>

</div>
<? }else{ ?>
<div class="l-avatar pull-left m-r">
<img src="<?=$client_img?>" id="twilio_profile_img" class="md img-circle b-a b-3x b-white">
</div>
<? }?>
</a>
		<!--<a href="<? //=$href?>" class="thumb-md pull-left m-r">
		  <img src="<? //=$client_img?>" id="twilio_profile_img" class="img-circle b-a b-3x b-white">
		</a>-->
		<div class="clear m-t">
		  <a href="<?=$href?>" class="text-info h4"><?=$client_details[0]['first_name'].' '.$client_details[0]['last_name']?></a>
		  <small class="block text-muted" id="twilio_incoming_call_number"><?=$operation['incoming_call_from']?></small>
		</div>
		<div class="clear m-t m-l-none">
		<div class="h5 hide"><small class="text-u-c"></small></div>
		  
		</div>
		<div class="row m-t-md">
			<div class="col-xs-12 text-center">
				<div class="btn-group" id="twilio_call_accept_reject">
					<button class="btn btn-primary m-r" id="twilio_call_accept">
						  <i class="vh vh-call vh-lg"></i> <?=$vis_language['TXTITILACCEPT']; ?>
					</button>
					<button class="btn vh-danger-bg pull-right" id="twilio_call_reject">
						  <i class="vh vh-call vh-lg"></i> <?=$vis_language['TXTITILREJECT']; ?>
					</button>
				</div>
				<button class="btn btn-lg vh-danger-bg btn-block" id="twilio_call_hangup_btn" style="display:none;">
					  <i class="vh vh-call vh-lg"></i> <?= $vis_language['TXTHANGUP']; ?>
				</button>
			</div>
		</div>
	</div>
</div>