﻿//document.write('<script type="text/javascript" src="http://www.in.gov/ai/rightnow/syndication_widget/arss.js"></script>');

//function faqload(){
//    document.getElementById('want').style.display='none';document.getElementById('faq').style.display='none';
 
//    var reader2 = RNTFeed.getReader();
//    reader2.uri='http://iot.custhelp.com/cgi-bin/iot.cfg/php/enduser/opensearch.php?p_cv=';
//    reader2.pagesize = 10;
//    reader2.navigation = "off";
//    reader2.searchbox = "off";
//    reader2.render("faqdivload");
//    reader2.search("");
//    var timeX = setTimeout("document.getElementById('faq').style.display='block'", 500);
//}
 

//The 'jQuery.noConflict' statement below is implemented so that jQuery will play nice with other Javascript Libraries.   
//'$' is replaced with 'jQuery' in all instanes of jquery-based javascript
jQuery.noConflict();



jQuery(document).ready(function(){

//removes the 'link' from leftnav link headers with a href of javscript:void
jQuery("li.linkhdr").each(function(i) {
    if(jQuery(this).children("a").attr("href") == "javascript:void(0);"){
        jQuery(this).addClass(" liNoLink");
    }
});


// for Indiana Code Search functionality. 
var codeSearchVals=new Array(" T", " A", " C", " S");    
jQuery("#codeSearchForm input.codeSearch").each(function (e) {
    jQuery(this).val(codeSearchVals[e]);
});
jQuery("#codeSearchForm input.codeSearch").focus(function () {
    jQuery(this).val("");
});
jQuery("#codeSearchForm input.codeSearch").blur(function () {
    if(jQuery(this).val() == ""){
        var currId = jQuery(this).attr("id");
        switch(currId)
        {
            case "title":
                jQuery(this).val(codeSearchVals[0]);
                break;
            case "article":
                jQuery(this).val(codeSearchVals[1]);
                break;
            case "chapter":
                jQuery(this).val(codeSearchVals[2]);
                break;
            case "section":
                jQuery(this).val(codeSearchVals[3]);
                break;
        }
    }
});
    
jQuery("#codeSearchForm").submit(function(event){
    var titleVal = jQuery("#codeSearchForm #title").val();
    if (titleVal == codeSearchVals[0] || titleVal == ""){
        event.preventDefault();
        jQuery("#csValidation").html("Please enter a Title number");
        jQuery("#title").css("color","#900");
    }
    else{
        jQuery("#csValidation").html("&nbsp;");
        jQuery("#codeSearchForm input.codeSearch").each(function (e) {
            var currentVal = jQuery(this).val();
            if (currentVal == codeSearchVals[e]){
            jQuery(this).val("");
            }
        });
    }
});
});
