(function($){$.fn.tinycarousel=function(options){var defaults={start:1,display:1,axis:'x',controls:true,pager:false,interval:false,intervaltime:3000,rewind:false,animation:true,duration:1000,callback:null};var options=$.extend(defaults,options);var oSlider=$(this);var oViewport=$('.viewport:first',oSlider);var oContent=$('.overview:first',oSlider);var oPages=oContent.children();var oBtnNext=$('.next:first',oSlider);var oBtnPrev=$('.prev:first',oSlider);var oPager=$('.pager:first',oSlider);var iPageSize,iSteps,iCurrent,oTimer,bPause,bForward=true,bAxis=options.axis=='x';return this.each(function(){initialize();});function initialize(){iPageSize=bAxis?$(oPages[0]).outerWidth(true):$(oPages[0]).outerHeight(true);var iLeftover=Math.ceil(((bAxis?oViewport.outerWidth():oViewport.outerHeight())/(iPageSize*options.display))-1);iSteps=Math.max(1,Math.ceil(oPages.length/options.display)-iLeftover);iCurrent=Math.min(iSteps,Math.max(1,options.start))-2;oContent.css(bAxis?'width':'height',(iPageSize*oPages.length));move(1);setEvents();}
function setEvents(){if(options.controls&&oBtnPrev.length>0&&oBtnNext.length>0){oBtnPrev.click(function(){move(-1);return false;});oBtnNext.click(function(){move(1);return false;});}
if(options.interval){oSlider.hover(function(){clearTimeout(oTimer);bPause=true},function(){bPause=false;setTimer();});}
if(options.pager&&oPager.length>0){$('a',oPager).click(setPager);}}
function setButtons(){if(options.controls){oBtnPrev.toggleClass('disable',!(iCurrent>0));oBtnNext.toggleClass('disable',!(iCurrent+1<iSteps));}
if(options.pager){var oNumbers=$('.pagenum',oPager);oNumbers.removeClass('active');$(oNumbers[iCurrent]).addClass('active');}}
function setPager(oEvent){if($(this).hasClass('pagenum')){iCurrent=parseInt(this.rel)-1;move(1);}
return false;}
function setTimer(){if(options.interval&&!bPause){clearTimeout(oTimer);oTimer=setTimeout(function(){iCurrent=!options.rewind&&(iCurrent+1==iSteps)?-1:iCurrent;bForward=iCurrent+1==iSteps?false:iCurrent==0?true:bForward;move((options.rewind?(bForward?1:-1):1));},options.intervaltime);}}
function move(iDirection){if(iCurrent+iDirection>-1&&iCurrent+iDirection<iSteps){iCurrent+=iDirection;var oPosition={};oPosition[bAxis?'left':'top']=-(iCurrent*(iPageSize*options.display));oContent.animate(oPosition,{queue:false,duration:options.animation?options.duration:0,complete:function(){if(typeof options.callback=='function')
options.callback.call(this,oPages[iCurrent],iCurrent);}});setButtons();setTimer();}}};})(jQuery);;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);$(document).ready(function(){$(".widgetleft .textwidget, .widgetleft ul, .widgetleft .tagcloud, .widgetleft form#searchform, .widgetleft #calendar_wrap").hide();$("h3.sid_title").click(function(){$(this).toggleClass("active").next().slideToggle("slow");});$('img[width=0]').remove();$("ul.sub-menu").css({display:"none"});$("ul.menu li").hover(function(){$('ul:first.sub-menu',this).before('<div class="menu_level"></div>');$(this).find('ul:first').css({visibility:"visible",display:"none"}).slideDown(300);$('ul:first.sub-menu li:last',this).after('<div class="menu_level_bottom"></div>');},function(){$(this).find('ul:first').css({visibility:"hidden"});$('.menu_level_bottom',this).remove();$('.menu_level',this).remove();});$("ul.menu li ul li").hover(function(){$('li:first',this).before('<div class="menu_level_arrow"></div>');$('ul:first.sub-menu',this).before('<div class="menu_level_two"></div>');$(this).find('ul:first.sub-menu').css({visibility:"visible",display:"none"}).slideDown(100);$('li:last',this).append('<div class="menu_level_bottom_two"></div>');},function(){$(this).find('ul:first.sub-menu').css({visibility:"hidden"});$('.menu_level_two',this).remove();$('.menu_level_arrow',this).remove();});$('a.upperbar_social_blog').hover(function(){$('.upperbar_social_start_blog').stop().animate({"width":"159px"},"slow");},function(){$('.upperbar_social_start_blog').stop().animate({"width":"40px"},"slow")});$('a.upperbar_social_ipa').hover(function(){$('.upperbar_social_start_ipa').stop().animate({"width":"159px"},"slow");},function(){$('.upperbar_social_start_ipa').stop().animate({"width":"40px"},"slow")});$('a.upperbar_social_mac').hover(function(){$('.upperbar_social_start_mac').stop().animate({"width":"159px"},"slow");},function(){$('.upperbar_social_start_mac').stop().animate({"width":"40px"},"slow")});$('a.upperbar_social_android').hover(function(){$('.upperbar_social_start_android').stop().animate({"width":"159px"},"slow");},function(){$('.upperbar_social_start_android').stop().animate({"width":"40px"},"slow")});$('a.upperbar_social_vente').hover(function(){$('.upperbar_social_start_vente').stop().animate({"width":"159px"},"slow");},function(){$('.upperbar_social_start_vente').stop().animate({"width":"40px"},"slow")});$("#searchmenu").css({display:"none"});$(".search_icon").click(function(){$("#searchmenu").animate({"width":"toggle"},"slow");});$("a.slider_caption").css({display:"none"});$("li.slider_thumb_wp").hover(function(){$(this).find('a.slider_caption').animate({opacity:"show"});},function(){$(this).find('a.slider_caption').animate({opacity:"hide"});});$(".mini_social_arrow_facebook").css({display:"none"});$(".mini_social_facebook").click(function(){$(".mini_social_arrow_facebook").fadeIn("slow").animate({'marginLeft':'312px'},300);setTimeout(function(){$(".mini_social_arrow_facebook").animate({'marginLeft':'302px'},300).fadeOut("slow");},1000);return false;});$(".mini_social_arrow_twitter").css({display:"none"});$(".mini_social_twitter").click(function(){$(".mini_social_arrow_twitter").fadeIn("slow").animate({'marginLeft':'824px'},300);setTimeout(function(){$(".mini_social_arrow_twitter").animate({'marginLeft':'814px'},300).fadeOut("slow");},1000);return false;});$("a.comment-reply-link").css({'height':'0'});$('.mini_comm').hover(function(){$(this).find('.comm_txt').stop().animate({'paddingBottom':'34px'},200);$(this).find('a.comment-reply-link').stop().animate({'height':'30px'},200);},function(){$(this).find('a.comment-reply-link').stop().animate({'height':'0'},200);$(this).find('.comm_txt').stop().animate({'paddingBottom':'5px'},200);});$(window).scroll(function(){if($(this).scrollTop()){$('.backtotop').fadeIn();}else{$('.backtotop').fadeOut();}});$('.backtotop').click(function(e){e.preventDefault();$.scrollTo(0,1000);});$('li.ckrating_highly_rated',this).before('<span class="minimac_rating"></span>');});
