$.fn.equalHeights = function(px) {
	var currentTallest = 0;
	$(this).each(function(){
		currentTallest= $(this).height() > currentTallest ?  $(this).height() : currentTallest;
	});
	$(this).css({'min-height': currentTallest}); 
	return this;
};

$.fn.getMaximumHeight = function(px) {
	var currentTallest = 0;
	$(this).each(function(){
		currentTallest= $(this).height() > currentTallest ?  $(this).height() : currentTallest;
	});
	return currentTallest;
};

jQuery(function($) {

	$("a.lb").fancybox();

	
	$(".boxsm").hover(function(){
			var el=$(this).find("div");
			$(el).css({'margin-top':(380-$(el).height()).toString()+'px'}).show();
		},function(){$(this).find("div").hide();
		});

	$('div.swfpdf a').fancybox({type:'iframe',width:'90%',height:'90%'});

	$("a.lb.link").fancybox({'type':'iframe','width':700,'height':600});
	$("a.lb.pic").fancybox();
	$("a.lb.youtube").click(function(e) {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: this.title,
				'width'			: 680,
				'height'		: 495,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: { 'wmode' : 'transparent', 'allowfullscreen' : 'true' }
			});
		e.preventDefault;
		return false;
	});

	$("a.nl").fancybox({'type':'iframe','width':700,'height':300});

	var l1=$('#mainframe').offset().left+$('#mainframe').width()+10;	
	var s1='<div style="position:absolute;left:'+l1.toString()+'px;top:20px;width:120px;height:600px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id="skyscraper" width="120" height="600">';
	s1+='<param name="movie" value="/banner/skyscraper.swf"><param name="bgcolor" value="#FFFFFF"><param name="quality" value="high"><param name="seamlesstabbing" value="false"><param name="allowscriptaccess" value="samedomain">';
	s1+='<embed type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="skyscraper" width="120" height="600" src="/banner/skyscraper.swf" bgcolor="#FFFFFF" quality="high" seamlesstabbing="false" allowscriptaccess="samedomain"><noembed></noembed></embed>';
	s1+='</object></div>';
	$('#mainframe').after(s1);

});


