/*************************************************************************/
/*                                                                 		 */
/*    JAVASCRIPT DOCUMENT                                		   		 */
/*    Revision 1.0 - Januar 29. 2010. - Marija					  		 */
/*                                                             	  	     */
/*************************************************************************/



// when the DOM is ready:
$(document).ready(function () {
						
  /* -- HIDE MAIL -- */
   $('.hide-email').each(function() {
      var $email = $(this);
      var address = $email.text().replace(/\s*\[at\]\s*/, '@')
                                 .replace(/\s*\[dot\]\s*/g, '.');
      $email.html('<a href="mailto:' + address + '">' + address + '</a>');
   });
   
});


 /* -- EASY SLIDER -- */
		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true, 
				continuous: true,
				speed:		1200,
				pause: 		9000,
			});
			$("#slider2").easySlider({ 
		auto: true,
		continuous: true,
		speed: 		1500,
		pause: 		3000,
		nextId: "slider1next",
		prevId: "slider1prev"

	});
		});	


/* -- PANEL SLIDER -- */
$(document).ready(function() {
	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Open" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
		
});

/* -- VTIP  --  Vertigo Tip by www.vertigo-project.com Requires jQuery */
this.vtip=function(){this.xOffset=-10;this.yOffset=10;$(".vtip").unbind().hover(function(a){this.t=this.title;this.title="";this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","images/arrow-vtip.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(a){this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function(a){vtip()});


/* -- SCROLL TO TOP --*/
$(document).ready(function() {
   
    $('a[href=#top]').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
        return false;
    });

});

/* -- DUAL SLIDER -- */
		$(document).ready(function() {
			
			$(".carousel").dualSlider({
				auto:true,
				autoDelay: 6000,
				easingCarousel: "swing",
				easingDetails: "easeOutBack",
				durationCarousel: 1000,
				durationDetails: 500
			});
			
		});
		
/* -- PRETTY PHOTO -- */

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

/* --- TOGGLE -- */
$(document).ready(function(){
$(".toggle_container").hide();
$("h2.trigger").click(function(){
$(this).toggleClass("active").next().slideToggle("slow");
});
}); 
