var Eaingvar_data = [ {"nom7bit": "Long day at school1", "id": "1246", "nom": "Long day at school1", "items": [{ "type" : "Sweater", "marque" : "from a store called Bikbok in SWE" }, { "type" : "Jeans", "marque" : "Nudie" }, { "type" : "Socks", "marque" : "H&M" }, { "type" : "Scarf", "marque" : "Other" }, { "type" : "T-shirt", "marque" : "Ginatricot" }] }, 
{"nom7bit": "Sunday", "id": "1248", "nom": "Sunday", "items": [{ "type" : "T-shirt", "marque" : "JC Company" }, { "type" : "Pajama pants", "marque" : "Miss Helen" }, { "type" : "Slippers", "marque" : "Other" }, { "type" : "Bonnet", "marque" : "H&M" }, { "type" : "", "marque" : "Other" }] }, 
{"nom7bit": "When I long for summer", "id": "1254", "nom": "When I long for summer", "items": [{ "type" : "Dress", "marque" : "Indiska" }, { "type" : "Sweater", "marque" : "Tessie" }, { "type" : "Necklace", "marque" : "Eva Attling" }] }, 
{"nom7bit": "Autumn", "id": "1271", "nom": "Autumn", "items": [{ "type" : "Trench coat", "marque" : "Zara" }, { "type" : "Sweater", "marque" : "Filippa K" }, { "type" : "T-shirt", "marque" : "H&M" }, { "type" : "Tank", "marque" : "Filippa K" }, { "type" : "Pants", "marque" : "Tiger" }, { "type" : "Boots", "marque" : "Jack Daniels" }, { "type" : "School bag", "marque" : "Fred Perry" }] }, 
{"nom7bit": "Housewarming Party", "id": "1286", "nom": "Housewarming Party", "items": [{ "type" : "Dress", "marque" : "Red Label" }, { "type" : "Tights", "marque" : "H&M" }, { "type" : "Trench coat", "marque" : "Zara" }, { "type" : "Necklace", "marque" : "Other" }] }, 
{"nom7bit": "Adventure", "id": "1299", "nom": "Adventure!", "items": [{ "type" : "T-shirt", "marque" : "Fait Maison" }, { "type" : "Shirt", "marque" : "H&M" }, { "type" : "Pants", "marque" : "Replay" }] }, 
{"nom7bit": "Mirror mirror", "id": "1404", "nom": "Mirror, mirror", "items": [{ "type" : "Tank", "marque" : "Filippa K" }, { "type" : "Jeans", "marque" : "Nudie" }, { "type" : "Bracelet", "marque" : "Other" }, { "type" : "Bracelet", "marque" : "Other" }, { "type" : "Other", "marque" : "Nikon" }] }, 
{"nom7bit": "Dance it away", "id": "1423", "nom": "Dance it away", "items": [{ "type" : "Sweater", "marque" : "H&M" }, { "type" : "Tank", "marque" : "David&Goliath" }, { "type" : "Tights", "marque" : "H&M" }, { "type" : "Necklace", "marque" : "Other" }] }, 
{"nom7bit": "Fridays not that far away", "id": "1665", "nom": "Friday's not that far away", "items": [{ "type" : "T-shirt", "marque" : "Ginatricot" }, { "type" : "Sweater", "marque" : "Ginatricot" }, { "type" : "Tights", "marque" : "H&M" }, { "type" : "Ballerinas", "marque" : "Other" }] }, 
{"nom7bit": "Another winter morning", "id": "1754", "nom": "Another winter morning", "items": [{ "type" : "Bonnet", "marque" : "H&M" }, { "type" : "Foulard", "marque" : "H&M" }, { "type" : "Jacket", "marque" : "RedLabel" }] }, 
{"nom7bit": "Its a HM day today", "id": "1781", "nom": "It's a H&M day today", "items": [{ "type" : "Sweater", "marque" : "H&M" }, { "type" : "Scarf", "marque" : "H&M" }, { "type" : "Skirt", "marque" : "H&M" }, { "type" : "Tights", "marque" : "H&M" }, { "type" : "Socks", "marque" : "H&M" }, { "type" : "Valise", "marque" : "H&M" }] }, 
{"nom7bit": "Happy Delayed Valentines", "id": "2002", "nom": "Happy Delayed Valentine's", "items": [{ "type" : "Blouse", "marque" : "annat" }, { "type" : "Skirt", "marque" : "Filippa K" }, { "type" : "Tights", "marque" : "H&M" }, { "type" : "Other", "marque" : "annat" }] }];

var Eaingvar_tofindex = 2;

