//pic fade
jQuery(document).ready(function($) {
$.cookie("photo", "hidden", { path: '/', expires: 1000 });
});
jQuery(document).ready(function($) {
jQuery('#photo').hide();
});
jQuery(window).load(function () {
jQuery('#photo').fadeIn(750);
});


//comments slide in out
jQuery(document).ready(function($) {
        // the div's that will be hidden/shown
	var panel = $("#slide-out");
	//the button that will toggle the panel
	var button = $("a#show");
	// do you want the panel to start off collapsed or expanded?
	var initialState = "collapsed"; // "expanded" OR "collapsed"
	// the class added when the panel is hidden
	var activeClass = "hidden";
	// the text of the button when the panel's expanded
	var visibleText = "hide comments";
	// the text of the button when the panel's collapsed
	var hiddenText = "show comments";
        //---------------------------
	// don't    edit    below    this    line,<
	// unless you really know what you're doing
	//---------------------------</p>
	if($.cookie("panelState") == undefined) {
		
$.cookie("panelState", initialState, { path: '/' });
}

var state = $.cookie("panelState");

if(state == "collapsed") {


panel.hide();
button.addClass(activeClass);

}

button.click(function(){
					  
if($.cookie("panelState") == "expanded") {
$.cookie("panelState", "collapsed", { path: '/' });
button.addClass(activeClass);

} else {
$.cookie("panelState", "expanded", { path: '/' });
button.removeClass(activeClass);
}

panel.slideToggle(1000);

return false;
});
});



