//vars var current = '.welcome'; var slideshow_image_count = 9; var paused = false; var curr_slide = 0; var prev_slide = -1; var slideshow_delay = 4000; var timer; function slideshow(){ //slideshow module if(paused) exit; //check for pause $('.slideshow ul li:eq('+curr_slide+')').css('z-index','99').fadeIn('slow'); $('.slideshow ul li:eq('+prev_slide+')').css('z-index','98').fadeOut('slow'); prev_slide = curr_slide; if(curr_slide == slideshow_image_count-1) curr_slide = 0; else curr_slide++; timer = setTimeout("slideshow("+curr_slide+")",slideshow_delay); } function move() { //clearTimeout(timer); //$('.slideshow').stop(true).animate({top:50},'fast'); //slideshow(); } function pageContent() { //create the content in a temp div, then move it into place } $(document).ready(function(){ //init //$('.gallery').blinds(); //gallery $('.slideshow-link').stop(true).animate({top:573},'slow'); $('.root').stop(true).animate({top:371},'slow'); $('.logo').stop(true).animate({top:289},'slow'); $('.title').stop(true).animate({top:0},'slow'); $('.section').stop(true).animate({top:0},'slow'); $('.welcome').stop(true).animate({top:100},'slow'); $('.terms').stop(true).animate({top:557},'slow'); $('.credits').stop(true).animate({top:557},'slow'); $('.section').html('/ welcome'); $('.title').html('/ Dalli House 2011'); $('.slideshow-link').click(function() { //slideshow clicked clearTimeout(timer); $("#contentarea").hide(); $("#welcome").hide(); $('.section').html('/ slideshow'); $('.title').html('/ slideshow'); $(current).css('top',600); current = '.slideshow'; $('.slideshow').stop(true).animate({top:50},'fast'); slideshow(); //start slideshow }); $('.pause').click(function() { if(paused){ paused = false; $('.pause').html('pause'); slideshow(curr_slide); } else { paused = true; $('.pause').html('resume'); } }); $('.terms').click(function() { //terms clicked clearTimeout(timer); $("#contentarea").hide(); $('.portfolio-image').hide(); $("#welcome").hide(); $('.section').html('/ terms & conditions'); $('.title').html('/ terms & conditions'); $(current).css('top',600); $('.terms-content').stop(true).animate({top:50},'slow'); current = '.terms-content'; }); $('.credits').click(function() { //credits clicked clearTimeout(timer); $("#contentarea").hide(); $("#welcome").hide(); $('.section').html('/ site credits'); $('.title').html('/ site credits'); $(current).css('top',600); $('.credits-content').stop(true).animate({top:50},'slow'); current = '.credits-content'; }); $('.root li').click(function() { $('.terms-content').stop(true).animate({top:600},'fast'); $('.level-2 li').removeClass('selected'); $('.level-3 li').removeClass('selected'); $('.level-1 li').removeClass('selected'); $('.level-2 li:first').addClass('selected'); $('.level-2-2 li:first').addClass('selected'); $(".level-3").find("li:first").addClass("selected"); $('.level-1 li:first').addClass('selected'); $('.root li').removeClass('selected'); $(this).addClass('selected'); switch($(this).index()){ case 0: //portfolio clicked clearTimeout(timer); $("#contentarea").hide(); $("#welcome").hide(); $('.portfolio-image').show(); $('.section').html('/ portfolio'); $('.title').html('/ portfolio'); $(current).css('top',600); current = '.portfolio'; $('.portfolio').stop(true).animate({top:150},'slow'); $('.root').stop(true).animate({top:193},'slow'); $('.level-1').stop(true).animate({top:371},'slow'); $('.level-2-1').stop(true).animate({top:600},'slow'); $('.level-2-2').stop(true).animate({top:600},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 1: //bio clicked $("#contentarea").hide(); $("#welcome").hide(); $('.portfolio-image').hide(); clearTimeout(timer); $('.section').html('/ bio'); $('.title').html('/ bio'); $(current).css('top',600); current = '.bio'; $('.bio').height(600); $('.bioinner').scrollbar(); $('.bio').stop(true).animate({top:0},'slow'); //$('.bio').scrollbar(); $('.root').stop(true).animate({top:371},'slow'); $('.level-1').stop(true).animate({top:600},'slow'); $('.level-2-1').stop(true).animate({top:600},'slow'); $('.level-2-2').stop(true).animate({top:600},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 2: //contact clicked $("#contentarea").hide(); $("#welcome").hide(); clearTimeout(timer); $('.section').html('/ contact'); $('.title').html('/ contact'); $(current).css('top',600); current = '.contact'; $('.contact').stop(true).animate({top:0},'slow'); $('.root').stop(true).animate({top:371},'slow'); $('.level-1').stop(true).animate({top:600},'slow'); $('.level-2-1').stop(true).animate({top:600},'slow'); $('.level-2-2').stop(true).animate({top:600},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); } }); $('.level-1 li').click(function() { $('.terms-content').stop(true).animate({top:600},'fast'); $('.level-2 li').removeClass('selected'); $('.level-3 li').removeClass('selected'); $('.level-1 li').removeClass('selected'); $('.level-2 li:first').addClass('selected'); $('.level-2-2 li:first').addClass('selected'); $(".level-3").find("li:first").addClass("selected"); $(this).addClass('selected'); switch($(this).index()){ case 0: //architecture clicked $('.portfolio-image').show(); $('.portfolio').stop(true).animate({top:150},'slow'); $("#contentarea").hide(); $("#welcome").hide(); //$('.portfolio-image').show(); $('.section').html('/ architecture'); $('.title').html('/ architecture'); $('.root').stop(true).animate({top:105},'slow'); $('.level-1').stop(true).animate({top:193},'slow'); $('.level-2-1').stop(true).animate({top:371},'slow'); $('.level-2-2').stop(true).animate({top:600},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 1: //product design clicked //alert(0); $('.section').html('/ design'); $('.title').html('/ design'); $('.root').stop(true).animate({top:105},'slow'); $('.level-1').stop(true).animate({top:193},'slow'); $('.level-2-1').stop(true).animate({top:600},'slow'); $('.level-2-2').stop(true).animate({top:371},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); } }); $('.level-2-1 li').click(function() { $('.terms-content').stop(true).animate({top:600},'fast'); $("#contentarea").hide(); $('.level-2 li').removeClass('selected'); $('.level-3 li').removeClass('selected'); $('.level-2-1 li').removeClass('selected'); //$('.level-2 li:first').addClass('selected'); //$('.level-2-2 li:first').addClass('selected'); $(".level-3").find("li:first").addClass("selected"); $(this).addClass('selected'); switch($(this).index()){ case 0: // commercial clicked $('.section').html('/ commercial'); $('.title').html('/ commercial'); $(current).css('top',600); //current = '.gallery'; //$('.gallery').stop(true).animate({top:50},'slow'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:371},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 1: // public clicked $('.section').html('/ public'); $('.title').html('/ public'); //current = '.gallery'; //$('.gallery').stop(true).animate({top:50},'slow'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:371},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 2: // offices clicked $('.section').html('/ offices'); $('.title').html('/ offices'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:371},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 3: // residential clicked $('.section').html('/ residential'); $('.title').html('/ residential'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:371},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 4: // restaurants clicked $('.section').html('/ restaurants'); $('.title').html('/ restaurants'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:371},'slow'); $('.level-3-6').stop(true).animate({top:600},'slow'); break; case 5: // stores clicked $('.section').html('/ stores'); $('.title').html('/ stores'); //current = '.gallery'; //$('.gallery').stop(true).animate({top:50},'slow'); $('.root').stop(true).animate({top:45},'slow'); $('.level-1').stop(true).animate({top:112},'slow'); $('.level-2-1').stop(true).animate({top:160},'slow'); $('.level-3-1').stop(true).animate({top:600},'slow'); $('.level-3-2').stop(true).animate({top:600},'slow'); $('.level-3-3').stop(true).animate({top:600},'slow'); $('.level-3-4').stop(true).animate({top:600},'slow'); $('.level-3-5').stop(true).animate({top:600},'slow'); $('.level-3-6').stop(true).animate({top:371},'slow'); } }); $('.level-2-2 li').click(function() { $('.terms-content').stop(true).animate({top:600},'fast'); $("#contentarea").hide(); $('.level-2 li').removeClass('selected'); $('.level-3 li').removeClass('selected'); $('.level-2-2 li').removeClass('selected'); //$('.level-2 li:first').addClass('selected'); //$('.level-2-2 li:first').addClass('selected'); $(".level-3").find("li:first").addClass("selected"); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ jack in the bocks 2005'); break; case 1: $('.title').html('/ street furniture 2005'); break; case 2: $('.title').html('/ table soccer 2006'); break; case 3: $('.title').html('/ el cubo 2007'); break; case 4: $('.title').html('/ untitled exhibition 2007'); break; case 5: $('.title').html('/ red blue shelf 2011'); break; } }); $('.level-3-1 li').click(function() { $('.level-3-1 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ miss skyscraper 1998'); break; case 1: $('.title').html('/ urban lounge 2004'); break; case 2: $('.title').html('/ diwan hotel 2008'); break; case 3: $('.title').html('/ gieves hotel 2010'); break; case 4: $('.title').html('/ mattia preti hotel 2011'); break; case 5: $('.title').html('/ bettina palace guesthouse 2011'); break; } }); $('.level-3-2 li').click(function() { $('.level-3-2 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ secondary school 2004'); break; case 1: $('.title').html('/ wignacourt museum 2007'); break; case 2: $('.title').html('/ torino UIA 2008'); break; case 3: $('.title').html('/ ggantija heritage park 2009'); break; case 4: $('.title').html('/ strait street toilets 2010'); break; case 5: $('.title').html('/ valletta toilets 2011'); break; case 6: $('.title').html('/ spinola public convenience 2011'); break; case 7: $('.title').html('/ valletta info point 2011'); break; } }); $('.level-3-3 li').click(function() { $('.level-3-3 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ ec 2006'); break; case 1: $('.title').html('/ afc 2007'); break; case 2: $('.title').html('/ bahrain WTC 2007'); break; case 3: $('.title').html('/ skin peep 2009'); break; } }); $('.level-3-4 li').click(function() { $('.level-3-4 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ homepad 2001'); break; case 1: $('.title').html('/ home in garden 2005'); break; case 2: $('.title').html('/ home in water 2006'); break; case 3: $('.title').html('/ nine X two 2008'); break; case 4: $('.title').html('/ outdoor living 2009'); break; case 5: $('.title').html('/ aalter house 2009'); break; case 6: $('.title').html('/ dalli house 2011'); break; case 7: $('.title').html('/ st ursula street 2011'); break; case 8: $('.title').html('/ pjazza tigne 2011'); break; } }); $('.level-3-5 li').click(function() { $('.level-3-5 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ two and a half lemon 2006'); break; case 1: $('.title').html('/ two twentytwo 2007'); break; } }); $('.level-3-6 li').click(function() { $('.level-3-6 li').removeClass('selected'); $('.terms-content').stop(true).animate({top:600},'fast'); $(this).addClass('selected'); switch($(this).index()){ case 0: $('.title').html('/ auntielucy 2002'); break; case 1: $('.title').html('/ doneo 2004'); break; case 2: $('.title').html('/ swinger 2006'); break; case 3: $('.title').html('/ shu 2007'); break; case 4: $('.title').html('/ joinwell 2008'); break; case 5: $('.title').html('/ flow 2011'); break; } }); });