// JavaScript Document


// Image rollovers

function tftRollOver (el) {
	$(el + " img").after("<span class='rollover'></span>");
	$(el).find('.rollover').fadeTo(0, 0.10).fadeTo(0, 0.00);
	
	$(el).hover(
		function() {
			$(this).find('.rollover').fadeTo(250, 1.00);
		},
		function() {
			$(this).find('.rollover').fadeTo(500, 0.00);
		}
	);
}

Cufon.replace('h1', { 
	fontFamily: 'Helvetica Neue', 
	hover: true 
});
Cufon.replace('h2', { 
	fontFamily: 'Helvetica Neue', 
	hover: true
});

$(document).ready(function() {
	tftRollOver("#ftr-tech-drupal a");
	tftRollOver("#ftr-tech-magento a");
	tftRollOver("#ftr-tech-modx a");
	tftRollOver("#ftr-social-twitter a");
	tftRollOver("#ftr-social-facebook a");
	tftRollOver("#ftr-social-linkedin a");
	$('#ftr-news ul').scrollList('up', 15, 4000); 
	if (parseInt($.browser.version) <= 7 && $.browser.msie == true) { } else {
		$("#nav").droppy({ speed: 250 }); 
	}
	$("#services li").hover(
		function() {
			$(this).addClass("active").find(".over").fadeIn('fast');
		}, 
		function() {
			$(this).removeClass("active").find(".over").fadeOut('fast');
		}
	);	
		

	$("#portfolioThumbs").hover(
		function() {}, 
		function() {        
			$('#portfolioThumbs>li').fadeTo("slow", 1.0); 
		}
	);

	$("#portfolioThumbs>li").hoverIntent(
		function(){
			$(this).addClass("current"); // Add class .current
			$(this).siblings().fadeTo("medium", 0.5); // Fade other items to 30%
			$(this).fadeTo("medium", 1.0); // Fade current to 100%
		},
		function(){            
			$(this).removeClass("current"); // Remove class .current
			$(this).fadeTo("fast", 1.0); // This should set the other's opacity back to 100% on mouseout   
		}
	);
	
	$("#client-login").sSelect().change(function(){
		if ($(this).getSetSSValue() != '') { 
//			window.open($(this).getSetSSValue(),'name','height=768,width=1024');
			window.open($(this).getSetSSValue(),'name');
		}
//		window.location = $(this).getSetSSValue();
	});
});




