﻿
/* 

START jQUERY 

*/
$(document).ready(function() {

    $(".clearme").focus(function() {
        if (this.value == this.defaultValue) {
            this.value = "";
        }
    })
	.end();
    
});

function getElementsByClassName(class_name) {
    var all_obj, ret_obj = new Array(), j = 0, teststr;

    if (document.all) all_obj = document.all;
    else if (document.getElementsByTagName && !document.all)
        all_obj = document.getElementsByTagName("*");

    for (i = 0; i < all_obj.length; i++) {
        if (all_obj[i].className.indexOf(class_name) != -1) {
            teststr = "," + all_obj[i].className.split(" ").join(",") + ",";
            if (teststr.indexOf("," + class_name + ",") != -1) {
                ret_obj[j] = all_obj[i];
                j++;
            }
        }
    }
    return ret_obj;
}

function openUpdatesModal() {
    $(".updatesModal").modal({
        appendTo: 'form',
        close: false,
        opacity: 60,
        overlayCss: { backgroundColor: "#000" }
    });
    //Set Email Field
    $(".signUpModalEmail").val($(".signUpEmail").val());
//    //Set User Type field
//    if ($(".signUpUserType").attr("selectedIndex") == 1) { $(".UserTypeBuyer input").attr("checked", "checked"); }
//    else if ($(".signUpUserType").attr("selectedIndex") == 2) { $(".UserTypeIndustry input").attr("checked", "checked"); }
//    else if ($(".signUpUserType").attr("selectedIndex") == 3) { $(".UserTypeFashion input").attr("checked", "checked"); }
//    else if ($(".signUpUserType").attr("selectedIndex") == 4) { $(".UserTypeMedia input").attr("checked", "checked"); }
//    else if ($(".signUpUserType").attr("selectedIndex") == 5) { $(".UserTypeOther input").attr("checked", "checked"); }
}

function getHome() {
    return document.getElementById("ctl00_ApplicationRoot").href;
}


