$(document).ready(function(){
     

	$('#nav li').hover(
		function() { $('ul',this).css('display', 'block'); },
		function() { $('ul',this).css('display', 'none'); 
    });
    
    $('body').click(function(){
        $('.links_container ul').css('display','none');
    });
    $('.links_container').click(function(event){	
        event.stopPropagation();
        $('ul', this).toggle();		        
    });
    
    $('.faq_question').click(function(){
        //var img = $('img',this).attr('src');
        var img = $(this).css("background-image");
        var urlpath = img.substring(img.lastIndexOf("/")+1,img.length-1);
        
        if(urlpath == "faq_on.gif" || urlpath == "faq_on.gif\""){//IE uses quotes around url Firefox removes them
            //$('img',this).attr('src','/images/faq/faq_off.gif');
            $(this).css("background-image","url(\"/images/faq/faq_off.gif\")");
        }
        else{
            //$('img',this).attr('src','/images/faq/faq_on.gif');
            $(this).css("background-image","url(\"/images/faq/faq_on.gif\")");
        }
        $(this).next().toggle(500);
    });
    
    $('.links_question').click(function(){
        var img = $('img.links_arrow',this).attr('src');
        
        if(img == "/images/usefullinks/links_arrow_off.gif" || img == "/images/usefullinks/links_arrow_off.gif\""){
            $('img.links_arrow',this).attr('src','/images/usefullinks/links_arrow_on.gif');
            $(this).css('background-image','url(/images/usefullinks/links_on_bg.gif)');
            $(this).css('background-repeat','repeat-x');
        }
        else{
            $('img.links_arrow',this).attr('src','/images/usefullinks/links_arrow_off.gif');
            $(this).css('background-image','none');
        }
        
        $(this).next().toggle(500);
    });
    
    $('.toggle_next').click(function(){
        $(this).next().toggle(500);
    });
    
    $('.toggle_next').hover(
        function(){ $(this).css("color","#F95501")},
        function(){ $(this).css("color","#1597BC")}
      );    
});


function smallFontSize() {
$("p").css("font-size","10px");
}

function regularFontSize() {
$("p").css("font-size","12px");
}

function largeFontSize() {
$("p").css("font-size","14px");
}

swfobject.embedSWF("octa.swf", "flash", "691", "336", "9.0.0", "expressInstall.swf",{}, {wmode: "transparent"} );

/*function submitSearchForm(e)
{
    //000764167413059203292%3Avqcnawyubky  OCTA search cx code
    //018254500067243561434%3Amp_enb2xk4q  My test search cx code
    if((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)){
        e.keyCode = 0;
        document.location.href='http://dev.octa.net/search.aspx?cx=000764167413059203292%3Avqcnawyubky&cof=FORID%3A10&ie=UTF-8&q=' + document.getElementById('q').value + '&sa=Search';         
    }
}*/
    
    
    