/**
 * Fix IE6's double-margin problem
 *  This fix doesn't uses display:inline hack, so you are free to make boxes as you prefer!
 *
 *  @example $('div').fixBoxModel(); // note, this have to be the FIRST thing (or second after fixBoxModel) you have to do on $('document').ready
 *  @example Note: next example is not correct because create problems with images with border...
 *    $('*').fixBoxModel(); // Not correct, do not use it, use div in place of *
 *  
 *  @license You can use it free of charge for private and commercial website.
 *      You can't sell this code.
 *      You have to leave the @license and the @author name and website even in minified (or similar) js files
 *      Thanks.
 *  @author Alessandro Coscia (php_staff [/\] yahoo [-] it || http://www.programmatorephp.it/jquery)
 */

(function($){$.fn.fixDoubleMargin=function(options){settings=jQuery.extend({force:true},options);if(typeof $.browser.browser!='function')
alert('jQBrowser v0.2+ plugin of jQuery needed:\n Download it from:\n http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/');if(settings.force||typeof(IE7)!='object'){if(($.browser.browser()=='Internet Explorer')&&($.browser.version.number()<7)){return $(this).each(function(){if($(this).css('float')!='none'){var top=parseInt($(this).css('margin-top'));var right=parseInt($(this).css('margin-right'));var bottom=parseInt($(this).css('margin-bottom'));var left=parseInt($(this).css('margin-left'));top=parseInt(top/2);if(isNaN(top))top=0;right=parseInt(right/2);if(isNaN(right))right=0;bottom=parseInt(bottom/2);if(isNaN(bottom))bottom=0;left=parseInt(left/2);if(isNaN(left))left=0;if($(this).prev().css('float')=='none'){$(this).css({marginTop:top*2});$(this).css({marginBottom:bottom*2});if($(this).css('float')=='left'){$(this).css({marginLeft:left});$(this).css({marginRight:right*2});}
else{$(this).css({marginLeft:left*2});$(this).css({marginRight:right});}}
else{var nextFloat=$(this).next().css('float');var prevFloat=$(this).prev().css('float');var thisFloat=$(this).css('float');if(nextFloat=='none'&&prevFloat!=thisFloat){if(thisFloat=='left')
$(this).css({marginLeft:left});else
$(this).css({marginRight:right});}}}});}}
return this;}})(jQuery);
