﻿
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
jQuery(document).ready(function() {
		jQuery("#qlink a").mouseover(function(){
			jQuery("#qlink a").removeClass("selected");
			jQuery(this).addClass("selected");
		});
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
		fixPng();
		jQuery(".product1_right div").mouseover(function(){
			jQuery(".product1_right div").removeClass("selected");
			jQuery(this).addClass("selected");
		});
		jQuery("#iframe").click(function(){
			jQuery("#iframe").css({display:"none"});
			jQuery("#flv").html('');
			jQuery("#flv").css({width:"304px",height:"169px",display:"none"},500);
		});
		jQuery("#flvimg img").click(function(){
			jQuery("#iframe").css({display:"block",height:jQuery(document).height()+"px"});
			var src="flv.flv";
			var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="620" height="350"><param name="movie" value="Flvplayer.swf" /><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="FlashVars" value="vcastr_file='+src+'&BufferTime=3" /><embed src="Flvplayer.swf" allowfullscreen="true" flashvars="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="620" height="350"></embed></object>';
			jQuery("#flv").html(str);
			jQuery("#flv").css({width:"620px",height:"350px",display:"block"},500);
		});
		if(jQuery("#news")[0]){
			jQuery("#close").animate({opacity:"0"},0);
			jQuery("#news").animate({opacity:"0"},0);
			jQuery("#close").animate({opacity:"1"},1000);
			jQuery("#news").animate({opacity:"1"},1000);
		}
		jQuery("#close").click(function(){
			jQuery("#close").animate({opacity:"0"},1000);
			jQuery("#news").animate({opacity:"0"},1000);
		});
});

function view_video(video){
	var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="694" height="377">           <param name="movie" value="Flvplayer.swf" />           <param name="quality" value="high" />           <param name="allowFullScreen" value="true" />           <param name="FlashVars" value="vcastr_file='+video+'&BufferTime=3" />           <embed src="Flvplayer.swf" allowfullscreen="true" flashvars="'+video+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="694" height="377"></embed>       </object>';
	jQuery("#video_main").html(str);
}