function Eaingvar_updatetof() {
  var tag = document.getElementById('look_Eaingvar');
  var dbgstr = Eaingvar_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://www.cloziz.com/look/thumb/lookid/' + Eaingvar_data[Eaingvar_tofindex].id;
  var new_link = 'http://www.cloziz.com/look/show/lookid/' + Eaingvar_data[Eaingvar_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", Eaingvar_data[Eaingvar_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_Eaingvar');
  if (tag) {
    tag.innerHTML = Eaingvar_data[Eaingvar_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_Eaingvar');
  if (tag) {
    var items = Eaingvar_data[Eaingvar_tofindex].items;
    tag.innerHTML = "";
    for(var i=0; i<items.length; i++) {
      tag.innerHTML += '<li style="display: inline;">';
      tag.innerHTML += items[i].type + " : " + items[i].marque;
      if(i<items.length-1)
        tag.innerHTML += ',';
      tag.innerHTML += "</li>  ";
    }
  }
  tag = document.getElementById('link1_Eaingvar');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_Eaingvar');
  if (tag) tag.href = new_link;
  return true;
}

function Eaingvar_nexttof() {
  Eaingvar_tofindex++;
  if(Eaingvar_tofindex == Eaingvar_data.length)
    Eaingvar_tofindex = 0;
  return Eaingvar_updatetof();
}

function Eaingvar_prevtof() {
  if(Eaingvar_tofindex==0)
    Eaingvar_tofindex = Eaingvar_data.length;
  Eaingvar_tofindex--;
  return Eaingvar_updatetof();
}

document.write('<div style="margin: 0 auto; width: 230px; font-family: Arial, sans-serif;">');
document.write('<div style="height: 40px; margin: 0 5px; background: url(http://www.cloziz.com/images/widget/widget_top_bg-left.gif) left top no-repeat;">');
document.write('<div style="height: 40px; margin: 0 auto; background: url(http://www.cloziz.com/images/widget/widget_top_bg-right.gif) right top no-repeat;">');
document.write('<div style="padding: 2px 0 0 5px;">');
document.write('<a href="http://www.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://www.cloziz.com/images/widget/widget_top_clozizlogo.gif" alt="" /></a>');
document.write('</div></div></div>');

document.write('<div style="margin: 0 5px; padding: 0 10px; background: url(http://www.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://www.cloziz.com/images/widget/widget_mid_content_top_bg-left.gif) left bottom no-repeat;">'); // content-top left
document.write('<div style="height: 5px; background: url(http://www.cloziz.com/images/widget/widget_mid_content_top_bg-right.gif) right bottom no-repeat;">'); // content-top right
document.write('</div></div>');
document.write('<div style="padding: 3px 0 6px 0; background: #fff; text-align: center;">'); // content
document.write('<div>'); // photo
document.write('<a target="_blank" id="link1_Eaingvar" href="http://www.cloziz.com/Eaingvar/look/Long+day+at+school1"><img id="look_Eaingvar" alt="Long day at school1" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://www.cloziz.com/look/thumb/lookid/1246" /></a>\n');
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('<div style="width: 100%; height: 60px;">'); //mid nav
document.write('<div style="float: left; width: 25px; height: 60px;">');  // nav previous
document.write('<a href="#" onClick="Eaingvar_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://www.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://www.cloziz.com/images/widget/void.gif" alt="previous" onmouseover="style.backgroundPosition=\'bottom\'" onmouseout="style.backgroundPosition=\'top\'">');
document.write('</a>');
document.write('</div>');
document.write('<div style="float: right; width: 25px; height: 60px;">'); // nav next
document.write('<a href="#" onClick="Eaingvar_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://www.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://www.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://www.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://www.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;\'">');
document.write('</a>');
document.write('</div>');

document.write('<div style="margin: 0 25px; padding: 0 1px; text-align: center; background: #fff;">'); // lookdata
document.write('<h1 style="margin: 0; padding: 0; border: 0; height: 18px; font-size: 14px; font-weight: bold;">');
document.write('<a style="color: #d0517e; text-decoration: none;" href="#" id="nomlook_Eaingvar" onmouseover="style.color=\'#910134\'" onmouseout="style.color=\'#d0517e\'">Nomdulook</a>');
document.write('</h1>');
document.write('<ul style="margin: 0; padding: 0 10px; height: 42px; list-style: none; text-align: center; line-height: 10px; overflow: hidden; font-size: 10px; color: #000;" id="detaillook_Eaingvar">');
document.write('<li>detail</li>');
document.write('</ul>');
document.write('</div>');
document.write('</div>');
document.write('<div style="clear: both;">'); // clear
document.write('</div>');
document.write('<div style="margin: 0 5px; padding: 0 10px; height: 20px; background: url(http://www.cloziz.com/images/widget/widget_mid_bg_btm.gif) repeat-x top #C5C5C5;">'); // mid links
document.write('<div style="padding: 2px 10px 0 10px; background: #fff; line-height: 16px; text-align: right;">'); // links
document.write('<a href="http://www.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_Eaingvar">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://www.cloziz.com/images/widget/widget_mid_content_btm_bg-left.gif) left top no-repeat;">'); // content-btm left
document.write('<div style="height: 5px; font-size: 0px; background: url(http://www.cloziz.com/images/widget/widget_mid_content_btm_bg-right.gif) right top no-repeat;">'); // content-btm right
document.write('</div>');
document.write('</div>');
document.write('</div>');
document.write('<div style="margin: 0 auto; height: 10px; font-size: 0px;">'); // wbtm
document.write('<div style="margin: 0 5px; height: 10px; background: url(http://www.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://www.cloziz.com/images/widget/widget_btm_bg-right.gif) right top no-repeat;">'); // wbtm bright
document.write('</div>');
document.write('</div>');
document.write('</div>');

document.write('</div>');

Eaingvar_updatetof();


