// JavaScript Document

// Image loaded one by one
$(function () {
	$('#features img').hide();//hide all the images on the page
	$('#main img').hide();//hide all the images on the page
});

var i = 0;//initialize
var int=0;//Internet Explorer Fix
$(document).ready(function() {//The load event will only fire if the entire page or document is fully loaded
	var int = setInterval("doThis(i)",150);//500 is the fade in speed in milliseconds
});

function doThis() {
		var images = $('img').length;//count the number of images on the page
		if (i >= images) {// Loop the images
			clearInterval(int);//When it reaches the last image the loop ends
		}
		$('#main img:hidden').eq(0).fadeIn(350);//fades in the hidden images one by one	
		$('#features img:hidden').eq(0).fadeIn(350);//fades in the hidden images one by one
		i++;//add 1 to the count
}

$(document).ready(function(){
	$("#leftPart img").hover(function(){
		$(this).stop().animate({opacity: "0.5"}, 350);
	},
	function(){
		$(this).stop().animate({opacity: "1"}, 125);
	});
});

$(document).ready(function(){
	$(".ask_package_button a").click(function(){
		$("#package_form").slideToggle('slow');
	});
});

$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded'});
});
