/*
* Jquery Simple Cycle
* Author: Websir.co.uk
*/
			
(function($) {
	//interval variable
	var imageFade;
    $.fn.extend({
	
		simpleCycle: function(options){
			var defaults = {
				duration: 'slow',
				interval: 5000,
				child: 'img',
				eq: 'none'
			};
	
			var options = $.extend(defaults, options);
			
			
			return this.each(function(){
				var obj=$(this).children(options.child);
				var dura = options.duration;
				var inter = options.interval;
				var c=0;
				var eq = options.eq;
				
				if(eq!='none') {
					obj.fadeOut().eq(eq).fadeIn();
				} else {
					
				obj.hide().eq(0).show();

				imageFade=setInterval(function(){
					if(c<obj.length-1) c++; else c=0;
					obj.fadeOut().eq(c).fadeIn()
				}, inter);
				} //end eq
			}); //return		
		}, //function simpleCycle
		
		simpleCycleStop: function(){
			clearInterval(imageFade);
		}
	}); //extend
	
})(jQuery);



//ROTARY
(function(f){f.fn.extend({rotary:function(i){var l={auto:{interval:3E3},changer:"img",control:{ind:false,arrows:false},onstage:{opacity:1},offstage:{opacity:0},ext:{queue:false,duration:500,easing:"swing"},hash:false,mod_class:f(".rot")};i=f.extend(l,i);return this.each(function(){function g(k){e.children(a.changer).animate(a.offstage,{queue:a.ext.queue,easing:a.ext.easing,duration:a.ext.duration}).eq(k).animate(a.onstage,{queue:a.ext.queue,easing:a.ext.easing,duration:a.ext.duration});typeof a.control.ind.onclass== "string"&&a.control.ind.element.removeClass(a.control.ind.onclass).eq(k).addClass(a.control.ind.onclass)}var a=i,e=f(this),h,b=false,c={auto:typeof a.auto,control:typeof a.control,changer:typeof a.changer,ind:typeof a.control.ind,arrows:typeof a.control.arrows,onclass:typeof a.control.ind.onclass};if(e.children(a.changer).length)var j=e.children(a.changer).length-1;if(a.hash&&location.hash){first=location.hash.substr(1);if(first>e.children(a.changer).length)first=e.children(a.changer).length}else first= 1;var d=first-1;if(c.changer=="string"){e.children(a.changer).css(a.offstage).eq(first-1).css(a.onstage);c.onclass=="string"&&a.control.ind.element.removeClass(a.control.ind.onclass).eq(0).addClass(a.control.ind.onclass)}if(c.auto=="object"&&c.changer=="string"){d=first;h=setInterval(function(){g(d);if(d==j)d=0;else d++},a.auto.interval)}if(c.control=="object"&&c.changer=="string"){c.ind=="object"&&a.control.ind.element.bind(a.control.ind.binding,function(){c.auto=="object"&&clearInterval(h);ti=a.control.ind.element.index(this); if(c.arrows=="object")b=ti;g(ti);return false});if(c.arrows=="object"){a.control.arrows.nxt.bind(a.control.arrows.binding,function(){if(c.auto=="object"&&b===false){clearInterval(h);b=d}else{if(b===false)b=a.hash?d:0;if(b==j)b=0;else b++}g(b);return false});a.control.arrows.prv.bind(a.control.arrows.binding,function(){if(c.auto=="object"&&b===false){clearInterval(h);b=d}else{if(b===false)b=a.hash?d:0;if(b==0)b=j;else b--}g(b);return false})}a.mod_class.bind("click",function(){c.auto=="object"&&clearInterval(h); ti=f(this).attr("rel");if(c.arrows=="object")b=ti;g(ti);return false})}})}})})(jQuery);


