﻿//------------------------Events' information------------------------
//["0Date","1Event Title","2Mon-Sun","3Time","4Location","5Cost","6Detail","7[1]Off [2]On [3]CloseEvent","8Photo Link","9Event Details",10[vid name,vid url]],
var events_fall=[
["10/03/2009","Mid-Autumn Festival","Sat","9:00 PM - 10:00 PM","Red Square, Outside Kane Hall","FREE!","Free Food & Drinks","3","MidAutumnFestivalCelebration2009","140814283756",["",""]],
["10/12/2009","HKSA Orientation 2009","Mon","5:30 PM - 7:00 PM","HUB 106B ","$5 for 2009-2010 HKSA Membership Card","Free Food & Drinks ! Fun game ! ","3","HKSAOrientation2009","145474314126",["HKSA Orientation 2009 Video","_3j0iAAaZ9U"]],
["10/24/2009","Dim Sum Trip 2009","Sat","2:00 PM - 4:30 PM","Jade Garden (Chinatown, Seattle)","HKSA members $10 / Non-HKSA members $12","Dim Sum is a traditional Chinese cuisine in which small portions of a variety of foods, including an assortment of steamed or fried dumplings, are served in succession.","3","DimSumTrip2009","155705135546",["",""]],
["11/10/2009","HKSA x SCA Movie Night","Tues","5:30 PM - 7:30 PM","Main TV lounges, Terry Hall, UW","Free!","Movie playing -> 葉問 (Ip Man)<br />Food Preparation -> Popcorn and Water<br />Possible -> Dinner after movie","3","","172803377127",["Ip Man (2008) Trailer","959h-GXfeNc"]],
["11/25/2009","Thanksgiving Hot Pot Night","Wed","7:00 PM - 9:30 PM","Hong Kong Bistro (Chinatown, Seattle)","HKSA members $15 / Non-HKSA members $18","Hot pot refers to several East Asian varieties of stew, consisting of a simmering metal pot of stock at the center of the dining table. While the hot pot is kept simmering, ingredients are placed into the pot and are cooked at the table. Typical hot pot dishes include thinly sliced meat, leafy vegetables, mushrooms, wontons, egg dumplings, and sea food.","2","","171592588358",["",""]],
["12/06/2009","Ice Skating","Sun","3:00 PM - 6:00 PM","Group Health Ice Arena (Bellevue Downtown Park)","HKSA members $8 / Non-HKSA members $10 @ Booth only","Skate and celebrate at the Group Health Ice Arena in Downtown Park! This beloved Magic Season tradition is the perfect memory-making activity for family and friends. The arena features the area’s only outdoor skating rink, plus music from STAR 101.5, free skating lessons, and a series of special holiday events.","2","","215762355010",["Bellevue Magic Season","ft2Nz8qvWe8"]]
]

var events_winter=[
["01/2010","Hotpot Night","Thurs","","","","","1","","",["",""]],
["01/16/2010","Ski/Snowboarding Trip at Whistler (MLK Weekend)","Sat","01/16/2010 (Sat) - 01/18/2010 (Mon - MLK Holiday)","Whistler, BC, Canada","","::Regular Price::<br />* $384 per person including tax (paid after 10/30/09)<br /><br />::Other optional fees::<br />- 2 day ski or board rental package: $80<br />- 2 day rental & 1 beginner lesson package: $110","2","","314312495106",["Salomon Freeski TV - Whsitler Ski Bum","237JWUz-Z9s"]],
["01/2010","Husky Basketball UW vs. WAZZU","Sat","","","","","1","","",["",""]],
["02/2010","Fortune Telling Workshop","Fri","","","","","1","","",["",""]],
["02/2010","Chinese New Year Dinner","Fri","","","","","1","","",["",""]],
["02/2010","Valentine's Day Party","Sat","","","","","1","","",["",""]],
["02/2010","ASC Talent Show","Sat","","","","","1","","",["",""]],
["02/2010","Mahjong/Poker Tournament","Fri","","","","","1","","",["",""]]
]

var events_spring=[
["04/2010","Volunteer Service","Fri","","","","","1","","",["",""]],
["04/2010","Singcon Audition","Sat","","","","","1","","",["",""]],
["04/2010","HKSA x HKAW Career Fair","Sat","","","","","1","","",["",""]],
["04/2010","Chinese Dessert Night","Fri","","","","","1","","",["",""]],
["05/2010","BBQ Night","Fri","","","","","1","","",["",""]],
["05/2010","Bite of Asia","Sat","","","","","1","","",["",""]],
["05/2010","HKSA Elections/Graduating Senior Dinner","Sat","","","","","1","","",["",""]],
["05/2010","Singing Contest","Sat","","","","","1","","",["",""]]
]

