/**
 * AOL TV Squad
 * Mike '1312' @ Area 17
 * (c) Copyright 2009 AOL LLC
 * dependencies: jQuery 1.3.2
 *
 * 2 functions in here:
 * - some helper classes for IE
 * - a quick browser check
 *
 */
var tvsquad = {
    helperClasses : function(version) {
        // psuedo classes IE just can't do...
        $('li:last-child').addClass("last");
        if (version == 6) {
            $('li:first-child').addClass("first");
            $("input[type=submit]").hover(function(){
        		$(this).addClass("submitHover");
        	}, function() {
        		$(this).removeClass("submitHover");
        	});
        }
    },   
    browserTest : function() {
        //
    	function searchVersion(browser) {
    		var dataString = navigator.userAgent;
    		var index = dataString.indexOf(browser);
    		if (index == -1) return;
    		var bVersion = parseFloat(dataString.substring(index+browser.length+1));
    		return bVersion.toString().split(".")[0];
    	}
    	if (jQuery.browser.msie) {
    	    version = searchVersion("MSIE") || "";
    	    tvsquad.helperClasses(version);
    	}
    },
    domready : function() {
        // quick browser test to aid css for older browsers
        tvsquad.browserTest();
    }
}


    function __TABBLO_TPT_LOAD(){
  Tabblo.embedded.sites.SettingsObject.preprocess.apply({Properties:{template:'blog'},FixedContent:{'logo':'http://www.tvsquad.com/media/feedlogo.gif'},Content:{'pagetitle':{ match: 'css', selector:'h1' }, 'text':{ match: 'css', selector:'#tvsquad_left .content', outputTagToo: true, recurse: true }, 'image': { match: 'css', selector:'#tvsquad_left .content img', nodeContentType: 'image' }} }, []); Tabblo.embedded.printabulous();
}

function MakePDF() { var tpS = document.createElement('script');tpS.setAttribute('type','text/javascript');tpS.setAttribute('charset','utf-8'); tpS.setAttribute('src','http://h30405.www3.hp.com/edit/tptboot/1.0');document.getElementsByTagName('body').item(0).appendChild(tpS);}
function pdfPrint(url){MakePDF();}
function showHpPop(iShow){
    if (iShow == 1) {
        document.getElementById("hpPopCnt").innerHTML = "<p>With HP wireless printers, you could have printed this from any room in the house. Live wirelessly. Print wirelessly.</p>";
        document.getElementById("hpPopCnt").style.display = "block";
    } else {
        document.getElementById("hpPopCnt").style.display = "none";
    }
}
function showHpPop2(iShow){
    if (iShow == 1) {
        document.getElementById("hpPopCnt2").innerHTML = "<p>With HP wireless printers, you could have printed this from any room in the house. Live wirelessly. Print wirelessly.</p>";
        document.getElementById("hpPopCnt2").style.display = "block";
    } else {
        document.getElementById("hpPopCnt2").style.display = "none";
    }
}

function getBio(id,height){
	if(height==44){
		document.getElementById("bloggerBio"+id).style.height = document.getElementById("bloggerPar"+id).offsetHeight+"px";
		document.getElementById("bioBox"+id).style.height = 310+"px"; 
		document.getElementById("moreBio"+id).className = "moreBioUp"; 
	}else{ 
		document.getElementById("bloggerBio"+id).style.height = 44+"px";
		document.getElementById("bioBox"+id).style.height = 176+"px"; 
		document.getElementById("moreBio"+id).className = "moreBioDown"; 
	}
}

function checkEmptyBio(id){

	if((document.getElementById("portrait"+id).src==document.location) || (document.getElementById("portrait"+id).src=="http://www.tvsquad.aol.com/") || (document.getElementById("portrait"+id).src=="http://") || (document.getElementById("portrait"+id).src=="http:///")){
		document.getElementById("portrait"+id).src="http://o.aolcdn.com/dims-commerce/dims/MOVS/5/132/176/100/http://www.aolcdn.com/ch_celebrity/celeb_noimage";
	}
	
	if((document.getElementById("bloggerPar"+id).innerHTML=='')|| (document.getElementById("bloggerPar"+id).innerHTML=='<br>')){
		document.getElementById("bloggerBio"+id).style.display="none";
		document.getElementById("moreBio"+id).style.display="none";
	}

	if((document.getElementById("bloggerTwitterLink"+id).href=="") || (document.getElementById("bloggerTwitterLink"+id).href=="http://www.tvsquad.com/") || (document.getElementById("bloggerTwitterLink"+id).href==window.location)){
		document.getElementById("bloggerTwitter"+id).style.display ="none";
	}
	if((document.getElementById("bloggerFacebookLink"+id).href=="") || (document.getElementById("bloggerFacebookLink"+id).href=="http://www.tvsquad.com/") || (document.getElementById("bloggerFacebookLink"+id).href==window.location)){
		document.getElementById("bloggerFacebook"+id).style.display ="none";
		
	}

}