$(document).ready(function(){
  $('img[@src$=.png]').ifixpng(); 

  $('#billboard').cycle({
    fx:       'fade',
    timeout:  1000
  });
  
  // Tabs
  $('#tabs').tabs({ 
    selected: 2 
  });
  
  var $tabs = $('#tabs').tabs({ 
    selected: 0,
    fx: { opacity: 'toggle' }
  });


  //var $tabs = $('#example').tabs(); // first tab selected
  
  $('#view-portrait-packages').click(function() { // bind click event to link
      $tabs.tabs('select', 1); // switch to second tab
      return false;
  });

  // Image Galleria
  $('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
  $('.nav').css('display','none'); // hides the nav initially
  
  $('ul.gallery_demo').galleria({
    history   : false, // deactivates the history object for bookmarking, back-button etc.
    clickNext : false, // helper for making the image clickable. Let's not have that in this example.
    insert    : undefined, // the containing selector for our main image. 
    					   // If not found or undefined (like here), galleria will create a container 
    					   // before the ul with the class .galleria_container (see CSS)
    onImage   : function() { $('.nav').css('display','block'); } // shows the nav when the image is showing
  });


});