jQuery.noConflict();jQuery(document).ready(function(){Cufon.replace("h1, h2, h3, h4, h5, h6, .navfont",{fontFamily:"Bebas Neue",hover:false,textShadow:"#fff 1px 1px"});Cufon.replace(".dividerbig, .dividersmall",{fontFamily:"Bebas Neue",hover:false,textShadow:"#fff 1px 1px"});Cufon.replace(".footertitle_white, .footertitle_blue",{fontFamily:"Bebas Neue",hover:false,textShadow:"#000 1px 1px"});jQuery("img.captionmeblue").each(function(){var _1=jQuery(this).attr("title");jQuery(this).wrap("<div class='imgpost'></div>");jQuery(this).parent().append("<div class='thecaptionblue'>"+_1+"</div>");});jQuery("img.captionmegrey").each(function(){var _2=jQuery(this).attr("title");jQuery(this).wrap("<div class='imgpost'></div>");jQuery(this).parent().append("<div class='thecaptiongrey'>"+_2+"</div>");});jQuery("img.captionmered").each(function(){var _3=jQuery(this).attr("title");jQuery(this).wrap("<div class='imgpost'></div>");jQuery(this).parent().append("<div class='thecaptionred'>"+_3+"</div>");});jQuery("a[rel^='fadeimg'] img").hover(function(){jQuery(this).stop().fadeTo("fast",0.5);},function(){jQuery(this).stop().fadeTo("fast",1);});addPrettyPhoto();addFacebook();addTwitter();addYoutubeVideo();addSidebarSlider();if(jQuery(".smoothTabs").length!=0){jQuery(".smoothTabs").smoothTabs(200);}addPortfolio("4");addPortfolio("3");addPortfolio("2");addPortfolio("1");if(jQuery("#contactform").length!=0){addForm("#contactform");}if(jQuery("#newsletterform").length!=0){addForm("#newsletterform");}if(jQuery("#replyform").length!=0){addForm("#replyform");}});jQuery(window).load(function(){if(jQuery("#slider").length!=0){jQuery("#slider").nivoSlider({effect:"random",slices:10,boxCols:5,boxRows:4,animSpeed:500,pauseTime:5000,startSlide:0,directionNav:false,directionNavHide:true,controlNav:true,controlNavThumbs:true,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.9,prevText:"Prev",nextText:"Next",beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){},customChange:function(){Cufon.replace(".slidercaption",{fontFamily:"Bebas Neue",hover:true});}});}addPiecemaker();loadGoogleMaps();});function addPrettyPhoto(){jQuery("a[rel^='prettyPhoto']").prettyPhoto({theme:"facebook",overlay_gallery:true,show_title:false,hideflash:true});jQuery("a[rel^='prettyPhoto'] img").hover(function(){jQuery(this).stop().fadeTo("fast",0.5);},function(){jQuery(this).stop().fadeTo("fast",1);});};function addFacebook(){if(jQuery("#facebooklike").length!=0){window.fbAsyncInit=function(){jQuery("#facebooklike").append("<fb:like href=\"\" layout=\"button_count\" show_faces=\"false\" width=\"90\"></fb:like>");jQuery("#facebooklike").delay(500).fadeIn(1000);};var _4=document.createElement("script");_4.type="text/javascript";_4.src="../../../connect.facebook.net/en_US/all.js#xfbml=1";document.getElementsByTagName("head")[0].appendChild(_4);}};function addTwitter(){if(jQuery("#twittertweet").length!=0){jQuery("#twittertweet").append("<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-url=\"#\" data-text=\"Notorious Creative Portfolio Template\" data-count=\"horizontal\">Tweet</a>");jQuery("#twittertweet").delay(500).fadeIn(1000);var _5=document.createElement("script");_5.type="text/javascript";_5.src="../../../platform.twitter.com/widgets.js";document.getElementsByTagName("head")[0].appendChild(_5);}};function addYoutubeVideo(){if(jQuery("#youtubevideo").length!=0){jQuery("#youtubevideo").append("<object type=\"application/x-shockwave-flash\" style=\"width:670px; height:404px;\" data=\"http://www.youtube.com/v/oRLTU5E2JVU?hl=en&amp;fs=1&amp;hd=1\">"+"<param name=\"movie\" value=\"http://www.youtube.com/v/oRLTU5E2JVU?hl=en&amp;fs=1&amp;hd=1\" />"+"<param name=\"allowFullScreen\" value=\"true\" />"+"</object>");}};function addPiecemaker(){if(jQuery("#piecemaker").length!=0){jQuery("head").append("<script>swfobject.embedSWF(\"images/piecemaker2/piecemaker.swf\" , \"piecemaker\", \"920\", \"445\", \"10\", null, flashvars, params, null)</script>");}};function addSidebarSlider(){if(jQuery("#sidebarslider").length!=0){jQuery("#sidebarslider").tinycarousel({controls:false,pager:true,interval:true,intervaltime:3000});}};function initGoogleMaps(){var _6=new google.maps.LatLng(50.935816,6.961212);var _7={zoom:14,center:_6,popup:true,mapTypeId:google.maps.MapTypeId.ROADMAP};var _8=new google.maps.Map(document.getElementById("googlemap"),_7);};function loadGoogleMaps(){if(jQuery("#googlemap").length!=0){var _9=document.createElement("script");_9.type="text/javascript";_9.src="http://maps.google.com/maps/api/js?sensor=false&callback=initGoogleMaps";document.body.appendChild(_9);}};function addPortfolio(_a){var _b=jQuery("#portfoliolist"+_a+"column");if(jQuery(_b).length!=0){var _c=_b.clone();jQuery(".portfoliofilter li").click(function(e){jQuery(".portfoliofilter li a").addClass("portfoliobutton_noselect");jQuery(".portfoliofilter li a").removeClass("portfoliobutton");jQuery(this).children("a").removeClass("portfoliobutton_noselect");jQuery(this).children("a").addClass("portfoliobutton");var _d=jQuery(this).attr("class");if(_d=="all"){var _e=_c.find(".portfolioentry"+_a+"column");}else{var _e=_c.find(".portfolioentry"+_a+"column[data-type="+_d+"]");}jQuery(_b).quicksand(_e,{duration:500,easing:"easeInOutQuad",adjustHeight:"dynamic",enhancement:function(){if(typeof Cufon!=="undefined"){Cufon.refresh();}}},function(){addPrettyPhoto();});return false;});}};function addForm(_f){var _10=jQuery(_f);var _11=false;_10.find("button[name=send]").click(_12);function _13(){var _14=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;var _15=/.{4}/;var _16=true;_10.find(".requiredfield").each(function(){var _17=jQuery(this).attr("name");var _18=jQuery(this).val();if(_17=="email"){if(!_14.test(_18)){jQuery(this).addClass("formerror");_16=false;}else{jQuery(this).removeClass("formerror");}}else{if(!_15.test(_18)){jQuery(this).addClass("formerror");_16=false;}else{jQuery(this).removeClass("formerror");}}});if(!_16){_10.find(".errormessage").fadeIn();}return _16;};function _19(){_10.find("input").each(function(){jQuery(this).val("");});_10.find("textarea").val("");_11=false;};function _12(){_10.find(".successmessage").hide();var _1a="";if(_f=="#contactform"){_1a="php/contact.php";}else{if(_f=="#newsletterform"){_1a="php/signup.php";}else{_1a="";}}if(_13()){if(!_11){_11=true;_10.find(".errormessage").hide();_10.find(".sendingmessage").show();jQuery.post(_1a,_10.serialize(),function(){_10.find(".sendingmessage").hide();_10.find(".successmessage").fadeIn();_19();});}}return false;};};(function($){$.fn.smoothTabs=function(_1b){var _1c=0;var _1d="smoothTabsLiCurrent";var _1e="smoothTabsDivHidden";var _1f="smoothTabsDivVisible";var _20=document.location.hash.substr(1,document.location.hash.length);if(_20&&$("#"+_20,this).size()){_1c=$("#"+_20,this).index();}this.each(function(){$("ul li:eq("+_1c+")",this).addClass(_1d);$(this).children("div").addClass(_1e);$("div:eq("+_1c+")",this).fadeIn(_1b).addClass(_1f).removeClass(_1e);});$("ul li",this).click(function(){var _21=$(this).parent();var _22=$(_21).parent();$("li",_21).removeClass(_1d);$(this).addClass(_1d);var _23=$("li",_21).index(this);var _24=$("div",_22).get(_23);if($(_24).attr("class")==_1f){return false;}$("."+_1f,_22).fadeOut(_1b,function(){$(_24).fadeIn(_1b).addClass(_1f).removeClass(_1e);});$("."+_1f,_22).removeClass(_1f).addClass(_1e);});};})(jQuery);
