$(document).ready(function(){
  
  $('ul.category').hide();
  
  $('#catTitle').click(function(){
	$('ul.category').show();
	$('ul.values').hide();
  });
  
  $('#contentTitle').click(function(){
	$('ul.category').hide();
	$('ul.values').show();
  });

  $('li.entry').hover(
  function(){
	$(this).children('p.url').slideDown(200);
  }
  , 
  function(){
	$(this).children('p.url').slideUp(200);
  });

});
  
/* 
 Onload 
*/ 
//window.onload = initCSS; 
// initCSS: If there's a "mystyle" cookie, set the active stylesheet when the page loads 
/*function initCSS() { 
 var style = readCookie("mystyle"); 
 if (style) { 
 activeCSS(style); 
 } 
} */
/* 
 Switcher functions 
*/ 
// activeCSS: Set the active stylesheet 
function activeCSS(link) { 
 var i, oneLink;
 

 
 for (i = 0; (oneLink = document.getElementsByTagName("link")[i]); i++)
 { 
    if (oneLink.getAttribute("title") && findWord("stylesheet", oneLink.getAttribute("rel"))) 
    {
      oneLink.disabled = true;
      
      if (oneLink.getAttribute("title") == link.title)
      { 
        oneLink.disabled = false;
      }
    }
 }
 
 setCookie("mystyle", link.title, 365); 

 

 if(link.title == 'default')
 {
  link.title = 'inverted';
  document.getElementById('rssLink').src = 'images/rssIcon.png';
  document.getElementById('s').src = 'images/search.png';
  document.getElementById('twittIcon').src = 'images/twitterIco.png';
 }
 else 
 {
  link.title = 'default';
  document.getElementById('rssLink').src = 'images/invertedrssIcon.png';
  document.getElementById('s').src = 'images/invertedsearch.png';
  document.getElementById('twittIcon').src = 'images/invertedtwitterIco.png';
 }
}
// findWord: Used to find a full word (needle) in a string (haystack) 
function findWord(needle, haystack)
{
 var init = needle + "\\b"; 
 return haystack.match(needle + "\\b"); 
} 
/* 
 Cookie functions 
*/ 
// Set the cookie 
function setCookie(name,value,days) { 
 if (days) { 
 var date = new Date(); 
 date.setTime(date.getTime()+(days*24*60*60*1000)); 
 var expires = ";expires="+date.toGMTString(); 
 } else { 
 expires = ""; 
 } 
 document.cookie = name+"="+value+expires+";"; 
} 
// Read the cookie 
function readCookie(name) { 
 var needle = name + "="; 
 var cookieArray = document.cookie.split(';'); 
 for(var i=0;i < cookieArray.length;i++) { 
 var pair = cookieArray[i]; 
 while (pair.charAt(0)==' ') { 
 pair = pair.substring(1, pair.length); 
 } 
 if (pair.indexOf(needle) == 0) { 
 return pair.substring(needle.length, pair.length); 
 } 
 } 
 return null; 
}

function printAds()
{
	Vertical1239118 = false;
	ShowAdHereBanner1239118 = true;
	RepeatAll1239118 = false;
	NoFollowAll1239118 = false;
	BannerStyles1239118 = new Array(
		"a{float:left;display:block;font-size:11px;color:#888;font-family:verdana,sans-serif;margin:0 4px 10px 0;text-align:center;text-decoration:none;overflow:hidden;}",
		"img{border:0;clear:right;}",
		"a.adhere{color:#666;font-weight:bold;font-size:12px;border:1px solid #ccc;background:#e7e7e7;text-align:center;}",
		"a.adhere:hover{border:1px solid #999;background:#ddd;color:#333;}"
	);
	document.write(unescape("%3Cscript src='"+document.location.protocol+"//s3.buysellads.com/1239118/1239118.js?v="+Date.parse(new Date())+"' type='text/javascript'%3E%3C/script%3E"));
}
