$(document).ready(function(){$("#dropmenu ul").css({display:"none"});$("#dropmenu li").hover(function(){$(this).find('ul:first').animate({height:"show"},150,"easeInOutCubic")},function(){$(this).find('ul:first').animate({height:"hide"},250,"easeInBack")})});$(document).ready(function(){$('.hozbreak-top a').click(function(){$('html, body').animate({scrollTop:'0px'},300);return false})});$(document).ready(function(){$("#open").click(function(){$("div#panel").animate({height:"show"},900,"easeInOutCubic")});$(".contacttrigger").click(function(){$("div#panel").animate({height:"show"},900,"easeInOutCubic");$("#toggle a").toggle()});$(".droppaneltrigger").click(function(){$("div#panel").animate({height:"show"},900,"easeInOutCubic");$("#toggle a").toggle()});$("#close").click(function(){$("div#panel").animate({height:"hide"},600,"easeInBack")});$("#toggle a").click(function(){$("#toggle a").toggle()})});$(document).ready(function(){$('#pause').click(function(){$('.stage-slider').cycle('pause')});$('#resume').click(function(){$('.stage-slider').cycle('resume')});$("#toggle_slide_nav a").click(function(){$("#toggle_slide_nav a").toggle()})});$(document).ready(function(){$(".socialinit").click(function(){$("div.socialicons").animate({width:'show'})});$(".socialhide").click(function(){$("div.socialicons").animate({width:'hide'})});$("#togglesocial li").click(function(){$("#togglesocial li").toggle()})});$(document).ready(function(){var originalFontSize=$('html').css('font-size');$(".resetFont").click(function(){$('html').css('font-size',originalFontSize)});$(".increaseFont").click(function(){var currentFontSize=$('.content-wrapper-inner').css('font-size');var currentFontSizeNum=parseFloat(currentFontSize,10);var newFontSize=currentFontSizeNum*1.1;$('.content-wrapper-inner').css('font-size',newFontSize);return false});$(".decreaseFont").click(function(){var currentFontSize=$('.content-wrapper-inner').css('font-size');var currentFontSizeNum=parseFloat(currentFontSize,10);var newFontSize=currentFontSizeNum*0.9;$('.content-wrapper-inner').css('font-size',newFontSize);return false})});$(document).ready(function(){$('.galleryimg,.shortcodeimg,.shortcodevid,.galleryvid').hover(function(){$(this).children('div').css('display','block');$(this).children('div').fadeTo("fast",0.6)},function(){$(this).children('div').fadeTo("fast",0,function(){})})});$(document).ready(function(){$('form#contactForm').submit(function(){$('form#contactForm .error').remove();var hasError=false;$('.requiredField').each(function(){if(jQuery.trim($(this).val())==''){var labelText=$(this).prev('label').text();$(this).parent().append('<span class="error">You forgot to enter your '+labelText+'.</span>');hasError=true}else if($(this).hasClass('email')){var emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;if(!emailReg.test(jQuery.trim($(this).val()))){var labelText=$(this).prev('label').text();$(this).parent().append('<span class="error">You entered an invalid '+labelText+'.</span>');hasError=true}}});if(!hasError){$('form#contactForm li.buttons button').fadeOut('normal',function(){$(this).parent().append('<img src="/wp-content/themes/td-v3/images/template/loading.gif" alt="Loading&hellip;" height="31" width="31" />')});var formInput=$(this).serialize();$.post($(this).attr('action'),formInput,function(data){$('form#contactForm').slideUp("fast",function(){$(this).before('<p class="thanks"><strong>Thanks!</strong> Your email was successfully sent. I check my email all the time, so I should be in touch soon.</p>')})})}return false})});function gettweets(name,tweetsnum){var twitter_name=name;var twitter_count=tweetsnum;var callback_name="tweet_callback";var twitter_search="http://twitter.com/statuses/user_timeline";var return_type="json";(function(){var ts=document.createElement('script');ts.type='text/javascript';ts.async=true;ts.src=twitter_search+"."+return_type+"?screen_name="+twitter_name+"&count="+twitter_count+"&callback="+callback_name;(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(ts)})()}function tweet_callback(data){$.each(data,function(i,tweet){if(tweet.text!=undefined){var text=tweet.text.toString().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$1">$1</a>').replace(/(^|\s)@(\w+)/,'<a href="http://www.twitter.com/$2">@$2</a>').replace(/[#]+[A-Za-z0-9-_]+/ig,function(t){var tag=t.replace("#","%23");return t.link("http://search.twitter.com/search?q="+tag)});$("#tweet_container").append("<span>"+text+"</span>");$('#tweet_container').cycle({fx:'fade',speed:1000,timeout:10000,cleartype:1})}})}$(document).ready(function(){$(".reveal-content").hide();$("h4.reveal").click(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});$("h4.reveal").click(function(){$(this).next(".reveal-content").animate({height:"show"},900,"easeInOutCubic")});$("h4.reveal.active").click(function(){$(this).next(".reveal-content").animate({height:"hide"},600,"easeInBack")})});
