/**
 * syncHeight - jQuery plugin to automagically Snyc the heights of columns
 * Made to seemlessly work with the CCS-Framework YAML (yaml.de)
 * @requires jQuery v1.0.3
 *
 * http://blog.ginader.de/dev/syncheight/
 *
 * Copyright (c) 2007 
 * Dirk Ginader (ginader.de)
 * Dirk Jesse (yaml.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 1.0
 *
 * Usage:
 	$(document).ready(function(){
		$('p').syncHeight();
		$(window).resize(function(){ //if you want to update the columns after a Browser resize (optional)
			$('p').syncHeight();
		});
	});
 */

(function($) {
	$.fn.syncHeight = function(settings) {

		var left;
		var right;
		var maxs;
		var col1;
		var browser_id = 0;
		var property = [
		   ['min-height','0px'],
			['height','1%']
		];

		// check for IE6 ...
		if($.browser.msie && $.browser.version < 7){
			browser_id = 1;
		}
		
		// get maximum element height ...
		$(this).each(function() {
			// fallback to auto height before height check ...
			$(this).css(property[browser_id][0],property[browser_id][1]);
			var val=$('.footerHeight').position(); 
			right = val['top'];
			
			var val=$('.footerHeightL').position(); 
			left = val['top'];			

            if (left>right) {
			var value = left - right;
			$('.footerHeight').css('marginTop', +value+'px');
			}
			
			else {
			var value = right - left;
			$('.footerHeightL').css('marginTop', +value+'px');
			}

			
			
			   
			

		});
		

	};	
})(jQuery);