// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
$(function() {
	// Use this example, or...
	$('a[rel=lightbox]').lightBox();
	
});

jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(function( $ ){


	var opacity;
	if (jQuery.browser.msie && jQuery.browser.version<='7.0') opacity = false; else opacity = true;
	
	if (opacity) $('#flash').css({'opacity':0.01});

  $('#flash').html('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="984" height="489">'+
			'<param name="movie" value="images/baner-top.swf" />'+
			'<param name="quality" value="high" />'+
			'<param name="bgcolor" value="#ffffff" />'+
			'<param name="wmode" value="transparent" />'+
			'<object wmode="transparent" data="images/baner-top.swf" width="984" height="489" type="application/x-shockwave-flash">'+
			'<param name="quality" value="high" />'+
			'<param name="bgcolor" value="#ffffff" />'+
			'<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />'+
			'<param name="bgcolor" value="#ffffff" />'+
			'<img src="images/logo-intertechnik.png" alt="Inter Technik" />'+
			'<img class="logo" src="images/logo-delimon.png" alt="Bijur Delimon" />'+
			'</object></object>');
			
	if (opacity){
	  var stt = 1200;
	  /*setTimeout(function(){ $('#flash').css({'opacity':.2}); }, stt+0);
	  setTimeout(function(){ $('#flash').css({'opacity':.3}); }, stt+40);
	  setTimeout(function(){ $('#flash').css({'opacity':.4}); }, stt+80);
	  setTimeout(function(){ $('#flash').css({'opacity':.8}); }, stt+120);*/
	  setTimeout(function(){ $('#flash').css({'opacity':1}); }, stt+160);
  }
  
  $('a[href*=#]').click(function(){
    var str = $(this).attr('href');
    if ($('#content a[name='+str.substr(1)+']').is('#content a'))
    	$(window).scrollTo('#content a[name='+str.substr(1)+']', 800, {offset: {top: -200}});
	});

	 
	$('#footcomp').serialScroll({
		target:'#slide',
		items:'li', 
		prev:'#prev',
		next:'#next',
		axis:'x',
		
		duration:400,
		force:true, 
		
		lock:false,
		start: 0,
		exclude: 3,
		cycle:true,
		step: 1,
		interval:3000, 

		
		onBefore:function( e, elem, $pane, $items, pos ){
			e.preventDefault();
			if( this.blur )
				this.blur();

		},
  onAfter:function( elem ){

		}
	});


});

