$(document).ready(function() {
	
	$(".extranet-login .input-text").focus(function() {
		$(this).removeClass("gray");
	}).blur(function() {
		if ($(this).val().replace(/\s/g, "")=="") {
			$(this).val("").addClass("gray");
		}
	});

	$("#nav-content .section").show();

    $("#nav-content").hover(function(){
		$(this).stop().animate({"top": "0"}, 500);
		return false;
    },function(){
		$(this).stop().animate({"top": "-260px"}, 500);
		return false;
    });


   	$("#m-client-work .content").cycle({
	    fx:"fade", 
	    speed:"fast", 
	    timeout:0, 
	    next:"#m-client-work-next", 
	    prev:"#m-client-work-prev" 
   	});


   	$("#m-products .content").cycle({
	    fx:"fade", 
	    speed:"fast", 
	    timeout:0, 
	    next:"#m-products-next", 
	    prev:"#m-products-prev" 
   	});

   	$("#m-slideshow-home .content").cycle({
	    fx:"scrollUp", 
	    speed:1000, 
	    timeout:5000, 
	    pager:"#m-slideshow-home-pages"
   	});   	
   	$("#m-slideshow-home-pages a").wrapAll('<span class="pages-list"></span>');
   	$(".pages-list a").after("&nbsp;&nbsp;|&nbsp;&nbsp;");
   	$(".pages-list").after('<a href="#" class="pause">pause</a>');
	$(".pause").click(function() {
	    var obj = $(this);
	    if (obj.hasClass('pause')) {
	        obj.removeClass('pause').addClass('play').text('play');
	        $("#m-slideshow-home .content").cycle('pause'); 
	        return false;
	    } else if (obj.hasClass('play')) {
	        obj.removeClass('play').addClass('pause').text('pause');
	        $("#m-slideshow-home .content").cycle('resume');
	        return false;
	    }
	});	
	
	
});
jQuery.preloadImages = function() {
  for(var i = 0; i<arguments.length; i++)  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
$.preloadImages("/images/bg-login-input.png");

function writeEmail(account) {
	document.write('<a href="mailto:');
	document.write(account);
	document.write('&#064'); //this is the "at" character
	document.write('decisioncounsel.');
	document.write('com">');
	document.write(account);
	document.write('&#064'); //this is the "at" character
	document.write('decisioncounsel.');
	document.write('com');
	document.write('</a>');
}

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-3667390-2");
pageTracker._trackPageview();
} catch(err) {}

