var a='<div class="wtw"><a href="whatwearesaying.php"><img src="images/nav/whattheword-default.jpg" alt="Press" /></a></div><div class="wtw-sub"><div class="wtw-wws" rel=";whatwearesaying.php;"><a href="whatwearesaying.php"><img src="images/nav/wws-default.jpg" /></a></div><div class="wtw-wts" rel=";whattheyaresaying0.php;whattheyaresaying_2.php;"><a href="whattheyaresaying0.php"><img src="images/nav/wts-default.jpg" /></a></div><div class="wtw-wws" rel=";whatwevepublished.php"><a href="whatwevepublished.php"><img id="btn_published" src="images/nav/published-default.jpg" /></a></div></div>';

var uri=top.location.href;
var tmps=uri.split("/");
var file=tmps[tmps.length-1];
file=file.toLowerCase();
var pages=";whattheword.php;whatwearesaying.php;whattheyaresaying.php;whattheyaresaying_2.php;whatwearesaying.php;whatwevepublished.php;whattheyaresaying0.php;";

var outsidepages=";outsider.php;felipe_detail.php;sam_detail.php;elijah_detail.php;bill_detail.php;clementine_detail.php;jimmy_detail.php;james_detail.php;pressley_detail.php;jesse_detail.php;murray_detail.php;bloom_detail.php;faves_detail.php;";

if(outsidepages.indexOf(file)>0)
{
	a='<div class="wtw"><a href="whatwearesaying.php"><img src="images/nav/whattheword2-default.jpg" alt="Press" /></a></div><div class="wtw-sub"><div class="wtw-wws" rel=";whatwearesaying.php;"><a href="whatwearesaying.php"><img src="images/nav/wws2-default.jpg" /></a></div><div class="wtw-wts" rel=";whattheyaresaying0.php;whattheyaresaying_2.php;"><a href="whattheyaresaying0.php"><img src="images/nav/wts2-default.jpg" /></a></div><div class="wtw-wws" rel=";whatwevepublished.php"><a href="whatwevepublished.php"><img id="btn_published" src="images/nav/published-outsider-default.jpg" /></a></div></div>';
}

function hover(jqimg,on)
{
	var src=jqimg.attr("src");
	if(on) src=src.replace("-default","-over");
	else src=src.replace("-over","-default");
	jqimg.attr("src",src);
}



function initSubNav(type) {

    document.getElementById('sub_menu_background').style.visibility = 'visible';
    if (type === 'wwg') {
        document.getElementById("wwg_traditional").style.visibility = 'visible';
        document.getElementById("wwg_outsider").style.visibility = 'visible';
    } else if (type === 'wtw') {
        document.getElementById("wws").style.visibility = 'visible';
        document.getElementById("wts").style.visibility = 'visible';
        document.getElementById("wwp").style.visibility = 'visible';
    } else if (type === 'wwg/wtw') {
    	document.getElementById("wwg_traditional").style.visibility = 'hidden';
        document.getElementById("wwg_outsider").style.visibility = 'hidden';
        document.getElementById("wws").style.visibility = 'visible';
        document.getElementById("wts").style.visibility = 'visible';
        document.getElementById("wwp").style.visibility = 'visible';
    }
}

function hideSubNav(type) {
    
    if (type === 'wwg') {
        document.getElementById("wwg_traditional").style.visibility = 'hidden';
        document.getElementById("wwg_outsider").style.visibility = 'hidden';
    } else if (type === 'wtw') {
        document.getElementById("wws").style.visibility = 'hidden';
        document.getElementById("wts").style.visibility = 'hidden';
        document.getElementById("wwp").style.visibility = 'hidden';
    } else if (type === 'all') {
        document.getElementById('sub_menu_background').style.visibility = 'hidden';
        document.getElementById("wwg_traditional").style.visibility = 'hidden';
        document.getElementById("wwg_outsider").style.visibility = 'hidden';
        document.getElementById("wws").style.visibility = 'hidden';
        document.getElementById("wts").style.visibility = 'hidden';
        document.getElementById("wwp").style.visibility = 'hidden';
    }
}
