<!--
/*!
 **************************************************
 * Copyright 2010 - Danny Carmical
 * http://luckykind.com
 **************************************************/

var $j = jQuery.noConflict();

(function(){
  // if firefox 3.5+, hide content till load (or 3 seconds) to prevent FOUT
  var d = document, e = d.documentElement, s = d.createElement('style');
  if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
    s.textContent = 'body{visibility:hidden}';
    var r = document.getElementsByTagName('script')[0];
    r.parentNode.insertBefore(s, r);
    function f(){ s.parentNode && s.parentNode.removeChild(s); }
    addEventListener('load',f,false);
    setTimeout(f,1000); 
  }
})();


$j(document).ready(function() {
	/*******************************************************
	 *
	 * Navigation Menu
	 *
	 *******************************************************/
	sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);

	$j('#nav > ul').superfish({
		delay: 100,
		animation:   {opacity:'show',height:'show'},
		speed:       100,
		autoArrows:  true,
		dropShadows: false,
		onInit: function(){
			$j('span.sf-sub-indicator').next('span').remove(); /* Some Reason, Superfish throws two sets of arrows sometimes... getting rid of second set */
			$j('#nav > ul > li > a > span.sf-sub-indicator').html(' ').addClass('nav-arrow-down');
			$j('#nav > ul > li > ul  span.sf-sub-indicator').html(' ').addClass('nav-arrow-right');
		}
	});

	var sidebar_box = $j('#pb-sidebar .sidebar-box');		
	if(sidebar_box!=null) {
		$j.each(sidebar_box,function(){
			$j(this).addClass('clearfix');
		});
	}
	
/*
	var ripworld_btn = $j('#rip-world-sites-btn a');
	var ripworld_sites = $j('#rip-world-sites');
	var ripworld_close = $j('#rws-close');
	
	ripworld_btn.bind('click',function(){
		ripworld_sites.addClass('rws-show');
	});

	ripworld_close.bind('click',function(){
		ripworld_sites.removeClass('rws-show');
	});
	
*/	

});

$j(window).load(function() {
	var post_col = $j('#pb-col');
	var col_height = post_col.height();
	var sidebar_height = $j('#pb-sidebar').height();
	if((sidebar_height!=null) && (col_height!=null)){
		var dif = col_height - sidebar_height;
		if(dif < 45){
			post_col.height(sidebar_height + 45);
		}
	}	
});

-->	


