// JavaScript Document
$(document).ready(function () {
$('.image img').css({ opacity: 0.5 });
$('.module-article-link').hover(
function() { $(this).find('.image img').stop().animate({"opacity": 1}); 
},function() { $(this).find('.image img').stop().animate({"opacity": 0.5}); 
});
});


$(document).ready(function() {

$(".social-button-container").hover(function() {
    $(this).find('.button').stop().animate({
        'height': '1px'
    });
},function() {
       $(this).find('.button').stop().animate({
        "height": "60px"
    });
});

});

$(document).ready(function(){

$('.selected img').css({ opacity: 1 });
var p = $(".external-links");
var offset = p.offset();
var timer = 0;

$('.external-links').mousemove(function(e){
var xpos =  e.pageY - offset.top;

var xpos = Math.floor(xpos/80)*80+40;

$('.external-follow').stop().animate({"top":xpos+"px"}, 300);
});

 $(".external-links a:first").addClass("selected");
$(".external-links a").mouseover(function() {
	$(this).addClass("selected");
		$('.selected img').css({ opacity: 0.5 });
    $(".external-links .selected").removeClass("selected");});

$(".external-links").mouseout(function() {
    $(".external-links a:first").addClass("selected");
	});
	
	$(".external-links").hover(function() {

},function() {
	$('.external-follow').stop().animate({"top":"40px"});
	});
});


$(document).ready(function(){
$(".scroller-items").carouFredSel({pagination  : ".scroller-pagination"});
$('.textfield').one("focus", function() { $(this).val("");}); 
});

$(document).ready(function(){
	$('.webcam img:not(:first)').hide();
	$('.webcam-details').html($('.webcam img:visible').attr('title'));
	setInterval(function(){
		var next = $('.webcam img:visible').fadeOut().nextAll('img:first');
		if (next.size() == 0) {
			next = $('.webcam img:first');
		}
		next.fadeIn();
		$(".webcam-details").html(next.attr('title'));
	}, 3000);
});


$(document).ready(function (){
         $('form[name=bootsize]').submit(function (){
                $.get( $(this).attr("action"), $('form[name=bootsize]').serialize(), function(data){$('#bootsize-answer').html(data);});
                return false;
         });
});
$(document).ready(function (){
         $('form[name=bindings]').submit(function (){
                $.get( $(this).attr("action"), $('form[name=bindings]').serialize(), function(data){$('#bindings-answer').html(data);});
                return false;
         });
});

$(function(){
  $("#view tr:odd").addClass("oddrow");
});// JavaScript Document