var events_hkaw=[
["10/22/2009","Community Service and Outreach","Thurs","11:30 AM","New Hong Kong Restaurant (Chinatown, Seattle)","","","3","","150605881667",["",""]],
["10/22/2009","Bi-monthly Members Dinner","Thurs","	6:30 PM - 8:30 PM","Top Gun Seafood Restaurant (Bellevue)","$20 USD per person","","3","","291640840175",["",""]],
["11/21/2009","HKAW Photo Scavenger Hunt","Sat","1:30 PM - 3:30 PM","UW campus and surrounding area","$5/team","Wanna have fun and know more about UW and its surrounding area? Come to the HKAW photohunt with your friends to explore and a chance to win a $50 Gift Card from UW bookstore and win an hour of free karaoke @enKore!<br /><br />We will provide water and snacks for all participants. <br />Registration deadline: Wednesday, 11/18/09 ","3","","268543620153",["",""]]
]
	
//------------------------Photographer------------------------
var photographer = "Ryan Tsai";

//------------------------Officer Background------------------------
//["position","name","icon","year","major","minor","email","website"],
var officerbg=[
["President","Brian Poon","Brian","Senior","1) Accounting<br />2) International Studies in Business","","bwyp@u.washington.edu",""],
["External Vice President","Joey Sin","Joey","Junior","Japanese","","sinjoey@u.washington.edu",""],
["Internal Vice President","Alice Qiu","Alice","Sophomore","Undecided","","aliceqiu@u.washington.edu",""],
["Secretary","Vivian Tung","Vivian","Senior","Biochemistry","Japanese","tungv@uw.edu",""],
["Event Coordinator","Alex Lee","Alex","Sophomore","1)Economics<br />2) International Studies - IPE","NELC","leewingc@uw.edu",""],
["Treasurer","Lawrence So","Lawrence","Sophomore","Undecided","","lso0405@gmail.com",""],
["Senior Advisor","Elaine Masaki Ng","Elaine","","","","",""],
["Senator","Becky Tsui","Becky","Sophomore","Undecided","","wybtsui@u.washington.edu",""],
["Designer","Nicole Chan","Nicole","Senior","Visual Communication Design","","nchan42@u.washington.edu",""],
["Webmaster","Jacky Lam","Jacky","Senior","Aeronautics & Astronautics","","jackylam@uw.edu",""],
["SingCon Director","Derrick Lee","Derrick","Senior","Interdisciplinary Visual Arts","","kobachi@u.washington.edu",""],
["Recruitment Coordinator","Eugene Ngai","Eugene","Junior","Chemical Engineering / Business","Chemistry / Math","ngaitime@uw.edu",""],
["Public Relations","Anita Ng","Anita","Junior","Communications","Japanese","anita.est@gmail.com ",""],
["Public Relations","Scarlett Chan","Scarlett","Junior","Undecided","","scchan@u.washington.edu",""],
["Public Relations","Chandler Chin","Chandler","Junior","Electrical Engineering","","chin0010@u.washington.edu",""],
["Photographer","Ryan Tsai","Ryan","","","","",""],
["Event Crew","Andrew Ng","Andrew","Senior","Biochemistry","","amn9@u.washington.edu",""],
["Event Crew","Euny Chum","Euny","Sophomore","Pre-nursing","","ccw0726@u.washington.edu",""],
["Event Crew","Joshua Wong","Joshua","Junior","Electrical Engineering","","josh1003@u.washington.edu",""],
["Event Crew","Victor Lee","Victor","Junior","Sociology","","lee_yuk_fai@hotmail.com",""],
["Event Crew","Yan Cao","Yan","Sophomore","Environmantal Health","","yongyc@u.washington.edu",""],
["Freshman Ambassador","Jess Yu","Jess","","","","",""]
]

//------------------------Menu Links------------------------
var menulink=[
["News","index.html"],
["About","about.html"],
["Officers","officers.html"],
["Sponsors","sponsors.html"],
["Events-Photos","events.html"],
["Join","join.html"],
["Contact","contact.html"],
["Links","links.html"]
]

//------------------------HKSA URL logo------------------------
document.write("<link rel=\"bookmark\" href=\"./pics/hksa.ico\" />");
document.write("<link rel=\"shortcut icon\" href=\"./pics/hksa.ico\" />	");


