$(document).ready(function(){$("a[href^=http]").each(function(){if(this.href.indexOf(location.hostname)==-1){$(this).attr("target","_blank")}});$("input[type=text]").focus(function(){handle_default_text(this);$(this).addClass("focus")});$("input[type=text]").blur(function(){handle_default_text(this);$(this).removeClass("focus")});$(".slideshow-nav-outer").hover(function(){$(this).children(".slideshow-nav-background").animate({opacity:0.85},350)},function(){$(this).children(".slideshow-nav-background").animate({opacity:0.3},350)});if(browser.type=="mobile"){window.scrollTo(0,1)}if(browser.isIE){$(".client-header").hover(function(){$(this).children("h2").css("color","#D71251");$(this).children(".project-circular-thumbs").children(".project-circular-thumb").children("a").children("img").animate({opacity:1},250,function(){$(this).css("filter","none")})},function(){$(this).children("h2").css("color","#139CD1");$(this).children(".project-circular-thumbs").children(".project-circular-thumb").children("a").children("img").animate({opacity:0},250)})}else{$(".client-header").hover(function(){$(this).children("h2").css("color","#D71251");$(this).children(".project-circular-thumbs").animate({opacity:1},250)},function(){$(this).children("h2").css("color","#139CD1");$(this).children(".project-circular-thumbs").animate({opacity:0},250)})}if(browser.player=="link"){}else{$(".slideshow a.media-container-video").bind("click",function(a){a.preventDefault();var j=$(this).parent(".media-type-video").attr("data-video-url");var g=$(this).parents(".slideshow");var i=g.attr("id");var h=i+"_player";var f=i+"_player_outer";var c=g.attr("data-width");var e=g.attr("data-height");var d=g.children(".video-player-wrapper").children(".video-player-loading-screen");d.css("top","0");d.css("opacity","1");g.children(".video-player-wrapper #"+h).html("");setup_slideshow_player(i,h,f,j,c,e);$("#"+f).css("top",0);$("#"+f).animate({opacity:1},450);g.children(".video-functions-buttons").css("top","10px");var b=$(this).parent(".media-type-video").attr("data-vimeo-id");b==""?g.children(".video-functions-buttons").children(".embed").css("top","-5000px"):g.children(".video-functions-buttons").children(".embed").css("top","0px");g.children(".video-functions-buttons").children(".download").attr("href","/download.php?url="+j);g.children(".embed-code").children(".embed-code-inner").children("textarea").text('<iframe src="http://player.vimeo.com/video/'+b+'?title=0&amp;byline=0&amp;portrait=0&amp;color=111111" width="580" height="326" frameborder="0"></iframe>')});$(".video-play-button").bind("click",function(){var i=$(this).parents(".media-type-video").attr("data-video-url");var f=$(this).parents(".slideshow");var h=f.attr("id");var g=h+"_player";var e=h+"_player_outer";var b=f.width();var d=f.height();var c=f.children(".video-player-wrapper").children(".video-player-loading-screen");c.css("top","0");c.css("opacity","1");f.children(".video-player-wrapper #"+g).html("");setup_slideshow_player(h,g,e,i,b,d);$("#"+e).css("top",0);$("#"+e).animate({opacity:1},450);f.children(".video-functions-buttons").css("top","10px");var a=$(this).parents(".media-type-video").attr("data-vimeo-id");a==""?f.children(".video-functions-buttons").children(".embed").css("top","-5000px"):f.children(".video-functions-buttons").children(".embed").css("top","0px");f.children(".video-functions-buttons").children(".download").attr("href","/download.php?url="+i);f.children(".embed-code").children(".embed-code-inner").children("textarea").text('<iframe src="http://player.vimeo.com/video/'+a+'?title=0&amp;byline=0&amp;portrait=0&amp;color=111111" width="580" height="326" frameborder="0"></iframe>')});$(".slideshow-nav").bind("click",function(){var d=$(this).parents(".slideshow");d.children(".video-functions-buttons").css("top","-5000px");var b=d.children(".video-player-wrapper").attr("id");var a=b.substr(0,(b.length-6));var c=document.getElementById(a);jwplayer(c).pause(true);$("#"+b).css("top",-5000);d.children(".hides-group-2").fadeIn(50)});$(".slideshow").hover(function(){var b=$(this).children(".video-player-wrapper").attr("id");var a=b.substr(0,(b.length-6));var c=document.getElementById(a);if(jwplayer(c).getState()=="PLAYING"){jwplayer(c).getPlugin("controlbar").show()}$(this).children(".hides-group-2").fadeIn(50)},function(){var b=$(this).children(".video-player-wrapper").attr("id");var a=b.substr(0,(b.length-6));var c=document.getElementById(a);if(jwplayer(c).getState()=="PLAYING"){$(this).children(".hides-group-2").fadeOut(50)}});$(".video-functions-buttons .embed").bind("click",function(){var b=$(this).parents(".slideshow").children(".video-player-wrapper").attr("id");var a=b.substr(0,(b.length-6));var d=document.getElementById(a);jwplayer(d).pause(true);var c=$(this).parents(".slideshow").children(".embed-code");c.css("top","0");c.animate({opacity:1},300)});$(".embed-code .button").bind("click",function(){var a=$(this).parents(".slideshow").children(".embed-code");a.animate({opacity:0},300,function(){a.css("top","-5000px");var c=$(this).parents(".slideshow").children(".video-player-wrapper").attr("id");var b=c.substr(0,(c.length-6));var d=document.getElementById(b);jwplayer(d).pause()})})}});function setup_slideshow_player(f,b,e,c,a,d){jwplayer(b).setup({flashplayer:"/sites/default/files/scripts-and-libraries/jwplayer/player.swf",wmode:"transparent",skin:"/sites/default/files/scripts-and-libraries/jwplayer/skins/bekle/bekle.zip",file:c,autostart:true,controlbar:"over",icons:false,dock:false,"controlbar.idlehide":true,width:a,height:d,events:{onPlay:function(){var h=$("#"+b).parents(".slideshow");var g=h.children(".video-player-wrapper").children(".video-player-loading-screen");g.animate({opacity:0},450,function(){g.css("top","-5000px");g.css("opacity","1")});jwplayer(b).getPlugin("controlbar").show();$("#"+b).parents(".slideshow-slide").children(".hides-group-1").fadeOut(50)},onComplete:function(){var g=$("#"+b).parents(".slideshow");$("#"+e).css("top",-5000);$("#"+b).parents(".slideshow-slide").children(".hides-group-1").fadeIn(50);g.children(".hides-group-2").fadeIn(50);g.children(".video-functions-buttons").css("top","-5000px")},onPause:function(){}}});jwplayer(b).getPlugin("controlbar").hide()}function handle_default_text(a){if(a.defaultValue==a.value){a.value=""}else{if(a.value==""){a.value=a.defaultValue}}}function dk_share(d,f,a){var e=f+" | DIGITALKITCHEN";var c="http%3A%2F%2Fthisisdk.com"+a;var b=d=="twitter"?"http://twitter.com/share?url="+c+"&text="+e+"&count=horiztonal":"http://www.facebook.com/sharer.php?u="+c;window.open(b,"","menubar=1, resizable=1, location=1, width=548,height=340")}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}});
