var $j = jQuery.noConflict();

$j(document).ready(function() {
    /* all inputs */
    $j(":text").focus(function(e) {
        $j(this).addClass("active");
    }).blur(function(e) {
        $j(this).removeClass("active");
    });

    /* search box */
    $j("input[name='query']").attr("value", "enter keywords to search");
    $j("input[name='query']").focus(function(e) {
        if($j(this).attr("value") == "enter keywords to search") {
            $j(this).attr("value", "");
        }
    });

    $j("input[name='query']").blur(function(e){
        if ($j(this).attr("value") == "") {
            $j(this).attr("value", "enter keywords to search");
        }
    });

    $j('#status').css({opacity:0}).animate({opacity: 1});
    setTimeout(fadestatus, 3000);
});

function fadestatus() {
    $j('#status').fadeOut(2000);
}

function createPlayer(plst) {
    if (!plst) return;
    var flashvars = {
        file:plst,
        autostart:'true',
        abouttext:'giggidy v1.0',
        aboutlink:'http://www.giggidy.com',
        backcolor:'000000',
        frontcolor:'F8B705',
        lightcolor:'FFFFFF',
        screencolor:'000000'
    }
    var params = {
        allowfullscreen:'true',
        allowscriptaccess:'always',
        wmode:'transparent'
    }
    var attributes = {
        id:'gp',
        name:'gp'
    }
    swfobject.embedSWF("http://www.giggidy.com/flash/player.swf", "player", "640", "480", "9.0.115", false, flashvars, params, attributes);
}