
/***************************************************
			SlideOut
***************************************************/
$(document).ready(function() {
             $('.slide-out-div').tabSlideOut({
                 tabHandle: '.handle',                              //class of the element that will be your tab
                 pathToTabImage: 'http://html.orange-idea.com/qark-/images/switch1.png',          //path to the image for the tab (optionaly can be set using css)
                 imageHeight: '100px',                               //height of tab image
                 imageWidth: '50px',                               //width of tab image    
                tabLocation: 'left',                               //side of screen where tab lives, top, right, bottom, or left
                 speed: 300,                                        //speed of animation
                 action: 'click',                                   //options: 'click' or 'hover', action to trigger animation
                 topPos: '20px',                                   //position from the top
                 fixedPosition: true                               //options: true makes it stick(fixed position) on scroll
             });
         });
		 



/***************************************************
			SuperFish Menu
***************************************************/	
// initialise plugins
	$(document).ready(function() {
		jQuery('ul#menu').superfish();
	});
	
	
	
$(document).ready(function() {
  if ($.browser.msie && $.browser.version.substr(0,1)<7)
  {
	$('li').has('ul').mouseover(function(){
		$(this).children('ul').css('visibility','visible');
		}).mouseout(function(){
		$(this).children('ul').css('visibility','hidden');
		})
  }
}); 



/***************************************************
			Nivo Slider
***************************************************/


$(document).ready(function() {
            $('#slider').nivoSlider({
                pauseTime:5000,
                pauseOnHover:false,
				captionOpacity:0.9
            });        
    });


/***************************************************
			PRETTY PHOTO
***************************************************/

$(document).ready(function() {  

$("a[rel^='prettyPhoto']").prettyPhoto({opacity:0.80,default_width:200,default_height:344,theme:'facebook',hideflash:false,modal:false});

});

/***************************************************
			TWITTER FEED
***************************************************/

	$(document).ready(function () {
		// start jqtweet!
		JQTWEET.loadTweets();
	});


/***************************************************
			TIPSY
***************************************************/
$(document).ready(function() {
    
    $('#example-1').tipsy();
    
    $('#north').tipsy({gravity: 'n'});
    $('#south').tipsy({gravity: 's'});
    $('#east').tipsy({gravity: 'e'});
    $('#west').tipsy({gravity: 'w'});
    
    $('#auto-gravity').tipsy({gravity: $.fn.tipsy.autoNS});
    
    $('.social').tipsy({fade: true});
	$('.service-tipsy').tipsy({fade: true, gravity: 's'});
    
    $('#example-custom-attribute').tipsy({title: 'id'});
    $('#example-callback').tipsy({title: function() { return this.getAttribute('original-title').toUpperCase(); } });
    $('#example-fallback').tipsy({fallback: "Where's my tooltip yo'?" });
    
    $('#example-html').tipsy({html: true });
    
  });		 


/***************************************************
			SLIDES
***************************************************/	
$(document).ready(function() {
	$('#slides').slides({
		preload: true,
		generateNextPrev: false
	});
	$('#slides2').slides({
		preload: true,
		generateNextPrev: false,
		generatePagination: true
	});
});


/***************************************************
			ACCORDION SLIDER
***************************************************/
$(document).ready(function() {
	$('.kwicks').kwicks({
		max : 900,
		spacing : 0
	});
});
			
/***************************************************
			VERTICAL ACCORDION SLIDER
***************************************************/

$(document).ready(function() {
$('#ca-container').contentcarousel();

	$('#va-accordion').vaccordion();
});


$(document).ready(function() {
	$('ul#filter a').click(function() {
		$(this).css('outline','none');
		$('ul#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filterVal == 'all') {
			$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			
			$('ul#portfolio li').each(function() {
				if(!$(this).hasClass(filterVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}

		return false;
	});
});

	$(document).ready(function() {
		$('ul#filter-sidebar a').click(function() {
			$(this).css('outline','none');
			$('ul#filter-sidebar .current').removeClass('current');
			$(this).parent().addClass('current');
			
			var filterVal = $(this).text().toLowerCase().replace(' ','-');
					
			if(filterVal == 'all') {
				$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
			} else {
				
				$('ul#portfolio li').each(function() {
					if(!$(this).hasClass(filterVal)) {
						$(this).fadeOut('normal').addClass('hidden');
					} else {
						$(this).fadeIn('slow').removeClass('hidden');
					}
				});
			}
			
			return false;
		});
	});


	$(document).ready(function() {
		$('.slideshow').cycle({
			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
		$('.slideshow2').cycle({
			fx: 'scrollUp' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	});




$(document).ready(function() {

	function mycarousel_initCallback(carousel)
	{
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});
	
		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});
	
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};
	
	jQuery(document).ready(function() {
		jQuery('#mycarousel').jcarousel({
			auto: 2,
			scroll: 3,
			wrap: 'last',
			initCallback: mycarousel_initCallback
		});
	});
	
	$(document).ready(function() {
		$('#btn_box_mail').click(function() {
			$('#box_mail').toggle('slow');
		});
		
	});

});	



