var nefi_out=1;var nefi_opacity=0.2;var nefi_speed=1000;var nefi_tt_interval=8000;var nefi_rt_interval=5000;var nefi_mt_interval=4000;var nefi_easing=1;function onBefore(d,b,c,a){jQuery(d).find("div.post").stop(true,true).hide()}function onAfter(d,b,c,a){jQuery(b).find("div.post").delay(1500).fadeIn(1000)}function prepare_structure(b){var d=b.outerWidth();var c=b.outerHeight(true);var a={display:"block",width:d,height:c};b.wrap(function(){return jQuery("<span></span>").css(a)});b.parent().append(function(){return jQuery('<span class="oli"></span>').css(a)});if(jQuery.browser.msie&&jQuery.browser.version<7){b.addClass("ie6-v")}}function hover_mainthumb(a){a.parents(".frame-container,.trigger-home,.frame-home").hover(function(){a.stop(true).fadeTo(nefi_speed,nefi_opacity)},function(){a.stop(true).fadeTo(nefi_speed,nefi_out)})}function pulse(a,b){if(active){a.contents("img").fadeTo(nefi_speed,b,function(){pulse(a,b==nefi_out?nefi_opacity:nefi_out)})}}function init_preload(){if(jQuery("#start-now").length>0){var a=jQuery("div.slide-container").length;preload_slide(1,a)}else{if(jQuery("#start-now-blog").length>0){var a=jQuery("div.feat-slider-tab").length;if(!a){a=1}preload_ticker(1,a)}}}function preload_slide(e,d){if(e<=d){if(jQuery("#start-now").hasClass("start-it")){var b=true}var c=jQuery("#slide-img-"+e);var a=new Image();jQuery("#lo-t").replaceWith('<span id="lo-t">Loading image '+e+" of "+d+"...</span>");slide_target_src=c.attr("title");jQuery(a).bind("error load",function(){jQuery(this).addClass("slide-img").prependTo(c).clone().removeAttr("class").insertAfter("#fc-"+e);if(e==1){jQuery(this).css("opacity","0");if(b==true){startSlide();jQuery("#lo-t").replaceWith('<span id="lo-t2">Starting...</span>');jQuery("#slide-img-1 .slide-img").animate({opacity:1},1000,function(){jQuery("#slide-img-loading").remove()})}}else{if(e==d&&b!=true){startSlide();jQuery("#slide-img-1 .slide-img").animate({opacity:1},1000,function(){jQuery("#slide-img-loading").remove()})}}c.removeAttr("title");preload_slide(e+1,d)}).attr({src:slide_target_src})}}function preload_ticker(e,d){if(d==1){var b=true}if(e<=d){var c=jQuery("#t-"+e);var a=new Image();slide_target_src=c.attr("title");if(slide_target_src!=""){jQuery(a).bind("error load",function(){jQuery(this).addClass("feat-image").appendTo("#t-"+e);c.removeAttr("title");if(e==1){c.css("opacity","0");jQuery("#lo-s").replaceWith('<span id="lo-s">Starting...</span>');if(b){c.css("display","block");jQuery("#slide-img-loading-blog").fadeOut("slow").remove();jQuery("#t-1").animate({opacity:1},2000,function(){jQuery("#feat-img").css("background-image","none")});tab_ticker()}}else{if(e==2){jQuery("#slide-img-loading-blog").fadeOut("slow").remove();tab_ticker();jQuery("#t-1").animate({opacity:1},2000,function(){jQuery("#feat-img").css("background-image","none")})}}preload_ticker(e+1,d)}).attr({src:slide_target_src})}else{jQuery('<span class="no-thumbnail-found"> Image not found<br/>Please enter image url on Thumbnail image post meta </span>').appendTo("#t-"+e);if(e==1){c.css("opacity","0");jQuery("#lo-s").replaceWith('<span id="lo-s">Starting...</span>');if(b){c.css("display","block");jQuery("#slide-img-loading-blog").fadeOut("slow").remove();jQuery("#t-1").animate({opacity:1},2000,function(){jQuery("#feat-img").css("background-image","none")});tab_ticker()}}else{if(e==2){jQuery("#slide-img-loading-blog").fadeOut("slow").remove();tab_ticker();jQuery("#t-1").animate({opacity:1},2000,function(){jQuery("#feat-img").css("background-image","none")})}}preload_ticker(e+1,d)}}}function preload_image(e,f,a,d){var j=jQuery(e);j.ctype=j.attr("class");j.css({opacity:0,visibility:"hidden"});switch(j.ctype){case"portfolio-image":if(jQuery.browser.msie&&jQuery.browser.version<7){j.css({opacity:1,visibility:"visible",border:"none"}).parent().css("background-image","none")}else{if(a.complete==true){j.css({opacity:1,visibility:"visible"}).parent().css("background-image","none")}else{j.bind("error load",function(){j.css({visibility:"visible"}).animate({opacity:0.5},500).animate({opacity:1},1000).parent().css("background-image","none")})}}break;case"IMG-thumbs":prepare_structure(j);var b;var h;var g=j.parent();var c=j.attr("src");hover_mainthumb(j,g);if(j.parents("a").attr("href").match(/(youtube|vimeo|wmv|swf|mov)/i)){b="spanwrap vVideo pngfix";h="vVideo";g.append("<span class='icon-"+h+" pngfix'></span>")}else{b="spanwrap vGoto pngfix"}if(jQuery.browser.msie&&jQuery.browser.version<7){j.css({opacity:1,visibility:"visible",border:"none"});g.addClass(b).find(".oli").remove();if(d==c){init_preload();meta_tab()}}else{if(a.complete==true){j.css({opacity:1,visibility:"visible"});g.addClass(b).find(".oli").remove();if(d==c){init_preload();meta_tab()}}else{j.bind("error load",function(){setTimeout(function(){j.css({visibility:"visible"}).animate({opacity:1},1000);g.addClass(b).find(".oli").remove();if(d==c){init_preload();meta_tab()}},1000)})}}break;default:if(jQuery.browser.msie&&jQuery.browser.version<7){j.css({opacity:1,visibility:"visible","background-image":"none"})}else{if(a.complete){j.css({opacity:1,visibility:"visible","background-image":"none"})}else{j.bind("error load",function(){j.css({visibility:"visible","background-image":"none"}).animate({opacity:0.5},500).animate({opacity:1},1000)})}}break}}function tab_ticker(){jQuery("#start-scroll").tabs("#feat-img > div.feat-image-container",{effect:"fade",current:"active",fadeInSpeed:800,fadeOutSpeed:1200,rotate:true}).slideshow({clickable:false,autoplay:true,interval:nefi_tt_interval})}function meta_tab(){jQuery("div.blog-meta-tabs").tabs("div.panes > img.blog-meta-image",{effect:"fade",current:"bmt-active",fadeInSpeed:800,fadeOutSpeed:1200,rotate:true}).slideshow({autoplay:true,interval:nefi_mt_interval})}function recent_ticker(){jQuery("#tab-recents").tabs("#tab-recent > div.tab-part-recent",{effect:"fade",current:"tr-active",fadeInSpeed:800,fadeOutSpeed:1200,rotate:true}).slideshow({clickable:false,autoplay:true,interval:nefi_rt_interval})}function scroll_ticker(){jQuery("#feat-slider").scrollable({items:"#start-scroll",vertical:true,size:4,next:"#slider-down",prev:"#slider-up",speed:500,easing:"easeInExpo"}).mousewheel(500)}(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,e.easing,e.duration,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);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}g=nefi_easing;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}g=nefi_easing;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}});jQuery(document).ready(function(){var e=jQuery("#main-wrapper .IMG-thumbs").last().attr("src");jQuery("img.recent-img, img.IMG-thumbs,img.recent-thumbs, .entry img, .lightbox_li img, img.popular-image, #contact-map").each(function(f,g){preload_image(this,f,g,e)});jQuery("#content a[rel^='lightbox']").not(".frame-container,.IMG-thumbs-hold").each(function(){var g;var o=jQuery(this);var j=o.contents("img");var f=new Image();f.src=j.attr("src");if(o.attr("href").match(/(jpg|gif|jpeg|png|tif)/i)){g="vPhoto"}else{if(o.attr("href").match(/(youtube|vimeo|mov|swf|wmv)/i)){g="vVideo"}else{g="vGoto"}}if(jQuery.browser.msie&&jQuery.browser.version<7){o.addClass("ie6-v")}var l=j.width()+10;var h=j.height()+10;if(o.hasClass("thumb")){l=l-2;h=h+8}var n;var p;var m=j.attr("class");if(m.match(/alignleft/i)){n="left";p="10px 10px 10px 0"}else{if(m.match(/alignright/i)){n="right";p="10px 0 10px 10px"}else{if(o.parents().hasClass("wp-caption")){n="none";p="0"}else{if(!o.hasClass("thumb")){n="none";p="10px auto"}}}}var k="display: block; width:"+l+"px; height: "+h+"px";var i={position:"relative",display:"block",width:l,height:h,margin:p,"float":n};if(f.complete==true){j.css("margin",0);o.css(i).append("<span class='"+g+" pngfix' style='"+k+"'></span><span class='icon-"+g+" pngfix'></span>");if(o.hasClass("thumb")){o.find(".frame-portfolio").hover(function(){active=true;pulse(o,nefi_opacity)},function(){active=false;j.stop(true).fadeTo(nefi_speed,nefi_out)})}else{j.hover(function(){active=true;pulse(o,nefi_opacity)},function(){active=false;j.stop(true).fadeTo(nefi_speed,nefi_out)})}}else{j.bind("load",function(){j.css("margin",0);o.css(i).append("<span class='"+g+" pngfix' style='"+k+"'></span><span class='icon-"+g+" pngfix'></span>");if(o.hasClass("thumb")){o.find(".frame-portfolio").hover(function(){active=true;pulse(o,nefi_opacity)},function(){active=false;j.stop(true).fadeTo(nefi_speed,nefi_out)})}else{j.hover(function(){active=true;pulse(o,nefi_opacity)},function(){active=false;j.stop(true).fadeTo(nefi_speed,nefi_out)})}})}});jQuery("div.slide-container").each(function(){var f=jQuery(this).find(".post");f.hide();jQuery(this).hover(function(){f.stop(true,true).fadeIn("normal")},function(){f.stop(true,true).fadeOut("normal")})});if(jQuery(".search-field-wrapper").length!=0){var a=jQuery(".search-field-wrapper #s").attr("title");if(!jQuery("#searchForm .search-field").val()){jQuery("#searchForm .search-field").val(a).focus(function(){if(jQuery(this).val()==a){jQuery(this).val("")}}).blur(function(){if(jQuery(this).val()==""){jQuery(this).val(a)}})}}jQuery("#mouse-scroll").css({opacity:0,visibility:"visible"});if(jQuery("div.feat-slider-tab").length>4){jQuery("#feat-slider").hover(function(){jQuery("#mouse-scroll").stop(true,true).animate({opacity:1},500)},function(){jQuery("#mouse-scroll").stop(true,true).animate({opacity:0},500)})}if(jQuery("img.IMG-thumbs").length==0){init_preload();if(jQuery("img.blog-meta-image").length>0){meta_tab()}}if(jQuery("#scroll-portfolio").length>0){var c=jQuery("#scroll-portfolio").scrollable({api:true,clickable:false,items:"#start-scroll-portfolio",size:1,next:".next-scroll",prev:".prev-scroll",speed:1500,easing:"easeInOutBack"});jQuery("span.sp").each(function(){var f=jQuery(this).attr("title");jQuery(this).bind("click",function(){c.setPage(f)})});var b=jQuery(".pagi-top").scrollable({api:true,disabledClass:"pnavi-disable",items:".s-pagination-items",size:1,next:".pagi-next-top",prev:".pagi-prev-top"});var d=jQuery(".pagi-bottom").scrollable({api:true,disabledClass:"pnavi-disable",items:".s-pagination-items",size:1,next:".pagi-next-bottom",prev:".pagi-prev-bottom"});jQuery("span.index-scroll").each(function(){jQuery(this).replaceWith(function(){var f=c.getIndex();s_index=f+1;if(jQuery(this).hasClass("ps-top")){return'<span class="index-scroll ps-top"><i>'+s_index+"</i> / <b>"+c.getSize()+"</b></span>"}else{return'<span class="index-scroll ps-bottom"><i>'+s_index+"</i> / <b>"+c.getSize()+"</b></span>"}})});c.onBeforeSeek(function(){var f=c.getIndex();jQuery("span.sp-"+f).removeClass("sp-active")});c.onSeek(function(){var f=c.getIndex();s_index=f+1;b.setPage(Math.floor(f/5));d.setPage(Math.floor(f/5));jQuery("span.index-scroll").each(function(){jQuery(this).replaceWith(function(){if(jQuery(this).hasClass("ps-top")){return'<span class="index-scroll ps-top"><i>'+s_index+"</i> / <b>"+c.getSize()+"</b></span>"}else{return'<span class="index-scroll ps-bottom"><i>'+s_index+"</i> / <b>"+c.getSize()+"</b></span>"}})});jQuery("span.sp-"+f).addClass("sp-active")})}jQuery("div.widget-home-1 a[class^=tag],div.widget-home-2 a[class^=tag]").addClass("wptaglink");jQuery("div.widget-home-1 .wptaglink,div.widget-home-2 .wptaglink").wrapAll('<div class="wptaglink-wrapper"/>');jQuery("#centering-footer-span").css("width",jQuery("#list-footer").width());recent_ticker();scroll_ticker()});
