var ReferX = (screen.width/2)-368;
var ReferY = (screen.height/2)-325;
var pos = "left="+ReferX+",top="+ReferY;

function Refer(Linkvar){
ReferWindow = window.open(Linkvar,"Refer","scrollbars=yes,width=350,height=450,"+pos);
}

var FriendX = (screen.width/2)-368;
var FriendY = (screen.height/2)-325;
var pos = "left="+FriendX+",top="+FriendY;

function Friend(Linkvar){
FriendWindow = window.open(Linkvar,"Friend","scrollbars=no,width=350,height=350,"+pos);
}


$(function() {
    swapValues = [];
    $(".swap_value").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });
});
