$.runInit = function(){ //ms ie 확인 var msie=""; if($.browser.msie){ msie="true"; } //데이타 저장용 OBJ -> postValue.js 에서 사용 var data = $("data")[0]; $dataGet =$.data(data,"get"); /************************ 메인 페이지 용 메서드 main Page 용 *************************/ if($dataGet.tag=="") { /* 컨텐츠 뷰어 */ //레프트메뉴 디폴트 선택 $("#leftMenu").css("background-image","url('images/r"+1+".png')"); var tags= "우리들이야기"; $("#c_viewer").load("server/pagecreate.php?data-role=mainList&data-theme=mainList&tag="+tags,{tag: tags,tag_plus:"ok"}); //레프트메뉴 디폴트선택 $(".leftMenu").each(function(idx,value){ var thisNum = idx+1; $(value).bind("click",function(){ $("#leftMenu").css("background-image","url('images/r"+thisNum+".png')"); var tags= $(this).attr("tag"); $("#c_viewer").load("server/pagecreate.php?data-role=mainList&data-theme=mainList&tag="+tags,{tag: tags,tag_plus:"ok"},function(){ if(!msie) { $("#c_viewer img").css("width","408"); }else{ $("#c_viewer img").css("width","388"); } }); }); }); /* 메인화면 중앙 VOD 플레이 */ $(".vodMenu").each(function(idx,value){ var thisNum = idx+1; if(thisNum == 1) { $.vodPlay(value); } $(value).bind("click",function(){ $(".vodMenu").each(function(idx,value){ $(this).attr("src","images/ld"+(idx+1)+".png"); }); $(this).attr("src","images/ld"+thisNum+"o.png"); $.vodPlay(this); }); });//each }//if /* 메인 페이지 용 메서드 끝 */ /************************** 서브페이지용 메서드 시작 ***************************/ $("#contentstitle").live("click",function(){ var a=$(this).next().css("display"); if(a=="none") { $(this).next().fadeIn("fast"); }else{ $(this).next().fadeOut("fast"); } }); /* 서브페이지용 메서드 끝 */ /********************** 공통사용 메서드 ***********************/ $(".mainMenu").each(function(){ $(this).bind("click",function(){ $(this).goUrl("defualtTag","tagIndex"); }); }); $("#mainMenu img").first().bind("click",function(){ window.location.href="index.html"; }); /* 로그인 버튼 클릭 */ $("#loginBox input[type='button']").bind("click",function(){ $(this).signIN(); }); /* 로그인 박스 클 */ $("#loginBox input[type='text']").bind("click",function(){ $("#login_panel").css("background-image","url('images/login_blank.png')"); $(this).unbind("click"); }); /**/ $("#loginBox input").keypress(function(evt){ if(evt.which==13) { $(this).signIN(); } }); /* 로그아웃 */ $("#logout").click(function(){ var answer = confirm("로그아웃 하시겠습니까?") if (answer){ $.ajax({ type:'POST', url:"server/user.php", data:"type=signout", error:function(xhr,ajaxOptions,thrownError){ alert(xhr.statusText); }, success:function(_d){ document.location.reload(); } }); } }); $("#signupforget").click(function(){ window.location.href="signup.html"; }); /* 공통사용 메서드 */ } //이동스크립트 $.fn.goUrl=function(selector,idx){ var tag=$(this).attr(selector); var index=$(this).attr(idx); if(index == 1) { window.location.href="serv_info.html?type=getlist&maintag="+index+"&tag="+tag; }else{ window.location.href="serv.html?type=getlist&maintag="+index+"&tag="+tag; } }; //메인 VOD 설정 $.vodPlay = function mainVod(obj){ var data = "type=vod&tag="+$(obj).attr("tag"); $.ajax({ type:'POST', url:"server/tag.php", data:data, error:function(xhr,ajaxOptions,thrownError){ alert(xhr.statusText); }, success:function(_d){ $("#temp").html(_d); var vod_src =$("#temp .ac").attr("data_src"); jwplayer("vodPanel").setup({ skin: "javascript/beelden.zip", stretching: "fill", flashplayer: "javascript/player.swf", image: "http://vod.pyungkwang.com/movie/"+vod_src+".jpg", levels: [ {file: "http://vod.pyungkwang.com/movie/"+vod_src+".mp4"} ] }); } }); } //로그아웃 메소드 $.fn.signOut = function(){ } //경고 창 $.fn.showMessage = function(msg,title){ $( "