/* IMAGE SWAPS  example of usage: give img the .buttonswap class and make sure to get the on (mouse on) and off (mouse off) */
$(document).ready(function(){
	$(".buttonSwap").hover(
	function()	
	 {this.src = this.src.replace("_up","_down");},
	 function()
	 {this.src = this.src.replace("_down","_up");}
	);
});

/* Text form behavior  http://buildinternet.com/2009/01/changing-form-input-styles-on-focus-with-jquery/ */
$(document).ready(function() {  
    $('input[type="text"]').addClass("idleField");  
    $('input[type="text"]').focus(function() {  
        $(this).removeClass("idleField").addClass("focusField");  
        if (this.value == this.defaultValue){  
            this.value = '';  
        }  
        if(this.value != this.defaultValue){  
            this.select();  
        }  
    });  
    $('input[type="text"]').blur(function() {  
        $(this).removeClass("focusField").addClass("idleField");  
        if ($.trim(this.value == '')){  
            this.value = (this.defaultValue ? this.defaultValue : '');  
        }  
    });  
});  

/* Lightbox for full comment and scrolling comments */
$(document).ready(function(){
	$(".actualComment a[rel='cpop']").click(function(){ 
	var url = '#' + $(this).attr('href'); 
    $(url).show();
    $.fn.colorbox({'href':url, 'open':true, 'inline':true, 'width':'35%','opacity':'0.6'});
	return false; 
	});
	
	$(".scrollable").scrollable({ 
        vertical:true,  
        size: 1
    }).mousewheel();
	
});

/* Get Latest Tweet */
// $.getJSON("http://twitter.com/statuses/user_timeline/lttg.json?callback=?", function(data) {
//      $("#larryTweet").html(data[0].text);
// });
