(function($){
    $(document).ready(function() {
        $(".smarteditor2").each( function(index){
            var get_id = $(this).attr("id");

            if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true;
            nhn.husky.EZCreator.createInIFrame({
                oAppRef: oEditors,
                elPlaceHolder: get_id,
                sSkinURI: g5_editor_url+"/SmartEditor2Skin_comment.html?t=400",	
                htParams : {
                    bUseToolbar : false,				// 툴바 사용 여부 (true:사용/ false:사용하지 않음)
                    bUseVerticalResizer : false,		// 입력창 크기 조절바 사용 여부 (true:사용/ false:사용하지 않음)
                    bUseModeChanger : false,			// 모드 탭(Editor | HTML | TEXT) 사용 여부 (true:사용/ false:사용하지 않음)
                    //aAdditionalFontList : aAdditionalFontSet,		// 추가 글꼴 목록
                    fOnBeforeUnload : function(){
                        //alert("완료!");
                    }
                }, //boolean
                fOnAppLoad : function(){
                    //예제 코드
                    //oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]);
					
					set_height();
					
					if(g5_is_member=='')
					{
						$('.bo_vc_in').find('iframe').contents().find('.lascon_button_icon img').click(function(){
							alert('회원가입후 이용가능합니다');
							document.location.href=g5_url+'/bbs/register_form.php';
							return;
						})
						$('.bo_vc_in').find('iframe').contents().find('.se2_input_area').find('iframe').contents().find('.se2_inputarea').click(function(){
							alert('회원가입후 이용가능합니다');
							document.location.href=g5_url+'/bbs/register_form.php';
							return;
						})
					}
                },
                fCreator: "createSEditor2"
            });
        });
    });
})(jQuery);