if($.browser.mozilla||$.browser.opera ){document.removeEventListener("DOMContentLoaded",jQuery.ready,false);document.addEventListener("DOMContentLoaded",function(){jQuery.ready()},false)} jQuery.event.remove( window, "load", jQuery.ready ); jQuery.event.add( window, "load", function(){jQuery.ready();} ); jQuery.extend({ includeStates:{}, include:function(url,callback,dependency){ if ( typeof callback!='function'&&!dependency){ dependency = callback; callback = null; } url = url.replace('\n', ''); jQuery.includeStates[url] = false; var script = document.createElement('script'); script.type = 'text/javascript'; script.onload = function () { jQuery.includeStates[url] = true; if ( callback ) callback.call(script); }; script.onreadystatechange = function () { if ( this.readyState != "complete" && this.readyState != "loaded" ) return; jQuery.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('body')[0].appendChild(script); else setTimeout(arguments.callee, 10); }, 10); } else document.getElementsByTagName('body')[0].appendChild(script); return function(){ return jQuery.includeStates[url]; } }, readyOld: jQuery.ready, ready: function () { if (jQuery.isReady) return; imReady = true; $.each(jQuery.includeStates, function(url, state) { if (! state) return imReady = false; }); if (imReady) { jQuery.readyOld.apply(jQuery, arguments); } else { setTimeout(arguments.callee, 10); } } }); /************** Include Javascript Files ***************/ $.include('js/superfish.js'); if($('.testimonials').length || $('.pics').length || $('.pics_single').length || $('.single-pics').length) {$.include('js/jquery.cycle.all.min.js');} if($('.zoomer').length) {$.include('fancybox/jquery.fancybox.pack.js');} if($('.workPanelLink').length) {$.include('js/jquery.quicksand.js');} if($('#jstwitter').length) {$.include('js/twitter.js');} /************* Sliders *************/ /* Nivo Slider --> Begin */ if ($('#imageSlider').length) { $.include('sliders/nivo-slider/jquery.nivo.slider.js'); jQuery(window).load(function(){ jQuery('#imageSlider').nivoSlider({ effect:'random', animSpeed:600, startSlide: 0, pauseTime:4000, captionOpacity: 1, pauseOnHover:true, directionNav: false, directionNavHide:false }); }); } /* Nivo Slider --> End */ /* Elegan Accordion Slider --> Begin */ if ($('#accordion').length) { $.include('sliders/elegant-accordion/jquery.elegantAccordion.js'); jQuery(function() { jQuery('#accordion').eAccordion({ easing: 'swing', // Anything other than "linear" or "swing" requires the easing plugin autoPlay: true, // This turns off the entire FUNCTIONALY, not just if it starts running or not startStopped: false, // If autoPlay is on, this can force it to start stopped stopAtEnd: false, // If autoplay is on, it will stop when it reaches the last slide delay: 3000, // How long between slide transitions in AutoPlay mode animationTime: 600, // How long the slide transition takes hashTags: true, // Should links change the hashtag in the URL? pauseOnHover: false, // If true, and autoPlay is enabled, the show will pause on hover width: null, // Override the default CSS width height: null, // Override the default CSS height expandedWidth: '570px' // Width of the expanded slide }); }); } /* Elegan Accordion Slider --> End */ /* Circle Navigation Effect Slider --> Begin */ if($('#cn-slideshow').length) { $.include('sliders/circle-navigation-effect/jquery.tmpl.min.js'); $.include('sliders/circle-navigation-effect/jquery.slideshow.js'); jQuery(function() { jQuery('#cn-slideshow').slideshow(); }); } /* Circle Navigation Effect Slider --> End */ /* Rama Slider --> Begin */ if(jQuery('#example').length) { $('#example').frames_slider({ width:770, height:415, theme:"sport", timer:6000, hidetoolbar:60000000000000 }) } /* Rama Slider --> End */ /* Mosaic --> Begin */ if ($('#sample').length) { $.include('js/jquery.imjqmosaic.0.1.packed.js'); jQuery(function() { $.imJQMosaic({ image:'images/sliders/img_03.jpg', target: 'sample', frameWidth: '755', frameHeight:'415', numberOfTilesX: '11', numberOfTilesY: '6', tileBorder: '1', tileBorderColor: '#fff', tileBorderRadius: '0', effectIntensity: '0.5', effectColor: '#c6e346' }); }); } /* Mosaic --> End */ /* Load Google Fonts --> Begin */ WebFontConfig = { google: {families: ['PT+Sans+Narrow::latin','Oswald::latin','Nova+Square::latin','Lobster::latin']} }; (function() { var wf = document.createElement('script'); wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('body')[0]; s.appendChild(wf, s); })(); /* Load Google Fonts --> End */ /*********************** DOM READY --> Begin ****************************/ jQuery(document).ready(function(){ /* Superfish Menu Plugin --> Begin */ $('#navigation > ul').superfish({ animation: {height:'show'}, delay: 1200 // 1.2 second delay on mouseout }); /* Superfish Menu Plugin --> End */ /* Query data-rel to rel --> Begin */ if ($("a[data-rel]").length) { $('a[data-rel]').each(function() {$(this).attr('rel', $(this).data('rel'));}); } /* Query data-rel to rel --> End */ /* Pics --> Begin */ if (jQuery(".pics").length) { jQuery('.pics').cycle({ fx: 'scrollHorz', timeout: 0, next: '.next', prev: '.prev', easing: 'easeOutQuint' }); } if (jQuery(".single-pics").length) { jQuery('.single-pics').cycle({ fx: 'scrollHorz', timeout: 0, next: '.next', prev: '.prev', easing: 'easeOutQuint' }); } /* Pics --> End */ /* Tables --> Begin */ var $table = $('table.feature-table', this); $('table.feature-table thead tr th:first-child').addClass('leftR'); $('table.feature-table thead tr th:last-child').addClass('rightR'); $table.find('tbody tr:odd').addClass('odd'); /* Tables --> End */ /* Scroll to Top --> Begin */ $('a[href=#top]').click(function(){ $('html, body').animate({scrollTop:0}, 'slow'); return false; }); /* Scroll to Top --> End */ /* Testimonials --> Begin */ if($('.testimonials').length) { function onAfter(curr, next, opts, fwd) { var $ht = $(this).height(); $(this).parent().animate({height: $ht}); } $('.testimonials').cycle({ fx: 'fade', timeout: 8000, height: 'auto', pause: 1, pager: '.testimonial-pager', before: onAfter, cleartypeNoBg: true }); } /* Testimonials --> End */ /* Box close --> Begin */ $notifications_collection = $('.success, .info, .error, .warning'); $notifications_collection.append('×').wrap('