/* Blog Status Alert...
-----------------------------------------------------*/
$(document).ready(function() {
	$(".btn-slide").click(function(){
		$("#panel").slideToggle("slow");
		$(this).toggleClass("active"); return false;
		document.signup.sign_up_email.focus();
	});
	
	$(".close-this").click(function(){
		$("#panel").slideToggle("slow");
	}); 
});


/* Recent Projects Tool Tips...
-----------------------------------------------------*/
$(document).ready(function() {
	$(".recent a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "-75"}, "slow");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "-85"}, "fast");
	});
});

$(document).ready(function(){
	$(".share-blk a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "-75"}, "slow");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "-85"}, "fast");
	});
});


/* Navigation Slide Effect...
-----------------------------------------------------*/
$(document).ready(function() {
    var d=300;
	$('#nav a').each(function(){
		$(this).stop().animate({'marginTop':'-50px'},d+=150);
		
		if ($(this).hasClass("a-on")) {
			$(this).stop().animate({'marginTop':'0px'},d+=150);
		}
	});
	
	$('#nav > li').hover(function () {
		$('a',$(this)).stop().animate({'marginTop':'0px'},200);
	}, function () {
		if ($('a',$(this)).hasClass("a-on")) {
			$(this).stop().animate({'marginTop':'0px'},d+=150);
		} else {
			$('a',$(this)).stop().animate({'marginTop':'-50px'},200);
		}
	});
});


/* Portfolio Section Tabs...
-----------------------------------------------------*/
$(document).ready(function(){
	var tabContainers = $('div.portal > div');

	$('div.link-style a.tab-nav').click(function () {
		tabContainers.hide().filter(this.hash).fadeIn('slow');
		
		$('div.link-style a.tab-nav').removeClass('portal-on');
		$(this).addClass('portal-on');
						
		return false;
	}).filter(':first').click();
});


/* Fade Effect...
-----------------------------------------------------*/
$(function () {
  $('.fade').hover(function() {
    $(this).fadeTo("slow", 1);
  }, function() {
    $(this).fadeTo("slow", 0.50);
  });
});


/* About Page Image Cycle...
-----------------------------------------------------*/
$(document).ready(function() {
	$('.pic').cycle({
    	fx: 'scrollHorz',
    	timeout: 6000,
    	speed: 1000
    });
});


/* Caption Div Content...
-----------------------------------------------------*/
$(document).ready(function() {
	document.getElementById("web-box").style.display = "block";
});

function showWeb() {
	document.getElementById("web-box").style.display = "block";
	document.getElementById("id-box").style.display = "none";
	document.getElementById("ill-box").style.display = "none";
	document.getElementById("gd-box").style.display = "none";
}

function showId() {
	document.getElementById("id-box").style.display = "block";
	document.getElementById("web-box").style.display = "none";
	document.getElementById("ill-box").style.display = "none";
	document.getElementById("gd-box").style.display = "none";
}

function showGd() {
	document.getElementById("gd-box").style.display = "block";
	document.getElementById("ill-box").style.display = "none";
	document.getElementById("web-box").style.display = "none";
	document.getElementById("id-box").style.display = "none";
}

function showIll() {
	document.getElementById("web-box").style.display = "none";
	document.getElementById("id-box").style.display = "none";
	document.getElementById("gd-box").style.display = "none";
	document.getElementById("ill-box").style.display = "block";
}


/* Portfolio Sections Content...
-----------------------------------------------------*/
$(document).ready(function() {
	$('#wd').cycle({
	    fx:     				'fade',
	    speed:  				'slow',
	    timeout: 				0,
	    prev: 					'.prev-btn',
		next: 					'.next-btn',
	    pager:  				'#web-nav',
	    before: 				 onBefore,
	    pagerAnchorBuilder:		 pagerBuilder,
	    requeueOnImageNotLoaded: true,
	    requeueTimeout: 		 1000
	});
	
	function onBefore() {
        $('#web-title').html(this.title);
    }
	
	function pagerBuilder() {
		return '<li><a href="#"></a></li>';
	}
});

