2013-04-11 19:13:03 +00:00
|
|
|
<script type='text/javascript' src='/assets/jquery.cycle.all.latest.js'></script>
|
2012-12-19 09:15:31 +00:00
|
|
|
<script type='text/javascript'>
|
|
|
|
jQuery(function( $ ){
|
|
|
|
|
|
|
|
$('#slideshow-<%= @ad_banner.title.dehumanize %>').cycle({
|
|
|
|
delay: -1000,
|
|
|
|
fx: "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
|
|
|
timeoutFn: getTimeout,
|
|
|
|
pager: '.banner_nav-<%= @ad_banner.title.dehumanize %>',
|
|
|
|
pagerAnchorBuilder: function(idx, slide) {
|
|
|
|
return "<li><a href='#'></a></li>";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div style='position:relative'>
|
|
|
|
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
|
|
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
|
|
|
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
|
|
|
<% if ad_image.display? %>
|
2013-01-11 03:28:13 +00:00
|
|
|
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image) %>' style=' <%= 'cursor:pointer;' if !ad_image_link(ad_image).blank? %>'/>
|
2012-12-19 09:15:31 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|