
function goto(place) {
    switch(place) {
    case 'design':
    case 'tab1':
        location.href = "/design/new";
        break;
    case 'closet':
    case 'tab2':
        location.href = "/my_collection";
        break;
    case 'inspire':
    case 'tab3':
        location.href = "/referrals/new";
        break;
    case 'label':
    case 'tab4':
        location.href = "http://blog.fashionplaytes.com/";
        break;
    case 'tab5':
        location.href = "/giftcards/new";
        break;   
    case 'label_back':
        history.go(-1);
        break;
    }
}

function openPopup(url) {
    tb_show("",url);
    return false;
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
function saveToCollection(designId) {
	if (getCookie("fp_buy")=="1") {
		window.location.href = "/cart";
		return false;
	}
    url = "/designs/save_to_collection?width=686&height=340&TB_classname=rounded2";
    tb_show("", url);
    return false;
}

function moreGarmentInfo(garmentId) {
    s = "/garments/" + garmentId + "/more_info?width=900&height=500&TB_classname=rounded";
    tb_show("", s);
    return false;
}

function addToCartFromCollection(designId) {
    window.location.href = "/line_items/create?design_id=" + designId;
    return false;
}
/*
 * function show_footer2(obj) { id = "#footer2-" +
 * /footer-link-(.+)/.exec(jQuery(obj).attr('id'))[1];
 * jQuery(".footer2-link").css('font-weight', 'normal');
 * jQuery(".footer2-links").hide(); jQuery(obj).css('font-weight', 'bold');
 * jQuery(id).show(); }
 * 
 * jQuery(document).ready(function(){
 * jQuery(".footer2-link").mouseover(function(){ show_footer2(this); }); });
 */