function wopen(url, name, w, h)
{
// Fudge factors for window decoration space.
 // In my tests these work well on all platforms & browsers.
w += 32;
h += 96;
 var win = window.open(url,
  name,
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=yes, resizable=yes');
 win.resizeTo(w, h);
 win.focus();
}


$j = jQuery;
$j(document).ready(function(){
$j(document).pngFix(); 
	//control colors
	
	$j("div.menu01").mouseover(function(){
		$j(this).css({'background-color' : '#96C35D'})
	});
	
	$j("div.menu01").mouseout(function(){
		$j(this).css({'background-color' : ''})
	});
	
	
	$j("a#services-link").mouseover(function(){ 
		$j('#services-sub').fadeIn();
	});
	
	
	$j('div.menu01,div.menu03,div.menu04,div.menu05').mouseover(function(){ 

		if($j("#service-sub-div").attr("class") == "menu02-selected")
		{
			$j('#services-sub').fadeIn();
		}else{
			$j('#services-sub').fadeOut();
		
		}
		
		
		
			
		
	});
	
	
	
	$j('.top').hover(function(){
		var obj = $j(this).attr('rel');
		
		if ($j.browser.safari) {
		   $j(obj).css({"marginLeft":"430px"});
		   $j('#searchBlock').css({"marginLeft":"430px"});
		}
		$j('.message-box').hide();
		$j('#searchBlock').fadeOut();	
		$j(obj).fadeIn();
		
	},function(){
		var obj = $j(this).attr('rel');
		
		$j(obj).fadeOut();		  
	})
	
	$j('#subscribe-trigger').click(function(){
								$j('.message-box').hide();
								$j('#subBox').fadeIn();				
							
							});
	
	
	
	
	$j('#searchLnk').click(function(){
								$j('.message-box').hide();
							
								$j('#searchBlock').fadeIn();				
							
							});
	
		
	
	$j('#slideshow').serialScroll({
		 items:'li',
		 prev:'.buttons a.prev',
		 next:'.buttons a.next',
		 duration:200,
		 force:true,
		 stop:true,
		 lock:false,
		 cycle:true //don't pull back once you reach the end
		 });
	
	
	
									
	
	$j('.cform1 input').focus(function(){	 
							$j(this).prev().children('span').css({"color":"#96C15C"});			
						
						});
	
	$j('.cform1 input').blur(function(){	 
							$j(this).prev().children('span').css({"color":"#fff"});			
						
						});
	
		
	$j('.panel').hover(function(){
							$j(this).children('div.panel-body').fadeIn("fast");
								
						},
						function(){
							$j(this).children('div.panel-body').fadeOut("fast");
						}
						);
	
	$j('.prev').hover(function(){
							   		$j('.prevarrow').hide();
									$j('.greenprevarrow').show();
							   
							   },
					  function(){
							   		$j('.prevarrow').show();
									$j('.greenprevarrow').hide();
							   
							   }
					  )
	
	$j('#banner-holder').cycle({ fx:'fade', 
						 	speed:2000, 
							timeout:10
							/*,nowrap:1 */
							 });
	
	if($j('.sidebar_top').length > 0)
	{
		 var pos = $j('#blog_content').height();
         
         $j('.sidebar_top').css({"height": pos+ 10 + "px"});
		
	}
	
	

});
