// Nav Bar

	        $(function(){

            //Hide SubLevel Menus
            $('#header ul li ul').hide();

            //OnHover Show SubLevel Menus
            $('#header ul li').hover(
                //OnHover
                function(){     
                    //Hide Other Menus
                    $('#header  ul li').not($('ul', this)).stop();
					
					var parentWidth = jQuery(this).width();
					jQuery('ul', this).css("width", parentWidth+"px");
					jQuery('ul', this).stop(true, true).slideDown();

                },
                function(){             
                    // Hide Other Menus
jQuery('ul', this).delay(400).slideUp();

                }
            );

        });

    $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});
	
	function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

// Form Focus IE //

    sfFocus = function() {
	var sfEls = document.getElementsByTagName("INPUT");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onfocus=function() {
                this.className+=" sffocus";
        }
        sfEls[i].onblur=function() {
                this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
        }
    }}
if (window.attachEvent) window.attachEvent("onload", sfFocus);

    taFocus = function() {
	var sfEls = document.getElementsByTagName("TEXTAREA");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onfocus=function() {
                this.className+=" tafocus";
        }
        sfEls[i].onblur=function() {
                this.className=this.className.replace(new RegExp(" tafocus\\b"), "");
        }
    }}
if (window.attachEvent) window.attachEvent("onload", taFocus);



// Cycle //
  
  $(document).ready(function() {
    $('#hot-topics-ul').cycle({
		fx: 'fade', 
		pager:   '#cycle-nav', 
		timeout:  5000 ,
		speed: 700
		});
});

//Fancybox

  $(document).ready(function() {
	
	$("a#email-button").fancybox({
		'hideOnContentClick': false
	});
	
	$("a#callback-button").fancybox({
		'hideOnContentClick': false
	});
	
});

// Autoheight iFrame //
