var psychoglam_data = [ {"nom7bit": "Bapteme de Manon", "id": "771", "nom": "Baptème de Manon", "items": [{ "type" : "Hemd", "marque" : "Lulu Castagnette" }, { "type" : "Kleid", "marque" : "galeries lafaytte" }, { "type" : "Halsband", "marque" : "jcf" }, { "type" : "Handtasche", "marque" : "kipling" }, { "type" : "Pumps", "marque" : "Elle" }] }, 
{"nom7bit": "Mes chaussures adoreesh", "id": "790", "nom": "Mes chaussures adorées♥", "items": [{ "type" : "Jeans", "marque" : "Diesel" }, { "type" : "Halbschuhe", "marque" : "Elle" }] }, 
{"nom7bit": "Ma robe Custo", "id": "791", "nom": "Ma robe Custo", "items": [{ "type" : "Kleid", "marque" : "Custo Barcelona" }] }, 
{"nom7bit": "aprem entres wonders", "id": "792", "nom": "aprem entres wonders", "items": [{ "type" : "Pulli", "marque" : "La scène privée" }, { "type" : "Top", "marque" : "H&M" }, { "type" : "Jeans", "marque" : "Diesel" }, { "type" : "Pumps", "marque" : "Elle" }, { "type" : "Sonnenbrille", "marque" : "Ray-ban" }, { "type" : "Einkaufstasche", "marque" : "pink elephant" }, { "type" : "Armband", "marque" : "les néréïdes" }, { "type" : "Handy", "marque" : "Sony Ericsson m600" }] }, 
{"nom7bit": "Attente a laeroport dorly", "id": "793", "nom": "Attente à l'aéroport d'orly", "items": [{ "type" : "Sonnenbrille", "marque" : "Ray-ban" }, { "type" : "Weste", "marque" : "Mango" }, { "type" : "T-Shirt", "marque" : "Petit Bateau" }, { "type" : "Jeans", "marque" : "Diesel" }, { "type" : "Handtasche", "marque" : "Kipling" }, { "type" : "Sonstiges", "marque" : "Vogue" }] }, 
{"nom7bit": "Mon nouveau sac Sonia Rykiel", "id": "794", "nom": "Mon nouveau sac Sonia Rykiel", "items": [{ "type" : "Handtasche", "marque" : "Sonia Rykiel" }] }, 
{"nom7bit": "Total look EDC by Esprit", "id": "795", "nom": "Total look EDC by Esprit", "items": [{ "type" : "T-Shirt", "marque" : "EDC" }, { "type" : "Rock", "marque" : "EDC" }, { "type" : "Ballerinas", "marque" : "Mellow yellow" }] }, 
{"nom7bit": "Japan school uniform", "id": "800", "nom": "Japan school uniform", "items": [{ "type" : "Jacke", "marque" : "Uniforme scolaire d'Hiroshima" }, { "type" : "Hemd", "marque" : "acte 2, scène 3" }, { "type" : "Pulli", "marque" : "Zara" }, { "type" : "Fliege", "marque" : "Uniforme scolaire d'Hiroshima" }, { "type" : "Rock", "marque" : "Uniforme scolaire d'Hiroshima" }] }, 
{"nom7bit": "Jappy", "id": "823", "nom": "Jappy!! : )", "items": [{ "type" : "Top", "marque" : "Joky gal" }, { "type" : "Top", "marque" : "Calvin klein" }, { "type" : "Rock", "marque" : "Roxy" }, { "type" : "Handtasche", "marque" : "Longchamp" }, { "type" : "Halsband", "marque" : "réserve naturelle" }] }, 
{"nom7bit": "UsagiMoi", "id": "995", "nom": "Usagi&Moi", "items": [{ "type" : "Handtasche", "marque" : "Fait Maison" }, { "type" : "Kleid", "marque" : "smash" }] }, 
{"nom7bit": "Saturday Night Princess", "id": "1437", "nom": "Saturday Night Princess", "items": [{ "type" : "Haarband", "marque" : "H&M" }, { "type" : "Kleid", "marque" : "Milla Jovovich for MNG" }, { "type" : "Pumps", "marque" : "Enrie Navarro" }, { "type" : "Halsband", "marque" : "ADP" }, { "type" : "Ring", "marque" : "Offerte à noel" }] }, 
{"nom7bit": "Soiree du nouvel an", "id": "1663", "nom": "Soirée du nouvel an", "items": [{ "type" : "Kleid", "marque" : "Pepe jeans" }, { "type" : "Kleid", "marque" : "H&M" }] }];

