
$(function() {
	//$('img[@src$=.png]').ifixpng(); 
	
	/* EASING **/
	/* http://gmarwaha.com/jquery/jcarousellite/#demo */
	
    $(".slider-images").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		visible: 1,
		easing: "easeout",
		auto: 3100,
		speed: 1000
    });
		
	$(".slidertext").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		vertical: true,
		visible: 1,
		easing: "easeout",
	 	auto: 3100,
		speed: 1000
    });

$(".ddsmoothmenu").init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
	 
});

	
	//remove last border	
	   $(document).ready(function() {
	  $('.ddsmoothmenu li:last').addClass("lastlink");
	   $('.f-menu li:last').addClass("lastlink");
	   $('.f-menu li:first').addClass("nopadding");

		
		
 	});

$("input.focus:last").focus();

$(document).ready(function(){
	$("a[rel^='prettyPhoto']").each(function() {	
		var $image = $(this).contents("img");
			$hoverclass = 'hover_video';

	if($(this).attr('href').match(/(jpg|gif|jpeg|png|tif)/)) 
	$hoverclass = 'hover_image';
		
	if ($image.length > 0)
	{	
		var $hoverbg = $("<span class='"+$hoverclass+"'></span>").appendTo($(this));
		
			$(this).bind('mouseenter', function(){
			$height = $image.height();
			$width = $image.width();
			$pos =  $image.position();		
			$hoverbg.css({height:$height, width:$width, top:$pos.top, left:$pos.left});
		});
	}

});	

$("a[rel^='prettyPhoto']").contents("img").hover(function() {
		$(this).stop().animate({"opacity": "0.2"}, 400);
		},function() {
		$(this).stop().animate({"opacity": "1"},400);
	});
});

