// JavaScript Document
window.document.onload = init();

function init() {
	if (document.images) {
		nav1 = new Image();
		nav2 = new Image();
		nav3 = new Image();
		nav4 = new Image();
		nav5 = new Image();
		nav6 = new Image();

		nav7 = new Image();
		nav8 = new Image();
		nav9 = new Image();
		nav10 = new Image();
		nav11 = new Image();
		nav12 = new Image();
		nav13 = new Image();
		nav14 = new Image();
		nav15 = new Image();
		nav16 = new Image();

		nav1.src = "images/footer_home2.png";
		nav2.src = "images/footer_work2.png";
		nav3.src = "images/footer_about2.png";
		nav4.src = "images/footer_contak2.png";
		nav5.src = "images/freequote_images/send_button2.png";
		nav6.src = "images/contak_form/send2.png";
		nav7.src = "images/buttons/gallery/gallery_buttons_fanart2.png";
		nav8.src = "images/buttons/gallery/gallery_buttons_animation2.png";
		nav9.src = "images/buttons/gallery/gallery_buttons_print2.png";
		nav10.src = "images/buttons/gallery/gallery_buttons_comics2.png";
		nav11.src = "images/buttons/gallery/gallery_buttons_webdesign2.png"
		nav12.src = "images/buttons/gallery/gallery_buttons_illustration2.png";
		nav13.src = "portfolio_work/comics/images/banner_button2.jpg";
		nav14.src = "images/contak_form/info_address.png";
		nav15.src = "images/contak_form/art_address.png";
		nav16.src = "images/contak_form/web_address.png";
	}
}

$(document).ready(function() {
	$("a[rel=illustration]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	$("a#comicIssue").fancybox({
		'titleShow'		: false
	});		

	$("a[rel=print]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

	$("a[rel=fanart]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	
	$(".termspolicy").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});	

	$("#various4").fancybox({
		'autoScale'			: false,
		'padding'			: 0,
		'height'			: 396,
		'width'				: 720,
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'none'
	});
});

// JavaScript Document
$(function() {
	$("#foot_home img").hover(function(){
	$(this).attr({src: 'images/footer_home2.png'});
	}, function() {
	$(this).attr({src: 'images/footer_home.png'});
	})

	$("#foot_work img").hover(function(){
	$(this).attr({src: 'images/footer_work2.png'});
	}, function() {
	$(this).attr({src: 'images/footer_work.png'});
	})

	$("#foot_about img").hover(function(){
	$(this).attr({src: 'images/footer_about2.png'});
	}, function() {
	$(this).attr({src: 'images/footer_about.png'});
	})

	$("#foot_contak img").hover(function(){
	$(this).attr({src: 'images/footer_contak2.png'});
	}, function() {
	$(this).attr({src: 'images/footer_contak.png'});
	})

	$("#illus").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_illustration2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_illustration.png'});
	})

	$("#webd1").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_webdesign2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_webdesign.png'});
	})

	$("#com2").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_comics2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_comics.png'});
	})

	$("#pri").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_print2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_print.png'});
	})

	$("#anim2").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_animation2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_animation.png'});
	})

	$("#fan2").hover(function(){
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_fanart2.png'});
	}, function() {
	$(this).attr({src: 'images/buttons/gallery/gallery_buttons_fanart.png'});
	})

	$("#ihatemyboss").hover(function(){
	$(this).attr({src: 'portfolio_work/comics/images/banner_button2.jpg'});
	}, function() {
	$(this).attr({src: 'portfolio_work/comics/images/banner_button1.jpg'});
	})

	$("#webe").hover(function(){
	$(this).attr({src: 'images/contak_form/web_address.png'});
	}, function() {
	$(this).attr({src: 'images/contak_form/web_address2.png'});
	})

	$("#arte").hover(function(){
	$(this).attr({src: 'images/contak_form/art_address.png'});
	}, function() {
	$(this).attr({src: 'images/contak_form/art_address2.png'});
	})

	$("#infoe").hover(function(){
	$(this).attr({src: 'images/contak_form/info_address.png'});
	}, function() {
	$(this).attr({src: 'images/contak_form/info_address2.png'});
	})
});


