/* this prevents dom flickering, needs to be outside of dom.ready event: */
document.documentElement.className += ' js_active ';
/*end dom flickering =) */

$(document).ready(function(){
						   
	//activates the prettyphoto lightbox
	if(jQuery.fn.avia_activate_lightbox)		
	jQuery('body').avia_activate_lightbox();
	
	// activates the toggle shortcode
	if($.fn.avia_sc_toggle)
	$('.togglecontainer').avia_sc_toggle();
	
	// activates the tabs shortcode
	if($.fn.avia_sc_tabs)
	$('.tabcontainer').avia_sc_tabs();
	
	dropdown_menu(); // dropdown menu
	
	// royal slider
	$('#image-gallery').royalSlider({
		captionShowEffects:["fade"],
		controlNavThumbs:true,		
		imageAlignCenter:true,
		directionNavEnabled: true,
		welcomeScreenEnabled:false,
		hideArrowOnLastSlide:true,
		slideshowEnabled: true,                  
    	slideshowPauseOnHover: true,            
    	slideshowAutoStart:false,  
		controlNavThumbsNavigation:false
	});	 
	
	// flickr stream	
	$('.flickr').jflickrfeed({
		limit: 9,
		qstrings: {
			id: '32234084@N04'
		},
		itemTemplate: '<li><a href="{{image_b}}"><img src="{{image_s}}" alt="{{title}}" /></a></li>'
	});
	
	/*
	var canvas = document.createElement('canvas'), 
	ctx = canvas.getContext('2d'), 
	width = canvas.width = document.documentElement.clientWidth, 
	height = canvas.height = window.innerHeight, 
	particles = [], 
	mouseX = 0; 
	
	canvas.setAttribute("id", "snow-canvas");
	var wrapper = document.getElementsByClassName('wrapper_shadow')[0];
	wrapper.appendChild(canvas);
	document.addEventListener("mousemove", onMouseMove); 

	setInterval(loop, 1000/30); 
	
	function loop() { 

		var particle = new Particle();
		particles.push(particle); 
		
		//ctx.globalCompositeOperation = 'source-over'; 
		ctx.fillStyle = "rgba(0,0,0,0.1)"; 
		ctx.clearRect(0,0,width, height); 
		
		//ctx.globalCompositeOperation = 'lighter'; 
		for(var i=0;i<particles.length;i++){
			particles[i].update(); 
		}
		
		while(particles.length>200) particles.shift(); 
	}
	
	function onMouseMove(e) { 
		mouseX = e.clientX;
	}
	
	function Particle() { 
		
		this.x = randomRange(0,width); 
		this.y = 0; 
		this.velX = randomRange(-1,1); 
		this.velY = randomRange(1,2); 
		var z = randomRange(-200,200); 
		
		this.scale = 250/(250+z); 
		this.shrink = 0.96;
		this.colour = "white";
		
		this.update = function () {
			ctx.fillStyle = this.colour;
			
			var tempscale = this.scale; 
			ctx.font = Math.round(tempscale*14) + "pt Arial"; 
			ctx.fillText("❄", this.x, this.y); 
			
			var wind = ((width/2) - mouseX ) * 0.01; 
			
			this.x+=((this.velX+wind) * this.scale);
			this.y+=(this.velY * this.scale);
			
			if(this.x<0) this.x = width; 
			else if(this.x>width) this.x = 0; 
			
		};
	}
	
	function randomRange(min, max) { 
		return Math.random() * (max-min) + min; 
	}
	*/
});
	
// equalHeights
$.fn.equalHeights = function() {
	return this.height(Math.max.apply(null, this.map(function() {
           return $(this).height()
        }).get()
    ));
};



// -------------------------------------------------------------------------------------------
// Dropdown Menu
// -------------------------------------------------------------------------------------------
function dropdown_menu() {

	$("nav ul a").removeAttr('title');
	$("nav ul ul").css({display: "none"}); // Opera Fix
	
	// remove the last border from category menu item if there are 7 items, that border is not needed
	if($("nav > ul > li").length >= 7){
		$("nav > ul > li:last").addClass("noborder");
	}

	// set equal height for all category main items, in case a description is too long
	var mainitem = $("nav > ul > li > a");
	mainitem.each(function(){
		if($(this).height() < 34){
			$(this).css({height:"34px"});
		}
	});
	mainitem.equalHeights();

	//smooth drop downs
	$("nav ul li").each(function(){	
		
		var $sublist = $(this).find('ul:first');
		
		$(this).hover(function() {	
			$sublist.stop().css({overflow:"hidden", height:"auto", display:"none"}).slideDown(400, function(){
				$(this).css({overflow:"visible", height:"auto"});
			});	
		},
		function()
		{	
			$sublist.stop().slideUp(400, function()
			{	
				$(this).css({overflow:"hidden", display:"none"});
			});
		});	
	});
}

