jQuery(document).ready(function(){
  $('#slider1')
    .anythingSlider({
     width        : 980,
     height       : 409,
	 autoplay       : true,
	 pauseOnHover   : true,
     toggleArrows   : false,
	 delay          : 6500,
	 easing         : "swing",
     toggleControls : false,
	 startStopped   : false,
	 
   inFx: {
    '.caption-mobile'  : { right: 0, opacity: 1, time: 400 },
    '.caption-revenue'  : { right: 0, opacity: 1, time: 400 },
    '.caption-digitalpub'  : { right: 0, opacity: 1, time: 400 },

   },
   outFx: {
    '.caption-mobile'  : { right: -150, opacity: 0, time: 350 },
    '.caption-revenue'  : { right: -150, opacity: 0, time: 350 },
    '.caption-digitalpub'  : { right: -150, opacity: 0, time: 350 },
}

    
  })
	


    //ie li ul li hack
	startList = function() {
	if (document.all&&document.getElementById) {
	navRoot = document.getElementById("nav");
	for (i=0; i<navRoot.childNodes.length; i++) {
	node = navRoot.childNodes[i];
	if (node.nodeName=="LI") {
	node.onmouseover=function() {
	this.className+=" over";
	  }
	  node.onmouseout=function() {
	  this.className=this.className.replace(" over", "");
	   }
	   }
	  }
	 }
	}
	window.onload=startList;


    // navigation dropdown
	$('#jsddm')
	var timeout    = 500;
	var closetimer = 0;
	var ddmenuitem = 0;
	
	function jsddm_open()
	{  jsddm_canceltimer();
	   jsddm_close();
	   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
	
	function jsddm_close()
	{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
	
	function jsddm_timer()
	{  closetimer = window.setTimeout(jsddm_close, timeout);}
	
	function jsddm_canceltimer()
	{  if(closetimer)
	   {  window.clearTimeout(closetimer);
		  closetimer = null;}}
	
	$(document).ready(function()
	{  $('#jsddm > li').bind('mouseover', jsddm_open)
	   $('#jsddm > li').bind('mouseout',  jsddm_timer)});
	
	document.onclick = jsddm_close;
	
	//center navigation dropdowns
	$("#navigation li").mouseover(function() {
			var the_width = $(this).find("a").width();
			var child_width = $(this).find("ul").width();
			var width = parseInt((child_width - the_width)/2);
			$(this).find("ul").css('left', -width);
		});


		  
		  
		  
    // Table Alternate Row Colors
	$('.col2:even').css(
	{'background-color': '#ffd47f'}
	);
	
	$('.col4:even').css(
	{'background-color': '#ffd47f'}
	);

    $('.success-table tr:odd').css(
	{'background-color': '#FFAA00'}
	);



    //Contact form 
	$('.contact-input').each(function() {
		var default_value = this.value;
		$(this).css('color', '#a0a0a0').css('font-style', 'italic');
		$(this).focus(function() {
			if(this.value == default_value) {
				this.value = '';
				$(this).css('color', '#333').css('font-style', 'normal');
			}
		});
		$(this).blur(function() {
			if(this.value == '') {
				$(this).css('color', '#a0a0a0');
				this.value = default_value;
			}
		});
	});
    


// Equal Height content
        sameHeightDivs = $('.sameHeight');
        var maxHeight = 0;
        sameHeightDivs.each(function() {

            maxHeight = Math.max(maxHeight, $(this).outerHeight())+40;

        });


        sameHeightDivs.css({ height: maxHeight + 'px' });





});
