jQuery(document).ready(function($){ mainInit(); }); function mainInit(){ $('#contactEmailWrap').html('info@kmswireless.com'); $('#careerEmailWrap').html('jobs@kmswireless.com'); //initialize overlays $('.jobInfo').colorbox(); //initialize nav $('#menu ul').superfish(); //initialize cycles $.fn.cycle.transitions.scrollHorzFade = function($cont, $slides, opts) { $cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts, fwd) { opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW); opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW; }); opts.cssBefore= { opacity: 0, display: 'block' }; opts.animIn = { opacity: 1, left: 0 }; opts.animOut = { opacity: 0 }; }; $('.outer-slider').cycle({ fx: 'scrollHorzFade', speed: 1000, timeout: 10000, pager: '#pageNext', prev: '#prev2', next: '#next2', before: function() { $('#caption').html(this.alt); } }); $('.outer-job-slider').cycle({ fx: 'scrollHorzFade', speed: 700, timeout: 0, pager: '#jobs', prev: '#prev3', next: '#next3', before: function() { $('#caption').html(this.alt); } }); var name = ''; //not sure what this is yet $(".home-roll-box").hover(function() { name = $(this).attr("id"); $("#image-"+name).stop(true, false).show().animate({ opacity: 1 }); }, function() { name = $(this).attr("id"); $("#image-"+name).stop(true, false).animate({ opacity: 0 }).hide(); }); //onblur="" onfocus="if(this.value=='Search')this.value='';" $('#searchBox').blur(function(){ if($(this).val() == ''){ $(this).val('Search'); } }); $('#searchBox').focus(function(){ if($(this).val() == 'Search'){ $(this).val(''); } }); //truncate not sure what $('.trunk').truncate({ width: '103', after: '…', center: true, addclass: false, addtitle: false, }); }