// -------------------------------------------------------------------------------------------
// Tab shortcode javascript
// -------------------------------------------------------------------------------------------
(function($)
{
	$.fn.avia_sc_tabs= function(options) 
	{
		var defaults = 
		{
			heading: '.tab',
			content: '.tab_content'
		};
		
		var options = $.extend(defaults, options);
	
		return this.each(function()
		{
			var container = $(this),
				tabs = $(options.heading, container),
				content = $(options.content, container),
				initialOpen = 1;
			
			// sort tabs
			
			if(tabs.length < 2) return;
			
			if(container.is('.tab_initial_open'))
			{
				var myRegexp = /tab_initial_open__(\d+)/;
				var match = myRegexp.exec(container[0].className);
				
				if(match != null && parseInt(match[1]) > 0)
				{
					initialOpen = parseInt(match[1]);
				}
			}
			
			if(!initialOpen || initialOpen > tabs.length) initialOpen = 1;
			
			tabs.prependTo(container).each(function(i)
			{
				var tab = $(this);
				
				//set default tab to open
					if(initialOpen == (i+1))
					{
						tab.addClass('active_tab');
						content.filter(':eq('+i+')').addClass('active_tab_content');
					}
			
				tab.bind('click', function()
				{
					if(!tab.is('.active_tab'))
					{
						$('.active_tab', container).removeClass('active_tab');
						$('.active_tab_content', container).removeClass('active_tab_content');
						
						tab.addClass('active_tab');
						content.filter(':eq('+i+')').addClass('active_tab_content');
					}
					return false;
				});
			});
		
		});
	};
})(jQuery);


// -------------------------------------------------------------------------------------------
// Toggle shortcode javascript
// -------------------------------------------------------------------------------------------
(function($)
{
	$.fn.avia_sc_toggle = function(options) 
	{
		var defaults = 
		{
			heading: '.toggler',
			content: '.toggle_wrap'
		};
		
		var options = $.extend(defaults, options);
	
		return this.each(function()
		{
			var container = $(this),
				heading   = $(options.heading, container),
				allContent = $(options.content, container),
				initialOpen = '';
			
			//check if the container has the class toggle initial open. 
			// if thats the case extract the number from the following class and open that toggle	
			if(container.is('.toggle_initial_open'))
			{
				var myRegexp = /toggle_initial_open__(\d+)/;
				var match = myRegexp.exec(container[0].className);
				
				if(match != null && parseInt(match[1]) > 0)
				{
					initialOpen = parseInt(match[1]);
				}
			}	
			
			heading.each(function(i)
			{
				var thisheading =  $(this),
					content = thisheading.next(options.content, container);
				
				if(initialOpen == (i+1)) { content.css({display:'block'}); }
				
					
				if(content.is(':visible'))
				{
					thisheading.addClass('activeTitle');
				}
				
				thisheading.bind('click', function()
				{	
					if(content.is(':visible'))
					{
						content.slideUp(300);
						thisheading.removeClass('activeTitle');
					}
					else
					{
						if(container.is('.toggle_close_all'))
						{
							allContent.slideUp(300);
							heading.removeClass('activeTitle');
						}
						content.slideDown(300);
						thisheading.addClass('activeTitle');
					}
				});
			});
		});
	};
})(jQuery);

// -------------------------------------------------------------------------------------------
// Ligthbox activation
// -------------------------------------------------------------------------------------------

