$(document).ready(function() {
 
	//---------------------
	/*$("#logo").css({opacity:0 } );
	$("#logo").animate({ 
		opacity: 1,
		marginLeft: "30px",
	}, 2000 );*/
	//---------------------
	
	//---------------------
	var flashvars = {};
	var params = {};
	params.wmode = "transparent";
 	swfobject.embedSWF("../flash/header.swf", "flashHeader", "964", "285", "8.0.0","",flashvars,params);   
  	//---------------------		  
	
	//---------------------		  
	 $(function() {
		// initialize scrollable 
		$("div.scrollable").scrollable({			
			// items are auto-scrolled in 2 secnod interval
			interval: 2000,
			
			// when last item is encountered go back to first item
			loop: true, 
			
			// make animation a little slower than the default
			speed: 4000,
			
			// when seek starts make items little transparent
			onBeforeSeek: function() {
				this.getItems().fadeTo(500, 0.2);		
			},
			
			// when seek ends resume items to full transparency
			onSeek: function() {
				this.getItems().fadeTo(500, 1);
			}
		});	
		
	});
	//---------------------
	
	//---------------------
		$("dd").hide();	
		$("dt").css("cursor", "pointer");
		$("dt").click(function() {
			if($(this).next().is(":visible") == false) {
				$("dd").slideUp();
				$(this).next().slideDown();
			}
		});
		//--
		$("dd.open ").css("display", "block");
	//---------------------	
	
	//---------------------	
         $('.targetblank').click( function() {
			window.open(
			 $(this).attr('href') );
			 return false;
		});
  	//---------------------	
  	//---------------------	
	$('a[href*=#]').not('a[href=#]').bind('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}, "normal");
          return false;
        }
      }});

  	//---------------------	
  	//---------------------	
	
 
	$("a[href^=\"http\"]").each(function(i){
		$(this).not("[href*=\""+document.domain+"\"]").not(".noExternal").append(' <img src="../images/external.gif" class="borderNone external" alt="" />').bind('click', function() {
			this.target = "_blank";
		});
	});
  	//---------------------	
	
  	//---------------------	
 
	
});


