$(document).ready( function() {
  $('div.slides').cycle({ 
  	fx: 		'fade', 
  	speed: 		1500, 
  	timeout: 	5000,
	delay:	-1500,
	random: 1, 
	prev:   'div.leftArrow a', 
	next:   'div.rightArrow a'  
  });

	$('.lightboxGalleri').after('<ul id="nav">').cycle({ 
	    fx:     'scrollLeft', 
	    speed:  350, 
	    timeout: 0, 
	    pager:  '#nav',
		next: '.lightboxGalleri img',     
	    // callback fn that creates a thumbnail to use as pager anchor 
	    pagerAnchorBuilder: function(idx, slide) { 
	        return '<li><a href="' + slide.src + '" rel="lightbox"><img src="' + slide.src + '" width="104"/></a></li>'; 
	    } 
		});

	/* This is basic - uses default settings */
	$('a[rel*=lightbox]').lightBox();
	
});

// VALUE SWAP
$(function() {
    swapValues = [];
    $(".sv").each(function(i){
        swapValues[i] = jQuery(this).val();
        jQuery(this).focus(function(){
            if (jQuery(this).val() == swapValues[i]) {
                jQuery(this).val("");
            }
        }).blur(function(){
            if (jQuery.trim(jQuery(this).val()) == "") {
                jQuery(this).val(swapValues[i]);
            }
        });
    });
});
