// JavaScript Document

$(document).ready(function(){

//Cycle plugin for slideshow
$('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed:   1000,
		timeout: 4000,  // milliseconds between slide transitions (0 to disable auto advance)
		pause:   1,	  // true to enable "pause on hover"
		cleartypeNoBg:   true // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
});	

//Tagline animation
$('.tagline_bg').hover(function() { //mouse in
    $(this).animate({ marginRight: '-5px' }, 200);
  }, function() { //mouse out
    $(this).animate({ marginRight: '0px' }, 200);
});

//Change the HTML5 data-rel attribute to rel
$('a[data-rel]').each(function() {
		$(this).attr('rel', $(this).data('rel'));
});
	
//PrettyPhoto
$("a[rel^='prettyPhoto[gallery1]']").prettyPhoto({
		animation_speed: 'fast',
		slideshow: 5000,
		autoplay_slideshow: false,
		opacity: 0.80,
		show_title: false,
		theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		overlay_gallery: false,
		social_tools: false
});

//Subscribe form
$(function() {
		var v = $("#subform").validate({
			submitHandler: function(form) {
				$(form).ajaxSubmit({
					target: "#result_sub",
					clearForm: true
				});
			}
		});
});	

//Contact form
$(function() {
		var v = $("#form").validate({
			submitHandler: function(form) {
				$(form).ajaxSubmit({
					target: "#result",
					clearForm: true
				});
			}
		});
		
});	

//On Hover Event for social, gallery image
$('ul.social li img, ul.gallery li img').hover(function(){
			$(this).animate({opacity: 0.6}, 300);
		}, function () {
			$(this).animate({opacity: 1}, 300);
});

}); // close document.ready

<!--
	getTwitters('twitter', {
        id: 'envato', 
        count: 2, 
        enableLinks: true, 
        template: '<span class="twitterPrefix"><span class="twitterStatus">%text%</span> <span class="username"><a href="http://twitter.com/%user_screen_name%"><br/></span>',
        newwindow: true
});
-->