//------------------------Get initial time & other js------------------------
beforeload = (new Date()).getTime();
document.write("<script type=\"text/javascript\" src=\"./script/styleswitch.js\"></script>");
document.write("<script type=\"text/javascript\" src=\"./script/bookmarkscroll.js\"></script>");


//------------------------HKSA Colorbox Setting------------------------
function colorboxsetting(){
$(document).ready(function(){
		$(".iframe").colorbox({width:"80%", height:"90%",speed:300,iframe:true,opacity:"0.6"});
		$(".video").colorbox({width:"70%", height:"80%",speed:300,iframe:true,opacity:"0.8"});
		$(".mailing").colorbox({width:"300", height:"250",speed:300,iframe:true,opacity:"0.6"});
		$(".sponsors").colorbox({width:"550", height:"550",speed:300,iframe:true,opacity:"0.6"});
		$(".send").colorbox({width:"400", height:"500",speed:300,iframe:true,opacity:"0.6"});
		$(".googlemap").colorbox({width:"800", height:"550",speed:300,iframe:true,opacity:"0.6"});
		$(".poster").colorbox({maxHeight:'95%',maxWidth:'90%',opacity:"0.6"});
			});
}
//------------------------HKSA MENU LINKS------------------------
function menulinks(){

	document.write("<span id=\"menu\">")
	for (i = 0; i < menulink.length; i++)
		document.write("<a href="+menulink[i][1]+" class=\""+menulink[i][0]+"Menu\">"+menulink[i][0]+"</a>")
	document.write("</span>")
	document.write("<span id=\"menu2\">")
	document.write("<a href=\"http://washington.facebook.com/group.php?gid=2200920384\" target=\"_blank\">HKSA Facebook Group</a>")
	document.write("<a href=\"http://students.washington.edu/hksa/\" title=\"(HKSA) Hong Kong Student Association - 香港同學會 \" class=\"jqbookmark\">Bookmark</a>")
	document.write("<a href=\"?style=style1\" rel=\"style1\" class=\"styleswitch\">[1]</a>")
	document.write("<a href=\"?style=style2\" rel=\"style2\" class=\"styleswitch\">[2]</a>")
	document.write("<a href=\"?style=style3\" rel=\"style3\" class=\"styleswitch\">[3]</a>")
	document.write("</span>")
	
}

//------------------------Officers' Information------------------------
function officerinfo(){

	document.write("<div id=\"content\" style=\"height:1900px\"><h1> Hong Kong Student Association Officers 2009 - 2010 </h1>")
		for(a=0; a<officerbg.length; a++){
		document.write("<div class=\"officers\"><img src=\"./pics/officers0910/"+officerbg[a][2]+".jpg\" style=\"width:200px;height:190px;position:absolute;z-index:1;\"><div class=\"hksacontent\">")
		document.write("<h3>"+officerbg[a][1]+"</h3>")
		document.write("<h4>"+officerbg[a][0]+"</h4><br />")
		if(officerbg[a][3].length>0) document.write("Year : "+officerbg[a][3]+"<br />")
		if(officerbg[a][4].length>0) document.write("Major : "+officerbg[a][4]+"<br />")
		if(officerbg[a][5].length>0) document.write("Minor : "+officerbg[a][5]+"<br />")
		if(officerbg[a][6].length>0) document.write("E-Mail : "+officerbg[a][6]+"<br />")
		if(officerbg[a][7].length>0) document.write("Website : "+officerbg[a][7]+"<br />")
		document.write("</div></div>")
		}
	document.write("</div><br /><p style=\"text-align:center;padding:5px;font-size:18px;font-weight:bold\"><a href=\"#top\">:: Top ::</a></p>")
}

//------------------------Event photo' function------------------------
function hksaeventphotos(num,start,end){
var quarter;

if (num==1) {quarter=events_fall}
else if (num==2) {quarter=events_winter}
else if (num==3) {quarter=events_spring}
else if (num==4) {quarter=events_hkaw}

for(k=start-1; k<end; k++){
if(quarter[k][8].length>0){
document.write("<li><a href=\"http://picasaweb.google.com/uwseattlehksa/" +quarter[k][8]+"#slideshow\" class=\"iframe info\" title=\""+quarter[k][0]+" : "+quarter[k][1]+" - Photos taken by "+photographer+"\"><img src=\"./pics/picasa.png\" style=\"vertical-align:middle;border:0px;\">&nbsp;&nbsp;&nbsp;"+quarter[k][1]+"")
document.write("<span style=\"text-decoration: line-through;width:300px\" >")
document.write("Date: "+quarter[k][0]+" ("+quarter[k][2]+")<br />")
if(quarter[k][3].length>0) document.write("Time: "+quarter[k][3]+"<br />")
if(quarter[k][4].length>0) document.write("Location: "+quarter[k][4]+"<br />")
if(quarter[k][5].length>0) document.write("Cost: "+quarter[k][5]+"<br />")
document.write("</span></a>")
document.write("</li>")
}
}
}


