﻿function href(path){
document.location.href = path;
}

function setwidth() {
    $("body").width(screen.width - (screen.width/100*5-5));
}

jQuery.fn.separator = function() {
    return this.each(function() {
        var re = / \| /g
        $(this).html($(this).html().replace(re, '<span class="separator">&nbsp;</span>'));
    });
}


$(function() {
    setwidth();
    $('#UserBar').separator();
    $('.DivLink').click(function() { document.location = $('.DivLink').find('a').attr('href'); })
    $('.HomeButton').click(function() { document.location = $('.HomeButton').find("a").attr('href'); })
    $('.SearchBox').click(function() { if ($('.SearchBox').attr('value') == 'Enter Search Keywords') { $('.SearchBox').attr('value', ''); } })
    $('.FolderNameBox').click(function() { if ($('.FolderNameBox').attr('value') == 'Enter Folder Name') { $('.FolderNameBox').attr('value', ''); $('.FolderNameBox').attr('class', ''); } })
    //$('body').click(function() { if ($('.SearchBox').attr('value') == '') { $('.SearchBox').attr('value', 'Enter Search Keywords'); } });
    //$("div.clTabItemCenter").corner("top bevel cc:white");
});

