jQuery.noConflict();
jQuery(document).ready( function() {

	jQuery('.slideshow').cycle({
		fx: 'scrollHorz',
		    speed: 2000,
		    timeout: 8000,
		    next: '#navnext',
		    prev: '#navprev',
		    pager: '#nav',
		    pagerAnchorBuilder: function(index, el) {
		      return '<a href="#"></a>';
		    },
		    slideExpr: 'img'
	    });

	jQuery('#toggleButton').click(function() {
		var imgPath = jQuery("#toggleButton").css("background-image");
		var curState = imgPath.search("pause");
		if(curState == -1){
		    document.getElementById("toggleButton").style.backgroundImage = "url(img/pause1.png)";
		    document.getElementById("toggleButton").onmouseover = function() { this.style.backgroundImage = "url(img/pause2.png)"; }
		    document.getElementById("toggleButton").onmouseout = function() { this.style.backgroundImage = "url(img/pause1.png)"; }
		}
		else {
		    document.getElementById("toggleButton").style.backgroundImage = "url(img/play1.png)";
		    document.getElementById("toggleButton").onmouseover = function() { this.style.backgroundImage = "url(img/play2.png)"; }
		    document.getElementById("toggleButton").onmouseout = function() { this.style.backgroundImage = "url(img/play1.png)"; }
		}
		jQuery('.slideshow').cycle('toggle');
		return false;
	    }).css('cursor', 'pointer');


	/*jQuery('.slideshow img').click(function (){
		document.location.href = jQuery(this).attr('rel');
		}).css('cursor', 'pointer');*/

    });