(function($)
{
	$.fn.avia_activate_lightbox = function(variables) 
	{
		var defaults = 
		{
			autolinkElements: 'a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="screenr.com"]'
		};
		
		var options = $.extend(defaults, variables);
		
		return this.each(function()
		{
			var elements = $(options.autolinkElements, this).not('.noLightbox, .noLightbox a'),
				lastParent = "",
				counter = 0;
		
			elements.each(function()
			{
				var el = $(this),
					parentPost = el.parents('.post-entry:eq(0)'),
					group = 'auto_group';
				
				if(parentPost.get(0) != lastParent)
				{
					lastParent = parentPost.get(0);
					counter ++;
				}
					
				if((el.attr('rel') == undefined || el.attr('rel') == '') && !el.hasClass('noLightbox')) 
				{ 
					el.attr('rel','lightbox['+group+counter+']'); 
					
					//manipulate the link in case we got a screenr video
					if(el.is('a[href*="screenr.com"]'))
					{
						var currentlink = el.attr('href');
						
						if(currentlink.indexOf('embed') !== -1)
						{
							el.attr('href', currentlink + '?iframe=true&width=650&height=396');
						}
						else
						{
							var append =  currentlink.substring(currentlink.lastIndexOf('/') + 1,currentlink.length);
							el.attr('href', 'http://www.screenr.com/embed/' + append + '?iframe=true&width=650&height=396');
						}
					}
				}
			});
			
			if($.fn.prettyPhoto)
			elements.prettyPhoto({ 'social_tools':'','slideshow': 5000 }); /* facebook /light_rounded / dark_rounded / light_square / dark_square */								
		});
	};
})(jQuery);	


/**
 * AviaSlider - A jQuery image slider
 * (c) Copyright Christian "Kriesi" Budschedl
 * http://www.kriesi.at
 * http://www.twitter.com/kriesi/
 * For sale on ThemeForest.net
 */

/* this prevents dom flickering, needs to be outside of dom.ready event: */
document.documentElement.className += ' js_active ';
/*end dom flickering =) */


