$(document).ready(function() {	
						   
	// Apply Tooltip to the technology icons
	$('#technology_icons a').each(function(e) {
			$(this).tipsy({gravity: 's'});							 
	});
	
	/* Estimate form */	
	//Sliding panel
	/*
	var container = $('#sliding_panel');
	$('#sliding_panel').hide();
	
	$('#estimate_btn').click(function(e) {
										
	   e.preventDefault();	
		
	   if(container.is(":visible")) {
	       container.slideUp('fast'); 
		   $(this).removeClass('btn_active');
	   }else{
		   container.slideDown('fast'); 
		   $(this).addClass('btn_active');
	   };	   
	   
	 });
	
	//slideing panel close button
	$('#panel_close').click(function(e) {
		$('#estimate_btn').click();	
		 e.preventDefault();
	});
	
	//Estimate button trigger
	$('#estimate_trigger').click(function(e) {
		$('#estimate_btn').click();	
		 e.preventDefault();
	});*/
	
	//Design process trigger
	$('#process_trigger01').fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
	});
	
	$('#process_trigger02').fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
	});
	
	$('#process_trigger03').fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
	});
	
	
});


/* Improved version of JavaScript fix for the iOS viewport scaling bug. See http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ */
// Rewritten version
// By @mathias, @cheeaun and @jdalton

(function(doc) {

	var addEvent = 'addEventListener',
	    type = 'gesturestart',
	    qsa = 'querySelectorAll',
	    scales = [1, 1],
	    meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];

	function fix() {
		meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
		doc.removeEventListener(type, fix, true);
	}

	if ((meta = meta[meta.length - 1]) && addEvent in doc) {
		fix();
		scales = [.25, 1.6];
		doc[addEvent](type, fix, true);
	}

}(document));
