var jull_data = [ {"nom7bit": "red is the new black", "id": "1001", "nom": "red is the new black", "items": [{ "type" : "Kavaj", "marque" : "Zara" }, { "type" : "Topp", "marque" : "balli baret" }, { "type" : "Halsduk", "marque" : "dior homme" }, { "type" : "Solglasögon", "marque" : "Ray ban" }, { "type" : "Byxor", "marque" : "April 77" }, { "type" : "Handväska", "marque" : "Lollipops" }] }, 
{"nom7bit": "transparence", "id": "1002", "nom": "transparence", "items": [{ "type" : "Byxor", "marque" : "April 77" }, { "type" : "Platåskor", "marque" : "Aldo" }] }, 
{"nom7bit": "week end", "id": "1003", "nom": "week end", "items": [{ "type" : "Topp", "marque" : "Bali barret" }, { "type" : "Klänning", "marque" : "Abercrombie" }, { "type" : "Solglasögon", "marque" : "Ray ban" }, { "type" : "Annat", "marque" : "" }] }, 
{"nom7bit": "white eyes", "id": "1004", "nom": "white eyes", "items": [{ "type" : "Solglasögon", "marque" : "Ray ban" }] }, 
{"nom7bit": "party", "id": "1006", "nom": "party", "items": [{ "type" : "Topp", "marque" : "Zara" }, { "type" : "Handväska", "marque" : "petite mandiguotte" }] }, 
{"nom7bit": "jai marche sur un chew gum", "id": "1009", "nom": "j'ai marché sur un chew gum", "items": [{ "type" : "T-shirt", "marque" : "Dior" }, { "type" : "Byxor", "marque" : "April 77" }, { "type" : "Pumps", "marque" : "Aldo" }, { "type" : "Trenchcoat", "marque" : "APC" }] }, 
{"nom7bit": "skull", "id": "1010", "nom": "skull", "items": [{ "type" : "Handväska", "marque" : "petite mandiguotte" }] }, 
{"nom7bit": "red panther", "id": "1011", "nom": "red panther", "items": [{ "type" : "Ballerinaskor", "marque" : "steve madden" }] }, 
{"nom7bit": "red sofa1", "id": "1026", "nom": "red sofa1", "items": [{ "type" : "T-shirt", "marque" : "Uniqlo" }, { "type" : "Jeans", "marque" : "Pepe jeans" }, { "type" : "Espadrilles", "marque" : "Andre" }] }, 
{"nom7bit": "dans mon sac1", "id": "1028", "nom": "dans mon sac1", "items": [{ "type" : "Portmonnä", "marque" : "Louis Vuitton" }, { "type" : "Annat", "marque" : "Fait Maison" }, { "type" : "Plånbok", "marque" : "mont blanc" }, { "type" : "Solglasögon", "marque" : "Ray ban" }, { "type" : "Annat", "marque" : "mont blanc" }, { "type" : "Annat", "marque" : "Fait Maison" }, { "type" : "Kuvertväska", "marque" : "petite mendigote" }, { "type" : "Annat", "marque" : "mont blanc" }, { "type" : "Mp3", "marque" : "Ipod" }, { "type" : "Annat", "marque" : "Fait Maison" }] }, 
{"nom7bit": "bcn night", "id": "1149", "nom": "bcn night", "items": [{ "type" : "Blus", "marque" : "sophie solut" }, { "type" : "Klänning", "marque" : "Abercrombie" }, { "type" : "Pumps", "marque" : "Aldo" }] }, 
{"nom7bit": "bcn night 2", "id": "1150", "nom": "bcn night 2", "items": [{ "type" : "Pumps", "marque" : "Aldo" }] }, 
{"nom7bit": "disco2000", "id": "1526", "nom": "disco2000", "items": [{ "type" : "Klänning", "marque" : "H&M" }] }, 
{"nom7bit": "winter party", "id": "1532", "nom": "winter party", "items": [{ "type" : "Halsband", "marque" : "tatty devine" }, { "type" : "Klänning", "marque" : "H&M" }] }, 
{"nom7bit": "jack daniels", "id": "1708", "nom": "jack daniels", "items": [{ "type" : "Skjorta", "marque" : "Sandro" }, { "type" : "Jeans", "marque" : "Hells Bells" }, { "type" : "Handväska", "marque" : "petite mandiguote" }] }, 
{"nom7bit": "BBQ Party", "id": "1709", "nom": "BBQ Party", "items": [{ "type" : "Klänning", "marque" : "mage" }] }, 
{"nom7bit": "glamrock", "id": "1742", "nom": "glamrock", "items": [{ "type" : "Jacka", "marque" : "Fait Maison" }, { "type" : "Boots", "marque" : "Balenciaga" }, { "type" : "Pumps", "marque" : "Andre" }, { "type" : "Pumps", "marque" : "Pierre Hardy" }, { "type" : "Pumps", "marque" : "Andre" }] }];

var jull_tofindex = 1;

function jull_updatetof() {
  var tag = document.getElementById('look_jull');
  var dbgstr = jull_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://sv.cloziz.com/look/thumb/lookid/' + jull_data[jull_tofindex].id;
  var new_link = 'http://sv.cloziz.com/look/show/lookid/' + jull_data[jull_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", jull_data[jull_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_jull');
  if (tag) {
    tag.innerHTML = jull_data[jull_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_jull');
  if (tag) {
    var items = jull_data[jull_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_jull');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_jull');
  if (tag) tag.href = new_link;
  return true;
}

function jull_nexttof() {
  jull_tofindex++;
  if(jull_tofindex == jull_data.length)
    jull_tofindex = 0;
  return jull_updatetof();
}

function jull_prevtof() {
  if(jull_tofindex==0)
    jull_tofindex = jull_data.length;
  jull_tofindex--;
  return jull_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://sv.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://sv.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://sv.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://sv.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://sv.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://sv.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://sv.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_jull" href="http://sv.cloziz.com/jull/look/red+is+the+new+black"><img id="look_jull" alt="red is the new black" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://sv.cloziz.com/look/thumb/lookid/1001" /></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="jull_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://sv.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://sv.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="jull_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://sv.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://sv.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://sv.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://sv.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_jull" 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_jull">');
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://sv.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://sv.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_jull">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://sv.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://sv.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://sv.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://sv.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>');

jull_updatetof();


