 function start(){
			   $("div#flash_wrap").hide();
			   }


$(function() {
                    var top = false;
		   $(".close").hide();
		   function front() {
			   $(this).css("z-index", 200);
			   $(this).addClass("top");
			   $(this).removeClass("running");
		   }
		   function frontend() {
			   $(this).next().show();
		   }
		   function setback() {
			   var orgin;
			   switch ($(this).attr("id")) {
				   case 'resume':
				   		orgin = 0;
						break;
				    case 'print':
						orgin = 10;
						break;
					case 'web':
						orgin = 20;
						break;
					case 'graphic':
						orgin = 30;
						break;
			   }
			   $(this).css("z-index", orgin);
			   $(this).removeClass("top");
			   $(this).removeClass("hover");
			   $(this).children(".close").hide();
		   }
		   $("div.slide").mouseenter(function(e) {
				if (top == true) return false;
				$(this).addClass("hover");
				if(!$(this).hasClass("top") && !$(this).hasClass("running")) {
				$(this).animate({
								marginLeft: "-=30px"
								}, "fast", null);
				};
				
			});
		   	$("div.slide").mouseleave(function(e) {
				if (top == true) return false;
				if (!$(this).hasClass("hover"))
					return;
				$(this).removeClass("hover");
				if(!$(this).hasClass("top") && !$(this).hasClass("running")) {
				$(this).animate({
								marginLeft: "+=30px"
								}, "fast");
				}
				
			});
		   $("div.slide").click(function(e) {
				if (top == true) return false;
				if(!$(this).hasClass("top")) {
				$(this).addClass("running");
				$(this).animate({
								marginLeft: "-=200px"
								}, "slow", null, front);	
				$(this).animate({
								marginLeft: "+=230px"
								}, "fast", null, frontend);
				}
				top = true;
//				$(this).unbind('click');
			});
		   $("div.close").click(function(e){
				$(this).prev().animate({
								marginLeft: "-=200px"
								}, "fast", null, setback);
				$(this).prev().animate({
								marginLeft: "+=200px"
								}, "fast");
				$(this).hide();
				top = false;
			});
		   $("div.picture").click(function() {
				switch($(this).attr("id")) {
					case 'beauty':
						url = 'beauty.html';
						break;
					case 'brokenapple':
						url = 'brokenapple.html';
						break;
					case 'magichat':
						url = 'magichat.html';
						break;
					case 'brokenglass':
						url = 'brokenglass.html';
						break;
					case 'shinyvector':
						url = 'shinyvector.html';
						break;
					case 'girl':
						url = 'girl.html';
						break;
					case 'job':
						url = 'job.html';
						break;
					case 'newsletter':
						url = 'http://content.hoiio.com/Data/1/Folder/newsletter/newsletter_zmkvp.htm';
						break;
					case 'shoutbox1':
						url = 'shoutbox.html';
						break;
					case 'UI_mobile':
						url = 'UI_mobile.html';
						break;
					case 'incoming':
						url = 'hoiioflash.html';
						break;
					case 'UI_hoiioOffice':
						url = 'UI_hoiioOffice.html';
						break;
                                        case 'LuminaSystems':
						url = 'http://www.luminasystems.net/';
						break;
					case 'sms':
						url = 'send sms.html';
						break;
					case 'hoiio':
						url = 'hoiiologo.html';
						break;
					case 'quickStart':
						url = 'quickStart.html';
						break;
					case 'hoiioMobility':
						url = 'http://content.hoiio.com/Data/1/Folder/files/HoiioMobility_datasheet.pdf';
						break;
					case 'hoiioOffice':
						url = 'http://content.hoiio.com/Data/1/Folder/files/HoiioOffice_datasheet.pdf';
						break;
					case 'cdfront':
						url = 'cdfront.html';
						break;
					case 'cdreverse':
						url = 'cdreverse.html';
						break;
					case 'cdcover':
						url = 'cdcover.html';
						break;
					
				}
				window.open(url);
			});
//		   $("div.inner").mouseover(function(e) { e.stopPropagation(); }).mouseout(function(e) { e.stopPropagation(); });
});
