Skip to content

Instantly share code, notes, and snippets.

@stirlinghewitt
Created October 11, 2012 20:35
Show Gist options
  • Save stirlinghewitt/3875299 to your computer and use it in GitHub Desktop.
Save stirlinghewitt/3875299 to your computer and use it in GitHub Desktop.
querie bitches
Ok here is the js:
var currentSlide = 0;
var sportsconfig = {
over: function () { $('#sports-subnav').toggle(); },
timeout: 300, // number = milliseconds delay before onMouseOut
out: function () { $('#sports-subnav').toggle(); } // function = onMouseOut callback (REQUIRED)
};
var concertconfig = {
over: function () { $('#concert-subnav').toggle(); },
timeout: 300, // number = milliseconds delay before onMouseOut
out: function () { $('#concert-subnav').toggle(); } // function = onMouseOut callback (REQUIRED)
};
var theaterconfig = {
over: function () { $('#theater-subnav').toggle(); },
timeout: 300, // number = milliseconds delay before onMouseOut
out: function () { $('#theater-subnav').toggle(); } // function = onMouseOut callback (REQUIRED)
};
function onAfter(curr,next,opts) {
$('#rotator-button li').removeClass('active');
var currentBtn = '#rotator-btn-1';
if (opts.currSlide != 4) {
var currentBtn = '#rotator-btn-' + (opts.currSlide + 1);
}
$(currentBtn).addClass('active');
}
function btnHover ($hoverItem) {
/*alert('clicked')*/
$('#rotator-button li').removeClass('active');
$hoverItem.addClass('active');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle('pause');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle($hoverItem.position())
};
function cycleResume () {
$('#dnn_ctr1175_HtmlModule_lblContent').cycle('resume');
};
function smallRotatorNext (selector) {
$currentItem = $(selector + ' .small-rotator:visible');
$firstItem = $(selector + ' .small-rotator:first');
if ($currentItem.next().length == 0) {
$currentItem.toggle();
$firstItem.toggle();
}
else {
$currentItem.toggle().next().toggle();
}
};
function smallRotatorPrevious (selector) {
$firstItem = $(selector + ' .small-rotator:first');
if ($firstItem.is(':visible')) {
//use the last item instead...
$firstItem.toggle(); //we are on the 1st item, make it invisible, then show the last item...
$(selector + ' .small-rotator:last').toggle();
} else {
$currentItem = $(selector + ' .small-rotator:visible');
$currentItem.toggle().prev().toggle();
}
};
$(document).ready( function () {
$('#sports-nav').hoverIntent(sportsconfig);
$('#concert-nav').hoverIntent(concertconfig);
$('#theater-nav').hoverIntent(theaterconfig);
$('#rotator-btn-1').hover( function(){
$('#rotator-button li').removeClass('active'); //remove from all of sidebars...
$('#rotator-btn-1').addClass('active');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle(0);
return false;
}
);
$('#rotator-btn-2').hover( function(){
$('#rotator-button li').removeClass('active'); //remove from all of sidebars...
$('#rotator-btn-2').addClass('active');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle(1);
return false;
}
);
$('#rotator-btn-3').hover( function(){
$('#rotator-button li').removeClass('active'); //remove from all of sidebars...
$('#rotator-btn-3').addClass('active');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle(2);
return false;
}
);
$('#rotator-btn-4').hover( function(){
$('#rotator-button li').removeClass('active'); //remove from all of sidebars...
$('#rotator-btn-4').addClass('active');
$('#dnn_ctr1175_HtmlModule_lblContent').cycle(3);
return false;
}
);
$('#dnn_ctr1175_HtmlModule_lblContent').cycle({
fx: 'fade',
speed: 2500,
timeout: 4000,
fastOnEvent: 1,
pause: true, // true to enable "pause on hover"
cleartype: true,
cleartypeNoBg: true,
after: onAfter,
autostop: true,
autostopCount: 9
});
$('#concert-next').click( function() {
smallRotatorNext('#concerts-rotator');
return false;
});
$('#concert-prev').click( function() {
smallRotatorPrevious('#concerts-rotator');
return false;
});
$('#sport-next').click( function() {
smallRotatorNext('#sports-rotator');
return false;
});
$('#sport-prev').click( function() {
smallRotatorPrevious('#sports-rotator');
return false;
});
$('#theater-next').click( function() {
smallRotatorNext('#theater-rotator');
return false;
});
$('#theater-prev').click( function() {
smallRotatorPrevious('#theater-rotator');
return false;
});
$('#search-text').autocomplete({
source: "/GetSearchResults.ashx",
minLength: 2,
select: function (event, ui) { window.location = ui.item.url; }
});
$('#search-form').submit(
function() {
window.location = 'searchresults.aspx?Search=' + $('#search-form').val();
}
);
$('#hidden-fees-link').click( function() {
$( "#guarantee" ).dialog({
height: 400,
modal: true
});
return false;
});
$('#specials').click( function() {
window.location = "http://eepurl.com/fqX6g";
}
);
$('#logo').supersleight();
}
)
<div id="smaller-rotators" class="container_12">
<div id="sports-rotator" class="grid_4 home-page-sm-rotator">
<div id="dnn_SportsRotatorPane"><div><a id="1177" name="1177"></a>
<div class="SolPartActions">
</div>
<div id="dnn_ctr1177_ContentPane"><!-- Start_Module_1177 --><div id="dnn_ctr1177_ModuleContent" class="ModDNNHTMLC">
<div id="dnn_ctr1177_HtmlModule_lblContent" class="Normal">
<h4>Sports</h4>
<div class="sm-rotator-button-wrapper"><a href="#"><img alt="Previous Item" height="19" width="19" id="sport-prev" class="sm-rotator-btn" src="/content/images/rotators/rotator-previous.png"></a> <a href="#"><img alt="Next Item" height="19" width="19" id="sport-next" class="sm-rotator-btn" src="/content/images/rotators/rotator-next.png"></a></div>
<div class="small-rotator"><a href="/Sports/NHL/StLouisBlues.aspx"> <img height="156" width="292" alt="Blues Fight" src="/content/images/rotators/blues-sm-rotator.png"></a>
<div class="call-to-action">
<h5><a href="/Sports/NHL/StLouisBlues.aspx">BLUES TICKETS</a></h5>
<p><a href="/Sports/NHL/StLouisBlues.aspx">Don't miss a minute of the action as the Blues go for The Stanley Cup!</a></p>
</div>
</div>
<div class="small-rotator" style="display: none;"><a href="/Sports/MLB/StLouisCardinals.aspx"> <img height="156" width="292" alt="Rams Rotator" src="/content/images/rotators/cards-small-rotator.png"></a>
<div class="call-to-action">
<h5><a href="/Sports/MLB/StLouisCardinals.aspx">CARDS TIX</a></h5>
<p><a href="/Sports/MLB/StLouisCardinals.aspx">Watch the 2012 Cardinals defend their World Series title! </a></p>
</div>
</div>
<div class="small-rotator" style="display: none;"><a href="/Sports/NFL/StLouisRams.aspx"> <img height="156" width="292" alt="Rams Rotator" src="/content/images/rotators/rams-rotator.png"></a>
<div class="call-to-action">
<h5><a href="/Sports/NFL/StLouisRams.aspx">SEE THE RAMS</a></h5>
<p><a href="/Sports/NFL/StLouisRams.aspx">Watch Sam and the Rams this winter as they try to return to the playoffs! </a></p>
</div>
</div>
</div>
</div><!-- End_Module_1177 --></div>
</div></div>
</div>
<div id="concerts-rotator" class="grid_4 home-page-sm-rotator">
<div id="dnn_ConcertRotatorPane"><div><a id="1178" name="1178"></a>
<div class="SolPartActions">
</div>
<div id="dnn_ctr1178_ContentPane"><!-- Start_Module_1178 --><div id="dnn_ctr1178_ModuleContent" class="ModDNNHTMLC">
<div id="dnn_ctr1178_HtmlModule_lblContent" class="Normal">
<h4>CONCERTS</h4>
<div class="sm-rotator-button-wrapper"><img alt="Previous Item" height="19" width="19" id="concert-prev" class="sm-rotator-btn" src="/content/images/rotators/rotator-previous.png"><img alt="Next Item" height="19" width="19" id="concert-next" class="sm-rotator-btn" src="/content/images/rotators/rotator-next.png"></div>
<div class="small-rotator"><a href="/Concerts/KennyChesney.aspx"> <img height="156" width="292" alt="Kenny Chesney Tickets" src="/content/images/rotators/KChesney.png"></a>
<div class="call-to-action">
<h5>KENNY CHESNEY TICKETS</h5>
<p>One of the most popular country music acts going. Kenny Chesney is always selling out.</p>
</div>
</div>
<div class="small-rotator" style="display:none"><a href="/Concerts/BonJovi.aspx"> <img height="156" width="292" alt="Bon Jovi" src="/content/images/rotators/BonJovi.png"></a>
<div class="call-to-action">
<h5>BON JOVI TICKETS</h5>
<p>The boys from New Jersey are heading back out on tour.</p>
</div>
</div>
</div>
</div><!-- End_Module_1178 --></div>
</div></div>
</div>
<div id="theater-rotator" class="grid_4 home-page-sm-rotator">
<div id="dnn_TheaterRotatorPane"><div><a id="1179" name="1179"></a>
<div class="SolPartActions">
</div>
<div id="dnn_ctr1179_ContentPane"><!-- Start_Module_1179 --><div id="dnn_ctr1179_ModuleContent" class="ModDNNHTMLC">
<div id="dnn_ctr1179_HtmlModule_lblContent" class="Normal">
<h4>THEATER</h4>
<div class="sm-rotator-button-wrapper"><img alt="Previous Item" height="19" width="19" id="theater-prev" class="sm-rotator-btn" src="/content/images/rotators/rotator-previous.png"><img alt="Next Item" height="19" width="19" id="theater-next" class="sm-rotator-btn" src="/content/images/rotators/rotator-next.png"></div>
<div class="small-rotator"><a href="/Theatre/JerseyBoys.aspx"><img height="156" width="292" alt="Jersey Boys" src="/content/images/rotators/JerseyBoys2.png"></a>
<div class="call-to-action">
<h5>JERSEY BOYS</h5>
<p>Jersey Boys has been a huge hit since it's launch in 2005.</p>
</div>
</div>
<div class="small-rotator" style="display: none;"><a href="/Theatre/Wicked.aspx"><img height="156" width="292" alt="Blues Fight" src="/content/images/rotators/Wicked.png"></a>
<div class="call-to-action">
<h5>WICKED</h5>
<p>Wicked is an amazing musical loosely based on the Wicked Witch.</p>
</div>
</div>
</div>
</div><!-- End_Module_1179 --></div>
</div></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment