$(window).load(function(){MainSlider.init();RefSlider.init();$("#leftb").click(function(){if(!MainSlider.moving){clearTimeout(MainSlider.auto_timer2);MainSlider.clearAutoMove();MainSlider.prev();MainSlider.auto_timer2=setTimeout("MainSlider.setAutoMove()",15E3)}});$("#rightb").click(function(){if(!MainSlider.moving){clearTimeout(MainSlider.auto_timer2);MainSlider.clearAutoMove();MainSlider.next();MainSlider.auto_timer2=setTimeout("MainSlider.setAutoMove()",15E3)}})});
var MainSlider={__img_width:476,__img_border:7,__img_space:1,time_show_hide_controls:600,time_movement:1E3,time_image_still:0,time_image_text_fade:1500,time_to_read_text:1E4,time_auto_next:17E3,time_auto_start:15E3,initialized:0,position:0,screenWidth:0,screenCenter:0,content:[],current:function(){for(var a=0,b=2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space,c=MainSlider.position;c<MainSlider.screenCenter;){a++;c+=b}return a},moving:0,auto:0,browser:"",auto_timer:0,auto_timer2:0,
init:function(){if(!MainSlider.initialized){jQuery.easing.def="easeInSine";$("#filmstripe_hp li img").each(function(){MainSlider.content.push(MainSlider.id)});MainSlider.getScreenWidth();for(var a=0,b=MainSlider.__img_width+2*MainSlider.__img_border+MainSlider.__img_space;MainSlider.screenWidth+3*b>=$("#filmstripe_hp li").length*b||a%MainSlider.content.length!=0||4E3>=$("#filmstripe_hp li").length*b;)$("#filmstripe_hp li").eq(a++).clone().appendTo($("#filmstripe_hp"));$("#filmstripe_hp li div").css({display:"block",
opacity:0});MainSlider.position=-(2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space-MainSlider.screenCenter);MainSlider.moving=1;MainSlider.moveRight();MainSlider.moveRight();$("#filmstripe_hp").animate({left:MainSlider.position},"normal","swing",function(){MainSlider.showControls();MainSlider.moving=0;MainSlider.showText()});MainSlider.auto_timer2=setTimeout("MainSlider.setAutoMove()",MainSlider.time_auto_start);$(window).wresize(MainSlider.resizeScreen);MainSlider.initialized=
1;Cufon.replace("#content h1")("#label_content h2")("#label_content_hp h2")("#menu a.l1")("#lng a")("#filmstripe_hp h2")("#butt_hp1")("#news span")("#butt_hp2")("ul#info")("#prod_request h2")}},setAutoMove:function(){if(!MainSlider.auto){MainSlider.auto=1;MainSlider.moving||MainSlider.next();MainSlider.auto_timer=setInterval("MainSlider.next()",MainSlider.time_auto_next)}},clearAutoMove:function(){MainSlider.auto=0;clearInterval(MainSlider.auto_timer)},prev:function(){MainSlider.moving++;$("#filmstripe_hp li:eq("+
MainSlider.current()+") div").stop(true).animate({opacity:0},600);MainSlider.position+=2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space;MainSlider.hideControls();$("#filmstripe_hp").delay(600).animate({left:MainSlider.position},MainSlider.time_movement,"swing",function(){MainSlider.showControls();MainSlider.moveRight();MainSlider.showText();MainSlider.moving--})},next:function(){MainSlider.moving++;$("#filmstripe_hp li:eq("+MainSlider.current()+") div").stop(true).animate({opacity:0},
600);MainSlider.position-=2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space;MainSlider.hideControls();$("#filmstripe_hp").delay(600).animate({left:MainSlider.position},MainSlider.time_movement,"easeOutQuad",function(){MainSlider.showControls();MainSlider.moveLeft();MainSlider.showText();MainSlider.moving--})},showText:function(){$("#filmstripe_hp li:eq("+MainSlider.current()+") div").css({display:"block",opacity:0}).delay(MainSlider.time_image_still).animate({opacity:1},MainSlider.time_image_text_fade).delay(MainSlider.time_to_read_text).animate({opacity:0},
MainSlider.time_image_text_fade)},isVisibleImage:function(a){return(a+1)*(2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space)+MainSlider.position>0&&a*(2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space)<MainSlider.screenWidth},getScreenWidth:function(){MainSlider.screenWidth=___getPageSize()[0]<930?930:___getPageSize()[0];MainSlider.screenCenter=Math.round(MainSlider.screenWidth/2-MainSlider.__img_width/2-MainSlider.__img_border);if(BrowserDetect.browser==
"Explorer"||BrowserDetect.browser=="Chrome")MainSlider.screenCenter--},moveRight:function(){MainSlider.position-=2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space;$("#filmstripe_hp li:last").prependTo($("#filmstripe_hp"));$("#filmstripe_hp").css("left",MainSlider.position)},moveLeft:function(){MainSlider.position+=2*MainSlider.__img_border+MainSlider.__img_width+MainSlider.__img_space;$("#filmstripe_hp li:first").appendTo($("#filmstripe_hp"));$("#filmstripe_hp").css("left",MainSlider.position)},
resizeScreen:function(){$("#filmstripe_hp").stop(true,true);MainSlider.moving=0;var a=MainSlider.screenCenter;MainSlider.getScreenWidth();for(var b=0,c=MainSlider.__img_width+2*MainSlider.__img_border+MainSlider.__img_space;MainSlider.screenWidth+3*c>=$("#filmstripe_hp li").length*c||b%MainSlider.content.length!=0;)$("#filmstripe_hp li").eq(b++).clone().appendTo($("#filmstripe_hp"));if(b!=0){$("#filmstripe_hp li div").css({display:"block",opacity:0});MainSlider.moveRight();MainSlider.moveRight()}MainSlider.position-=
a-MainSlider.screenCenter;$("#filmstripe_hp").animate({left:MainSlider.position},0)},showControls:function(){$("#rightb").animate({left:0},MainSlider.time_show_hide_controls);$("#leftb").animate({left:0},MainSlider.time_show_hide_controls)},hideControls:function(){$("#rightb").animate({left:-72},MainSlider.time_show_hide_controls);$("#leftb").animate({left:72},MainSlider.time_show_hide_controls)},delLeft:function(){},delRight:function(){}},RefSlider={__img_width:150,__img_border:7,__img_space:1,initialized:0,
position:0,content:[],current:0,moving:0,time_movement:600,init:function(){if(!RefSlider.initialized){$("#imgs_box_div img").each(function(){RefSlider.content.push(RefSlider.id)});RefSlider.current=0;RefSlider.initialized=1;RefSlider.checkLeftSide();RefSlider.checkRightSide()}},prev:function(){if(!RefSlider.moving){RefSlider.moving++;RefSlider.current--;RefSlider.position+=2*RefSlider.__img_border+RefSlider.__img_width+RefSlider.__img_space;$("#imgs_box_div").animate({left:RefSlider.position},RefSlider.time_movement,
"swing",function(){RefSlider.moving--;RefSlider.checkLeftSide();RefSlider.checkRightSide()})}},next:function(){if(!RefSlider.moving){RefSlider.moving++;RefSlider.current++;RefSlider.position-=2*RefSlider.__img_border+RefSlider.__img_width+RefSlider.__img_space;$("#imgs_box_div").animate({left:RefSlider.position},RefSlider.time_movement,"swing",function(){RefSlider.moving--;RefSlider.checkLeftSide();RefSlider.checkRightSide()})}},checkLeftSide:function(){if(RefSlider.current==0){$("#ref_cont_l").animate({opacity:0.2});
$("#ref_cont_l").unbind("click",RefSlider.prev)}else{$("#ref_cont_l").animate({opacity:1});$("#ref_cont_l").unbind("click",RefSlider.prev);$("#ref_cont_l").bind("click",RefSlider.prev)}},checkRightSide:function(){if(RefSlider.current+3==RefSlider.content.length){$("#ref_cont_r").animate({opacity:0.2});$("#ref_cont_r").unbind("click",RefSlider.next)}else{$("#ref_cont_r").animate({opacity:1});$("#ref_cont_r").unbind("click",RefSlider.next);$("#ref_cont_r").bind("click",RefSlider.next)}}};
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};BrowserDetect.init();
