jQuery(function($){$("ul.nav").superfish({delay:200,animation:{opacity:'show',height:'show'},speed:'fast',autoArrows:false});$("ul.tabs").tabs("div.pane",{effect:'fade'});var comment_list_now='comments';$('.comment-controls a').click(function(){var type=this.href.split('#')[1];if(comment_list_now!=type){comment_list_now=type;$(this).parent().find('a').toggleClass('button');jQuery('.commentlist').toggle();}
return false;});$("#main-nav ul.nav li:last-child").addClass("last");$("#featured .post:nth-child(3)").addClass("last");$("#main div.one_third:nth-child(3n+0)").addClass("last");$("#main .posts .half:nth-child(2n+0)").addClass("even");$("body.single-post #main .post-section:last-child").addClass("last");$("#comments ol.commentlist li:last-child").addClass("last");$("#related-posts .posts .post:odd").addClass("even");$("#sidebar .widget:last-child").addClass("last");$("#sidebar .widget-video h3").addClass("fl");$("#subfooter .widget:nth-child(3n+0)").addClass("last");$(".flickr_badge_image:nth-child(3n+4)").addClass("last");$("#pagination div > a").addClass("button");jQuery('#sidebar .widget-ads .square .ad-image:odd').addClass('odd');$("#subfooter .widget:nth-child(4n+0)").before("<div class=\"divider_padding\">");var opn_slider_length=Math.ceil($('#featured .post').length/3),opn_slider_current=0;$('#featured-controls a').click(function(){var rel=$(this).attr('rel');if(rel=='prev'){opn_slider_current--;}else if(rel=='next'){opn_slider_current++;}else{opn_slider_current=parseInt(rel)-1;}
if(opn_slider_current<0){opn_slider_current=opn_slider_length-1;}else if(opn_slider_current>=opn_slider_length){opn_slider_current=0;}
$(this).siblings('a').removeClass('active');$(this).parent().find('a.featured-dot').eq(opn_slider_current).addClass('active');$('#featured-inner').animate({left:-915*opn_slider_current});return false;});jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};$(document).ready(function(){if($.cookie('theme_color')!=null){var coockiecolor=$.cookie('theme_color');$("html").addClass(coockiecolor);}
$("#skin-select a").mouseover(function(){if($("html").attr("class")){$("html").removeClass($("html").attr("class"));}
$("html").addClass($(this).attr("class"));var colorname=$(this).attr("class");$.cookie('theme_color',colorname,{path:'/',expires:10});return false;});});$('img[title]').each(function(){$(this).removeAttr('title');});});
