// JavaScript Document


jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(function( $ ){
    var cookie = $.cookie('cookie04');
    
	var cookie04 = 0;
	
	if(cookie != null){
	    cookie04 = cookie;
	}
	
	
    cookie04 == cookie04++;
    if(cookie04 > $('#slideshow1 li').length-1){
        cookie04 = 1;
    }

	
	$.cookie('cookie04',eval("\"" + cookie04 + "\"") );
	
	$('#slideshow1').serialScroll({
		items:'li',
		prev:'#screen1 a.prev1',
		next:'#screen1 a.next1',
		offset:-440, //when scrolling to photo, stop 230 before reaching it (from the left)
		start:cookie04, //as we are centering it, start at the 2nd
		duration:1200,
		force:true,
		stop:true,
		lock:false,
		cycle:false, //don't pull back once you reach the end
		easing:'easeOutQuart', //use this easing equation for a funny effect
		jump:false, //click on the images to scroll to them		
		onBefore:function( e, elem, $pane, $items, pos ){
          $.cookie('cookie04',eval("\"" + pos + "\"") )
        }
	});
	
});

function open_win(url_add)
   {
   window.open(url_add,'','width=1270,height=887,menubar=1,resizable=1,status=1,location=1,toolbar=1,scrollbars=1,target=_parent');
   }
   
 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