var psychoglam_tofindex = 0;

function psychoglam_updatetof() {
  var tag = document.getElementById('look_psychoglam');
  var dbgstr = psychoglam_tofindex + "\n" + tag.src + "\n";
  var new_src = 'http://de.cloziz.com/look/thumb/lookid/' + psychoglam_data[psychoglam_tofindex].id;
  var new_link = 'http://de.cloziz.com/look/show/lookid/' + psychoglam_data[psychoglam_tofindex].id;
  if (tag) {
    tag.setAttribute("src", new_src);
    tag.setAttribute("alt", psychoglam_data[psychoglam_tofindex].nom);
  }
  dbgstr += tag.src + "\n";
  tag = document.getElementById('nomlook_psychoglam');
  if (tag) {
    tag.innerHTML = psychoglam_data[psychoglam_tofindex].nom;
    tag.href = new_link;
  }
  tag = document.getElementById('detaillook_psychoglam');
  if (tag) {
    var items = psychoglam_data[psychoglam_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_psychoglam');
  if (tag) tag.href = new_link;
  tag = document.getElementById('link2_psychoglam');
  if (tag) tag.href = new_link;
  return true;
}

function psychoglam_nexttof() {
  psychoglam_tofindex++;
  if(psychoglam_tofindex == psychoglam_data.length)
    psychoglam_tofindex = 0;
  return psychoglam_updatetof();
}

function psychoglam_prevtof() {
  if(psychoglam_tofindex==0)
    psychoglam_tofindex = psychoglam_data.length;
  psychoglam_tofindex--;
  return psychoglam_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://de.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://de.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://de.cloziz.com">');
document.write('<img style="border: 0; padding: 0;" src="http://de.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://de.cloziz.com/images/widget/widget_mid_bg_top.gif) repeat-x bottom #C5C5C5;">'); // mid mcontent
document.write('<div style="height: 5px; background: url(http://de.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://de.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_psychoglam" href="http://de.cloziz.com/psychoglam/look/Bapteme+de+Manon"><img id="look_psychoglam" alt="Baptème de Manon" style="border: 1px solid #313131; padding: 0; margin: 0;" src="http://de.cloziz.com/look/thumb/lookid/771" /></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="psychoglam_prevtof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://de.cloziz.com/images/widget/widget_mid_nav_prev.gif) top no-repeat;" src="http://de.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="psychoglam_nexttof(); return false;">');
document.write('<img style="margin: 0; padding: 0; width: 25px; height: 60px; border: 0; background: url(http://de.cloziz.com/images/widget/widget_mid_nav_next.gif) top no-repeat;" src="http://de.cloziz.com/images/widget/void.gif" alt="next" onmouseover="style.background=\'url(http://de.cloziz.com/images/widget/widget_mid_nav_next.gif) bottom no-repeat;\'" onmouseout="style.background=\'url(http://de.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_psychoglam" 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_psychoglam">');
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://de.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://de.cloziz.com" style="font-size: 10px; text-decoration: none; color: #910134;" onmouseover="style.color=\'#5d0122\'" onmouseout="style.color=\'#910134\'" id="link2_psychoglam">Le reste sur cloziz.com</a>');
document.write('</div>');
document.write('<div style="height: 5px; font-size: 0px; background: url(http://de.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://de.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://de.cloziz.com/images/widget/widget_btm_bg-left.gif) left top no-repeat;">'); // wbtm bleft
document.write('<div style="height: 10px; background: url(http://de.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>');

psychoglam_updatetof();