$(document).ready(function() {
	$('#id').cycle({
	    fx:     				'fade',
	    speed:  				'slow',
	    timeout: 				0,
	    prev: 					'.prev-btn',
		next: 					'.next-btn',
	    pager:  				'#id-nav',
	    before: 				 onBefore,
	    pagerAnchorBuilder:		 pagerBuilder,
	    requeueOnImageNotLoaded: true,
	    requeueTimeout: 		 1000
	});
	
	function onBefore() {
        $('#id-title').html(this.title);
    }
	
	function pagerBuilder() {
		return '<li><a href="#"></a></li>';
	}
});

$(document).ready(function() {
	$('#gd').cycle({
	    fx:     				'fade',
	    speed:  				'slow',
	    timeout: 				0,
	    prev: 					'.prev-btn',
		next: 					'.next-btn',
	    pager:  				'#gd-nav',
	    before: 				 onBefore,
	    pagerAnchorBuilder:		 pagerBuilder,
	    requeueOnImageNotLoaded: true,
	    requeueTimeout: 		 1000
	});
	
	function onBefore() {
        $('#gd-title').html(this.title);
    }
	
	function pagerBuilder() {
		return '<li><a href="#"></a></li>';
	}
});

$(document).ready(function() {
	$('#ill').cycle({
	    fx:     				'fade',
	    speed:  				'slow',
	    timeout: 				0,
	    prev: 					'.prev-btn',
		next: 					'.next-btn',
	    pager:  				'#ill-nav',
	    before: 				 onBefore,
	    pagerAnchorBuilder:		 pagerBuilder,
	    requeueOnImageNotLoaded: true,
	    requeueTimeout: 		 1000
	});
	
	function onBefore() {
        $('#ill-title').html(this.title);
    }
	
	function pagerBuilder() {
		return '<li><a href="#"></a></li>';
	}
});


/* Lightbox Function...
-----------------------------------------------------*/

$(document).ready(function() {
   $('.web-gallery a').lightBox({
		overlayBgColor: 	  '#000',
		overlayOpacity:       0.6,
		imageLoading: 		  'blk_images/lightbox/pre-loader.gif',
		imageBtnClose: 		  'blk_images/lightbox/close-btn-lb.png',
		imageBtnPrev:         'blk_images/lightbox/prev-btn-lb.png',
		imageBtnNext: 		  'blk_images/lightbox/next-btn-lb.png',
		containerResizeSpeed: 350,
		txtImage: '',
		txtOf: ''
	});
   
   $('.id-gallery a').lightBox({
		overlayBgColor: 	  '#000',
		overlayOpacity:       0.6,
		imageLoading: 		  'blk_images/lightbox/pre-loader.gif',
		imageBtnClose: 		  'blk_images/lightbox/close-btn-lb.png',
		imageBtnPrev:         'blk_images/lightbox/prev-btn-lb.png',
		imageBtnNext: 		  'blk_images/lightbox/next-btn-lb.png',
		containerResizeSpeed: 350,
		txtImage: '',
		txtOf: ''
	});
   
   $('.ill-gallery a').lightBox({
		overlayBgColor: 	  '#000',
		overlayOpacity:       0.6,
		imageLoading: 		  'blk_images/lightbox/pre-loader.gif',
		imageBtnClose: 		  'blk_images/lightbox/close-btn-lb.png',
		imageBtnPrev:         'blk_images/lightbox/prev-btn-lb.png',
		imageBtnNext: 		  'blk_images/lightbox/next-btn-lb.png',
		containerResizeSpeed: 350,
		txtImage: '',
		txtOf: ''
	});
	
	$('.gd-gallery a').lightBox({
		overlayBgColor: 	  '#000',
		overlayOpacity:       0.6,
		imageLoading: 		  'blk_images/lightbox/pre-loader.gif',
		imageBtnClose: 		  'blk_images/lightbox/close-btn-lb.png',
		imageBtnPrev:         'blk_images/lightbox/prev-btn-lb.png',
		imageBtnNext: 		  'blk_images/lightbox/next-btn-lb.png',
		containerResizeSpeed: 350,
		txtImage: '',
		txtOf: ''
	});
});