jQuery().ready(function() {
  jQuery("h3, .post_simple h1, .post_simple h2").not('.title').wrapInner("<span></span>");
  
  jQuery('.post_content img').not('.noborder').each(function() {
		if( jQuery(this).css('float') == 'right') { 
			jQuery(this).wrap('<span class="imgOverlay floatRight"></span>');
	  	} else if ( jQuery(this).css('float') == 'left') { 
			jQuery(this).wrap('<span class="imgOverlay floatLeft"></span>');
	  	} else {
			jQuery(this).wrap('<span class="imgOverlay"></span>');
	  	}
		
		 jQuery(this).after('<span class="overlay"></span>');
		 jQuery(this).removeAttr('style').removeAttr('align');
	});
  jQuery('.post_img_left img').not('.noborder').each(function() {
		jQuery(this).wrap('<span class="imgOverlay floatLeft"></span>');	
		 jQuery(this).after('<span class="overlay"></span>');
		 jQuery(this).removeAttr('style').removeAttr('align');
	});
  jQuery('.post_img_right img').not('.noborder').each(function() {
		jQuery(this).wrap('<span class="imgOverlay floatRight"></span>');	
		 jQuery(this).after('<span class="overlay"></span>');
		 jQuery(this).removeAttr('style').removeAttr('align');
	});
 
 jQuery(".colorbox a").colorbox({photo:true, maxWidth:"80%", maxHeight:"80%", scalePhotos:true, rel:'photos', slideshow:true});
  
  
	/*if (jQuery.cookie('colorbox')!='1') {
		jQuery.colorbox({inline:true, href: "#colorboxflash", innerWidth:"800", innerHeight:"600", onLoad:function(){ jQuery.cookie('colorbox','1') }})
		
	} */ 
	 /*if (jQuery('body').find('#colorboxflash').length > 0) {
		if (jQuery.cookie('colorbox')!='1') {
			jQuery.colorbox({inline:true, href: "#colorboxflash", innerWidth:"800", innerHeight:"400", onLoad:function(){ jQuery.cookie('colorbox','1') 	}}
		)}
	 }*/

 });
