﻿$(document).ready(function(){

  if (typeof $('#bigpush').cycle == 'function'){
    $("#bigpush").cycle({
      fx: 'scrollLeft',
      random: 1,
      speed: 300,
      timeout: 5000,
      //next: '#bigpush div',
      pause: 1       
    }); 
    $("#bigpush div").hover(function () {
      $(this).find("p").show(150);
    }, function(){
      $(this).find("p").hide(150);
    });
  }
        
  $("#filter1").click(function() {
    $("#portfolio").find("a").filter(".web").fadeIn("slow");
    $("#portfolio").find("a").not(".web").fadeOut("slow");
    return false;
  });
  $("#filter2").click(function() {
    $("#portfolio").find("a").filter(".form").fadeIn("slow");
    $("#portfolio").find("a").not(".form").fadeOut("slow");
    return false;
  });
/*  $("#filter3").click(function() {
    $("#portfolio").find("a").filter(".identity").fadeIn("slow");
    $("#portfolio").find("a").not(".identity").fadeOut("slow");
    return false;
  }); */
  $("#filter_all").click(function() {
    $("#portfolio").find("a").fadeIn("slow");
    return false;
  });

    $.fn.fancybox.build();
    $("a.ref").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true, 'zoomOpacity': true }); 

        //When page loads...
        $(".tab_content").hide(); //Hide all content
        $("ul.submenu li:first").addClass("active").show(); //Activate first tab
        $(".tab_content:first").show(); //Show first tab content
      
        //On Click Event
        $("ul.submenu li").click(function() {
      
          $("ul.submenu li").removeClass("active"); //Remove any "active" class
          $(this).addClass("active"); //Add "active" class to selected tab
          $(".tab_content").hide(); //Hide all tab content
      
          var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
          $(activeTab).fadeIn(); //Fade in the active ID content
          return false;
        });

$("#twitter").getTwitter({userName: "meramedia"});

});
