$(document).ready(function() {

$('#p_search_text').watermark('type keyword here');

//Store Image paths
var btnMinus = 'http://www.webroot.com/shared/img_structure/CS_content_minus.gif';
var btnPlus = 'http://www.webroot.com/shared/img_structure/CS_content_plus.gif';

var $expandList = $('.child_list').parent();

//Add the Plus image to every child by default
$expandList.prepend('<img src="' + btnPlus + '" alt="collapse this section" /> ');

//By Default put the Menu in collapsed state
$('.child_list').parent().children('ul').hide();

//Expand or Contract one particular Nested ul
$('img').bind('click',function(){toggleList($(this).children())});
$($expandList).bind('click',function(){toggleList($(this).children());});

//click trigger the WISE element to expand it
$("li.expand_list_item:first").trigger('click');

function toggleList(btnImg) {
var toggleSrc = btnImg.attr('src');
if ( toggleSrc == btnMinus ) {
btnImg.attr('src', btnPlus).parent().children('ul').hide();
} else{
btnImg.attr('src', btnMinus).parent().children('ul').show();
};
} 
});





function agents_available() {
var eVar23;
var event11;
document.getElementById('smartbutton').innerHTML = '<A HREF="" onClick="var s=s_gi(s_account); s.linkTrackVars=\'events,eVar23\'; s.linkTrackEvents=\'event11\'; s.eVar23=\'tech support user initiated\';s.events=\'event11\';s.tl(this,\'o\',\'Initiate Chat\'); window.open(\'http://www.webroot.com/En_US/tech-chat-form.html\',' + '\'custclient\',\'width=700,height=700,scrollbars=0\');return false;">' + '<IMG src="http://www.webroot.com/En_US/img_content/CS_techChat_btn.jpg" style="padding: 5px 0 0 9px;"></A>';
return true;
}
function agents_not_available() {
document.getElementById('smartbutton').innerHTML = ''; 
return true;
}


document.write('<img src="http://rs.instantservice.com/resources/smartbutton/6204/26289/available.gif?' + Math.floor(Math.random()*10001) + '" style="width:0;height:0;visibility:hidden;position:absolute;"' + ' onLoad="agents_available()" onError="agents_not_available()">');

