$(document).ready(function(){

	// ===========================================================
	// IMAGE FADES

	$(".fade").hover(function(){ 
		$(this).animate({"opacity" : 0.6}, 200);
	}, function() {
		$(this).animate({"opacity" : 1}, 400);
	});		
	
//	if($.browser.msie)
//	{
//	    $('.postHead').columnize({width : 290, height : 436})
//	}
	
});

//function nivoslider(nivoclass) {
//	$(nivoclass).nivoSlider({
//		effect:'fade',
//		//slices:15,
//		animSpeed:500,
//		pauseTime:3000,
//		startSlide:0, //Set starting Slide (0 index)
//		directionNav:false, //Next & Prev
//		//directionNavHide:true, //Only show on hover
//		controlNav:true, //1,2,3...
//		controlNavThumbs:false, //Use thumbnails for Control Nav
//		//controlNavThumbsSearch: '.jpg', //Replace this with...
//		//controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
//		keyboardNav:true, //Use left & right arrows
//		pauseOnHover:true, //Stop animation while hovering
//		manualAdvance:true //Force manual transitions
//		//captionOpacity:0.8, //Universal caption opacity
//		//beforeChange: function(){},
//		//afterChange: function(){},
//		//slideshowEnd: function(){} //Triggers after all slides have been shown
//	});
//};

function slide_panel_init(context) {
  // ===========================================================
  // SLIDE PANEL  
      if($.browser.msie)
      {
        $(".open",context).closest("div.postSlide").width(273);
        $(".open",context).closest("div.postSlide").find("div.IEScroll").addClass("noscroll");
      }
      
	  $(".open",context).click(function(){
	      if($.browser.msie)
	      {
	        $(this).closest("div.postSlide").width(900);
	        $(this).closest("div.postSlide").find("div.IEScroll").removeClass("noscroll").addClass("scrolling");
	      }
		  $(this).closest("div.postSlide").animate({left: "10px"}, "swing").animate({left: "20px"}, "fast");		 
		  return true;
	  });
		
	  $(".close",context).click(function(){
		  $(this).closest("div.postSlide").animate({left: "10px"}, "swing").animate({left: "650px"}, "fast");
		  if($.browser.msie)
	      {
	        $(this).closest("div.postSlide").width(273);
	        $(this).closest("div.postSlide").find("div.IEScroll").removeClass("scrolling").addClass("noscroll");
	      }
		  return true;
	  });  
	
    $(".xmoreLink",context).toggle(function() {      
      $("a.open",this).hide();
      $("a.close",this).show();
    },function() {      
      $("a.close",this).hide();
      $("a.open",this).show();
    });
}
 