// JavaScript Document
$(document).ready(function() {

	document.getElementById("pkgMinimize").style.zIndex = 5000;
		
	if(window.innerHeight || window.innerWidth){	
				
				heightPkgMax =  (window.innerHeight/1.7 )  + $(window).scrollTop();
				heightPkgMin =  (window.innerHeight/1.15 )  + $(window).scrollTop();
				
				WidthPkgMax = $("#Wrapper").innerWidth()-204 +( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				//alert($("#Wrapper").innerWidth());
			
			/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			/*************************************************************/	
	
					
		}
		else{
				
				
				heightPkgMax =  document.documentElement.clientHeight/1.7  + $(window).scrollTop();
				heightPkgMin =  ( document.documentElement.clientHeight/1.2 )  + $(window).scrollTop();
				
				WidthPkgMax = $("#Wrapper").innerWidth()-192 +( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				
				
			/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			
			/*************************************************************/	

		}

		
		
	

	$(window).scroll(function(){
		if(window.innerHeight || window.innerWidth){	
				
				
				heightPkgMax =  (window.innerHeight/1.7 )  + $(window).scrollTop();
				heightPkgMin =  (window.innerHeight/1.15 )  + $(window).scrollTop();
				
				WidthPkgMax = $("#Wrapper").innerWidth()-204+( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				
				
				/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			
			/*************************************************************/	
			
				//$("#FloatingLayerWrapper").fadeTo("slow",0);
				//$("#FloatingLayerWrapper").fadeTo(2000,0.9);

			
		}
		else{
				
				
				heightPkgMax =  document.documentElement.clientHeight/1.7  + $(window).scrollTop();
				heightPkgMin =  ( document.documentElement.clientHeight/1.15 )  + $(window).scrollTop();
				
				
				WidthPkgMax = $("#Wrapper").innerWidth()-192+( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				
				
			/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			
			/*************************************************************/			
		
				//$("#FloatingLayerWrapper").fadeTo("slow",0);
					
				//$("#FloatingLayerWrapper").fadeTo(2000,0.9)	;
  			 		

		}	
	});
	$(window).resize(function(){
				if(window.innerHeight || window.innerWidth){	
				
				
				heightPkgMax =  (window.innerHeight/1.7 )  + $(window).scrollTop();
				heightPkgMin =  (window.innerHeight/1.15 )  + $(window).scrollTop();
				
				WidthPkgMax = $("#Wrapper").innerWidth()-204+( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				
				
				/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			
			/*************************************************************/	
			
				//$("#FloatingLayerWrapper").fadeTo("slow",0);
				//$("#FloatingLayerWrapper").fadeTo(2000,0.9);

			
		}
		else{
				
				
				heightPkgMax =  document.documentElement.clientHeight/1.7  + $(window).scrollTop();
				heightPkgMin =  ( document.documentElement.clientHeight/1.15 )  + $(window).scrollTop();
				
				
				WidthPkgMax = $("#Wrapper").innerWidth()-192+( ($(window).innerWidth()-$("#Wrapper").innerWidth())/2 );
				
				
			/**********************Live Person***********************/	
				document.getElementById("pkgMaximize").style.top =heightPkgMax+"px";
				document.getElementById("pkgMinimize").style.left =WidthPkgMax+"px";
				document.getElementById("pkgMinimize").style.top =heightPkgMin+"px";
			
			/*************************************************************/			
		
				//$("#FloatingLayerWrapper").fadeTo("slow",0);
					
				//$("#FloatingLayerWrapper").fadeTo(2000,0.9)	;
  			 		

		}	

	
	});
	
	
	


	
				 
});