$(function() {

    /* Press Search Page */    
    $("#pressSearchBox").css({ color: "#cecece" }).focus(function() {
        var thisElem = $(this);
        var thisElemVal = thisElem.val();
        var searcValue = $("#searchValue").val();
        if ( thisElemVal == searcValue ) {
            thisElem.css({ color: "#000000" }).val("");
        }
    }).blur(function() {
        var thisElem = $(this);
        var thisElemVal = thisElem.val();
        var searcValue = $("#searchValue").val();      
        if ( thisElemVal == "" ) {
            thisElem.css({ color: "#cecece" }).val("searcValue");
        }
    });

    $(".download a").click(function() {
        var thisElem = $(this);
        var imageSRC = thisElem.attr("href");
        var imageContainer = $("#pressDownloadContainer");
        imageContainer.attr("src", imageSRC);
        $("#pressDownloadPreview").fadeIn();
        return false;
    });

    $("#pressDownloadPreviewClose").click(function() { 
        $("#pressDownloadPreview").fadeOut(function() {
            $("#pressDownloadContainer").attr("src", "");
            return false;
        });
    });
    
    $("#helpInfo").click(function() {
        $("#pressDownloadHelp").fadeIn();
        return false;
    });
    
    $("#pressDownloadHelpClose").click(function() {
        $("#pressDownloadHelp").fadeOut();
        return false;
    });

});