(function($)
{
	$.fn.aviaSlider= function(variables) 
	{
		var defaults = 
		{
			slides: 'li',				// wich element inside the container should serve as slide
			animationSpeed: 900,		// animation duration
			autorotation: true,			// autorotation true or false?
			autorotationSpeed:3,		// duration between autorotation switch in Seconds
			appendControlls: '',		// element to apply controlls to
			slideControlls: 'items',	// controlls, yes or no?
			blockSize: {height: 'full', width:'full'},
			betweenBlockDelay:60,
			display: 'topleft',
			switchMovement: false,
			showText: true,	
			captionReplacement: false,		//if this is set the element will be used for caption instead of the alt tag
			transition: 'fade',			//slide, fade or drop	
			backgroundOpacity:1,		// opacity for background
			transitionOrder: ['diagonaltop', 'diagonalbottom','topleft', 'bottomright', 'random']
		};
		
		var options = $.extend(defaults, variables);
		 
		return this.each(function()
		{
			var slideWrapper = $(this),									//wrapper element
				slides = slideWrapper.find(options.slides),				//single slide container
				slideImages	= slides.find('img'),						//slide image within container
				slideCount 	=	slides.length,							//number of slides
				slideWidth =	slides.width(),							//width of slidecontainer
				slideHeight= slides.height(),							//height of slidecontainer
				blockNumber = 0,										//how many blocks do we need
				currentSlideNumber = 0,									//which slide is currently shown
				reverseSwitch = false,									//var to set the starting point of the transition
				currentTransition = 0,									//var to set which transition to display when rotating with 'all'
				current_class = 'active_item',							//currently active controller item
				controlls = '',											//string that will contain controll items to append
				skipSwitch = true,										//var to check if performing transition is allowed
				interval ='',
				blockSelection ='',
				blockSelectionJQ ='',
				blockOrder = [];										
			
			//check if either width or height should be full container width			
			if (options.blockSize.height == 'full') { options.blockSize.height = slideHeight; } else { options.blockSize.height = parseInt(options.blockSize.height)}
			if (options.blockSize.width == 'full') { options.blockSize.width = slideWidth; } else { options.blockSize.width = parseInt(options.blockSize.width)}
			
			//slider methods that controll the whole behaviour of the slideshow	
			slideWrapper.methods = {
			
				//initialize slider and create the block with the size set in the default/options object
				init: function()
				{	
					var posX = 0,
						posY = 0,
						generateBlocks = true,
						bgOffset = '';
					
					// make sure to display the first image in the list at the top
					slides.filter(':first').css({'z-index':'5',display:'block'});
						
					// start generating the blocks and add them until the whole image area
					// is filled. Depending on the options that can be only one div or quite many ;)
					while(generateBlocks)
					{
						blockNumber ++;
						bgOffset = "-"+posX +"px -"+posY+"px";
						
						$('<div class="kBlock"></div>').appendTo(slideWrapper).css({	
								zIndex:20, 
								position:'absolute',
								display:'none',
								left:posX,
								top:posY,
								height:options.blockSize.height,
								width:options.blockSize.width,
								backgroundPosition:bgOffset
							});
				
						
						posX += options.blockSize.width;
						
						if(posX >= slideWidth)
						{
							posX = 0;
							posY += options.blockSize.height;
						}
						
						if(posY >= slideHeight)
						{	
							//end adding Blocks
							generateBlocks = false;
						}
					}
					
					//setup directions
					blockSelection = slideWrapper.find('.kBlock');
					blockOrder['topleft'] = blockSelection;
					blockOrder['bottomright'] = $(blockSelection.get().reverse());
					blockOrder['diagonaltop'] = slideWrapper.methods.kcubit(blockSelection);
					blockOrder['diagonalbottom'] = slideWrapper.methods.kcubit(blockOrder['bottomright']);
					blockOrder['random'] = slideWrapper.methods.fyrandomize(blockSelection);
					
					
					//save image in case of flash replacements, will be available in the the next script version
					slides.each(function()
					{
						$.data(this, "data", { img: $(this).find('img').attr('src')});
					});
			
					if(slideCount <= 1)
						{
							slideWrapper.aviaSlider_preloadhelper({delay:200});
						}
						else
						{
							slideWrapper.aviaSlider_preloadhelper({callback:slideWrapper.methods.preloadingDone});
							slideWrapper.methods.appendControlls();
						}	
						slideWrapper.methods.addDescription();
				},
				
				//appends the click controlls after an element, if that was set in the options array
				appendControlls: function()
				{	
					if (options.slideControlls == 'items')
					{	
						var elementToAppend = options.appendControlls || slideWrapper[0];
						controlls = $('<div></div>').addClass('slidecontrolls').insertAfter(elementToAppend);
						
						slides.each(function(i)
						{	
							var controller = $('<a href="#" class="ie6fix '+current_class+'"></a>').appendTo(controlls);
							controller.bind('click', {currentSlideNumber: i}, slideWrapper.methods.switchSlide);
							current_class = "";
						});	
						
						controlls.css('float','none');
					}
					return this;
					
				},
				
				// adds the image description from an alttag 
				addDescription: function()
				{	
					if(options.showText)
					{
						slides.each(function()
						{	
						
							var currentSlide = $(this);
							
							if(options.captionReplacement)
							{
								var description = currentSlide.find(options.captionReplacement).css({display:'block','opacity':options.backgroundOpacity});
								
							}
							else
							{
								var	description = currentSlide.find('img').attr('alt'),
									splitdesc = description.split('::');
								
								
								
								if(splitdesc[0] != "" )
								{
									if(splitdesc[1] != undefined )
									{
										description = "<strong>"+splitdesc[0] +"</strong>"+splitdesc[1]; 
									}
									else
									{
										description = splitdesc[0];
									}
								}
	
								if(description != "")
								{
									$('<div></div>').addClass('feature_excerpt')
													.html(description)
													.css({display:'block', 'opacity':options.backgroundOpacity})
													.appendTo(currentSlide.find('a')); 
								}
							}
						});
					}
				},
				
				preloadingDone: function()
				{	
					skipSwitch = false;
					
					if($.browser.msie)
					{
						slides.css({'backgroundColor':'#000000','backgroundImage':'none'});
					}
					else
					{
						slides.css({'backgroundImage':'none'});
					}
					
					if(options.autorotation && options.autorotation != 2) 
					{
					slideWrapper.methods.autorotate();
					slideImages.bind("click", function(){ clearInterval(interval); });
					}
				},
				
				autorotate: function()
				{	
					var time = parseInt(options.autorotationSpeed) * 1000 + parseInt(options.animationSpeed) + (parseInt(options.betweenBlockDelay) * blockNumber);
				
					interval = setInterval(function()
					{ 	
						currentSlideNumber ++;
						if(currentSlideNumber == slideCount) currentSlideNumber = 0;
						
						slideWrapper.methods.switchSlide();
					},
					time);
				},
				
				switchSlide: function(passed)
				{ 
					var noAction = false;
						
					if(passed != undefined && !skipSwitch)
					{	
						if(currentSlideNumber != passed.data.currentSlideNumber)
						{	
							currentSlideNumber = passed.data.currentSlideNumber;
						}
						else
						{
							noAction = true;
						}
					}
						
					if(passed != undefined) clearInterval(interval);
					
					if(!skipSwitch && noAction == false)
					{	
						skipSwitch = true;
						var currentSlide = slides.filter(':visible'),
							nextSlide = slides.filter(':eq('+currentSlideNumber+')'),
							nextURL = $.data(nextSlide[0], "data").img,	
							nextImageBG = 'url('+nextURL+')';	
							if(options.slideControlls)
							{	
								controlls.find('.active_item').removeClass('active_item');
								controlls.find('a:eq('+currentSlideNumber+')').addClass('active_item');									
							}

						blockSelectionJQ = blockOrder[options.display];
						
						//workarround to make more than one flash movies with the same classname possible
						slides.find('>a>img').css({opacity:1,visibility:'visible'});
							
						//switchmovement
						if(options.switchMovement && (options.display == "topleft" || options.display == "diagonaltop"))
						{
								if(reverseSwitch == false)
								{	
									blockSelectionJQ = blockOrder[options.display];
									reverseSwitch = true;							
								}
								else
								{	
									if(options.display == "topleft") blockSelectionJQ = blockOrder['bottomright'];
									if(options.display == "diagonaltop") blockSelectionJQ = blockOrder['diagonalbottom'];
									reverseSwitch = false;							
								}
						}	
						
						if(options.display == 'random')
						{
							blockSelectionJQ = slideWrapper.methods.fyrandomize(blockSelection);
						}

						if(options.display == 'all')
						{
							blockSelectionJQ = blockOrder[options.transitionOrder[currentTransition]];
							currentTransition ++;
							if(currentTransition >=  options.transitionOrder.length) currentTransition = 0;
						}
						

						//fire transition
						blockSelectionJQ.css({backgroundImage: nextImageBG}).each(function(i)
						{	
							
							var currentBlock = $(this);
							setTimeout(function()
							{	
								var transitionObject = new Array();
								if(options.transition == 'drop')
								{
									transitionObject['css'] = {height:1, width:options.blockSize.width, display:'block',opacity:0};
									transitionObject['anim'] = {height:options.blockSize.height,width:options.blockSize.width,opacity:1};
								}
								else if(options.transition == 'fade')
								{
									transitionObject['css'] = {display:'block',opacity:0};
									transitionObject['anim'] = {opacity:1};
								}
								else
								{
									transitionObject['css'] = {height:1, width:1, display:'block',opacity:0};
									transitionObject['anim'] = {height:options.blockSize.height,width:options.blockSize.width,opacity:1};
								}
							
								currentBlock
								.css(transitionObject['css'])
								.animate(transitionObject['anim'],options.animationSpeed, function()
								{ 
									if(i+1 == blockNumber)
									{	
										slideWrapper.methods.changeImage(currentSlide, nextSlide);
									}
								});
							}, i*options.betweenBlockDelay);
						});
						
					} // end if(!skipSwitch && noAction == false)
					
					return false;
				},
				
				changeImage: function(currentSlide, nextSlide)
				{	
					currentSlide.css({zIndex:0, display:'none'});
					nextSlide.css({zIndex:3, display:'block'});
					blockSelectionJQ.fadeOut(800, function(){ skipSwitch = false; });
				},
				
				// array sorting
				fyrandomize: function(object) 
				{	
					var length = object.length,
						objectSorted = $(object);
						
					if ( length == 0 ) return false;
					
					while ( --length ) 
					{
						var newObject = Math.floor( Math.random() * ( length + 1 ) ),
							temp1 = objectSorted[length],
							temp2 = objectSorted[newObject];
						objectSorted[length] = temp2;
						objectSorted[newObject] = temp1;
					}
					return objectSorted;
				},
				
				kcubit: function(object)
				{
					var length = object.length, 
						objectSorted = $(object),	
						currentIndex = 0,		//index of the object that should get the object in "i" applied
						rows = Math.ceil(slideHeight / options.blockSize.height),
						columns = Math.ceil(slideWidth / options.blockSize.width),
						oneColumn = blockNumber/columns,
						oneRow = blockNumber/rows,
						modX = 0,
						modY = 0,
						i = 0,
						rowend = 0,
						endreached = false,
						onlyOne = false; 
					
					if ( length == 0 ) return false;
					for (i = 0; i<length; i++ ) 
					{
						objectSorted[i] = object[currentIndex];
						
						if((currentIndex % oneRow == 0 && blockNumber - i > oneRow)|| (modY + 1) % oneColumn == 0)
						{						
							currentIndex -= (((oneRow - 1) * modY) - 1); modY = 0; modX ++; onlyOne = false;
							
							if (rowend > 0)
							{
								modY = rowend; currentIndex += (oneRow -1) * modY;
							}
						}
						else
						{
							currentIndex += oneRow -1; modY ++;
						}
						
						if((modX % (oneRow-1) == 0 && modX != 0 && rowend == 0) || (endreached == true && onlyOne == false) )
						{	
							modX = 0.1; rowend ++; endreached = true; onlyOne = true;
						}	
					}
					
				return objectSorted;						
				}
			};
			
			slideWrapper.methods.init();	
		});
	};
})(jQuery);

