jQuery(window).load(function() { if (jQuery("#nivoslider").length) { jQuery('#nivoslider').nivoSlider({ effect:'random', //Specify sets like: 'fold,fade,sliceDown' slices:15, animSpeed:500, //Slide transition speed pauseTime:3000, startSlide:0, //Set starting Slide (0 index) directionNav:false, //Next & Prev directionNavHide:true, //Only show on hover controlNav:true, //1,2,3... controlNavThumbs:false, //Use thumbnails for Control Nav controlNavThumbsFromRel:false, //Use image rel for thumbs controlNavThumbsSearch: '&w=920&h=270', //Replace this with... controlNavThumbsReplace: '&w=28&h=28', //...this in thumb Image src keyboardNav:true, //Use left & right arrows pauseOnHover:true, //Stop animation while hovering manualAdvance:false, //Force manual transitions captionOpacity:0.8, //Universal caption opacity beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){} //Triggers after all slides have been shown }); } if (jQuery(".kwicks").length) { jQuery('.kwicks .slide .kwicks_title').css({ bottom: "0" }); jQuery('.kwicks .slide').fadeIn(300); jQuery('.kwicks').kwicks({ max : 920, spacing : 0 }); jQuery('.kwicks .slide').hover(function() { jQuery('.kwicks_title', this).hide(); jQuery('.kwicks_description', this).stop().fadeTo(900, 0.9); jQuery('.kwicks_title', this).css({ top: "0" }); jQuery('.kwicks_title', this).css({ bottom: "" }); jQuery('.kwicks_title', this).stop().fadeTo(900, 0.9); },function(){ jQuery('.kwicks_description', this).hide(); jQuery('.kwicks_title', this).hide(); jQuery('.kwicks_title', this).css({ top: "" }); jQuery('.kwicks_title', this).css({ bottom: "0" }); jQuery('.kwicks_title', this).stop().fadeTo(900, 0.9); }); } if (jQuery("#anythingslider").length) { jQuery('#anythingslider').fadeIn(300); jQuery('#anythingslider').anythingSlider({ autoPlay : false, pauseOnHover : true, resumeOnVideoEnd : true, addWmodeToObject : "opaque", toggleControls : false, theme : 'metallic', buildNavigation : false, buildArrows : true, delay : 3000, animationTime : 600, easing : "swing" }) } if (jQuery("#nivoslider").length || jQuery(".kwicks").length || jQuery("#jcycle").length || jQuery("#anythingslider").length ){ jQuery('#colorhead').removeClass('noslider'); } if (jQuery("#jcycle").length) { jQuery('.jcycle').fadeIn(300); jQuery('.navcycle').fadeIn(300); jQuery('#jcycle').cycle({ fx: 'fade', timeout: 6000, speed: 1000, next: "#nextcycle", prev: "#prevcycle", pauseOnPagerHover: true, pause: 1 }); } }); jQuery('.logo a span').each(function(){ var me = jQuery(this) , t = me.text().split(' '); me.html( ''+t.shift()+' '+t.join(' ') ); }); jQuery('ul.sf-menu').superfish({ autoArrows: false, speed:'fast'}); jQuery("a[rel^='prettyPhoto'], a[rel^='lightbox']").prettyPhoto({ theme: 'light_square', overlay_gallery: false }); jQuery('tr:odd').css({backgroundColor: '#f0f0f0'}); function ajaxContact(theForm) { var $ = jQuery; $('#loader').fadeIn(); var formData = $(theForm).serialize(), note = $('#Note'); $.ajax({ type: "POST", url: "http://www.apple-resources.com/wp-content/themes/apple_resources/functions/contactsend.php", data: formData, success: function(response) { if ( note.height() ) { note.fadeIn('fast', function() { $(this).hide(); }); } else { note.hide(); } $('#LoadingGraphic').fadeOut('fast', function() { //$(this).remove(); if (response === 'success') { $("#contactform").animate({opacity: 0},'fast'); } // Message Sent? Show the 'Thank You' message and hide the form result = ''; c = ''; if (response === 'success') { result = 'Your message has been sent. Thank you!'; c = 'success'; } else { result = response; c = 'error'; } note.removeClass('success').removeClass('error').text(''); var i = setInterval(function() { if ( !note.is(':visible') ) { note.html(result).addClass(c).slideDown('fast'); clearInterval(i); } }, 40); }); } }); return false; } if (jQuery("#contactform").length) { jQuery("#contactform").validate({ submitHandler: function(form) { ajaxContact(form); return false; }, messages: { formname: "Please specify your name.", formcomments: "Please enter your message.", formemail: { required: "We need your email address to contact you.", email: "Your email address must be in the format of name@domain.com" } } }); } jQuery(function () { jQuery('.loader img').hide(); }); var i = 0; var int=0; jQuery(window).bind("load", function() { var int = setInterval("imgLoaderKot(i)",300); }); function imgLoaderKot() { var images = jQuery('.loader img').length; if (i >= images) { clearInterval(int); } jQuery('.loader img:hidden').eq(0).fadeIn(300) jQuery('.loader img').eq(0).css('display', 'block'); i++; } jQuery(".kot_gallery .loader a.lightbox").prepend(""); jQuery(".kot_gallery .loader a.lightbox span").stop().animate({opacity:0},0) jQuery(".kot_gallery .loader a.lightbox").hover(function(){ jQuery(this).find("span").stop().animate({opacity:1},300) }, function(){ jQuery(this).find("span").stop().animate({opacity:0},100) }); jQuery('.widget li').hover(function(){ jQuery(this).stop().animate({ backgroundPosition: "3px 15px" }, 300); }, function(){ jQuery(this).stop().animate({ backgroundPosition: "0 15px" }, 300); }); jQuery(".widget_adv125 li:nth-child(even) ").css('width', '125px'); jQuery("#searchsubmit, .widget_feedburner button ").wrap('
'); jQuery(".sf-menu ul li:first-child").css('borderTop', 'none'); jQuery(".sf-menu ul li:last-child").css('borderBottom', 'none'); jQuery("#teasers .teaser:last-child").css({width:'310px', marginRight:'0'}); jQuery("aside .widget").append("
"); jQuery("aside .widget:last-child").find("hr:last-child").hide(); jQuery("aside .widget li:last-child").css('border', 'none'); jQuery('a.kot_button').hover(function() { jQuery(this).stop().fadeTo(150, 0.8); },function(){ jQuery(this).stop().fadeTo(150, 1); }); jQuery(function(){ var H = 0; jQuery(".teaser").each(function(i){ var h = jQuery(".teaser").eq(i).height(); if(h > H) H = h; }); jQuery(".teaser").height(H); }); jQuery(function(){ if (jQuery("#menu-main-menu").length) { var H = jQuery("#menu-main-menu").height(); jQuery(".main_menu").height(H); } });