/**
* CROCUS CAROUSEL v 1.3.5 minified Easing bundle 
* © Copyright 2011 Khoroshilv Evgeniy
* Webway IT labs | www.webway.ru
* includes Easing plugin | Copyright © 2008 George McGinley Smith
*/
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
//carousel
(function($){$.fn.extend({crocusCarousel:function(f){var g=this,defaults={arrowNext:$('.arrow_next'),arrowPrev:$('.arrow_prev'),slidesClass:'rotator-slide',slideChildrenClass:'block',slideHeight:300,slideWidth:800,scaleSecond:0.9,opacitySecond:0.5,bottomFirst:'58px',scaleInit:0.8,opacityInit:0.7,bottomSecond:'22px',animateVal:1600,timeoutVal:200,animateEasing:null,onSlideMove:false,onSlideNext:false,onSlidePrev:false,onReady:false,keyboard:false},crocusOptions=$.extend(defaults,f),co=crocusOptions,$arrowNext=co.arrowNext,$arrowPrev=co.arrowPrev,active=false,slideCallback=false,isIE=$.browser.msie&&!$.support.opacity,isIE6=isIE&&$.browser.version<7,slides=$('.'+co.slidesClass),$overlay=$('<ins class="overlay" />'),$sceneOverlay=$('<ins class="scene_overlay" />');if(co.onSlideNext||co.onSlidePrev){co.onSlideMove=false;slideCallback=true};function repaint(){slides=g.find('.'+co.slidesClass)}function reposition(){slides.each(function(i){var a=$(this);a.removeAttr('class').addClass(co.slidesClass).addClass('slide-'+(i+1));a.css({'z-index':Math.floor((1/(i+1))*1000)})});slides.filter(':gt(2)').childrenAvoid('.'+co.slideChildrenClass,'.overlay').css({opacity:0});slides.filter(':gt(2)').find('.overlay').css({opacity:0});slides.find('.'+co.slideChildrenClass).unbind();slides.eq(0).find('.'+co.slideChildrenClass).bind('click',function(){document.location.href=$(this).data('href')})}function rebuild(){repaint();reposition()}$.fn.childrenAvoid=function(a,b){return $(this).find(a).children(":not("+b+")")};if(slides.length>1&&slides.length<3){slides.clone().insertAfter(slides.last());repaint()};slides.find('.'+co.slideChildrenClass).append($overlay);$sceneOverlay.css({'width':g.outerWidth(),'height':g.outerHeight(),'position':'absolute','left':0,'top':0,'background':'#000','opacity':0.01,'z-index':9999}).appendTo(g).hide();slides.map(function(a){var b=$(this),overlays=b.find('.overlay');if(a==0){b.css({bottom:co.bottomFirst,width:co.slideWidth,'margin-left':-co.slideWidth/2+'px',height:co.slideHeight});overlays.css({opacity:0})}else if(a==1){b.css({bottom:co.bottomSecond,width:co.slideWidth*co.scaleSecond,'margin-left':-co.slideWidth/2*co.scaleSecond+'px',height:co.slideHeight*co.scaleSecond});overlays.css({opacity:co.opacitySecond})}else{b.css({bottom:'0',width:co.slideWidth*co.scaleInit,'margin-left':-co.slideWidth/2*co.scaleInit+'px',height:co.slideHeight*co.scaleInit});overlays.css({opacity:co.opacityInit})}});slides.find('.'+co.slideChildrenClass).each(function(){var a=$(this),link=a.find('a');if(link.length){a.data('href',link.attr('href')).click(function(){document.location.href=a.data('href')});link.replaceWith(link.contents())}});reposition();function executeForward(){active=true;$sceneOverlay.toggle();var d=slides.first();d.childrenAvoid('.'+co.slideChildrenClass,'.overlay').animate({opacity:0},co.animateVal,co.animateEasing);d.find('.overlay').animate({opacity:0},co.animateVal,co.animateEasing);d.animate({bottom:co.slideHeight*2+'px'},co.animateVal,co.animateEasing,function(){$(this).insertAfter(slides.last());var c=window.setTimeout(function(){rebuild();slides.map(function(a){var b=$(this),overlay=b.find('.overlay');if(a==0){overlay.animate({opacity:0},co.animateVal/2,co.animateEasing);b.animate({bottom:co.bottomFirst,width:co.slideWidth,'margin-left':-co.slideWidth/2+'px',height:co.slideHeight},co.animateVal/2,co.animateEasing,function(){if(slideCallback){co.onSlideNext.call(this)}else if(co.onSlideMove){co.onSlideMove.call(this)}$sceneOverlay.toggle();active=false})}else if(a==1){overlay.animate({opacity:co.opacitySecond},co.animateVal/2,co.animateEasing);b.animate({bottom:co.bottomSecond,width:co.slideWidth*co.scaleSecond,'margin-left':-co.slideWidth/2*co.scaleSecond+'px',height:co.slideHeight*co.scaleSecond},co.animateVal/2,co.animateEasing)}else if(a==2){b.css({top:'auto',bottom:'0',width:co.slideWidth*co.scaleInit,'margin-left':-co.slideWidth/2*co.scaleInit+'px',height:co.slideHeight*co.scaleInit});overlay.animate({opacity:1},-1,function(){b.childrenAvoid('.'+co.slideChildrenClass,'.overlay').animate({opacity:1},co.animateVal/2,co.animateEasing);$(this).animate({opacity:co.opacityInit},co.animateVal/4,co.animateEasing)})}})},co.timeoutVal)});return false};function executeBackward(){active=true;$sceneOverlay.toggle();slides.map(function(d){var e=$(this),overlay=e.find('.overlay');if(d==2){e.childrenAvoid('.'+co.slideChildrenClass,'.overlay').animate({opacity:0},co.animateVal/2,co.animateEasing);overlay.animate({opacity:co.opacityInit},co.animateVal/2,co.animateEasing)}else if(d==1){overlay.animate({opacity:co.opacityInit},co.animateVal/2,co.animateEasing);e.animate({bottom:'0',width:co.slideWidth*co.scaleInit,'margin-left':-co.slideWidth/2*co.scaleInit+'px',height:co.slideHeight*co.scaleInit},co.animateVal/2,co.animateEasing)}else if(d==0){overlay.animate({opacity:co.opacitySecond},co.animateVal/2,co.animateEasing);e.animate({bottom:co.bottomSecond,width:co.slideWidth*co.scaleSecond,'margin-left':-co.slideWidth/2*co.scaleSecond+'px',height:co.slideHeight*co.scaleSecond},co.animateVal/2,co.animateEasing,function(){var b=slides.last();b.find('.overlay').animate({opacity:0},-1);b.childrenAvoid('.'+co.slideChildrenClass,'.overlay').animate({opacity:0},-1);b.insertBefore(slides.first()).css({top:'auto',bottom:co.slideHeight*2+'px',width:co.slideWidth+'px',height:co.slideHeight+'px','margin-left':-co.slideWidth/2+'px'});var c=window.setTimeout(function(){repaint();reposition();var a=slides.first();a.childrenAvoid('.'+co.slideChildrenClass,'.overlay').animate({opacity:1},co.animateVal,co.animateEasing);a.find('.overlay').animate({opacity:0},co.animateVal,co.animateEasing);a.animate({bottom:co.bottomFirst},co.animateVal,co.animateEasing,function(){if(slideCallback){co.onSlidePrev.call(this)}else if(co.onSlideMove){co.onSlideMove.call(this)}$sceneOverlay.toggle();active=false})},co.timeoutVal)})}});return false}$arrowNext.bind('click',executeForward);$arrowPrev.bind('click',executeBackward);if(co.keyboard){$(document).bind("keydown",function(e){if(active==false&&e.keyCode===40){e.preventDefault();$arrowPrev.click()}else if(active==false&&e.keyCode===38){e.preventDefault();$arrowNext.click()}})}if(co.onReady){co.onReady.call(this)}}})})(jQuery);
