// JavaScript Document // created by MAURIX SUAREZ 2011 //---------------------------------------- // ++++ ++++ ++++ ++++ ++++ // + + + + + + + + + + // + + + + + + + + // + + + + + ++ + + + + + // +++++ +++++ ++++ ++++ ++++ ++++ //---------------------------------------- // $(document).ready(function(){ $('a.serv_bar').click(function(){ var thisElement = $(this); $('.serv_bar_content').slideUp('slow','linear'); $('a.serv_bar').removeClass('open_bar'); $(this).addClass('open_bar'); $(this).next().slideDown(); }); //hide the list content in the projects page $('.sca7_list .guide_content').hide(); //wrap the content inside the incoming listings $('.col1').wrapInner('
'); $('.col2').wrapInner('
'); $('.col3').wrapInner('
'); var getlistingTdtHight = $('.col1 .first_div').height(); var newListingDivHeight = getlistingTdtHight+'px'; $('.get_listings .col2 .first_div').css('height', newListingDivHeight); $('.get_listings .col3 .first_div').css('height', newListingDivHeight); var getGuidetHeight = $('.guide').height(); var newGuideHeight = (getGuidetHeight-(20)); $('.guide .center').css('height',getGuidetHeight); /*****************************/ /*CASE STUDIES PAGE*/ /*****************************/ /*MAIN NAV*/ var slider = $('.port_content').bxSlider({ controls: false }); $('.port_window').css('height','360px'); var getHeightForOverlay = $('.port_content_wrapper').height(); $('.white_overlay').css('height',getHeightForOverlay); // assign a click event to the external thumbnails $('.port_nav a').click(function(){ //alert('clicked'); var thumbIndex = $('.port_nav a').index(this); // call the "goToSlide" public function slider.goToSlide(thumbIndex); if (slider.getCurrentSlide() == 2){ $('.port_window ').css('height','500px'); }else if(slider.getCurrentSlide() == 4){ $('.port_window ').css('height','390px'); }else if(slider.getCurrentSlide() == 3){ $('.port_window ').css('height','340px'); }else if(slider.getCurrentSlide() == 0){ $('.port_window ').css('height','360px'); } else{ $('.port_window ').css('height','340px'); } // remove all active classes $('.port_nav a').removeClass('selected'); $('.port_nav a span').removeClass('selected'); // assisgn "pager-active" to clicked thumb $(this).addClass('selected'); $('.top_sp',this).addClass('selected'); $('.bt_sp',this).addClass('selected'); $('.white_overlay').slideDown('fast',function(){ $('.white_overlay').fadeOut(250); }); // very important! you must kill the links default behavior return false; }); //id all the galleries li $('#port_gallery1 li').attr("id",function(arr){ return "slider" + arr; var z = 100 + arr; $(this).css('z-index','100'+arr); //alert (z); }); $('#port_gallery2 li').attr("id",function(arr){ return "slider2" + arr; }); $('#port_gallery3 li').attr("id",function(arr){ return "slider3" + arr; }); $('#port_gallery4 li').attr("id",function(arr){ return "slider4" + arr; }); $('#port_gallery5 li').attr("id",function(arr){ return "slider5" + arr; }); jQuery.easing.def = "easeInOutQuad"; $('#port_g_thumbs1 a').click(function(){ var indexA = $('#port_g_thumbs1 a').index(this); $('#port_g_thumbs1 a').removeClass('selected'); $(this).addClass('selected'); var grabLi = '#slider'+indexA; var index_highest = 500; $('#port_gallery1 li.selected').animate({left:-200},300,'easeInOutQuad',function(){ $(this).css('z-index',498); $(this).animate({left:0},300,'easeInOutQuad'); $(this).removeClass('selected'); return false; }); $(grabLi).animate({left:400},10,'easeInOutQuad',function(){ $(this).css('opacity',.2); $(this).css('z-index',501); $(this).animate({left:0},300,'easeInOutQuad',function(){ $(this).animate({'opacity':1},300); }); $(this).addClass('selected'); return false; }); return false; }); $('#port_g_thumbs2 a').click(function(){ var indexA = $('#port_g_thumbs2 a').index(this); $('#port_g_thumbs2 a').removeClass('selected'); $(this).addClass('selected'); var grabLi = '#slider2'+indexA; var index_highest = 500; $('#port_gallery2 li.selected').animate({left:-200},300,'easeInOutQuad',function(){ $(this).css('z-index',498); $(this).animate({left:0},300,'easeInOutQuad'); $(this).removeClass('selected'); return false; }); $(grabLi).animate({left:400},10,'easeInOutQuad',function(){ $(this).css('opacity',.2); $(this).css('z-index',501); $(this).animate({left:0},300,'easeInOutQuad',function(){ $(this).animate({'opacity':1},300); }); $(this).addClass('selected'); return false; }); return false; }); $('#port_g_thumbs3 a').click(function(){ var indexA = $('#port_g_thumbs3 a').index(this); $('#port_g_thumbs3 a').removeClass('selected'); $(this).addClass('selected'); var grabLi = '#slider3'+indexA; var index_highest = 500; $('#port_gallery3 li.selected').animate({left:-200},300,'easeInOutQuad',function(){ $(this).css('z-index',498); $(this).animate({left:0},300,'easeInOutQuad'); $(this).removeClass('selected'); return false; }); $(grabLi).animate({left:400},10,'easeInOutQuad',function(){ $(this).css('opacity',.2); $(this).css('z-index',501); $(this).animate({left:0},300,'easeInOutQuad',function(){ $(this).animate({'opacity':1},300); }); $(this).addClass('selected'); return false; }); return false; }); $('#port_g_thumbs4 a').click(function(){ var indexA = $('#port_g_thumbs4 a').index(this); $('#port_g_thumbs4 a').removeClass('selected'); $(this).addClass('selected'); var grabLi = '#slider4'+indexA; var index_highest = 500; $('#port_gallery4 li.selected').animate({left:-200},300,'easeInOutQuad',function(){ $(this).css('z-index',498); $(this).animate({left:0},300,'easeInOutQuad'); $(this).removeClass('selected'); return false; }); $(grabLi).animate({left:400},10,'easeInOutQuad',function(){ $(this).css('opacity',.2); $(this).css('z-index',501); $(this).animate({left:0},300,'easeInOutQuad',function(){ $(this).animate({'opacity':1},300); }); $(this).addClass('selected'); return false; }); return false; }); $('#port_g_thumbs5 a').click(function(){ var indexA = $('#port_g_thumbs5 a').index(this); $('#port_g_thumbs5 a').removeClass('selected'); $(this).addClass('selected'); var grabLi = '#slider5'+indexA; var index_highest = 500; $('#port_gallery5 li.selected').animate({left:-200},300,'easeInOutQuad',function(){ $(this).css('z-index',498); $(this).animate({left:0},300,'easeInOutQuad'); $(this).removeClass('selected'); return false; }); $(grabLi).animate({left:400},10,'easeInOutQuad',function(){ $(this).css('opacity',.2); $(this).css('z-index',501); $(this).animate({left:0},300,'easeInOutQuad',function(){ $(this).animate({'opacity':1},300); }); $(this).addClass('selected'); return false; }); return false; }); //end ready function });