$(document).bind('ready', function(){
	_load_ourtechnology_feature();
});

function _load_ourtechnology_feature(){
	$('.our-technology-feature ul li.point-2 a')
		.bind('click', function(){
			var overlay_background = $('#overlay-background');
			var overlay_container = $('#overlay-container');

			if(!overlay_background.length){
				var overlay_background = $('<div id="overlay-background"></div>');
				var h = $(window).height();
				var w = $(window).width();
				overlay_background.css('height', h+'px');
				overlay_background.css('width', w+'px');

				$('body').prepend(overlay_background);
			}else{
				overlay_background.css('display', 'block');
			}

			if(!overlay_container.length){
				var overlay_container = $('<div id="overlay-container">'+
										  	'<div class="container-top"></div>'+
										  	'<div class="container-bg">'+
										  		'<a href="" class="close"></a>'+
												'<h5>Real-time fingerprint of the bio-system</h5>'+
												'<p>The bioprocess system (bacterial, yeast/ fungal, mammalian cells) behaves as a colloid suspension undergoing physicochemical changes upon growth, such as:</p>'+
												'<ul><li>bio-particle cross-linking (cell clumping, aerial mycelium formation in filamentous</li><li>cultures, extra-cellular polymer formation, apoptosis)</li><li>protein aggregation (antibodies) foaming</li></ul>'+
												'<p>These changes can be described in terms of properties such as density, volume fraction, shear modules and radius of the bio-particles.</p><p>Our software sensor provides a profile as a characteristic fingerprint of the dynamic bioculture.</p>'+
										  	'</div>'+
										  	'<div class="container-bottom"></div>'+
										  '</div>');
				$('body').prepend(overlay_container);
			}

			overlay_background.fadeTo(500, 0.7, function(){
				overlay_container.fadeIn(500, function(){
					$('a.close', this)
						.unbind('click')
						.bind('click', function(){
							overlay_container.fadeOut(500, function(){
								overlay_background.fadeOut(500, function(){
									overlay_container.remove();								 
									overlay_background.remove();								 
								});
							});
							return false;
						});
				});
			});

			return false;

		});

	$('.our-technology-feature ul li.point-1 a')
		.bind('click', function(){
			var overlay_background = $('#overlay-background');
			var overlay_container = $('#overlay-container');

			if(!overlay_background.length){
				var overlay_background = $('<div id="overlay-background"></div>');
				var h = $(window).height();
				var w = $(window).width();
				overlay_background.css('height', h+'px');
				overlay_background.css('width', w+'px');

				$('body').prepend(overlay_background);
			}else{
				overlay_background.css('display', 'block');
			}

			if(!overlay_container.length){
				var overlay_container = $('<div id="overlay-container">'+
										  	'<div class="container-top"></div>'+
										  	'<div class="container-bg">'+
												'<a href="" class="close"></a>'+
												'<ul class="small-tabs">'+
													'<li class="how-it-works"><a id="tab-1" class="selected" href="">How it works</a></li>'+
													'<li class="a-summary-of-rheology"><a id="tab-2" href="">A summary of Rhetology</a></li>'+
													'<li class="advantages-of-acoustics"><a id="tab-3" href="">Advantages of Acoustics</a></li>'+
												'</ul>'+
												'<div class="tab-selected tab tab-1">'+
													'<h5>How it works</h5>'+
													'<p>The transition stages of the dynamic bio-suspension are depicted in terms of the colloidal and mechanical properties during the course of the fermentation (bio-process).  An acoustic and, hence, a rheological profile is then generated which is characteristic of the type of biological system used in the process.</p>'+
													'<p>The ultrasonic wave is transmitted directly into the sample, and as it travels through the growing and dividing biological cells of the suspension within a fixed path length, its amplitude is attenuated.</p>'+
												'</div>'+
												'<div class="tab-2 tab">'+
													'<h5>A summary of rheology</h5>'+
													'<p>There are two types of test in conventional rheometry as follows:</p>'+
													'<ul>'+
														'<li>In a typical flow experiment, the response to shear and flow of a non-Newtonian fluid is assessed. The sample is subjected to a variable shear stress and rate, and the respective flow curve is obtained after the breaking down of any structure present.</li>'+
														'<li>Non-destructive rheological testing (NDT) is performed under low stress and strain without damaging the colloidal structures under test. In this way, the strength of particle interactions in a suspension, and the shape retention, i.e. elasticity of these structures can be determined.</li>'+
														'<li>Typical NTD involves dynamic oscillatory testing. This technique applies a small deformation to a sample, and the contribution of the solid-like and liquid-like character of viscoelastic materials (gels, hydrocolloids) is measured in terms of their storage (G\'), loss (G") moduli and loss tangent (tan).</li>'+
														'<li>For weak gels, G\'>G" in the linear viscoelastic region. The complex (dynamic) viscosity referring to both viscous and elastic characters can be calculated accordingly.</li>'+
													'</ul>'+
												'</div>'+
												'<div class="tab-3 tab">'+
													'<h5>Advantages of acoustics</h5>'+
													'<p>Within a certain frequency range, the ultrasonic wave propagation though a suspension is influenced only by the viscous and thermal properties of colloidal suspensions.</p>'+
													'<ul>'+
														'<li>The frequency range for viscous effects varies from 1-10MHz.</li>'+
														'<li>The shear viscosity, dynamic viscosity and visco-elastic moduli are calculated from the attenuation of the output wave, and sound velocity.</li>'+
														'<li>This technique has distinctive advantages as it can be applied in frequency regions where viscous and scattering effects occur independently so reliable rheological calculations can be performed.</li>'+
													'</ul>'+
													'<p>Measurements can be taken in real-time without disturbing the flow of the Colloid suspension. Therefore, it can be employed for bio-process monitoring as non-destructive testing. Real-time signals are obtained through continuous or pulsed propagation in-line, and/or in-situ.</p>'+
												'</div>'+
										  	'</div>'+
										  	'<div class="container-bottom"></div>'+
										  '</div>');
				$('body').prepend(overlay_container);
			}

			overlay_background.fadeTo(500, 0.7, function(){
				overlay_container.fadeIn(500, function(){
					$('.small-tabs a', this)
						.unbind('click')
						.bind('click', function(){
							$('.small-tabs a').removeClass('selected');
							$(this).addClass('selected');
							var target_class = '.'+$(this).attr('id');
							$('div.tab').removeClass('tab-selected');
							$(target_class).addClass('tab-selected');
							return false;
						});
					$('a.close', this)
						.unbind('click')
						.bind('click', function(){
							overlay_container.fadeOut(500, function(){
								overlay_background.fadeOut(500, function(){
									overlay_container.remove();								 
									overlay_background.remove();								 
								});
							});
							return false;
						});
				});
			});

			return false;

		});
}