$(function()
{
  $.easy.navigation();
  
  $('#slides').before('<div id="nav-slideshow">').cycle(
  {
    fx: 'fade',
    timeout: 6000,
    width: 980,
    height: 400,
    fit: 1,
    containerResize: 0,
    pager:  '#nav-slideshow'
  });
  
  // initialize scrollable
  $("#products-select").scrollable({
    
  });
  
  $("#pictures-select").easySlider({
    width: 400,
    height: 88,
    auto: false,
    continuous: true,
    nextId: "nextBtn-2",
    prevId: "prevBtn-2"
  });
  
  $('#pictures-select li a').click(function ()
  {
      if($(this).attr('id') != 'video')
      {
        var big = '<img src="'+$(this).attr("href")+'" alt="" />';
      
        $('#featured div').html(big);  
        $('#featured h4').html($(this).attr("title")); 
      }
      else
      {
        var big = '<iframe title="YouTube video player" width="454" height="300" src="http://www.youtube.com/embed/'+$(this).attr("href")+'" frameborder="0" allowfullscreen></iframe>';

        $('#featured div').html(big);  
      }
      
      $('.current').removeClass('current');
      $(this).addClass('current');
      
      return false;
  });
});

