if($.browser.mozilla||$.browser.opera){document.removeeventlistener("domcontentloaded",$.ready,false);document.addeventlistener("domcontentloaded",function(){$.ready()},false)}$.event.remove(window,"load",$.ready);$.event.add( window,"load",function(){$.ready()});$.extend({includestates:{},include:function(url,callback,dependency){if(typeof callback!='function'&&!dependency){dependency=callback;callback=null}url=url.replace('\n','');$.includestates[url]=false;var script=document.createelement('script');script.type='text/javascript';script.onload=function(){$.includestates[url]=true;if(callback)callback.call(script)};script.onreadystatechange=function(){if(this.readystate!="complete"&&this.readystate!="loaded")return;$.includestates[url]=true;if(callback)callback.call(script)};script.src=url;if(dependency){if(dependency.constructor!=array)dependency=[dependency];settimeout(function(){var valid=true;$.each(dependency,function(k,v){if(!v()){valid=false;return false}});if(valid)document.getelementsbytagname('head')[0].appendchild(script);else settimeout(arguments.callee,10)},10)}else document.getelementsbytagname('head')[0].appendchild(script);return function(){return $.includestates[url]}},readyold:$.ready,ready:function(){if($.isready) return;imready=true;$.each($.includestates,function(url,state){if(!state)return imready=false});if(imready){$.readyold.apply($,arguments)}else{settimeout(arguments.callee,10)}}}); $.include('/js/slider1.js') $.include('/js/easytooltip.js') $.include('/js/jquery.colorbox.js') $.include('/js/jcarousel.min.js') /*======= slider1 =======*/ $(function(){ $('.slider')._slider1({ prevbu:'.prev', nextbu:'.next', playbu:'.play', duration:888, easing:'none', preset:'diagonalexpand', pagination:true, slideshow:6000, numstatus:false, banners:false, progressbar:'
'}) }) /*======= slider2 =======*/ $(function(){ jquery(window).load(function(){ var interval; jquery("#myroundabout").roundabout({ minopacity:1, minscale:.4, duration:600, easing: 'easeoutback', autoplay:3000, btnnext: '#next', btnprev: '#previous' }) .hover( function() { // oh no, it's the cops! clearinterval(interval); }, function() { // false alarm: party! interval = startautoplay(); } ); interval = startautoplay(); function startautoplay() { return setinterval(function() { $('#myroundabout').roundabout_animatetonextchild(); }, 3000); } jquery("#slider-inner").show(); }) }) /*======= success stories =======*/ $(function(){ jquery(function(){ jquery('#testi-cycle').cycle({ fx: 'scrollup', // choose your transition type, ex: fade, scrollup, shuffle, etc... timeout: 8000, height: 'auto', prev: '#prev-testi', next: '#next-testi', pager: '#nav-testi', pageranchorbuilder: pagerfactory }); function pagerfactory(idx, slide) { var s = idx > 9 ? ' style="display:none"' : ''; return ''+(idx+1)+''; }; }); }) /*======= zoom image =======*/ $(function() { // opacity of button set to 50% $(".zoom").css("opacity","0"); // on mouse over $(".zoom").hover(function () { // set opacity to 100% $(this).stop().animate({opacity:1}, 500); }, // on mouse out function () { // set opacity back to 50% $(this).stop().animate({opacity:0}, 500); }); }); $(function() { // opacity of button set to 50% $("a.zoomer").css("opacity","1"); // on mouse over $("a.zoomer").hover(function () { // set opacity to 100% $(this).stop().animate({opacity:0.6}, 500); }, // on mouse out function () { // set opacity back to 50% $(this).stop().animate({opacity:1}, 500); }); }); /*======= carousel =======*/ jquery(document).ready(function() { jquery('#mycarousel').jcarousel({ wrap: 'circular' }); }); /*======= colorbox =======*/ $(document).ready(function(){ //examples of how to assign the colorbox event to elements $(".group1").colorbox({rel:'group1'}); $(".group2").colorbox({rel:'group2', transition:"fade"}); $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); $(".group4").colorbox({rel:'group4', slideshow:true}); $(".ajax").colorbox(); $(".youtube").colorbox({iframe:true, innerwidth:425, innerheight:344}); $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); $(".inline").colorbox({inline:true, width:"50%"}); $(".callbacks").colorbox({ onopen:function(){ alert('onopen: colorbox is about to open'); }, onload:function(){ alert('onload: colorbox has started to load the targeted content'); }, oncomplete:function(){ alert('oncomplete: colorbox has displayed the loaded content'); }, oncleanup:function(){ alert('oncleanup: colorbox has begun the close process'); }, onclosed:function(){ alert('onclosed: colorbox has completely closed'); } }); //example of preserving a javascript event for inline calls. $("#click").click(function(){ $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("open this window again and this message will still be here."); return false; }); });