(function($)
{
	$.fn.aviaFeatureThumbs = function(options) 
	{
		var defaults = 
		{
			titleWrap: '.slideThumbTitle',
			border: '.fancy'
			
		};
		
		var options = $.extend(defaults, options);
	
		return this.each(function()
		{
		
		//border behaviour
			var item = $(this),
				title = $(options.titleWrap, item), 
				border = $(options.border, item),
				theWidth = item.width(),
				theHeight = item.height();
				
			
			item.bind('mouseenter', function()
			{
				border.stop().animate({top:"-6px",left:"-6px",height:theHeight+12,width:theWidth+12},300);
				showTitle();
			});
			
			item.bind('mouseleave', function()
			{
				border.stop().animate({top:"0px", left:"0px",height:theHeight-6,width:theWidth-6},200);
				hideTitle();
			});
		
			
		//tooltip behaviour
		
			title.insertAfter(item);
			
			function showTitle()
			{
				title.stop().css({display:'block', opacity:0}).animate({opacity:0.85, bottom: "70px"});
			}
			
			function hideTitle()
			{
				title.stop().animate({opacity:0, bottom: "80px"}, function()
				{
					title.css({display:'none'});
				});
			}
				
		});
	}
})(jQuery);

(function($)
{
	$.fn.aviaSlider_preloadhelper = function(variables, callback) 
	{
		var defaults = 
		{
			fadeInSpeed: 800,
			maxLoops: 10,
			callback: ''
		};
		
		var options = $.extend(defaults, variables);
			
		return this.each(function()
		{
			var container 	= $(this),
				images		= $('img', this).css({opacity:0, visibility:'visible', display:'block'}),
				parent = images.parent(),
				imageCount = images.length,
				interval = '',
				allImages = images ;
				
			
			var methods = 
			{
				checkImage: function()
				{
					images.each(function(i)
					{
						if(this.complete == true) images = images.not(this);
					});
					
					if(images.length && options.maxLoops >= 0)
					{
						options.maxLoops--;
						setTimeout(methods.checkImage, 500);
					}
					else
					{
						methods.showImages();
					}
				},
				
				showImages: function()
				{
					allImages.each(function(i)
					{
						var currentImage = $(this);
						currentImage.animate({opacity:1}, options.fadeInSpeed, function()
						{
							if(allImages.length == i+1) methods.callback(i);
						});
					});
				},
				
				callback: function()
				{				
					if (variables instanceof Function) { callback = variables; }
					if (callback  instanceof Function) { callback.call(this);  }
					if(options.callback != '') (options.callback)();

				}
			};
			
			methods.checkImage();

		});
	};
})(jQuery);



(function($)
{
	$.fn.aviaSlider_externalControlls = function(options) 
	{
		var defaults = 
		{
			slideControlls: 'a',
			newControlls: '.slideThumb'
		};
		
		var options = $.extend(defaults, options);
	
		return this.each(function()
		{
			var container = $(this).css('display','none'),
				controlls = $(options.slideControlls, container),
				newControlls = $(options.newControlls).css('cursor','pointer');

				newControlls.each(function(i){
				
					$(this).click(function()
					{
						$(controlls[i]).trigger('click');
						return false;
					});
				});
		});
	}
})(jQuery);
