/*
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Interface elements for jQuery
*/
jQuery(function(){

/*
─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─
scrollTo
*/

jQuery(".goto_top a").click(function(){
	jQuery.scrollTo(jQuery(jQuery(this).attr("href")), {
		duration: 'slow'
	});
	return false;
});

/*
─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─・─
set class for lightbox
*/

jQuery("#content_body a[href$='.jpg']").addClass("lightbox");
jQuery("#content_body a[href$='.gif']").addClass("lightbox");
jQuery("#content_body a[href$='.png']").addClass("lightbox");
jQuery("#content_body a[href$='.jpeg']").addClass("lightbox");
jQuery("#content_body a[href$='.JPG']").addClass("lightbox");
jQuery("#content_body a[href$='.JPEG']").addClass("lightbox");
jQuery("#content_body a[href$='.GIF']").addClass("lightbox");
jQuery("#content_body a[href$='.PNG']").addClass("lightbox");

jQuery('.lightbox a, a.lightbox').lightBox();
jQuery('.mt-image-right, .mt-image-left, .mt-image-center, .mt-image-none').parent("a").lightBox();

/*
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
*/
});


/*
---------------------------------------------
read feed
---------------------------------------------
*/

//文字列置換関数
//主に、改行タグ変換用

function br_henkan(str){
/*
	var temp = str;
	return temp.split('<br />').join(' ');  
	return temp.split('<br>').join(' ');  
	return temp.split('<BR>').join(' ');  
	title_nado = temp;
*/
/*
	var temp = str;
	temp = temp.replace("<br />", " ") ;
	temp = temp.replace("<br>", " ") ;
	temp = temp.replace("<BR>", " ") ;
	temp = temp.replace("<BR />", " ") ;
*/
	var temp = str;
	temp = temp.split('<br />').join(' ');  
	temp = temp.split('<br>').join(' ');  
	temp = temp.split('<BR>').join(' ');  

	temp = temp.split("&lt;br /&gt;").join(' ');
	temp = temp.split("&lt;br&gt;").join(' ');
	temp = temp.split("&lt;BR&gt;").join(' ');
	temp = temp.split("&lt;BR /&gt;").join(' ');
	return temp;

}
