var $ = jQuery.noConflict();

$(window).load(function() { 
    /******************************************
    VERTICAL SCROLLER NAV BUTTONS
    ******************************************/
    string= "<!-- NAV BUTTON FOR THE SCROLLER -->" +
    "<div class='actions'>" +
    "<a class='prev'></a>" +
    "<a class='next'></a>" +
    "</div><!-- End .actions -->";
    $('.scrollable_vertical').before(string);
       /******************************************
             TABS
     *****************************************/
    //Add new effect('show') to the tabs (FOR IE)
    $.tools.tabs.addEffect("show", function(i, done) {
        this.getPanes().hide();
        this.getPanes().eq(i).show();
        done.call();
    });
    //If not IE...
    if ($.support.opacity){
        $("ul.tabs").tabs("div.panes > div", {
            effect: 'fade'
        });
    } else {
        $("ul.tabs").tabs("div.panes > div", {
            effect: 'show'
        });
    } 
         /******************************************
          VERTICAL SCROLLABLE
     *****************************************/
    $("div.scrollable_vertical:not(.tweets)").scrollable({
        vertical: true,
        //support for mousewheel
        mousewheel: false
    }).autoscroll({
        autoplay: false,
        interval: 3000
    });



    /******************************************
                    ANIMATION
     *****************************************/

    /******************************************
       Links - Fade Animation
    *****************************************/
  /*  if ($.support.opacity) {
        //Images with links
        $("a > img").hover(function(){
            $(this).stop().fadeTo(500, 0.5);
        },function(){
            $(this).stop(false, false).fadeTo(500, 1);
        });
	 //Headers with links
        $("h1 a, h2 a, h3 a, h4 a, h5 a, h6 a").hover(function(){
            $(this).stop().fadeTo(500, 0.7);
        },function(){
            $(this).stop(false, false).fadeTo(500, 1);
        });
    }  
  */ 
    /******************************************
          List Items - Margin Animation
     *****************************************/
    $("ul.style_1 li a, ul.style_2 li a, ul.style_3 li a, ul.style_4 li a,  ul.style_5 li a, ul.style_6 li a, \n\
       ul.style_7 li a, ul.style_8 li a").hover(function() {
        var li = $(this).parent();
        //Move the list item to the right
        li.stop().animate({
            marginLeft: "8px"
        }, 50, function() {
            li.animate({
                marginLeft: "5px"
            }, 50);
        });
    //Return the list item to the left
    },function(){
        var li = $(this).parent();
        li.stop().animate({
            marginLeft: "-5px"
        }, 200, function(){
            li.animate({
                marginLeft: "0px"
            },100);
        });
    });   
  });


