// JavaScript Document
//<![CDATA[
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//													Function for drop down menu 													//
//													Finds fisr UL and fades it in													//
//													Requires: Hover Plugin for jquery												//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$(document).ready(function() {
    $("#nav ul ").css({display: "none"});
    $("#nav li").hover(
      function () {
       $(this).css({cursor: "pointer"});
	   if($.browser.mozilla)
		{
			$(this).find('ul:first').css({visibility: "visible", display: "none"}).show();
			$(this).find('ul:first').css({visibility: "visible", opacity: 0, display: "block"}).fadeTo("slow", 1);
		} else 
		{
			$(this).find('ul:first').css({visibility: "visible", opacity: 0, display: "block"}).fadeTo("slow", 1);
		}
      }, 
      function () {
        if($.browser.mozilla)
		{
			$(this).find('ul:first').css({visibility: "visible", display: "block"}).hide();
		} else 
		{
			$(this).find('ul:first').css({visibility: "visible", display: "block"}).hide();
		}
      }
    );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//													Function for the image cycle on each page										//
//													Requires: Cycle Plugin															//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$('#Scroll1').cycle({ 
    fx:    'fade', 
    speed:  3500 
 });
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//													Function for the news scroller			 										//
//													Requires: Diemensions Plugin													//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var innercontainer;
var outercontainer;

outercontainer = $(".footernewscontainercms").width();
innercontainer = $(".footernewscms").width();
innercontainer = "-"+innercontainer+"px";	
function animate()
	{
			
		$(".footernewscms").animate(
		{
			left: innercontainer
		}, 80000,"linear", function(){
			
			$(".footernewscms").css("left", "322px");
			$(".footernewscms").css("width", "3000px");
			$(".footernewscms").css("zindex", "10");
			animate();			 
		});
	}

	animate();
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//													Function to correct IE6/7/8 Bugs		 										//
//																																	//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
jQuery.each(jQuery.browser, function(i) {
  if($.browser.msie){
     $("#homearrow").css("top","288px");
	 $("#servicearrow").css("top","320px");
	 $("#aboutusarrow").css("top","320px");
	 $("#homeuparrow").css("top","126px");
	 $("#homearrow").css("top","323px");
	 $("#securityuparrow").css("top","80px");
	 $("#aboutusarrowup").css("top","87px");
	 $("#contactusarrownew").css("top","325px");	 
  }
  }); 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}); 
//]]>
