var $j = jQuery.noConflict();

$j(document).ready(function() {

<!-- Add hover image to portfolio box -->
$j(".portfolio_box").hover(function()
{ $j(this).css("background-image","url(/images/portfolio_over.png)"); }, function(){ $j(this).css("background-image","none"); });

<!-- Animate opacity on images-->
$j(".portfolio_box img, .portfolio_box_slide img, .related_posts_box img, .sidebar img, .post_entry.blog img, .dog_border img").hover(function()
{ $j(this).animate({opacity: .7,left: '0px'}, "500"); }, function(){ $j(this).animate({opacity: 1,left: '0px'}, "500"); });

<!--prettyPhoto -->
$j("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
<!--Menu -->
$j("ul.menu").superfish();

});

// Cufon font
Cufon.replace('h1, h2, h3, h4, h5, h6', {hover: true});

// Login Form
$j(function() {
    var button = $j('#loginButton');
    var box = $j('#loginBox');
    var form = $j('#loginForm');
    button.removeAttr('href');
    button.mouseup(function(login) {
        box.toggle();
        button.toggleClass('active');
    });
    form.mouseup(function() { 
        return false;
    });
    $j(this).mouseup(function(login) {
        if(!($j(login.target).parent('#loginButton').length > 0)) {
            button.removeClass('active');
            box.hide();
        }
    });
});
