// source --> http://www.chintasutra.com/wp-content/plugins/meteor-slides/js/slideshow.js /* Script for the Meteor Slides 1.5.4 slideshow Copy "slideshow.js" from "/meteor-slides/js/" to your theme's directory to replace the plugin's default slideshow script. Learn more about customizing the slideshow script for Meteor Slides: http://www.jleuze.com/plugins/meteor-slides/customizing-the-slideshow-script/ */ // Set custom shortcut to avoid conflicts var $j = jQuery.noConflict(); $j(document).ready(function() { // Get the slideshow options var $slidespeed = parseInt( meteorslidessettings.meteorslideshowspeed ); var $slidetimeout = parseInt( meteorslidessettings.meteorslideshowduration ); var $slideheight = parseInt( meteorslidessettings.meteorslideshowheight ); var $slidewidth = parseInt( meteorslidessettings.meteorslideshowwidth ); var $slidetransition = meteorslidessettings.meteorslideshowtransition; // Setup jQuery Cycle $j('.meteor-slides').cycle({ cleartypeNoBg: true, fit: 1, fx: $slidetransition, height: $slideheight, next: '#meteor-next', pager: '#meteor-buttons', pagerEvent: 'click', pause: 1, prev: '#meteor-prev', slideExpr: '.mslide', speed: $slidespeed, timeout: $slidetimeout, width: $slidewidth }); // Setup jQuery TouchWipe $j('.meteor-slides').touchwipe({ wipeLeft: function() { $j('.meteor-slides').cycle('next'); }, wipeRight: function() { $j('.meteor-slides').cycle('prev'); }, preventDefaultEvents: false }); // Add class to hide and show prev/next nav on hover $j('.meteor-slides').hover(function () { $j(this).addClass('navhover'); }, function () { $j(this).removeClass('navhover'); }); // Set a fixed height for prev/next nav in IE6 if(typeof document.body.style.maxWidth === 'undefined') { $j('.meteor-nav a').height($slideheight); } // Add align class if set in metadata $j('.meteor-slides').each(function () { meteormetadata = $j(this).metadata(); if (meteormetadata.align == 'left') { $j(this).addClass('meteor-left'); } else if (meteormetadata.align == 'right') { $j(this).addClass('meteor-right'); } else if (meteormetadata.align == 'center') { $j(this).addClass('meteor-center'); } }); }); // source --> http://www.chintasutra.com/wp-content/themes/dd/includes/js/jquery.tools.js /* * jquery.tools 1.1.2 - The missing UI library for the Web * * [tools.tabs-1.0.4, tools.tabs.slideshow-1.0.2, tools.tooltip-1.1.2, tools.tooltip.slide-1.0.0, tools.tooltip.dynamic-1.0.1, tools.scrollable-1.1.2] * * Copyright (c) 2009 Tero Piirainen * http://flowplayer.org/tools/ * * Dual licensed under MIT and GPL 2+ licenses * http://www.opensource.org/licenses * * ----- * * File generated: Mon Oct 12 21:33:38 GMT+00:00 2009 */ (function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery); (function(b){var a=b.tools.tabs;a.plugins=a.plugins||{};a.plugins.slideshow={version:"1.0.2",conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:false,autopause:true,interval:3000,clickable:true,api:false}};b.prototype.slideshow=function(e){var f=b.extend({},a.plugins.slideshow.conf),c=this.length,d;e=b.extend(f,e);this.each(function(){var p=b(this),m=p.tabs(),i=b(m),o=m;b.each(e,function(t,u){if(b.isFunction(u)){m.bind(t,u)}});function n(t){return c==1?b(t):p.parent().find(t)}var s=n(e.next).click(function(){m.next()});var q=n(e.prev).click(function(){m.prev()});var h,j,l,g=false;b.extend(m,{play:function(){if(h){return}var t=b.Event("onBeforePlay");i.trigger(t);if(t.isDefaultPrevented()){return m}g=false;h=setInterval(m.next,e.interval);i.trigger("onPlay");m.next()},pause:function(){if(!h){return m}var t=b.Event("onBeforePause");i.trigger(t);if(t.isDefaultPrevented()){return m}h=clearInterval(h);l=clearInterval(l);i.trigger("onPause")},stop:function(){m.pause();g=true},onBeforePlay:function(t){return m.bind("onBeforePlay",t)},onPlay:function(t){return m.bind("onPlay",t)},onBeforePause:function(t){return m.bind("onBeforePause",t)},onPause:function(t){return m.bind("onPause",t)}});if(e.autopause){var k=m.getTabs().add(s).add(q).add(m.getPanes());k.hover(function(){m.pause();j=clearInterval(j)},function(){if(!g){j=setTimeout(m.play,e.interval)}})}if(e.autoplay){l=setTimeout(m.play,e.interval)}else{m.stop()}if(e.clickable){m.getPanes().click(function(){m.next()})}if(!m.getConf().rotate){var r=e.disabledClass;if(!m.getIndex()){q.addClass(r)}m.onBeforeClick(function(u,t){if(!t){q.addClass(r)}else{q.removeClass(r);if(t==m.getTabs().length-1){s.addClass(r)}else{s.removeClass(r)}}})}});return e.api?d:this}})(jQuery); (function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.2",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery); (function(b){var a=b.tools.tooltip;a.effects=a.effects||{};a.effects.slide={version:"1.0.0"};b.extend(a.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!b.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.tools.tooltip.addEffect("slide",function(d){var f=this.getConf(),g=this.getTip(),h=f.slideFade?{opacity:f.opacity}:{},e=c[f.direction]||c.up;h[e[1]]=e[0]+"="+f.slideOffset;if(f.slideFade){g.css({opacity:0})}g.show().animate(h,f.slideInSpeed,d)},function(e){var g=this.getConf(),i=g.slideOffset,h=g.slideFade?{opacity:0}:{},f=c[g.direction]||c.up;var d=""+f[0];if(g.bounce){d=d=="+"?"-":"+"}h[f[1]]=d+"="+i;this.getTip().animate(h,g.slideOutSpeed,function(){b(this).hide();e.call()})})})(jQuery); (function(d){var c=d.tools.tooltip;c.plugins=c.plugins||{};c.plugins.dynamic={version:"1.0.1",conf:{api:false,classNames:"top right bottom left"}};function b(h){var e=d(window);var g=e.width()+e.scrollLeft();var f=e.height()+e.scrollTop();return[h.offset().top<=e.scrollTop(),g<=h.offset().left+h.width(),f<=h.offset().top+h.height(),e.scrollLeft()>=h.offset().left]}function a(f){var e=f.length;while(e--){if(f[e]){return false}}return true}d.fn.dynamic=function(g){var h=d.extend({},c.plugins.dynamic.conf),f;if(typeof g=="number"){g={speed:g}}g=d.extend(h,g);var e=g.classNames.split(/\s/),i;this.each(function(){if(d(this).tooltip().jquery){throw"Lazy feature not supported by dynamic plugin. set lazy: false for tooltip"}var j=d(this).tooltip().onBeforeShow(function(n,o){var m=this.getTip(),l=this.getConf();if(!i){i=[l.position[0],l.position[1],l.offset[0],l.offset[1],d.extend({},l)]}d.extend(l,i[4]);l.position=[i[0],i[1]];l.offset=[i[2],i[3]];m.css({visibility:"hidden",position:"absolute",top:o.top,left:o.left}).show();var k=b(m);if(!a(k)){if(k[2]){d.extend(l,g.top);l.position[0]="top";m.addClass(e[0])}if(k[3]){d.extend(l,g.right);l.position[1]="right";m.addClass(e[1])}if(k[0]){d.extend(l,g.bottom);l.position[0]="bottom";m.addClass(e[2])}if(k[1]){d.extend(l,g.left);l.position[1]="left";m.addClass(e[3])}if(k[0]||k[2]){l.offset[0]*=-1}if(k[1]||k[3]){l.offset[1]*=-1}}m.css({visibility:"visible"}).hide()});j.onShow(function(){var l=this.getConf(),k=this.getTip();l.position=[i[0],i[1]];l.offset=[i[2],i[3]]});j.onHide(function(){var k=this.getTip();k.removeClass(g.classNames)});f=j});return g.api?f:this}})(jQuery); (function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var c;function a(o,m){var r=this,p=b(this),d=!m.vertical,e=o.children(),k=0,i;if(!c){c=r}b.each(m,function(s,t){if(b.isFunction(t)){p.bind(s,t)}});if(e.length>1){e=b(m.items,o)}function l(t){var s=b(t);return m.globalNav?s:o.parent().find(t)}o.data("finder",l);var f=l(m.prev),h=l(m.next),g=l(m.prevPage),n=l(m.nextPage);b.extend(r,{getIndex:function(){return k},getClickIndex:function(){var s=r.getItems();return s.index(s.filter("."+m.activeClass))},getConf:function(){return m},getSize:function(){return r.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/m.size)},getPageIndex:function(){return Math.ceil(k/m.size)},getNaviButtons:function(){return f.add(h).add(g).add(n)},getRoot:function(){return o},getItemWrap:function(){return e},getItems:function(){return e.children(m.item)},getVisibleItems:function(){return r.getItems().slice(k,k+m.size)},seekTo:function(s,w,t){if(s<0){s=0}if(k===s){return r}if(b.isFunction(w)){t=w}if(s>r.getSize()-m.size){return m.loop?r.begin():this.end()}var u=r.getItems().eq(s);if(!u.length){return r}var v=b.Event("onBeforeSeek");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}if(w===undefined||b.isFunction(w)){w=m.speed}function x(){if(t){t.call(r,s)}p.trigger("onSeek",[s])}if(d){e.animate({left:-u.position().left},w,m.easing,x)}else{e.animate({top:-u.position().top},w,m.easing,x)}c=r;k=s;v=b.Event("onStart");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}f.add(g).toggleClass(m.disabledClass,s===0);h.add(n).toggleClass(m.disabledClass,s>=r.getSize()-m.size);return r},move:function(u,t,s){i=u>0;return this.seekTo(k+u,t,s)},next:function(t,s){return this.move(1,t,s)},prev:function(t,s){return this.move(-1,t,s)},movePage:function(w,v,u){i=w>0;var s=m.size*w;var t=k%m.size;if(t>0){s+=(w>0?-t:m.size-t)}return this.move(s,v,u)},prevPage:function(t,s){return this.movePage(-1,t,s)},nextPage:function(t,s){return this.movePage(1,t,s)},setPage:function(t,u,s){return this.seekTo(t*m.size,u,s)},begin:function(t,s){i=false;return this.seekTo(0,t,s)},end:function(t,s){i=true;var u=this.getSize()-m.size;return u>0?this.seekTo(u,t,s):r},reload:function(){p.trigger("onReload");return r},focus:function(){c=r;return r},click:function(u){var v=r.getItems().eq(u),s=m.activeClass,t=m.size;if(u<0||u>=r.getSize()){return r}if(t==1){if(m.loop){return r.next()}if(u===0||u==r.getSize()-1){i=(i===undefined)?true:!i}return i===false?r.prev():r.next()}if(t==2){if(u==k){u--}r.getItems().removeClass(s);v.addClass(s);return r.seekTo(u,time,fn)}if(!v.hasClass(s)){r.getItems().removeClass(s);v.addClass(s);var x=Math.floor(t/2);var w=u-x;if(w>r.getSize()-t){w=r.getSize()-t}if(w!==u){return r.seekTo(w)}}return r},bind:function(s,t){p.bind(s,t);return r},unbind:function(s){p.unbind(s);return r}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(s,t){r[t]=function(u){return r.bind(t,u)}});f.addClass(m.disabledClass).click(function(){r.prev()});h.click(function(){r.next()});n.click(function(){r.nextPage()});if(r.getSize() http://www.chintasutra.com/wp-content/themes/dd/includes/js/jcarousellite.js /** * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget. * @requires jQuery v1.2 or above * * http://gmarwaha.com/jquery/jcarousellite/ * * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Version: 1.0.1 * Note: Requires jquery 1.2 or above from version 1.0.1 **/ /** * Creates a carousel-style navigation widget for images/any-content from a simple HTML markup. * * The HTML markup that is used to build the carousel can be as simple as... * * * * As you can see, this snippet is nothing but a simple div containing an unordered list of images. * You don't need any special "class" attribute, or a special "css" file for this plugin. * I am using a class attribute just for the sake of explanation here. * * To navigate the elements of the carousel, you need some kind of navigation buttons. * For example, you will need a "previous" button to go backward, and a "next" button to go forward. * This need not be part of the carousel "div" itself. It can be any element in your page. * Lets assume that the following elements in your document can be used as next, and prev buttons... * * * * * Now, all you need to do is call the carousel component on the div element that represents it, and pass in the * navigation buttons as options. * * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev" * }); * * That's it, you would have now converted your raw div, into a magnificient carousel. * * There are quite a few other options that you can use to customize it though. * Each will be explained with an example below. * * @param an options object - You can specify all the options shown below as an options object param. * * @option btnPrev, btnNext : string - no defaults * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev" * }); * @desc Creates a basic carousel. Clicking "btnPrev" navigates backwards and "btnNext" navigates forward. * * @option btnGo - array - no defaults * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * btnGo: [".0", ".1", ".2"] * }); * @desc If you don't want next and previous buttons for navigation, instead you prefer custom navigation based on * the item number within the carousel, you can use this option. Just supply an array of selectors for each element * in the carousel. The index of the array represents the index of the element. What i mean is, if the * first element in the array is ".0", it means that when the element represented by ".0" is clicked, the carousel * will slide to the first element and so on and so forth. This feature is very powerful. For example, i made a tabbed * interface out of it by making my navigation elements styled like tabs in css. As the carousel is capable of holding * any content, not just images, you can have a very simple tabbed navigation in minutes without using any other plugin. * The best part is that, the tab will "slide" based on the provided effect. :-) * * @option mouseWheel : boolean - default is false * @example * $(".carousel").jCarouselLite({ * mouseWheel: true * }); * @desc The carousel can also be navigated using the mouse wheel interface of a scroll mouse instead of using buttons. * To get this feature working, you have to do 2 things. First, you have to include the mouse-wheel plugin from brandon. * Second, you will have to set the option "mouseWheel" to true. That's it, now you will be able to navigate your carousel * using the mouse wheel. Using buttons and mouseWheel or not mutually exclusive. You can still have buttons for navigation * as well. They complement each other. To use both together, just supply the options required for both as shown below. * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * mouseWheel: true * }); * * @option auto : number - default is null, meaning autoscroll is disabled by default * @example * $(".carousel").jCarouselLite({ * auto: 800, * speed: 500 * }); * @desc You can make your carousel auto-navigate itself by specfying a millisecond value in this option. * The value you specify is the amount of time between 2 slides. The default is null, and that disables auto scrolling. * Specify this value and magically your carousel will start auto scrolling. * * @option speed : number - 200 is default * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * speed: 800 * }); * @desc Specifying a speed will slow-down or speed-up the sliding speed of your carousel. Try it out with * different speeds like 800, 600, 1500 etc. Providing 0, will remove the slide effect. * * @option easing : string - no easing effects by default. * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * easing: "bounceout" * }); * @desc You can specify any easing effect. Note: You need easing plugin for that. Once specified, * the carousel will slide based on the provided easing effect. * * @option vertical : boolean - default is false * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * vertical: true * }); * @desc Determines the direction of the carousel. true, means the carousel will display vertically. The next and * prev buttons will slide the items vertically as well. The default is false, which means that the carousel will * display horizontally. The next and prev items will slide the items from left-right in this case. * * @option circular : boolean - default is true * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * circular: false * }); * @desc Setting it to true enables circular navigation. This means, if you click "next" after you reach the last * element, you will automatically slide to the first element and vice versa. If you set circular to false, then * if you click on the "next" button after you reach the last element, you will stay in the last element itself * and similarly for "previous" button and first element. * * @option visible : number - default is 3 * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * visible: 4 * }); * @desc This specifies the number of items visible at all times within the carousel. The default is 3. * You are even free to experiment with real numbers. Eg: "3.5" will have 3 items fully visible and the * last item half visible. This gives you the effect of showing the user that there are more images to the right. * * @option start : number - default is 0 * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * start: 2 * }); * @desc You can specify from which item the carousel should start. Remember, the first item in the carousel * has a start of 0, and so on. * * @option scrool : number - default is 1 * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * scroll: 2 * }); * @desc The number of items that should scroll/slide when you click the next/prev navigation buttons. By * default, only one item is scrolled, but you may set it to any number. Eg: setting it to "2" will scroll * 2 items when you click the next or previous buttons. * * @option beforeStart, afterEnd : function - callbacks * @example * $(".carousel").jCarouselLite({ * btnNext: ".next", * btnPrev: ".prev", * beforeStart: function(a) { * alert("Before animation starts:" + a); * }, * afterEnd: function(a) { * alert("After animation ends:" + a); * } * }); * @desc If you wanted to do some logic in your page before the slide starts and after the slide ends, you can * register these 2 callbacks. The functions will be passed an argument that represents an array of elements that * are visible at the time of callback. * * * @cat Plugins/Image Gallery * @author Ganeshji Marwaha/ganeshread@gmail.com **/ (function($) { // Compliant with jquery.noConflict() $.fn.jCarouselLite = function(o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, visible: 1, start: 0, scroll: 1, beforeStart: null, afterEnd: null }, o || {}); return this.each(function() { // Returns the element collection. Chainable. var running = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width"; var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible; if (o.circular) { ul.prepend(tLi.slice(tl - v - 1 + 1).clone()) .append(tLi.slice(0, v).clone()); o.start += v; } var li = $("li", ul), itemLength = li.size(), curr = o.start; $(".bt1").addClass("current"); //JBarlow// Sets external control highlight to slide in current position at start div.css("visibility", "visible"); li.css({ overflow: "hidden", float: o.vertical ? "none" : "left" }); ul.css({ margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1" }); div.css({ overflow: "hidden", position: "relative", "z-index": "2", left: "0px" }); var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) var divSize = liSize * v; // size of entire div(total length for just the visible items) li.css({ width: li.width(), height: li.height() }); ul.css(sizeCss, ulSize + "px").css(animCss, -(curr * liSize)); div.css(sizeCss, divSize + "px"); // Width of the DIV. length of visible images if (o.btnPrev) $(o.btnPrev).click(function() { return go(curr - o.scroll); }); if (o.btnNext) $(o.btnNext).click(function() { return go(curr + o.scroll); }); if (o.btnGo) $.each(o.btnGo, function(i, val) { $(val).click(function() { $("#featured-controls li").removeClass("current"); //JBarlow// Remove active class from all external control buttons $(this).addClass("current"); //JBarlow// Add active class to current button running = false; return go(o.circular ? o.visible + i : i); }); }); if (o.mouseWheel && div.mousewheel) div.mousewheel(function(e, d) { return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll); }); //If the Pause option is set, toggle the paused class for the selector given if (o.pause) { $("#CarouselPlayPause").click(function() { if ($("#CarouselPlayPause").hasClass("paused")) { $(o.pause).removeClass("paused"); } else { $(o.pause).addClass("paused"); } }); } if (o.auto) setInterval(function() { running = checkIfPaused(o); go(curr + o.scroll); }, o.auto + o.speed); function vis() { return li.slice(curr).slice(0, v); }; //Check to see if the Animation has been paused or not function checkIfPaused(o) { if ($(o.pause).hasClass("paused")) { return true; } else { return false; } }; function go(to) { if (!running) { if (o.beforeStart) { o.beforeStart.call(this, vis()); } if (o.circular) { // If circular we are in first or last, then goto the other end if (to <= o.start - v - 1) { // If first, then goto last ul.css(animCss, -((itemLength - (v * 2)) * liSize) + "px"); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. curr = to == o.start - v - 1 ? itemLength - (v * 2) - 1 : itemLength - (v * 2) - o.scroll; } else if (to >= itemLength - v + 1) { // If last, then goto first ul.css(animCss, -((v) * liSize) + "px"); // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. curr = to == itemLength - v + 1 ? v + 1 : v + o.scroll; } else { curr = to; } } else { // If non-circular and to points to first or last, we just return. if (to < 0 || to > itemLength - v) { return; } else { curr = to; } } // If neither overrides it, the curr will still be "to" and we can proceed. running = true; ul.animate( animCss == "left" ? { left: -(curr * liSize)} : { top: -(curr * liSize) }, o.speed, o.easing, function() { if (o.afterEnd) o.afterEnd.call(this, vis()); running = false; } ); if (to > tl) { $("#featured-controls li").removeClass("current"); //JBarlow// Remove active class from all external control buttons $(".bt" + (to - tl)).addClass("current"); //JBarlow// Add active class to current button } else { $("#featured-controls li").removeClass("current"); //JBarlow// Remove active class from all external control buttons $(".bt" + to).addClass("current"); //JBarlow// Add active class to current button } // Disable buttons when the carousel reaches the last/first, and enable when not if (!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $((curr - o.scroll < 0 && o.btnPrev) || (curr + o.scroll > itemLength - v && o.btnNext) || [] ).addClass("disabled"); } } return false; }; }); }; function css(el, prop) { return parseInt($.css(el[0], prop)) || 0; }; function width(el) { return el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight'); }; function height(el) { return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom'); }; })(jQuery); // source --> http://www.chintasutra.com/wp-content/themes/dd/includes/js/superfish.js /* * Superfish v1.4.8 - jQuery menu widget * Copyright (c) 2008 Joel Birch * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt */ ;(function($){ $.fn.superfish = function(op){ var sf = $.fn.superfish, c = sf.c, $arrow = $([' »'].join('')), over = function(){ var $$ = $(this), menu = getMenu($$); clearTimeout(menu.sfTimer); $$.showSuperfishUl().siblings().hideSuperfishUl(); }, out = function(){ var $$ = $(this), menu = getMenu($$), o = sf.op; clearTimeout(menu.sfTimer); menu.sfTimer=setTimeout(function(){ o.retainPath=($.inArray($$[0],o.$path)>-1); $$.hideSuperfishUl(); if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} },o.delay); }, getMenu = function($menu){ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; sf.op = sf.o[menu.serial]; return menu; }, addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; return this.each(function() { var s = this.serial = sf.o.length; var o = $.extend({},sf.defaults,op); o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ $(this).addClass([o.hoverClass,c.bcClass].join(' ')) .filter('li:has(ul)').removeClass(o.pathClass); }); sf.o[s] = sf.op = o; $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { if (o.autoArrows) addArrow( $('>a:first-child',this) ); }) .not('.'+c.bcClass) .hideSuperfishUl(); var $a = $('a',this); $a.each(function(i){ var $li = $a.eq(i).parents('li'); $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); }); o.onInit.call(this); }).each(function() { var menuClasses = [c.menuClass]; if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); $(this).addClass(menuClasses.join(' ')); }); }; var sf = $.fn.superfish; sf.o = []; sf.op = {}; sf.IE7fix = function(){ var o = sf.op; if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off'); }; sf.c = { bcClass : 'sf-breadcrumb', menuClass : 'sf-js-enabled', anchorClass : 'sf-with-ul', arrowClass : 'sf-sub-indicator', shadowClass : 'sf-shadow' }; sf.defaults = { hoverClass : 'sfHover', pathClass : 'overideThisToUse', pathLevels : 1, delay : 800, animation : {opacity:'show'}, speed : 'normal', autoArrows : true, dropShadows : true, disableHI : false, // true disables hoverIntent detection onInit : function(){}, // callback functions onBeforeShow: function(){}, onShow : function(){}, onHide : function(){} }; $.fn.extend({ hideSuperfishUl : function(){ var o = sf.op, not = (o.retainPath===true) ? o.$path : ''; o.retainPath = false; var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) .find('>ul').hide().css('visibility','hidden'); o.onHide.call($ul); return this; }, showSuperfishUl : function(){ var o = sf.op, sh = sf.c.shadowClass+'-off', $ul = this.addClass(o.hoverClass) .find('>ul:hidden').css('visibility','visible'); sf.IE7fix.call($ul); o.onBeforeShow.call($ul); $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); return this; } }); })(jQuery); // source --> http://www.chintasutra.com/wp-content/themes/dd/includes/js/custom.js jQuery(document).ready(function(){ // News Ticker var ticker = function() { setTimeout(function(){ $('#ticker li:first').animate( {marginTop: '-28px'}, 800, function() { $(this).detach().appendTo('ul#ticker').removeAttr('style'); }); ticker(); }, 4000); }; ticker(); // Featured Rotator $( '.slider-tabs' ).tabs( '.slides > div', { effect: 'fade', fadeOutSpeed: "slow", rotate: true }).slideshow({ autoplay: true, clickable: false, interval: 6000 }); // Breaking News var ticker = function() { setTimeout(function(){ $('#breaking_news li:first').animate( {marginTop: '-28px'}, 800, function() { $(this).detach().appendTo('ul#breaking_news').removeAttr('style'); }); ticker(); }, 4000); }; ticker(); // Tabbed News $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content $("ul.tabs li").click(function() { //On Click Event $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active content return false; }); // jQuery Superfish menu $('ul.topnav').superfish({ delay: 100, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation speed: 'fast', // faster animation speed }); $('ul.nav').superfish({ delay: 100, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation speed: 'fast', // faster animation speed }); }); // source --> http://www.chintasutra.com/wp-content/plugins/bangla-date-display/bncalendar.inc.js //Bangla calendar added to "Basic Calendar Java Script" -By Brian Gosselin @ http://scriptasylum.com //and Bangla calendar created by Uttam Singha @ http://www.usingha.com var mn = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; function buildCal(m, y, cM, cH, cDW, cD, brdr){ var bnum=['১'] var dim=[31,0,31,30,31,30,31,31,30,31,30,31]; var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when current day is 31st oD.setTime(oD.getTime() + (oD.getTimezoneOffset() + 360) * 60 * 1000); var bcal = Bangla_Date(y, m, 25); var bcal1 = Bangla_Date(y, m, 10); oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is 31st var byy = (m == 4) ? convert((bcal[0]-1)) + ' ' + convert(bcal[0]) : convert(bcal[0]); var todaydate = new Date() //DD added todaydate.setTime(todaydate.getTime() + (todaydate.getTimezoneOffset() + 360) * 60 * 1000); var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28; var t='
'; t+=''; t+=''; for(s=0;s<7;s++)t+=''; t+=''; for(i=1;i<=42;i++){ var x=((i-oD.od>=0)&&(i-oD.od' + convert(indcal[2]) + '' : convert(indcal[2]) var xj=((i-oD.od>=0)&&(i-oD.od' //DD added t+=''; if(((i)%7==0)&&(i<36))t+=''; } return t+='
'+beng_bc_month_name[bcal1[1]]+''+ byy + '' + beng_bc_month_name[bcal[1]] + '
'+mn[m-1]+' - '+y+'
রবি সোমমঙ্গলবুধবৃহঃশুক্রশনি
'+"SMTWTFS".substr(s,1)+'
'+x+'
' + xj + '
'; } var beng_bc_month_name = new Array; beng_bc_month_name[1] = "বৈশাখ"; beng_bc_month_name[2] = "জ্যৈষ্ঠ"; beng_bc_month_name[3] = "আষাঢ়"; beng_bc_month_name[4] = "শ্রাবণ"; beng_bc_month_name[5] = "ভাদ্র"; beng_bc_month_name[6] = "আশ্বিন"; beng_bc_month_name[7] = "কার্তিক"; beng_bc_month_name[8] = "অগ্রহায়ন"; beng_bc_month_name[9] = "পৌষ"; beng_bc_month_name[10] = "মাঘ"; beng_bc_month_name[11] = "ফাল্গুন"; beng_bc_month_name[12] = "চৈত্র"; var bbc_month_len = ""; var Weekbc_days = new Array( "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); var bWeekbc_days = new Array("রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি", "রবি"); var bWeekbc_days1 = new Array("রবি", "সোম", "মঙ্গল", "বুধ", "বৃহ:", "শুক্র", "শনি", "রবি"); function convert(str) { var mystr =str.toString(); var outj; // javascript escaped hex var outj1; var be = new Array(); be['1'] = "\u09E7"; be['2'] = "\u09E8"; be['3'] = "\u09E9"; be['4'] = "\u09EA"; be['5'] = "\u09EB"; be['6'] = "\u09EC"; be['7'] = "\u09ED"; be['8'] = "\u09EE"; be['9'] = "\u09EF"; be['0'] = "\u09E6"; be[' '] = ''; be['-'] = '-'; outj1=""; for(var i=0; i= ps) && (nJD <= Math.floor(ns) + 1.75)) { bebc_month = i + 1; beday = Math.floor(nJD - ps) + 1; //bbc_month_len =Math.floor(ns) + 0.5; } } var array = []; for (var i = 0; i < 12; i++) { lastday = mesh + mas_len[i]; var nda = new Date(calData(lastday + 1).toDateString()); array.push((nda.getMonth()+1) + "/" + nda.getDate() + "/" + nda.getFullYear()); } bbc_month_len = array.join(","); //var bar = Math.floor(nJD + 0.5) % 7 + 1; //str = convert(beday) + " " + beng_bc_month_name[bebc_month] + " " + convert(lasteyear + 1) + " বঙ্গাব্দ, " + Weekebc_days[bar] + "বার।"; } //return str; return new Array(lasteyear + 1, bebc_month, beday); } function oneDay() { var now = new Date(); now.setTime(now.getTime() + (now.getTimezoneOffset() + 360) * 60 * 1000); var eday= now.getDate(); var ebc_month = now.getMonth(); var eyear = now.getFullYear(); var bcal = Bangla_Date(eyear, ebc_month + 1, eday); var nJD = ModernDate_to_Julianeday(eyear, ebc_month + 1, eday); var bar = Math.floor(nJD + 0.5) % 7 + 1; var str = convert(bcal[2]) + " " + beng_bc_month_name[bcal[1]] + " " + convert((bcal[0])) + " বঙ্গাব্দ, " + bWeekbc_days[bar] + "বার।"; return str; } function formSubmit() { var todaydate = new Date(); todaydate.setTime(todaydate.getTime() + (todaydate.getTimezoneOffset() + 360) * 60 * 1000); var curyear=todaydate.getFullYear(); var myyear; if ((document.bdcalendar.myear.value)<595) { myyear =curyear;} else {myyear=document.bdcalendar.myear.value;} var bdcal=""; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='' ; bdcal+='
' + buildCal(1, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(2, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(3, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '
' + buildCal(4, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(5, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(6, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '
' + buildCal(7, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(8, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(9, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '
' + buildCal(10, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(11, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '' + buildCal(12, myyear, "bc_main", "bc_month", "bc_bc_daysofweek", "bc_days", 1) + '
' ; document.all.vvv.innerHTML=bdcal; } //------------------------------------------------------------------------------------------ // Calendar day from Julian Day //------------------------------------------------------------------------------------------ function calData(jd) { with(Math){ z1 = jd + 0.5; z2 = floor(z1); f = z1 - z2; if(z2 < 2299161)a = z2; else { alf = floor((z2 - 1867216.25)/36524.25); a = z2 + 1 + alf - floor(alf/4); } b = a + 1524; c = floor((b - 122.1)/365.25); d = floor(365.25*c); e = floor((b - d)/30.6001); bc_days = b - d - floor(30.6001*e) + f; kday = floor(bc_days); if(e < 13.5)kmon = e - 1; else kmon = e - 13; if(kmon > 2.5)kyear = c - 4716; if(kmon < 2.5)kyear = c - 4715; hh1 = (bc_days - kday)*24; khr = floor(hh1); kmin = hh1 - khr; ksek = kmin*60; kmin = floor(ksek); ksek = floor((ksek - kmin)*60); if (kday < 10)kday = " " + kday; if (khr < 10)khr = "0" + khr; if (kmin < 10)kmin = "0" + kmin; if (ksek < 10)ksek = "0" + ksek; var dstr = mn[kmon - 1] + " " + kday + ", " + kyear + " " + khr + ":" + kmin + ":00"; //var sDate = new Date(Date.parse("03/20/2012", "MM/dd/yyyy")); s = new Date(dstr); } return s; } function BanglaMas() { var dynTable = ""; var now = new Date(); now.setTime(now.getTime() + (now.getTimezoneOffset() + 360) * 60 * 1000); var day = now.getDate(); var bc_month = now.getMonth(); var year = now.getFullYear(); var bcal = Bangla_Date(year, bc_month + 1, day); var mesh = 1938094.4629 + (bcal[0] - 1) * 365.2587564814815; var bar = calData(mesh + mas_len[bcal[1] - 1] + 1); var startingDay = bar.getDay(); var one_day = 1000 * 60 * 60 * 24; var mr = bbc_month_len.split(","); var diff = Math.ceil((new Date(mr[bcal[1]]) - new Date(mr[bcal[1] - 1])) / (one_day)); var bc_monthLength = diff; //bcal[2] var html = ''; html += ''; html += ''; for (var i = 0; i <= 6; i++) { html += ''; } html += ''; var day = 1; // this loop is for is weeks (rows) for (var i = 0; i < 9; i++) { // this loop is for weekbc_days (cells) for (var j = 0; j <= 6; j++) { html += ''; } // stop making rows if we've run out of bc_days if (day > bc_monthLength) { break; } else { html += ''; } } html += '
'; html += beng_bc_month_name[bcal[1]] + " " + convert((bcal[0])) + " বঙ্গাব্দ"; html += '
'; html += bWeekbc_days1[i]; html += '
'; if (day <= bc_monthLength && (i > 0 || j >= startingDay)) { if (day == bcal[2]) //DD added { html += 'আজ
' + convert(day) + '
'; //DD added } else { html += convert(day) + '
'; } day++; } html += '
'; return html; };