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

var $j = jQuery.noConflict();


$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');
		});
	}

});

$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);
		}
	}	
});

-->	


