/* Carousel */
#sw_denver_content #d_carousel { background:url('/landing/den/images/sw-denver/bg_top_carousel.jpg') no-repeat; height:410px; overflow:hidden; position:relative; width:960px; }
#sw_denver_content #d_carousel .window { margin:0 auto; position:relative; width:849px; overflow:hidden; }
#sw_denver_content #d_carousel .scene { position:relative; width:999999px; }
#sw_denver_content #d_carousel .scene ul li { display:block; float:left; height:400px; position:relative; text-align:center; width:280px; }
#sw_denver_content #d_carousel .scene ul li .person { background: url('/landing/den/images/sw-denver/sprite_people1.png') no-repeat; color:#83C4FA; display:inline-block; font-size:1px; height:400px; overflow:hidden; width:280px; }
#sw_denver_content #d_carousel .scene ul li .clicked { } /*for 3rd state - after a person has been clicked once*/
#sw_denver_content #d_carousel .scene ul li .open { background: url('/landing/den/images/sw-denver/sprite_people2.png') no-repeat; }
#sw_denver_content #d_carousel .scene ul li .details { background:url('/landing/den/images/sw-denver/bg_person-detail_left.png') no-repeat left 13px; display:none; position:absolute; top:50px; left:175px; height:313px; padding-left:46px; width:0; }
#sw_denver_content #d_carousel .scene ul li .details .content { background:url('/landing/den/images/sw-denver/bg_person-detail_right.png') no-repeat right 13px; height:313px; line-height:18px; overflow:hidden; }
#sw_denver_content #d_carousel .scene ul li .details .space { display:none; height:313px; overflow:hidden; padding-top:20px; width:620px; }
#sw_denver_content #d_carousel .scene ul li .details .title { background-repeat:no-repeat; position:absolute; height:303px; top:35px; left:0px; width:662px; z-index:0; }
#sw_denver_content #d_carousel .scene ul li .details .text { font-family:Verdana; font-size:12px; height:300px; line-height:18px; position:relative; width:100%; z-index:1; }
#sw_denver_content #d_carousel .scene ul li .details .text p { display:block; width:345px; position:absolute; top:100px; right:0; }
#sw_denver_content #d_carousel .scene ul li .details .text .yesLink { color:#ff0000; font-weight:700; font-style:normal; text-transform:uppercase; }
/* Carousel:people */
/*paul*/
#sw_denver_content #d_carousel .scene ul li.person1 a.person { background: url('/landing/den/images/sw-denver/person_paul.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person1 .title { background-image: url('/landing/den/images/sw-denver/person_paul-details.png'); background-position: 20px 0; }
#sw_denver_content #d_carousel .scene ul li.person1 .text p { width:320px; top:100px; right:20px; }
/*calvin*/
#sw_denver_content #d_carousel .scene ul li.person2 a.person { background: url('/landing/den/images/sw-denver/person_calvin.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person2 .title { background-image: url('/landing/den/images/sw-denver/person_calvin-details.png'); }
#sw_denver_content #d_carousel .scene ul li.person2 .text p { width:345px; top:100px; right:10px; }
/*Lydia*/
#sw_denver_content #d_carousel .scene ul li.person3 a.person { background: url('/landing/den/images/sw-denver/person_lydia.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person3 .title { background-image: url('/landing/den/images/sw-denver/person_lydia-details.png'); }
#sw_denver_content #d_carousel .scene ul li.person3 .text p.p1 { width:315px; top:100px; right:10px; }
#sw_denver_content #d_carousel .scene ul li.person3 .text p.p2 { width:290px; top:208px; right:auto; left:0; font-size:9px; line-height:10px; color:#666; }
#sw_denver_content #d_carousel .scene ul li.person3 .text .disclaimer {position:absolute; top:107px; right:0; width:327px; font-size:9px; line-height:10px; color:#666; }
#sw_denver_content #d_carousel .scene ul li.person3 .text .disclaimer p {float:left; height:12px; display:block; position:relative; padding-bottom:4px; }
/*tyrone*/
#sw_denver_content #d_carousel .scene ul li.person4 a.person { background: url('/landing/den/images/sw-denver/person_tyrone.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person4 .title { background-image: url('/landing/den/images/sw-denver/person_tyrone-details.png'); }
#sw_denver_content #d_carousel .scene ul li.person4 .text p.p1 { width:580px; top:70px; right:auto; left:23px; }
#sw_denver_content #d_carousel .scene ul li.person4 .text p.p2 { width:245px; top:150px; right:5px }
#sw_denver_content #d_carousel .scene ul li.person4 .text p.p2 .hint{ font-size:9px; line-height:9px;}
/*john*/
#sw_denver_content #d_carousel .scene ul li.person5 a.person { background: url('/landing/den/images/sw-denver/person_john.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person5 .title { background-image: url('/landing/den/images/sw-denver/person_john-details.png'); }
#sw_denver_content #d_carousel .scene ul li.person5 .text p { width:375px; margin-top:10px; right:10px; }
#sw_denver_content #d_carousel .scene ul li.person5 .text p.p2 { top:220px; font-size:9px; line-height:10px; color:#666; right:230px; }
/*kate*/
#sw_denver_content #d_carousel .scene ul li.person6 a.person { background: url('/landing/den/images/sw-denver/person_kate.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person6 .title { background-image: url('/landing/den/images/sw-denver/person_kate-details.png'); background-position: 10px 0; }
#sw_denver_content #d_carousel .scene ul li.person6 .text p { right:10px; top:80px; width:330px; }
/*randi*/
#sw_denver_content #d_carousel .scene ul li.person7 a.person { background: url('/landing/den/images/sw-denver/person_randi.png') 0 0; }
#sw_denver_content #d_carousel .scene ul li.person7 .title { background-image: url('/landing/den/images/sw-denver/person_randi-details.png'); background-position: 10px 0; }
#sw_denver_content #d_carousel .scene ul li.person7 .text p.p1 { width:590px; top:70px; right:auto; left:23px; }
#sw_denver_content #d_carousel .scene ul li.person7 .text p.p2 { width:450px; top:130px; right:20px; }
/* any special case that has been clicked once that needs a different pose */
#sw_denver_content #d_carousel .scene ul li.person2 a.clicked { background-position:-840px 0; }
/* hover states and open states */
#sw_denver_content #d_carousel .scene ul li a.person:hover { background-position:-560px 0!important; }
#sw_denver_content #d_carousel .scene ul li a.open,
#sw_denver_content #d_carousel .scene ul li a.open:hover { background-position:-280px 0!important; }
/* Carousel:controls */
#sw_denver_content #d_carousel .control { background:url('/landing/den/images/sw-denver/sprite_bg_scrollarrows.png') no-repeat; display:block; height:48px; margin-top:-26px; position:absolute!important; top:50%; width:50px;}
#sw_denver_content #d_carousel .next { background-position:-64px -47px; right:10px;}
#sw_denver_content #d_carousel .next:hover { background-position:-64px 0; }
#sw_denver_content #d_carousel .prev { background-position:0 -47px; left:10px; }
#sw_denver_content #d_carousel .prev:hover { background-position:0 0; }
#sw_denver_content #d_carousel .close { background:url('/landing/den/images/sw-denver/btn_close.png') no-repeat 0 -33px; height:33px; width:33px; margin:0; top:auto; bottom:25px; right:25px; z-index:5; }
#sw_denver_content #d_carousel .close:hover { background-position: top left; }
</style>
<a href="#next" class="control next png_bg"></a> <a href="#prev" class="control prev png_bg" style="display:none;"></a>
<li class="person1 current"> <a href="#" class="person png_bg imgReplacement" title="Paul"><span>Paul
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> With Southwest Airlines, your first two bags are taken care of. They're free! And that means our love will save you up to $120 every roundtrip. There's no better reason to say
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> to Southwest.
</p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="Calvin"><span>Calvin
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> With 133 convenient flights every day and more destinations than you could ever dream of, we can honeymoon whenever and wherever you want to. Just be sure to tell us
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> first.
</p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="Lydia"><span>Lydia
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> We're offering you everything we have to give - from loving smiles and low fares to ontime flights and no change fees
<sup>1
</sup>. And to really prove our dedication, we're offering you a chance to win two free flights
<sup>2
</sup> just for saying
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> </p>
For 2008 among all carriers that report as part of the Air Travel Consumer Report. From September 1987 through February 2010, Southwest Airlines has maintained the best cumulative ontime performance among all Major U.S. airlines according to the Air Travel Consumer Report.
</p>
<p><sup>1
</sup> Applicable fare difference may apply.
</p> <p><sup>2
</sup> September 11th Security Fee applies.
</p> </div>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="Tyrone"><span>Tyrone
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> Whether traveling for business or just for fun, you deserve to be one of the first to board, have plenty of room for your carryon and have a drink onboard. That's why we offer our Business Select Fare.
</p>
Upgrade today, and enjoy your travel experience even more.
<span class="hint">Seats limited. Fly By at participating airports.
</span> </p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="John"><span>John
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> At Southwest Airlines, you get to choose your seat. We'll lock in your boarding position when you check in online, so you can sit back, relax and recharge until your group is called. That's how much we care about you, and it's just another reason to say
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> to Southwest.
</p>
Online checkin may not be available for all fares.
</p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="Kate"><span>Kate
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> Saying
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> is just the beginning. We want to see you at least once a week and on special occasions.
<a href="http://www.southwest.com/specialoffers/signup.html">Sign up for Click 'n Save e-mails
</a> to get deals on flights, cars, hotels, and more delivered to your inbox.
</p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
<a href="#" class="person png_bg imgReplacement" title="Randi"><span>Randi
</span></a> <div class="details png_bg"> <div class="content png_bg"> <div class="title imgReplacement"><span>quote goes here
</span></div> <div class="text clearfix"> Southwest loves you so much that we sponsor everything from the Red Rocks Amphitheatre to the Metro Sports Commission. Volunteering in Denver is one of our favorite things to do. Check out the difference we're making at the moment.
</p>
<strong>Southwest Airlines Denver Rescue Mission
</strong> A group of Denver Employees volunteer regularly at the Denver Rescue Mission preparing meals for the local homeless community.
Say
<a class="yesLink btn_yes" href="/landing/den/entryform.html">Yes!
</a> and we'll keep giving you all the attention you deserve, Denver.
</p>
</div>
<a href="#close" class="control close png_bg"></a> </div>
</div>
</div>
</li>
</ul>
</div>
</div>
</span>
$( function(){
/**==VARS==**/
//Carousel
var $carousel = $('.carousel');
var $window = $carousel.find('.window');
var $scene = $carousel.find('.scene');
var $btn_controls = $carousel.find('.control');
var $peopleTargets = $carousel.find('.person');
var $btn_next = $carousel.find('.next');
var $btn_prev = $carousel.find('.prev');
var curSlide = 1;
var numSlides = $carousel.find('li').length;
/**==IE detection==**/
if ($.browser.msie && $.browser.version == "6.0") {
//ie 6 actions
$.fx.off = true;
DD_belatedPNG.fix('#carousel_png .png_bg, #carousel_png .imgReplacement');
}else if ($.browser.msie) {
//other IE browsers than IE6
}else {
//standards browsers' actions
$('.control').blend({speed: 200,top: true});
}
/**=== jquery functions ===**/
//set the current slide and check if within bounderies
setCurrentSlide = function( cur ){
//checks for the beginning of the carousel
if (cur <= 1) {
$.log("your at the beginning");
$btn_prev.hide();
curSlide = 1;
} else {
$btn_prev.show();
curSlide = cur;
}
//check if the details are not showing, and if we have reached the last element - 2
if( cur+2 >= numSlides && $carousel.hasClass("view_collapsed")) {
$.log("setCurrentSlide::if( cur+2 >= numSlides && $carousel.hasClass('view_collapsed'))");
$btn_next.hide();
curSlide = cur;
} else if(cur >= numSlides && $carousel.hasClass("view_expanded")){
$.log("setCurrentSlide::else if(cur >= numSlides && $carousel.hasClass('view_expanded'))");
$btn_next.hide();
curSlide = numSlides;
} else {
curSlide = cur;
$btn_next.show();
}
//set current object in DOM
$('.current').removeClass('current');
return $scene.find('li:eq('+(cur-1)+')').addClass('current').animatePerson();
}
// open targeted person's detail (like .show() for this project)
jQuery.fn.animatePerson = function(){
//cache elements
var $personContainer = $(this);
var $thisPerson = $personContainer.find(".person");
var $details = $personContainer.find(".details");
var detailWidth = 630;
//move to current person
setTimeout( function(){
$window.stop().scrollTo( $personContainer, 800, {queue:false});
}, 200);
//check if details already are open
if ( !$details.is(':visible') && $carousel.hasClass('view_expanded') ) {
$thisPerson.css({ 'margin': '0' });
//expand this scene's item and move the target to the left-most corner
$personContainer.css({
'text-align':'left'
}).animate({'width': 849}, { duration:200, queue:true });
//show the details
setTimeout( function(){
if ($.browser.msie) {
$details.show();
$details.animate({'width': detailWidth}, {duration:500});
setTimeout(function(){
$details.find('.space').fadeIn(500);
},400);
} else {
$details.css({'width': 60});
$details.fadeIn(400, function(){
setTimeout(function(){
$details.animate({'width': detailWidth}, {queue:false});
setTimeout(function(){
$details.find('.space').fadeIn(500);
},400);
}, 200);
});
}
}, 800);
}
}
//close any expanded sections and scroll to the current item(like .hide() for this project)
jQuery.fn.closeAll = function(){
//cache elements
var $personContainer = $(this).closest('li');
var $thisPerson = $personContainer.find('.person')
var $details = $personContainer.find(".details");
$carousel.removeClass('view_expanded').addClass('view_collapsed');
//====FIRST HIDE ALL DETAILS FOR PEOPLE YOU ARENT CURRENTLY LOOKING AT
//first hide all people text, then shrink the width down to 40px
$carousel.find('.details .space').not( $details )
.hide()
.parent().parent().css({ 'width': 40, 'display': 'none' });
$carousel.find('.person').not( $('.current').find('.person') )
.find('.open').removeClass('open');
$scene.find('li').not( $('.current') ).css({ 'width': 280 });
//move to the current person so we can see the close animation
$window.scrollTo( $('.current') , 10 );
//====NOW ANIMATE THE PERSON YOU ARE LOOKING AT AND SCROLL TO THE PERSON
//hide the details
$details.find('.space').stop().show().fadeOut(500);
$details.animate({ 'width': 40 }, {duration:500, queue:false});
currentIndex = $scene.find('ul li').index( $scene.find('.current') );
$.log("current INDEX: ");
$.log( currentIndex );
setTimeout( function(){
$details.hide();
$carousel.find('.current .open').removeClass('open');
//reset the containers widths
$scene.find('.current').animate({
'width': 280
}, {
duration:500,
queue:true
});
//reset the text alignment and scroll to the element
setTimeout( function(){
$scene.find('li').css({'text-align':'center'});
if ( currentIndex > 4 ) {
$.log("special close case");
setCurrentSlide( 5 );
$btn_next.hide();
} else {
setTimeout( function(){
setCurrentSlide( $scene.find('ul li').index( $('.current') ) + 1 );
},200);
}
}, 300);
}, 300);
}
/**== Actions for clicking the a control button
* Action Taken on click: depends on the anchor link
==**/
$btn_controls.live("click", function(e){
//perform actions for specific button click(next,prev,close)
if( $(this).hasClass('next') ){
$.log("$btn_controls click::next");
setCurrentSlide( curSlide + 1 );
}else if( $(this).hasClass('prev') ){
$.log("$btn_controls click::prev");
setCurrentSlide( curSlide - 1 );
}else if( $(this).hasClass('close') ) {
$.log("$btn_controls click::close");
$carousel.closeAll();
return false;
}
/* If the details have been expanded on any container, expand the details
* of the next object and scroll to it, otherwise just scroll to the element
*/
if( $carousel.hasClass('view_expanded') ){
$carousel.find('.current .person').trigger("click");
}else{
//$window.stop().scrollTo( '.current', 800 );
}
return false;
});
/**==
* Actions performed when clicking on a person's image(or '.person')
==**/
$peopleTargets.live('click', function(e){
//indicate to the carousel that one of the sections is open
$carousel.addClass('view_expanded').removeClass('view_collapsed');
//animate the opening of a person's details
$(this).addClass('open clicked');
cur = $scene.find('ul li').index( $(this).parent() ) + 1;
$.log("$peopleTargets click: cur = "+cur)
setCurrentSlide( cur );
//do not follow anchor
return false;
});
/* Actions for clicking the yes button
* Action Taken on click: show the sign-up form
*/
$('#sw_denver_content .btn_yes').openDOMWindow({
borderSize:0,
borderColor:'transparent',
height:544,
width:827,
positionType:'absolute',
positionTop:100,
positionLeft:($(window).width()/2 - 408),
eventType:'click',
loader:1,
loaderImagePath:'/landing/den/images/sw-denver/loading.gif',
loaderHeight:16,
loaderWidth:17,
windowPadding:0,
windowSource:'ajax',
windowHTTPType:'get'
});
});
</script>