$(document).ready(function(){
$('#banner').cycle({ 
fx: 'fade', 
speed: 1000,
timeout: 10000,
random: 1,
pause: 1

});
});

$(document).ready(function(){
$('.portfolio').before('<div id="pager">').cycle({ 
fx: 'fade', 
speed: 1000,
timeout: 10000,
pager:  '#pager',
before: function() { if (window.console) console.log(this.src); }
});
});


$(document).ready(function(){
$('#ad-cycle').before('<div id="ad-pager">').cycle({ 
fx: 'fade', 
speed: 1000,
timeout: 10000,
pager:  '#ad-pager',
random: 1,
pause: 1,
before: function() { if (window.console) console.log(this.src); }
});
});


$(document).ready(function(){
$('#sliderContent').cycle({ 
fx:     'scrollHorz', 
speed:   500, 
timeout: 10000, 
next:   '#next2', 
prev:   '#prev2',
pause: 1

});
});

$(document).ready(function(){
$(".golf-btn a").hover(function() {
$(this).next("em").show();
}, function() {
$(this).next("em").hide();
});
});





$(document).ready(function(){
    $("a#slick-toggle").click(function (event) {
    $('#slickbox').toggle(400);
    $("span.show").toggle();
    $("span.hide").toggle();
        return false;
    });
});


$(document).ready(function(){
$('#calendar').tabs();
});

$(document).ready(function(){
$('#service').tabs();
});



$(document).ready(function() {
// validate signup form on keyup and submit
$("#tripform").validate({
rules: {
firstname: "required",
lastname: "required",
address: "required",
city: "required",
state: "required",
zip: "required",
phone: "required",
sex: "required",
age: "required",
find: "required",
firstvisit: "required",
vacation: "required",
plan: "required",
coupons: "required",
terms: "required",
booking: "required",
email: {
	required: true,
	email: true
}

},
messages: {
terms: "Please agree to the terms"
}
});
});

   
$(document).ready( function() {
$('A[rel="external"]').addClass("external").click( function() {
window.open( $(this).attr('href') );
return false;
});
});

//$(document).ready( function() {
//$('#listing ul').hide();
//$("#listing").mouseenter(function (event) {
//	$("#listing h4").css('color', '#ff5577');
//$('#listing ul').slideDown('normal');
//	$('#listing').css({'border-color':'#cccccc', 'background-color':'#eaeaea'});
//});
//$("#listing").mouseleave(function (event) {
//	$('#listing h4').css('color', '#666666');

//$('#listing ul').slideUp('normal');
//	$('#listing').css({'border-color':'#eaeaea', 'background-color':'#ffffff'});
//});
//});

$(document).ready(function(){
    $("#listing-link").click(function (event) {
    $('#listing ul').slideToggle(400);
    $("span.hide").toggle();
    $("span.show").toggle();

        return false;
    });
});


$(document).ready(function(){
   var block = $(".box");
   block.click(function(){
      window.location = $(this).find("span a:contains('More info')").attr("href")
   });
   block.addClass("clickable");
   block.hover(function(){
      window.status = $(this).find("span a:contains('More info')").attr("href")
   }, function(){
      window.status = ""
   })
});


$(function(){
    $('a.top-page[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
            }
        }
    });
});

//$(document).ready(function() {
 //   $(".coupon a").each(function(){
//        $(this).attr('href', 'http://docs.google.com/viewer?url=http://strandmagazine.com/' + $(this).attr('href'));
 //   });
//});​

jQuery(function() {
jQuery("#affiliates").css("opacity","0.6");
		
jQuery("#affiliates").hover(function () {
										  
jQuery(this).stop().animate({
opacity: 1.0
}, "normal");
},
		
function () {
jQuery(this).stop().animate({
opacity: 0.6
}, "normal");
});
});
