
$(document).ready(function(){

	$(".slidex2").click(function(){
		$(this).toggleClass("activex2"); return false;
	});
	
	 
});


navHover = function() {
var lis = document.getElementById("navmenu").getElementsByTagName("LI");
for (var i=0; i<lis.length; i++) {
lis[i].onmouseover=function() {
this.className+=" iehover";
}
lis[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" iehover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", navHover);


$(function() {
    $('#pause').click(function() { $('.feature_bg').cycle('pause'); return false; });
    $('#play').click(function() { $('.feature_bg').cycle('resume'); return false; });
    
    $('.feature').hover(
        function() { $('#controls').fadeIn(); },
        function() { $('#controls').fadeOut(); }
    );
    
    $('.feature_bg').cycle({
        fx:     'fade',
        speed:   600,
        timeout: 9000,
        next:   '#next',
        prev:   '#prev'
    });
});

   $(document).ready(function()
{
	slide("#tool-nav", 10, 20, 90, .8);
});

function slide(navigation_id, pad_out, pad_in, time)
{
	var list_elements = navigation_id + " li.slide";
	var link_elements = list_elements + " a.slide";
	
	var timer = 0;	
	$(link_elements).each(function(i)
	{
		$(this).hover(
		function()
		{
			$(this).animate({ paddingLeft: pad_out }, 150);
		},		
		function()
		{
			$(this).animate({ paddingLeft: pad_in }, 150);
		});
	});
}
// MIKES AMAZING TAB SWITCHERoo
// $(document).ready(function() {  
//  $('#tool-nav').each(function() {    
// $(this).children('a').click(function() {  
//  $(this).addClass('selector'); 
//  $(this).siblings().removeClass('selector');     
//return false;         
//  });  
// });  
//});  


 $(document).ready(function() {  
 $('#tool-nav').each(function() { 
 $("#tool-nav > li > a").click(function(){
  $(this).addClass('selector'); 
  $(this).parent().siblings().children("a").removeClass('selector'); 
		
	});
	
	});	 
}); 

$(document).ready(function() {
	anchor.init()
});

anchor = {
	init : function()  {
		$("a.anchorLink").click(function () {	
			elementClick = $(this).attr("href")
			destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 1100 );
		  	return false;
		})
	}
}
    
    