/*
function ~ init_easycss
Copyright (C) 2011 Joachim Doerr, easycssframework.com
Creative Commons Attribution-Share Alike 3.0 License
*/
$(document).ready(function(){

});
function init_easycss(){
  var line_height = 18,
      min_margin = 2,
      indent = "1.5em";
  if ($.browser.msie && jQuery.browser.version.substring(0,1) === '6') {
    $("p + p").css("padding-top",line_height);
    $("p + p.indent").css("text-indent",indent);
    $("p.flr + p,p.fll + p,p + p.flr,p + p.fll,p + p.null").css("padding-top","0");
    $("ul.fll").css({'width':$("ul.fll li img").width()});
    $("ul.flr").css({'width':$("ul.flr li img").width()});
  } else {
    $("blockquote").prepend('<span class="bq-top">&rdquo;</span>');
    $("blockquote p:last").append('<span class="bq-bottom">&bdquo;</span>');
  }
  $('.section .bullet-color-list ul li').each(function(i, e) {
    $(e).addClass('bullet-color');
    $(e).contents().wrap('<span></span>');
  });
  $('.section .numeric-color-list ol li').each(function(i, e) {
    $(e).addClass('numeric-color');
    $(e).contents().wrap('<span></span>');
  });
  $('p.images,div.images').prev('p').css({'padding-bottom':line_height});
  $('p.images,div.images').prev('p.images').css({'padding-bottom':'0'});
  $('.images').each(function() {
    var $this = $(this);
    var img_height = $this.height();
    var img_margin = ((Math.ceil(img_height / line_height)) * line_height) - img_height;
    img_margin = (img_margin < min_margin)? img_margin + line_height : img_margin;
    $this.css({'margin-bottom' : img_margin + 'px'});
  });
}
