﻿// jquery-1.3.2.min.js

$(document).ready(function() {

	/* Attetions!!! */
//	$("div.attention").hide();
	//$("div#attention1").show();
//	$("div#attention1 .attentionControl a").click(function(){ $('div#attention1').hide(); return false; });

	/* Show & Hide */
	$("#subNav ul,.navControl .off").hide();
	$("#i639 #G00s,#i369 #G00s,#i963 #G00s,#i693 #G00s,#i396 #G00s,#i936 #G00s,#s693 #G01s,#s369 #G02s,#s963 #G03s,#s639 #G04s,#s396 #G05s,#s936 #G00s").show();
	$("#i639 #G00s,#i369 #G00s,#i963 #G00s,#i693 #G00s,#i396 #G00s,#i936 #G00s,#s693 #G01s,#s369 #G02s,#s963 #G03s,#s639 #G04s,#s396 #G05s,#s936 #G00s").animate({ marginTop: "0"},500);
	$("#myPage #subNav ul").show();
	$(".subNavTitle").hide();

	/* CSS */
	/*$(".box610 dd.cited:last-child,.box460 dd.cited:last-child,.box350 dd.cited:last-child").css("padding","0 0 2px 25px");*/
	/*$("#listBody dl:even dd").css( {'background-image' : 'url(/assets/css/all/dd.png)'} );*/
	$("#s369 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/369/DD.odd.png)'} );
	$("#s396 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/396/DD.odd.png)'} );
	$("#s639 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/639/DD.odd.png)'} );
	$("#s693 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/693/DD.odd.png)'} );
	$("#s936 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/936/DD.odd.png)'} );
	$("#s963 #listBody dl:odd dd").css( {'background-image' : 'url(/assets/css/963/DD.odd.png)'} );
	$(".table thead th:last").css( {'padding' : '0 15px 0 5px' , 'background-position' : '100% 100%'} );
	$(".table tbody tr td:last-child, .MFC tbody tr td:last-child").css( {'font-size' : '11px' , 'padding' : '10px 10px 5px 0'} );
	$(".table tbody tr td:last-child").css( {'background-position' : '100% 100%'} );
	$(".FPjournalArchives .table tbody tr td:last-child em").css( {'display' : 'block'} );
	$("#s369 .table tr:odd td").css( {'background-image' : 'url(/assets/css/369/TD.odd.png)'} );
	$("#s396 .table tr:odd td").css( {'background-image' : 'url(/assets/css/396/TD.odd.png)'} );
	$("#s639 .table tr:odd td").css( {'background-image' : 'url(/assets/css/639/TD.odd.png)'} );
	$("#s693 .table tr:odd td").css( {'background-image' : 'url(/assets/css/693/TD.odd.png)'} );
	$("#s936 .table tr:odd td").css( {'background-image' : 'url(/assets/css/936/TD.odd.png)'} );
	$("#s963 .table tr:odd td").css( {'background-image' : 'url(/assets/css/963/TD.odd.png)'} );
	$("#functionNav li:last,.IDX dl:last dd:last,#footerNav li:last,#tableOfContents dl:last-child dd, #eventPrograms dl:last-child dd").css("background","none");
	$(".MFC tr:even td").css("background","none");
	/*$("table.style1 tbody tr:odd td,table.style2 tbody tr:odd th,table.style2 tbody tr:odd td,table.style3 tbody tr:even td").css("background-color","#DD9");*/
	/*$("#s693 table.style1 tbody tr:odd th,#s693 table.style3 tbody tr:even th").css("background-color","#AD7");*/

	/* Posters */
	$("#i369 #poster1 img").attr("src","/assets/jpg/poster1.369.jpg");
	$("#i369 #poster2 img").attr("src","/assets/jpg/poster2.369.jpg");
	$("#i369 #poster3 img").attr("src","/assets/jpg/poster3.369.jpg");
	$("#i369 #poster4 img").attr("src","/assets/jpg/poster4.369.jpg");
	$("#i369 #poster5 img").attr("src","/assets/jpg/poster5.369.jpg");
	$("#i396 #poster1 img").attr("src","/assets/jpg/poster1.396.jpg");
	$("#i396 #poster2 img").attr("src","/assets/jpg/poster2.396.jpg");
	$("#i396 #poster3 img").attr("src","/assets/jpg/poster3.396.jpg");
	$("#i396 #poster4 img").attr("src","/assets/jpg/poster4.396.jpg");
	$("#i396 #poster5 img").attr("src","/assets/jpg/poster5.396.jpg");
	$("#i639 #poster1 img").attr("src","/assets/jpg/poster1.639.jpg");
	$("#i639 #poster2 img").attr("src","/assets/jpg/poster2.639.jpg");
	$("#i639 #poster3 img").attr("src","/assets/jpg/poster3.639.jpg");
	$("#i639 #poster4 img").attr("src","/assets/jpg/poster4.639.jpg");
	$("#i639 #poster5 img").attr("src","/assets/jpg/poster5.639.jpg");
	$("#i693 #poster1 img").attr("src","/assets/jpg/poster1.693.jpg");
	$("#i693 #poster2 img").attr("src","/assets/jpg/poster2.693.jpg");
	$("#i693 #poster3 img").attr("src","/assets/jpg/poster3.693.jpg");
	$("#i693 #poster4 img").attr("src","/assets/jpg/poster4.693.jpg");
	$("#i693 #poster5 img").attr("src","/assets/jpg/poster5.693.jpg");
	$("#i936 #poster1 img").attr("src","/assets/jpg/poster1.936.jpg");
	$("#i936 #poster2 img").attr("src","/assets/jpg/poster2.936.jpg");
	$("#i936 #poster3 img").attr("src","/assets/jpg/poster3.936.jpg");
	$("#i936 #poster4 img").attr("src","/assets/jpg/poster4.936.jpg");
	$("#i936 #poster5 img").attr("src","/assets/jpg/poster5.936.jpg");
	$("#i963 #poster1 img").attr("src","/assets/jpg/poster1.963.jpg");
	$("#i963 #poster2 img").attr("src","/assets/jpg/poster2.963.jpg");
	$("#i963 #poster3 img").attr("src","/assets/jpg/poster3.963.jpg");
	$("#i963 #poster4 img").attr("src","/assets/jpg/poster4.963.jpg");
	$("#i963 #poster5 img").attr("src","/assets/jpg/poster5.963.jpg");

	/* Poster Links */
	$('#poster a#poster1').attr({title: '파이낸셜 플래닝 10년사 E-Book 보기'});
	$('#poster a#poster2').attr({title: '실속있는 돈 관리 - 전국 순회 재무설계 강연회'});
	$('#poster a#poster3').attr({title: 'FP Conference 2011 - Smart FP The Best Value'});
	$('#poster a#poster4').attr({title: '2010 New 홈페이지 오픈 이벤트!'});
	$('#poster p a').attr({target: '_blank'});
		$('#poster p a').click(function(){ window.open(this.href); return false; });

	/* Special Event */
	$("#i369 #sEvent img").attr("src","/assets/jpg/sEvent.369.jpg");
	$("#i396 #sEvent img").attr("src","/assets/jpg/sEvent.396.jpg");
	$("#i639 #sEvent img").attr("src","/assets/jpg/sEvent.639.jpg");
	$("#i693 #sEvent img").attr("src","/assets/jpg/sEvent.693.jpg");
	$("#i936 #sEvent img").attr("src","/assets/jpg/sEvent.936.jpg");
	$("#i963 #sEvent img").attr("src","/assets/jpg/sEvent.963.jpg");

 
    /* Special Event Links */
	$('#sEvent a').attr({title: '#'});
	$('#sEvent a').attr({target: '_blank'});
	$('#sEvent a').click(function(){ window.open(this.href); return false; });

	/* Special Content */
	$("#i369 #sContent img").attr("src","/assets/jpg/sContent.369.jpg");
	$("#i396 #sContent img").attr("src","/assets/jpg/sContent.396.jpg");
	$("#i639 #sContent img").attr("src","/assets/jpg/sContent.639.jpg");
	$("#i693 #sContent img").attr("src","/assets/jpg/sContent.693.jpg");
	$("#i936 #sContent img").attr("src","/assets/jpg/sContent.936.jpg");
	$("#i963 #sContent img").attr("src","/assets/jpg/sContent.963.jpg");


	/* External Links */
	$('a[rel=external]').attr({target: '_blank',title: "새 창으로 열기"});
		$('a[rel=external]').click(function(){ window.open(this.href); return false; });
	$('div.SE a[href^="http"]').attr({target: '_blank',title: "새 창으로 열기"});
		$('div.SE a[href^="http"]').click(function(){ window.open(this.href); return false; });

	/* Contents END */
	$(".contentsEnd a.pageTop").click(function(){ $('html, body').animate({scrollTop: '0px'}, 500); return false; });
	$(".contentsEnd a.printPage, #doPrint").click(function(){ window.print(); return false; });
	$(".contentsEnd a.toBack").click(function(){ history.back(); return false; });
	$(".contentsEnd a.toFoward").click(function(){ history.forward(); return false; });
	$("#s693 .moneyTalks .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/money.talks.asp' });
	$("#s693 .FPTalks .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/FP.talks.asp' });
	$("#s693 .onlinePlanning .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/online.planning.asp' });
	$("#s693 .FPConsultations .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/FP.consultations.asp' });
	$("#s693 .letsPraise .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/lets.praise.asp' });
	$("#s693 .FPlounge .contentsEnd a.toList").click(function(){ window.location = '/Hello.FP/FP.lounge.asp' });
	$("#s369 .FPjournal .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.journal.asp' });
	$("#s369 .FPjournalCover .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.journal.back.issues.asp' });
	$("#s369 .vol42 .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.journal.cover.asp?vol42' });
	$("#s369 .vol45 .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.journal.cover.asp?vol45' });
	$("#s369 .foreignJournals .contentsEnd a.toList").click(function(){ window.location = '/Library/foreign.journals.asp' });
	$("#s369 .USjournal .contentsEnd a.toList").click(function(){ window.location = '/Library/US.journal.asp' });
	$("#s369 .JPjournal .contentsEnd a.toList").click(function(){ window.location = '/Library/JP.journal.asp' });
	$("#s369 .FPbooks .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.books.asp' });
	$("#s369 .FPbooksJournals .contentsEnd a.toList").click(function(){ window.location = '/Library/FP.books.journals.asp' });
	$("#s369 .siteReports .contentsEnd a.toList").click(function(){ window.location = '/Library/site.reports.asp' });
	$("#s369 .PDS .contentsEnd a.toList").click(function(){ window.location = '/Library/PDS.asp' });
	$("#s369 .videoNotes .contentsEnd a.toList").click(function(){ window.location = '/Library/video.notes.asp' });
	$("#s369 .photoGallery .contentsEnd a.toList").click(function(){ window.location = '/Library/photo.gallery.asp' });
	$("#s639 .whatsNew .contentsEnd a.toList").click(function(){ window.location = '/Events/whats.new.asp' });
	$("#s639 .conference .contentsEnd a.toList").click(function(){ window.location = '/Events/whats.new.conference.asp' });
	$("#s639 .FPconferenceHistory .contentsEnd a.toList").click(function(){ window.location = '/Events/FP.conference.history.asp' });
	$("#s639 .contest .contentsEnd a.toList").click(function(){ window.location = '/Events/whats.new.contest.asp' });
	$("#s639 .seminar .contentsEnd a.toList").click(function(){ window.location = '/Events/whats.new.seminar.asp' });
	$("#s396 .whatsNew .contentsEnd a.toList").click(function(){ window.location = '/Members/whats.new.asp' });
	$("#s396 .discussionRoom .contentsEnd a.toList").click(function(){ window.location = '/Members/discussion.room.asp' });
	
	$("#myPage .myMembership .contentsEnd a.toList").click(function(){ window.location = '/My.Page/membership.asp' });
	$("#myPage .transactionsMembership .contentsEnd a.toList").click(function(){ window.location = '/My.Page/membership.transactions.asp' });
	$("#myPage .myLibrary .contentsEnd a.toList").click(function(){ window.location = '/My.Page/library.asp' });
	$("#myPage .transactionsJournals .contentsEnd a.toList").click(function(){ window.location = '/My.Page/journals.transactions.asp' });
	$("#myPage .myMileage .contentsEnd a.toList").click(function(){ window.location = '/My.Page/mileage.asp' });
	$("#myPage .myUnits .contentsEnd a.toList").click(function(){ window.location = '/My.Page/units.asp' });
	$("#myPage .transactionsBooks .contentsEnd a.toList").click(function(){ window.location = '/My.Page/transactions.asp' });
	$("#myPage .transactionsEvents .contentsEnd a.toList").click(function(){ window.location = '/My.Page/transactions.events.asp' });
	$("#myPage .myQnAs .contentsEnd a.toList").click(function(){ window.location = '/My.Page/QnAs.asp' });

	/* Photo Gallery */
	$("a[rel=gallery]").colorbox({transition:"none", width:"90%", height:"90%", current: "Photo {current} of {total}"});

	/* Journal Cartoon */
	$("a[rel=illust]").colorbox({width:"900px", current: "{current} of {total}"});

	/* Membership Grade Information */
	$("a[rel=membershipGrade]").colorbox({width:"602px", height:"372px", current: "KFPA Membership {current} of {total}"});

	/* Event Poster */
	$("a[rel=eventPoster]").colorbox();

	/* Experience FP */
	$("a[rel=experienceFP1]").click(function(){experienceFP1();})
	$("a[rel=experienceFP2]").click(function(){experienceFP2();})
	$("a[rel=experienceFP3]").click(function(){experienceFP3();})

	/* Find Address */
	$("input#findAddress").click(function(){findAddress('zip');})

	/* Find RecipientAddress */
	$("input#findRecipientAddress").click(function(){findRecipientAddress();})

	/* Member Infomation */
	$("a[rel=memberInfo0]").click(function(){memberInfo(document.all.mem_key0.value);})
	$("a[rel=memberInfo1]").click(function(){memberInfo(document.all.mem_key1.value);})
	$("a[rel=memberInfo2]").click(function(){memberInfo(document.all.mem_key2.value);})
	$("a[rel=memberInfo3]").click(function(){memberInfo(document.all.mem_key3.value);})
	$("a[rel=memberInfo4]").click(function(){memberInfo(document.all.mem_key4.value);})
	$("a[rel=memberInfo5]").click(function(){memberInfo(document.all.mem_key5.value);})
	$("a[rel=memberInfo6]").click(function(){memberInfo(document.all.mem_key6.value);})
	$("a[rel=memberInfo7]").click(function(){memberInfo(document.all.mem_key7.value);})
	$("a[rel=memberInfo8]").click(function(){memberInfo(document.all.mem_key8.value);})
	$("a[rel=memberInfo9]").click(function(){memberInfo(document.all.mem_key9.value);})
	$("a[rel=memberInfo10]").click(function(){memberInfo(document.all.mem_key10.value);})
	$("a[rel=memberInfo11]").click(function(){memberInfo(document.all.mem_key11.value);})
	$("a[rel=memberInfo12]").click(function(){memberInfo(document.all.mem_key12.value);})
	$("a[rel=memberInfo13]").click(function(){memberInfo(document.all.mem_key13.value);})
	$("a[rel=memberInfo14]").click(function(){memberInfo(document.all.mem_key14.value);})
	$("a[rel=memberInfo15]").click(function(){memberInfo(document.all.mem_key15.value);})
	$("a[rel=memberInfo16]").click(function(){memberInfo(document.all.mem_key16.value);})
	$("a[rel=memberInfo17]").click(function(){memberInfo(document.all.mem_key17.value);})
	$("a[rel=memberInfo18]").click(function(){memberInfo(document.all.mem_key18.value);})
	$("a[rel=memberInfo19]").click(function(){memberInfo(document.all.mem_key19.value);})
	$("a[rel=memberInfo20]").click(function(){memberInfo(document.all.mem_key20.value);})
	$("a[rel=memberInfo21]").click(function(){memberInfo(document.all.mem_key21.value);})
	$("a[rel=memberInfo22]").click(function(){memberInfo(document.all.mem_key22.value);})
	$("a[rel=memberInfo23]").click(function(){memberInfo(document.all.mem_key23.value);})
	$("a[rel=memberInfo24]").click(function(){memberInfo(document.all.mem_key24.value);})
	$("a[rel=memberInfo25]").click(function(){memberInfo(document.all.mem_key25.value);})
	$("a[rel=memberInfo26]").click(function(){memberInfo(document.all.mem_key26.value);})
	$("a[rel=memberInfo27]").click(function(){memberInfo(document.all.mem_key27.value);})
	$("a[rel=memberInfo28]").click(function(){memberInfo(document.all.mem_key28.value);})
	$("a[rel=memberInfo29]").click(function(){memberInfo(document.all.mem_key29.value);})
	$("a[rel=memberInfo30]").click(function(){memberInfo(document.all.mem_key30.value);})

//	$("a[rel=memberInfo]").click(function(){memberInfo(this.href);})

	/* Article Purchase */
	//
	//$(".FPjournalCurrentIssue dt a, .FPjournalCurrentIssue dd a").click(function(){ articlePurchase(this.href); return false; });

	/* change PW */
	$("#changePW").colorbox({transition:"none", inline:true, href:"#changePWLayer"});
	$("#changePW1").colorbox({transition:"none", inline:true, href:"#changePWLayer"});
	$("#changePW2").colorbox({transition:"none", inline:true, href:"#changePWLayer"});

	/* myPage Window Open */
	$("#MyPage").click(function() { myPageOpen("/My.Page/"); });
	$("#MyInformation").click(function() { myPageOpen("/My.Page/information.asp"); });
	$("#MyMembership").click(function() { myPageOpen("/My.Page/membership.asp"); });
	$("#MyLibrary").click(function() { myPageOpen("/My.Page/library.asp"); });
	$("#MyMileage").click(function() { myPageOpen("/My.Page/mileage.asp"); });
	$("#MyUnits").click(function() { myPageOpen("/My.Page/units.asp"); });
	$("#MyMembershipBreakdown").click(function() { myPageOpen("/My.Page/membership.transactions.asp"); });
	$("#MyFPjournalsBreakdown").click(function() { myPageOpen("/My.Page/journals.transactions.asp"); });
	$("#MyFPbooksBreakdown").click(function() { myPageOpen("/My.Page/transactions.asp"); });
	$("#MyFPeventsBreakdown").click(function() { myPageOpen("/My.Page/transactions.events.asp"); });

	/* My Page Tabs Links */
	$("a.toBasicData").click(function(){$("#myInformation").tabs('select', 0); return false;});
	$("a.toPreferenceData").click(function(){$("#myInformation").tabs('select', 1); return false;});
	$("a.toWriterData").click(function(){$("#myInformation").tabs('select', 2); return false;});

	/* My Page Transactions Links */
	$(".transactionsEvents #M06 a").attr("href","transactions.events.asp");

	/* My Page Transactions cancel select */
	$("#cancelTransaction-refund").focus(function(){$("#cancelTransactionSelect1").css("display","block");$("#cancelTransactionSelect2").css("display","none");});
	$("#cancelTransaction-refund").focus(function(){$("#recipientInfoView").css("display","block");$("#recipientInfoEdit").css("display","none");$("fieldset.orderInfo").css("height","200px");$("fieldset.recipientInfo").css("height","200px");});
	$("#cancelTransaction-exchange").focus(function(){$("#cancelTransactionSelect1").css("display","none");$("#cancelTransactionSelect2").css("display","block");});
	$("#cancelTransaction-exchange").focus(function(){$("#recipientInfoView").css("display","none");$("#recipientInfoEdit").css("display","block");$("fieldset.orderInfo").css("height","211px");$("fieldset.recipientInfo").css("height","211px");});
	$("#cancelTransaction-refund, #cancelTransaction-exchange").focus(function(){$("#cancelCauseInput").css("display","block");$('html, body').animate({scrollTop: '400px'}, 500); return false;});

	/* My Page Recipient Info Edit */
	$("#editRecipientInfo").click(function(){$("#recipientInfoView").css("display","none");$("#recipientInfoEdit").css("display","block");$("fieldset.orderInfo").css("height","245px");});
	$("#cancelRecipientInfoEdit").click(function(){$("#recipientInfoView").css("display","block");$("#recipientInfoEdit").css("display","none");$("fieldset.orderInfo").css("height","200px");});

	/* My Page to Parent Window Links */
	$('a[rel=parent]').attr({target: '_parent',title: "원래 창으로 열기"});
		$('a[rel=parent]').click(function(){ window.opener.location.href = (this.href); window.opener.focus(); return false; });
	$("#subscribeJournal").attr({target: '_parent',title: "FP 저널 구독 신청 페이지를 원래 창에 엽니다"});
		$("#subscribeJournal").click(function(){ window.opener.location.href = ('/Library/FP.journal.subscribe.information.asp'); window.opener.focus(); return false; });

	/* My Page Close */
	$("input#closeWindow").click(function(){ self.close(); window.opener.document.location.reload(); return false; })

	/* Events Links - FP Conference */
 //	$(".s402 a#currentEvent").show();
 //	$(".s402 a#currentEvent").attr({style:'border-color:#CCC; cursor:text;'});
  
 	$(".s402 a#currentEvent").show();
 //	$(".s402 a#currentEvent").attr({href:'/Events/FP.conference.current.year.asp',title:'FP Conference 2011'});

	/* Events Links - FP Contest */ 

	$(".s403 a#currentEvent").show();
	$(".s403 a#currentEvent").css({'cursor':'default'});
//	$(".s403 a#currentEvent").attr({href:'/Events/FP.contest.current.year.asp',title:'Best Financial Planning Contest 2011'});

//	$(".s403 a#currentEvent").show();
//	$(".s403 a#currentEvent").attr({style:'border-color:#CCC; cursor:text;'});

	/* Events Links - FP Seminar */
		//$(".s404 a#currentEvent").hide();
	//$(".s404 a#currentEvent").attr({href:'/Events/FP.Seminar.20110324.asp',title:'2011년 정기총회 및 세미나'});
	//$(".s404 a#currentEvent").attr({href:'/Events/FP.Seminar.20101018.asp',title:'국제FPSB 총회 개최 기념 특별세미나'});
 
	$(".s404 a#currentEvent").show();
	$(".s404 a#currentEvent").attr({href:'/Events/FP.night.2011.asp',title:'FP의 밤 참가신청'});
//	$(".s404 a#currentEventS1").attr({href:'/Events/FP.seminar.information.asp?evt_key=41',title:'고객의 돈과 삶의 통합 전략! FLP 광주/전남지역 세미나'});
//	$(".s404 a#currentEventS2").show();
//	$(".s404 a#currentEventS2").attr({href:'/Events/FP.seminar.information.asp?evt_key=40',title:'2011 FP Contest 시상식 및 고객의 돈과 삶의 통합 전략! FLP 서울/경기지역 세미나'});

//	$(".s404 a#currentEvent").show();
//	$(".s404 a#currentEvent").attr({href:'/Events/FP.seminar.information.asp?evt_key=38',title:'2011년 정기총회 및 세미나'});

	/* TEMP */
	$("#editBasicData").click(function(){ window.location = '/My.Page/edit.basic.data.asp' });
	$("#editPreferenceData").click(function(){ window.location = '/My.Page/edit.preference.data.asp' });
	$("#editWriterData").click(function(){ window.location = '/My.Page/edit.writer.data.asp' });
	$("#toMembershipTransactions, .myMembership #goMyBreakdown").click(function(){ window.location = '/My.Page/membership.transactions.asp' });
	$("#toJournalsTransactions").click(function(){ window.location = '/My.Page/journals.transactions.asp' });
	$("#payMembershipFee, #toPayMembershipFee").click(function(){ window.location = '/My.Page/membership.application.asp' });
	$("#acquiredMileage").click(function(){ window.location = '/My.Page/mileage.acquired.history.asp' });
	$("#spentMileage").click(function(){ window.location = '/My.Page/mileage.spent.history.asp' });
	$("#journalUnits").click(function(){ window.location = '/My.Page/units.journal.asp' });
	$("#conferenceUnits").click(function(){ window.location = '/My.Page/units.conference.asp' });
	$("#seminarUnits").click(function(){ window.location = '/My.Page/units.seminar.asp' });
	$("#toMyQnAs").click(function(){ window.location = '/My.Page/QnAs.asp' });
	$("#toMyScrapbook").click(function(){ window.location = '/My.Page/scrapbook.asp' });
	$("#toMyActivities").click(function(){ window.location = '/My.Page/activities.asp' });
	$("#toWithdrawal").click(function(){ window.location = '/My.Page/withdrawal.asp' });
//	$(".transactionsMembership #cancelTransaction").click(function(){ window.location = '/My.Page/membership.transactions.cancel.asp' });
//	$(".transactionsJournals #cancelTransaction").click(function(){ window.location = '/My.Page/journals.transactions.cancel.asp' });
//	$(".transactionsBooks #cancelTransaction").click(function(){ window.location = '/My.Page/transactions.cancel.asp' });
//	$(".transactionsEvents #cancelTransaction").click(function(){ window.location = '/My.Page/transactions.events.cancel.asp' });
	//$(".FPconference #goCurrentEvent,.FPconferenceHistory #goCurrentEvent").click(function(){ window.location = '/Events/FP.conference.current.year.asp' });

});

	/* ACCORDION */
	$(function() {
		$("#poster").accordion();
		//getter
		//var header = $('#poster').accordion('option', 'event');
		//setter
		//$('#poster').accordion('option', 'event', 'mouseover');

		$("#tableOfContents").accordion({ autoHeight: false, navigation: true });

		$("#FAQ").accordion({ autoHeight: false, navigation: true });
	});

	/* TABS */
	$(function() {

		$("#contentsIndex").tabs({
			load: function(){/*Cufon.replace('#contentsIndex dt',{hover: true}),*/$(".IDX dl:last dd:last").css("background","none")}
		});

		$("#eventPrograms").tabs();

		$("#eventHistory").tabs();

		$("#KFPAHistory").tabs();

		$("#whatsbest").tabs();

		$("#whatshot").tabs();

		$("#bestList").tabs();

		$("#myInformation").tabs({
			//cookie: {
				// store cookie for a day, without, it would be a session cookie
				//expires: 1
			//}
		});

	});

	/* MainNav Function */
	$(function() {

		function mainNavOff() {
			$("#mainNav #G01 a").css("background-image","url(/assets/css/all/G01.png)");
			$("#mainNav #G02 a").css("background-image","url(/assets/css/all/G02.png)");
			$("#mainNav #G03 a").css("background-image","url(/assets/css/all/G03.png)");
			$("#mainNav #G04 a").css("background-image","url(/assets/css/all/G04.png)");
			$("#mainNav #G05 a").css("background-image","url(/assets/css/all/G05.png)");
			$("#subNav ul").animate({ marginTop: "-25px" },150);
			$("#subNav ul").hide();
		}

		function subNavOff() {
			$("#subNav").animate({ height: "25px" },150);
			$("#bodyBG").animate({ top: "120px" },150);
			$("#subNav ul").removeClass("subNavFull");
			$("#subNav ul,#subNav li.subNavTitle").hide();
			$("#G00s").show();
			mainNavOff();
			$(".navControl .off").hide();
			$(".navControl .on").show();
		}

		$("#G01 a,#G02 a,#G03 a,#G04 a,#G05 a").hover(function() {
			subNavOff();
		});

		$("#G01 a").hover(function() {
			$(this).css("background-image","url(/assets/css/all/G01.on.png)");
			$("#G01s").show();
			$("#G01s").animate({ marginTop: "0" },300);
		});
		$("#G02 a").hover(function() {
			$(this).css("background-image","url(/assets/css/all/G02.on.png)");
			$("#G02s").show();
			$("#G02s").animate({ marginTop: "0" },300);
		});
		$("#G03 a").hover(function() {
			$(this).css("background-image","url(/assets/css/all/G03.on.png)");
			$("#G03s").show();
			$("#G03s").animate({ marginTop: "0" },300);
		});
		$("#G04 a").hover(function() {
			$(this).css("background-image","url(/assets/css/all/G04.on.png)");
			$("#G04s").show();
			$("#G04s").animate({ marginTop: "0" },300);
		});
		$("#G05 a").hover(function() {
			$(this).css("background-image","url(/assets/css/all/G05.on.png)");
			$("#G05s").show();
			$("#G05s").animate({ marginTop: "0" },300);
		});

		$(".navControl a.on").click(function() {
			$("#subNav ul").show();
			$("#subNav").animate({ height: "175px" },300);
			$("#bodyBG").animate({ top: "270px" },300);
			$("#mainNav #G01 a").css("background-image","url(/assets/css/all/G01.png)");
			$("#mainNav #G02 a").css("background-image","url(/assets/css/all/G02.png)");
			$("#mainNav #G03 a").css("background-image","url(/assets/css/all/G03.png)");
			$("#mainNav #G04 a").css("background-image","url(/assets/css/all/G04.png)");
			$("#mainNav #G05 a").css("background-image","url(/assets/css/all/G05.png)");
			$("#G00s, #G03s").hide();
			$("#subNav li.subNavTitle").show();
			$("#subNav ul").addClass("subNavFull");
			$(this).hide();
			$(".navControl a.off").show();
		});
		$(".navControl a.off").click(function() {
			subNavOff();
			$("#i639 #G00s,#i369 #G00s,#i963 #G00s,#i693 #G00s,#i396 #G00s,#i936 #G00s,#s693 #G01s,#s369 #G02s,#s963 #G03s,#s639 #G04s,#s396 #G05s,#s936 #G00s").show();
			$("#i639 #G00s,#i369 #G00s,#i963 #G00s,#i693 #G00s,#i396 #G00s,#i936 #G00s,#s693 #G01s,#s369 #G02s,#s963 #G03s,#s639 #G04s,#s396 #G05s,#s936 #G00s").animate({ marginTop: "0"},300);
		});

	});

	/* Find Address Function */
	function findAddress() { //jqzippage
		var ffd=document.mainform;
		var ffa=document.all;
		//ffa.ajaxzippage.style.display='';

		$.fn.colorbox({href:'/includes/find.address.asp'});

		 
	}

	/* search Address Function */
	function searchAddress() { //jqzipsearch
	 
	var opttxt = document.all.addressQuery.value ;
	//  location.href="/includes/find.address.list.asp?addressQuery="+opttxt		//테스트 할때 이걸 쓰라
 
//	alert(opttxt);
		$.ajax({  
		    url:encodeURI("/includes/find.address.list.asp?addressQuery="+opttxt ), //ziplist.asp?zipaddr
			dataType:"text",
			contentType:"application/json;charset=UTF-8",
			beforeSend:function(data) {
				var html="<div class='loading'>&nbsp;</div>";
				$("#addressList").html(html); //#ajaxziplist
			},success:function(data) {
				$("#addressList").html(data); //#ajaxziplist
			},error:function(data) {
				alert("Loading Error!     ");
			}
		});	
	}


	/* Find Recipient Address Function */
	function findRecipientAddress() { //jqzippage
		var ffd=document.mainform;
		var ffa=document.all;
		//ffa.ajaxzippage.style.display='';

		$.fn.colorbox({href:'/includes/find.address2.asp'});

	}

	/* search Recipient Address Function */
	function searchRecipientAddress() { //jqzipsearch
	 
	var opttxt = document.all.addressQuery2.value ;
		$.ajax({  
		    url:encodeURI("/includes/find.address.list2.asp?addressQuery="+opttxt ), //ziplist.asp?zipaddr
			dataType:"text",
			contentType:"application/json;charset=UTF-8",
			beforeSend:function(data) {
				var html="<div class='loading'>&nbsp;</div>";
				$("#addressList").html(html); //#ajaxziplist
			},success:function(data) {
				$("#addressList").html(data); //#ajaxziplist
			},error:function(data) {
				alert("Loading Error!     ");
			}
		});	
	}

	/* Experience FP Function */
	function experienceFP1() { 
		$.fn.colorbox({href:'/Hello.FP/link_goal.asp', width:"820px", height:"90%", iframe:true}); }
	function experienceFP2() { 
		$.fn.colorbox({href:'/Hello.FP/link_edu.asp', width:"820px", height:"90%", iframe:true}); }
	function experienceFP3() { 
		$.fn.colorbox({href:'/Hello.FP/link_retire.asp', width:"820px", height:"90%", iframe:true}); }

	/* Member Infomation Function */
	function memberInfo(ID) { //jqzippage
		//var ffd=document.mainform;
		//var ffa=document.all;
		//ffa.ajaxzippage.style.display='';
		//alert(ID);
		$.fn.colorbox({href:'/includes/member.info.asp?mem_key='+ID});
	}

	/* Article Purchase Function */
	function articlePurchase(URL) { 
		//
		$.fn.colorbox({href:'/includes/article.purchase.asp?'+URL});
	}

	/* My Page Open Link */
	function myPageOpen(URL) {
		var name = "myPageWindow"
		var locX = screen.width/2-385
		var locY = screen.height/99.425
		var height = screen.height/1.15
		var features = "left="+locX+",top="+locY+",width=800,height="+height+",menubar=no,location=no,resizable=no,scrollbars=yes,status=yes"
		window.open(URL,name,features).focus();
		return false;
	}

	// 새창띄우기

	function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}


	/* cufon config */
	Cufon.replace('body#s693 #contentsNav h1', { color: '-linear-gradient(#EFD, #CF9)', textShadow: '#360 1px 1px' });
	Cufon.replace('body#s369 #contentsNav h1', { color: '-linear-gradient(#DEF, #9CF)', textShadow: '#036 1px 1px' });
	Cufon.replace('body#s963 #contentsNav h1', { color: '-linear-gradient(#FED, #FC9)', textShadow: '#630 1px 1px' });
	Cufon.replace('body#s639 #contentsNav h1', { color: '-linear-gradient(#EDF, #C9F)', textShadow: '#306 1px 1px' });
	Cufon.replace('body#s396 #contentsNav h1', { color: '-linear-gradient(#DFE, #9FC)', textShadow: '#063 1px 1px' });
	Cufon.replace('body#s936 #contentsNav h1', { color: '-linear-gradient(#FDE, #F9C)', textShadow: '#603 1px 1px' });
	Cufon.replace('#functionNav li', { hover: true })('#subNav li', { hover: true })('#contentsNav li a', { hover: true })('#footerNav li a', { hover: true });
	Cufon.replace('.list h1')('.table h1')('.cover h1')('.ACC h1')('.JNL h1')('.EVNT h1')('.UCC h1')('.answer h1')('p.writer strong');
	Cufon.replace('.eventsCalendar .events div', { hover: true })('#poster h6 a', { hover: true })('#footerContact li');

    var userAgent = navigator.userAgent.toLowerCase(); 
	var ie6catch;
    $.browser = { 
        version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1], 
        safari: /webkit/.test( userAgent ), 
        opera: /opera/.test( userAgent ), 
        msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), 
        mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) 
    }; 
	 ie6catch = $.browser.msie + $.browser.version;
