//var $J = jQuery.noConflict();
jQuery(document).ready(function(){

	//flying link
	/*$("#order_click").fadeTo(100, 0.7).mouseover(function(){
		$(this).fadeTo(200, 1);
	}).mouseout(function(){
		$(this).fadeTo(200, 0.7);
	});*/ // 2010-05-26
	
	$("#order_open").toggle(function(){
		$("#order_click").css({'margin-left': '0px'});
		return false;
	},function(){
		$("#order_click").css({'margin-left': '-102px'});
		return false;
	});
	$("#order_open").hover(function(){
		$("img", this).attr('src', '/data/img/order1r.gif');
	},function(){
		$("img", this).attr('src', '/data/img/order1.gif');
	}); // 2010-05-26

	$("#order_open").toggle(function(){
		$("#order_click").css({'margin-left': '-102px'});
		return false;
	},function(){
		$("#order_click").css({'margin-left': '0px'});
		return false;
	}).hover(function(){
		$("img", this).attr('src', '/data/img/order1r.gif');
	},function(){
		$("img", this).attr('src', '/data/img/order1.gif');
	});

	// submenu in main menu
	$(".bkgMenu").mouseover(function(){
		$(this).next(".bkgProducts").show().siblings(".bkgProducts").hide();
	}).mouseout(function(){
		$(this).next(".bkgProducts").hide();
	});
	$(".bkgProducts").mouseover(function(){
		$(this).show().siblings(".bkgProducts").hide();
	}).mouseout(function(){
		$(this).hide();
	});
	
	// change head images
	a = 2;
	max_a = 2;

	setInterval(function(){chImg();}, 5000);

	chImg = function()
	{
		$("#head_img").fadeTo(500, 0.3, function(){
			$("#head_img").attr('src', '/data/img/col' + a + '.jpg');
			$("#head_img").fadeTo(500, 1);
			a++;
			if (a > max_a)
			{
				a = 1;
			}
		});
	}
	
	// bottom menu
	$("#bot_menu a").mouseover(function(){
		c = $(this).attr('class');
		c = '.' + c + '-sub';
		$(c).show().siblings("div").hide();
	});
	
	
	jQuery('a.lightbox').lightBox();

      // banner
     $('#fuckin_banner').html('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="565" height="100"><param name="movie" value="/data/flash/baner.swf" /><param name="quality" value="high" /><param name="menu" value="false" /><param name="wmode" value="transparent" /><embed src="/data/flash/baner.swf" wmode="transparent" quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="565" height="100"></embed></object>');
});
