$(document).ready(function() {



// NEWS LETTER SIGN UP BOX
  $(function() {
     $('#signuplink').click(function() {
        $('#signupform-wrapper')
          .hide()
          .removeClass('hidden')
          .show('slow')
          return false
     });

  });


// TAG BOX POPUP

$(function() {
  $('#tag-link').hover(function() {
    $('#bottom-left-tags')
      .hide()
      .removeClass('hidden')
      .fadeIn('500');
    $('#tag-close>a')
      .click(function() {
        $('#bottom-left-tags')
          .fadeOut('500')
          .addClass('hidden')
          return false
      });
  });
});

// TAG BOX LINK MOUSEOVERS
$('a.tag').hover(function() {
  $link = $(this);
  $src = $(this).attr('href');
  $html = '<div id="tag-target">'+$src+'</div>';
  $($html).insertAfter('#tag-close');

  $($link).mouseout(function(){
     $('#tag-target').remove();
  });

});


// STYLE SWITCHER
  $(function() {
     var initStyle = $.cookie('onesoundSwitchstate');
     if($.cookie('onesoundSwitchstate')!=null) {
           $('.switcheroo')

        .removeClass('style1')
        .addClass(initStyle);
     }

  });

  $(function() {
    $('#switcher1').click(function() {
      $('.style2')

        .removeClass('style2')
        .addClass('style1') ;

      $('.style3')

        .removeClass('style3')
        .addClass('style1') ;
     $.cookie('onesoundSwitchstate','style1');


    });

    $('#switcher2').click(function() {
      $('.style1')

        .removeClass('style1')
        .addClass('style2');

      $('.style3')

        .removeClass('style3')
        .addClass('style2') ;
     $.cookie('onesoundSwitchstate','style2');
    });

     $('#switcher3').click(function() {
      $('.style2')

        .removeClass('style2')
        .addClass('style3');

      $('.style1')

        .removeClass('style1')
        .addClass('style3');
      $.cookie('onesoundSwitchstate','style3');
    });
  });




// HOME PAGE ANIMATION

  $(function() {
    $group3 = $('.home').find('.group3');

    $group3.hide();

    $('.home').find('.#top-zone').hide();

    $('.home').queue(function() {
      $('.home').find('#top-zone')
        .animate({opacity:0},1000)
        .animate({opacity:1},1000)
        .fadeIn(3600)
        .queue(function() {
          $group3.show()
          .dequeue();
        });
    });

  });

});
