function ligature_it(str) {/*    str=str.replace(/ffl/g,'\uFB04') ;    str=str.replace(/ffi/g,'\uFB03') ;    str=str.replace(/st/g,'\uFB06') ;    str=str.replace(/fl/g,'\uFB02') ;    str=str.replace(/fi/g,'\uFB01') ;    str=str.replace(/ff/g,'\uFB00') ;*/    return str ;}

function rgbToHex(rgb) {
  var rgbvals = /rgb\((.+),(.+),(.+)\)/i.exec(rgb);
  if(rgbvals){
  var rval = parseInt(rgbvals[1]);
  var gval = parseInt(rgbvals[2]);
  var bval = parseInt(rgbvals[3]);
  return '#' + (
    PadDigits(rval.toString(16),2) +
    PadDigits(gval.toString(16),2) +
    PadDigits(bval.toString(16),2)
  ).toUpperCase();
 } else {
if(rgb) {
 return rgb;
} else {
 return '#003882';
}
}
} 
function PadDigits(n, totalDigits) { 	n = n.toString(); 	var pd = ''; 	if (totalDigits > n.length) 	{ 		for (i=0; i < (totalDigits-n.length); i++) 		{ 			pd += '0'; 		} 	} 	return pd + n.toString(); }

/* sIFR.debug.ratios({ src: '../files/_swf/dolce.swf', selector: 'h1' }); */

    var dolce = {      src: '../files/_swf/dolce.swf'      ,ratios: [9, 1.49, 10, 1.39, 13, 1.41, 16, 1.39, 19, 1.38, 20, 1.35, 23, 1.36, 29, 1.35, 30, 1.33, 39, 1.34, 40, 1.32, 44, 1.33, 46, 1.32, 49, 1.33, 74, 1.32, 76, 1.31, 78, 1.32, 80, 1.31, 81, 1.32, 86, 1.31, 87, 1.32, 1.31]    };    // You probably want to switch this on, but read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad> first.    // sIFR.useStyleCheck = true;    sIFR.activate(dolce);    sIFR.replace(dolce, {      selector: '#shopPage-d h1'      ,css: [        '.sIFR-root { color: #003882; font-size: 30px; padding:0; margin:0;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it    });

    sIFR.replace(dolce, {      selector: '#shopPage-b h2'      ,wmode: 'transparent'      ,css: [        '.sIFR-root { color: #003882; font-size: 30px; padding:0; margin:0;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it    });

    sIFR.replace(dolce, {      selector: '#shopPage-r h2'      ,wmode: 'transparent'      ,css: [        '.sIFR-root { color: #003882; font-size: 30px; padding:0; margin:0;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it    });

    sIFR.replace(dolce, {      selector: '#shopPage-a h2'      ,wmode: 'transparent'      ,css: [        '.sIFR-root { color: #003882; font-size: 30px; padding:0; margin:0;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it    });      sIFR.replace(dolce, {      selector: '#shopPage-fp h2'      ,wmode: 'transparent'      ,css: [        '.sIFR-root { color: #003882; font-size: 30px; padding:0; margin:0;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it    });       sIFR.replace(dolce, {      selector: '#page-category h3'
      ,wmode: 'transparent'      ,css: [        '.sIFR-root { color: #ffffff; background: none; font-size: 30px; height: 30px;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #ffffff; }'        ,'a:hover { color: #ffffff; }'      ]
      ,modifyContentString: ligature_it    });      sIFR.replace(dolce, {      selector: 'h2.prodtitle'
      ,css: [        '.sIFR-root { color: '+ rgbToHex($('h2.prodtitle').css('color'))+'; background: none;font-size: 60px;}'        ,'a { text-decoration: none; }'        ,'a:link { color: #003882; }'        ,'a:hover { color: #003882; }'      ]      ,modifyContentString: ligature_it          });
