// JavaScript Document

function submitContactFrm() {
	$('#contactfrmloading').show();
	$('#contactusfrm').ajaxSubmit({
		data : {

		},
		success : function(data) {
			$('#contactfrmloading').hide();
			alert(data);
		},
		error : function() {
			$('#contactfrmloading').hide();
			alert('Problem contacting server.');
		}
	});
	
	
}

$(document).ready(function(){
	
	if ($.browser.msie  && parseInt($.browser.version) == 7) {
		window.location.href = "ie7.jsp";
	};
	
	$('#footerInner a, .menuItem a, .designSide a, .devSide a').bind('click',function(){
		var id = $(this).attr('href');
		if (id&&id.length>0) {
			if (id&&id.indexOf('#')==0) {
				var name = id.substr(1);
				var thething = $('a[name="'+name+'"]');
				if (thething&&thething.length>0) {
					$('html,body').animate({scrollTop: thething.offset().top-140},'slow');
					return false;
				}
			}
		}
		
		return true;
	});
	
	// back to top tween
	$('a[href="#backtotop"]').bind('click',function() {
		$('html,body').animate({scrollTop: 0},'slow');
		return false;
	});
	
	

	
	
		$(".socialPie").hover(function () {
			$("#socialPieImage").animate({width: "75px", height: "75px"}, 400 );
		});
		
		$(".socialPie").mouseleave(function () {
		$("#socialPieImage").animate({width: "30px", height: "30px"}, 400 );
		});
		
		$(".socialPie").click(function () {
			$(".socialMediaBar").fadeIn("slow");
		});
		
		$(".socialBar_close").click(function () {
			$(".socialMediaBar").fadeOut("fast");
		});
		
		$(".blurTrigger").hover(function () {
			$(".blurIt").animate({ opacity: 0.1 });
		});
		$(".blurTrigger").mouseleave(function () {
			$(".blurIt").animate({opacity: 1.0 });
		});
		
		$('#testimonials').cycle({
					fx: 'fade',
					delay: 1500
				});
					
	
});
