// JavaScript Document


// Sets the opacity change for the portfolio thumbnails

 $(document).ready(function() {
            $('.port-thumb').each(function() {
                $(this).hover(
                    function() {
                        $(this).stop().animate({ opacity: .25 }, 500);
                    },
                   function() {
                       $(this).stop().animate({ opacity: 1.0 }, 500);
                   })
                });
       
        $(".tweet").tweet({
            username: "simonsgroup",
            join_text: "auto",
            avatar_size: 0,
            count: 3,
            auto_join_text_default: "",
            auto_join_text_ed: "",
            auto_join_text_ing: "",
            auto_join_text_reply: "",
            auto_join_text_url: "",
            loading_text: "loading tweets..."
        });
  
	
	var portfolio = $(".items > div").length;
	
	$("#chained").scrollable({circular: true, mousewheel: false}).navigator().autoscroll({interval: 3000, autopause: false});
	
	if ( portfolio > 1) {
		
		$("#chained2").scrollable({circular: true, mousewheel: false}).navigator().autoscroll({interval: 4000, autopause: false});
	
	} else if (portfolio = 1) {
			
		$("#chained2").scrollable({circular: false, mousewheel: false});
	}
});





