$(document).ready(function() { 
		   
		//scroll
			$('a[href*=#]').click(function() {
			 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
			 && location.hostname == this.hostname) {
			   var $target = $(this.hash);
			   $target = $target.length && $target
			   || $('[name=' + this.hash.slice(1) +']');
			   if ($target.length) {
			  var targetOffset = $target.offset().top;
			  $('html,body')
			  .animate({scrollTop: targetOffset}, 500);
				return false;
			   }
			 }
			  });
		
		 
		 // expand 
		 $('.control').click(function() {

							  
							
							  
							 if ($(this).parent().children('.expand').is(':visible'))
									  {
									  		$(this).parent().children('.expand').slideToggle(200);
											$(this).removeClass("control_expanded");
											return(false);
									  }
							else
									  {
									  		$(this).parent().children('.expand').slideToggle(200);
											$(this).addClass("control_expanded");
											return(false);
									  }
							  
							  
											
								
							});
			
			
			// disable active links
			$(".control a").click(function(event){
			 event.preventDefault();
		   });

			$(".active a").click(function(event){
			 event.preventDefault();
		   });

			$("a.active").click(function(event){
			 event.preventDefault();
		   });

			
			//table
			$(".data_table tr:odd").addClass("odd");

			

		 	//filetypes
				$("a[href$='.pdf']").addClass("pdf_ico");
				$("a[href$='.doc']").addClass("doc_ico");
				$("a[href$='.xls']").addClass("xls_ico");
				$("a[href$='.ppt']").addClass("ppt_ico");
				$("a[href$='.rar']").addClass("rar_ico");
				$("a[href$='.exe']").addClass("exe_ico");
				$("a[href$='.zip']").addClass("zip_ico");
				
				
		 
		 	// lightbox
			 $('a.zoom').lightBox({
				overlayBgColor: '#071730',
				overlayOpacity: 0.8,
				imageLoading: '../media/images/lightbox_loading.gif',
				imageBtnClose: '../media/images/lightbox_close.gif',
				imageBtnPrev: '../media/images/lightbox_prev.gif',
				imageBtnNext: '../media/images/lightbox_next.gif',
				containerResizeSpeed: 350,
				txtImage: '',
				txtOf: '/'
			   });

			
			// ie6 fix
		 
			$('.products_index').pngFix();
			$('.footer').pngFix();
			$('.alt_head').pngFix();
			
			$('.wrapper').minmax();
			$('.center_col').minmax();

			
			
			
			
			
			
			});


	
			


	