//------------------------Events' function------------------------
function hksaevents(num,start,end){
var quarter;

if (num==1) {quarter=events_fall}
else if (num==2) {quarter=events_winter}
else if (num==3) {quarter=events_spring}
else if (num==4) {quarter=events_hkaw}

for(k=start-1; k<end; k++){
if(quarter[k][7]==1){
document.write("<li><a class=\"info\">"+quarter[k][0]+" - "+quarter[k][1]+"")
document.write("<span class=\"eventinfo\" style=\"display:none\">")
}
else if(quarter[k][7]==2){
document.write("<li><a class=\"info\">"+quarter[k][0]+" - "+quarter[k][1]+"")
document.write("<span class=\"eventinfo\">")
}
else if(quarter[k][7]==3){
document.write("<li><a style=\"text-decoration: line-through\" class=\"info\">"+quarter[k][0]+" - "+quarter[k][1]+"")
document.write("<span style=\"text-decoration: line-through\" class=\"eventinfo\">")
}
document.write("Event: "+quarter[k][1]+"<br />")
document.write("Date: "+quarter[k][0]+" ("+quarter[k][2]+")<br />")
if(quarter[k][3].length>0) document.write("Time: "+quarter[k][3]+"<br />")
if(quarter[k][4].length>0) document.write("Location: "+quarter[k][4]+"<br />")
if(quarter[k][5].length>0) document.write("Cost: "+quarter[k][5]+"<br />")
if(quarter[k][6].length>0) document.write("<br />Detail:<br />"+quarter[k][6]+"<br />")
document.write("</span></a>")
if(quarter[k][8].length>0 || quarter[k][9].length>0) document.write("<ul style=\"list-style-type: none;padding-left:10px;\">")
if(quarter[k][9].length>0) document.write("<li><a href=\"http://www.facebook.com/event.php?eid=" +quarter[k][9]+"\" target=\"_blank\"><img src=\"./pics/facebook.png\" style=\"vertical-align:middle;border:0px;\">&nbsp;&nbsp;&nbsp;Event Details @ Facebook</a></li>")
if(quarter[k][8].length>0) document.write("<li><a href=\"http://picasaweb.google.com/uwseattlehksa/" +quarter[k][8]+"#slideshow\" class=\"iframe\" title=\""+quarter[k][0]+" : "+quarter[k][1]+" - Photos taken by "+photographer+"\"><img src=\"./pics/picasa.png\" style=\"vertical-align:middle;border:0px;\">&nbsp;&nbsp;&nbsp;Event Pictures @ Picasa Album</a></li>")
if(quarter[k][10][0].length>0) document.write("<li><a href=\"http://www.youtube.com/v/" +quarter[k][10][1]+"\" class=\"video\" title=\"Youtube Video - "+quarter[k][10][0]+"\"><img src=\"./pics/youtube.png\" style=\"vertical-align:middle;border:0px;\">&nbsp;&nbsp;&nbsp;"+quarter[k][10][0]+"</a></li>")
if(quarter[k][8].length>0 || quarter[k][9].length>0) document.write("</ul>")

document.write("</li>")
}
}


//------------------------Bookmark function------------------------

$(document).ready(function(){
	// add a "rel" attrib if Opera 7+
	if(window.opera) {
		if ($("a.jqbookmark").attr("rel") != ""){ // don't overwrite the rel attrib if already set
			$("a.jqbookmark").attr("rel","sidebar");
		}
	}

	$("a.jqbookmark").click(function(event){
		event.preventDefault(); // prevent the anchor tag from sending the user off to the link
		var url = this.href;
		var title = this.title;

		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title);
		} else if(window.opera) { // Opera 7+
			return false; // do nothing - the rel="sidebar" should do the trick
		} else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)
			 alert('Unfortunately, this browser does not support the requested action,'
			 + ' please bookmark this page manually.');
		}

	});
});


//------------------------links w/ blur------------------------

window.onload=function(){
for(var d=0; d<document.links.length; d++)
document.links[d].onfocus=function(){this.blur()}

afterload = (new Date()).getTime();
secondes = (afterload-beforeload)/1000;
document.getElementById("foot").innerHTML = "<span style=\"float:right\">Processed in " + secondes + " second(s)</span>© 2009 Hong Kong Student Association at University of Washington. ";
}