var ddsmoothmenu={arrowimages:{down:[],right:[]},transition:{overtime:150,outtime:150},shadow:{enable:true,offsetx:5,offsety:5},showhidedelay:{showdelay:50,hidedelay:50},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,detectie6:document.all&&!window.XMLHttpRequest,getajaxmenu:function(c,b){var a=c("#"+b.contentsource[0]);a.html("Loading Menu...");c.ajax({url:b.contentsource[1],async:true,error:function(d){a.html("Error fetching content. Server Response: "+d.responseText);},success:function(d){a.html(d);ddsmoothmenu.buildmenu(c,b);}});},buildmenu:function(d,b){var e=ddsmoothmenu;var a=d("#"+b.mainmenuid+">ul");a.parent().get(0).className=b.classname||"ddsmoothmenu";var c=a.find("ul").parent();c.hover(function(f){d(this).children("a:eq(0)").addClass("selected");},function(f){d(this).children("a:eq(0)").removeClass("selected");});c.each(function(g){var j=d(this).css({zIndex:100-g});var f=d(this).find("ul:eq(0)").css({display:"block"});f.data("timers",{});this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:f.outerWidth(),subulh:f.outerHeight()};this.istopheader=j.parents("ul").length==1?true:false;f.css({top:this.istopheader&&b.orientation!="v"?this._dimensions.h+"px":0});j.children("a:eq(0)").css(this.istopheader?{paddingRight:e.arrowimages.down[2]}:{});if(e.shadow.enable){this._shadowoffset={x:(this.istopheader?f.offset().left+e.shadow.offsetx:this._dimensions.w),y:(this.istopheader?f.offset().top+e.shadow.offsety:j.position().top)};if(this.istopheader){$parentshadow=d(document.body);}else{var h=j.parents("li:eq(0)");$parentshadow=h.get(0).$shadow;}this.$shadow=d('<div class="ddshadow'+(this.istopheader?" toplevelshadow":"")+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+"px",top:this._shadowoffset.y+"px"});}j.hover(function(k){var i=f;var l=j.get(0);clearTimeout(i.data("timers").hidetimer);i.data("timers").showtimer=setTimeout(function(){l._offsets={left:j.offset().left,top:j.offset().top};var o=l.istopheader&&b.orientation!="v"?0:l._dimensions.w;o=(l._offsets.left+o+l._dimensions.subulw>d(window).width())?(l.istopheader&&b.orientation!="v"?-l._dimensions.subulw+l._dimensions.w:-l._dimensions.w):o;if(i.queue().length<=1){i.css({left:o+"px",width:l._dimensions.subulw+"px"}).animate({height:"show",opacity:"show"},ddsmoothmenu.transition.overtime);if(e.shadow.enable){var n=l.istopheader?i.offset().left+ddsmoothmenu.shadow.offsetx:o;var m=l.istopheader?i.offset().top+e.shadow.offsety:l._shadowoffset.y;if(!l.istopheader&&ddsmoothmenu.detectwebkit){l.$shadow.css({opacity:1});}l.$shadow.css({overflow:"",width:l._dimensions.subulw+"px",left:n+"px",top:m+"px"}).animate({height:l._dimensions.subulh+"px"},ddsmoothmenu.transition.overtime);}}},ddsmoothmenu.showhidedelay.showdelay);},function(k){var i=f;var l=j.get(0);clearTimeout(i.data("timers").showtimer);i.data("timers").hidetimer=setTimeout(function(){i.animate({height:"hide",opacity:"hide"},ddsmoothmenu.transition.outtime);if(e.shadow.enable){if(ddsmoothmenu.detectwebkit){l.$shadow.children("div:eq(0)").css({opacity:0});}l.$shadow.css({overflow:"hidden"}).animate({height:0},ddsmoothmenu.transition.outtime);}},ddsmoothmenu.showhidedelay.hidedelay);});});a.find("ul").css({display:"none",visibility:"visible"});},init:function(c){if(typeof c.customtheme=="object"&&c.customtheme.length==2){var b="#"+c.mainmenuid;var a=(c.orientation=="v")?b:b+", "+b;document.write('<style type="text/css">\n'+a+" ul li a {background:"+c.customtheme[0]+";}\n"+b+" ul li a:hover {background:"+c.customtheme[1]+";}\n</style>");}this.shadow.enable=(document.all&&!window.XMLHttpRequest)?false:this.shadow.enable;jQuery(document).ready(function(d){if(typeof c.contentsource=="object"){ddsmoothmenu.getajaxmenu(d,c);}else{ddsmoothmenu.buildmenu(d,c);}});}};jQuery(document).ready(function(a){a("div.ddsmoothmenu").attr("id","smoothmenu");a("div.ddsmoothmenu ul li ul li:last-child a").addClass("last");ddsmoothmenu.init({mainmenuid:"smoothmenu",orientation:"h",classname:"ddsmoothmenu",contentsource:"markup"});});jQuery(document).ready(function(a){a(".tab_content").hide();a("ul.tabs li:first").addClass("active").show();a(".tab_content:first").show();a("ul.tabs li").click(function(){a("ul.tabs li").removeClass("active");a(this).addClass("active");a(".tab_content").hide();var b=a(this).find("a").attr("href");a(b).fadeIn();return false;});});(function(a){a.fn.extend({accordion:function(){return this.each(function(){if(a(this).data("accordiated")){return false;}a.each(a(this).find("ul, li>div"),function(){a(this).data("accordiated",true);a(this).hide();});a.each(a(this).find("a:not(.foo)"),function(){a(this).click(function(d){b(d.target);return void (0);});});var c=false;if(location.hash){c=a(this).find("a[href="+location.hash+"]")[0];}else{if(a(this).find("li.current")){c=a(this).find("li.current a")[0];}}if(c){b(c,"toggle","parents");a(c).parents().show();}function b(f,e,d){a(f)[(d||"parent")]("li").toggleClass("active").siblings().removeClass("active").children("ul, div").slideUp("fast");a(f).siblings("ul, div")[(e||"slideToggle")]((!e)?"fast":null);}});}});})(jQuery);jQuery(document).ready(function(a){a("ul.accordion").accordion();});jQuery(document).ready(function(d){d("div.border-divider:last").hide();d("a.comment-reply-link").addClass("read-more");d("img.avatar").addClass("border");d("#inner-content img").each(function(){var i=d(this).attr("src");var f=d(this).width();var g=d(this).height();if(f>650){var j=650;var k=parseInt((650*g)/f);d(this).width(j);d(this).height(k);}});var e=d("#portfolio-item-slides").width();var b=d("#portfolio-item-slides img").size();var a=d("#portfolio-item-slides ul.pagination").width();var c=(parseInt(e/2)-parseInt(a/2));c=c+"px";d("#portfolio-item-slides ul.pagination").css({marginLeft:function(f){return c;}});});
