$(document).ready(function(){
	$("#btmFaq a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".faqRight a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$("#header .box1 a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$("#topHead ul a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".secL3 a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".toList a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".lineUpCts a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".secWorkCts p a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".faqDr a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".servU li a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
	$(".servM li a img").hover(
		function(){
			$(this).css('opacity', '0.6');
		},
		function(){
			$(this).css('opacity', '1');
		}
	);
});

$(document).ready(function(){
	$("#toTop a").click(function(){
		$("html , body").animate({ scrollTop: $("#content").offset().top}, "slow", "easeOutCirc");
		return false;
	});
});

function popform(target_items, name){
 $(target_items).each(function(i){
		$("body").append("<div class='"+name+"' id='"+name+i+"'><p>"+$(this).attr('title')+"</p></div>");
		var my_tooltip = $("#"+name+i);
		
		if($(this).attr("title") != "" && $(this).attr("title") != "undefined" ){
		
		$(this).removeAttr("title").mouseover(function(){
					my_tooltip.css({opacity:1, display:"none"}).fadeIn(200);
		}).mousemove(function(kmouse){
				var border_top = $(window).scrollTop(); 
				var border_right = $(window).width();
				var left_pos;
				var top_pos;
				var offset = 2;
				if(border_right - (offset *2) >= my_tooltip.width() + kmouse.pageX){
					left_pos = kmouse.pageX+offset;
					} else{
					left_pos = border_right-my_tooltip.width()-offset;
					}
					
				if(border_top + (offset *2)>= kmouse.pageY - my_tooltip.height()){
					top_pos = border_top +offset;
					} else{
					top_pos = kmouse.pageY-my_tooltip.height()-offset;
					}	
				
				
				my_tooltip.css({left:left_pos, top:top_pos});
		}).mouseout(function(){
				my_tooltip.css({left:"-9999px"});				  
		});
		
		}

	});
}


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-626237-12']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();


