2012-12-19 19:21:50 +00:00
|
|
|
<%#= encoding: utf-8 %>
|
|
|
|
// function slideshow() {
|
|
|
|
// var $globalW = $(".global").width(),
|
|
|
|
// $slideImg = $(".slideImg"),
|
|
|
|
// $slidebanner = $(".slidebanner"),
|
|
|
|
// $slideshow = $(".slideshow"),
|
|
|
|
// $slideImgOW = $slideImg.width(),
|
|
|
|
// $slideImgOH = $slideImg.height();
|
|
|
|
// $slideImg.css({
|
|
|
|
// "widht": $globalW,
|
|
|
|
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
|
|
|
|
// });
|
|
|
|
// $slideshow.css({
|
|
|
|
// "width": $globalW,
|
|
|
|
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
|
|
|
|
// });
|
|
|
|
// alert(Math.floor(($globalW/$slideImgOW)*$slideImgOH))
|
|
|
|
// }
|
|
|
|
$('#index').live('pageinit',function(){
|
|
|
|
var $globalW = $(window).width(),
|
|
|
|
$slideshow = $(".slideshow");
|
|
|
|
$slideshow.css({
|
|
|
|
"width": $globalW, "height": Math.floor($globalW/720*240)
|
|
|
|
});
|
|
|
|
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
|
|
|
$(this).find(".newpic img").muImageResize({width: 280, height: 200});
|
|
|
|
$('.slideshow').cycle({
|
2013-01-11 10:34:20 +00:00
|
|
|
fx: $effect,
|
|
|
|
timeout: $timeout
|
2012-12-19 19:21:50 +00:00
|
|
|
});
|
|
|
|
$(".newlist").css({
|
|
|
|
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
|
|
|
})
|
|
|
|
// var oc_timer;
|
|
|
|
// clearTimeout(oc_timer);
|
|
|
|
// oc_timer = setTimeout(function () {
|
|
|
|
// $('.newlist').swipePlanes();
|
|
|
|
// }, 1000);
|
|
|
|
});
|
2013-01-11 10:34:20 +00:00
|
|
|
$('#announcement_content').live('pageinit',function(){
|
2012-12-19 19:21:50 +00:00
|
|
|
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
|
|
|
|
});
|
|
|
|
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
|
|
|
|
$('#map').live('pageinit', function() {
|
|
|
|
var $windowH = $(window).height();
|
|
|
|
$("#map_canvas").css({
|
|
|
|
'height' : $windowH,
|
|
|
|
})
|
|
|
|
gmAPI.add('basic_map', function() {
|
|
|
|
$('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() {
|
|
|
|
var self = this;
|
|
|
|
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
|
|
|
|
self.openInfoWindow({ 'content': "<%= I18n.t('mobile.location_description') %>" }, this);
|
|
|
|
});
|
|
|
|
}});
|
|
|
|
}).load('basic_map');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#map').live('pageshow', function() {
|
|
|
|
gmAPI.add('basic_map', function() { $('#map_canvas').gmap('refresh'); }).load('basic_map');
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).bind('pagebeforehide',function(){
|
|
|
|
$("section.main-menu").removeClass("expanded");
|
|
|
|
});
|
|
|
|
$(document).bind("ready", function(){
|
|
|
|
// $(".openmenu").live("tap", function(){
|
|
|
|
// $("section.main-menu").toggleClass("expanded");
|
|
|
|
// return!1
|
|
|
|
// });
|
|
|
|
$("body").delegate(".openmenu","vclick",function(){
|
|
|
|
$("section.main-menu").toggleClass("expanded");
|
|
|
|
return!1
|
|
|
|
});
|
|
|
|
// alert(navigator.userAgent)
|
|
|
|
// $(".newpic img").muImageResize({width: 280, height: 100});
|
|
|
|
// $('.newlist').swipePlanes();
|
|
|
|
});
|
|
|
|
|
|
|
|
// $(window).resize(function(){
|
|
|
|
// alert("Resize");
|
|
|
|
// $(".slidebanner").removeAttr("style");
|
|
|
|
// $(".slidebanner").find("div").removeAttr("style");
|
|
|
|
// $(".slideImg").removeAttr("style");
|
|
|
|
// var $globalW = $(window).width(),
|
|
|
|
// $slideshow = $(".slideshow");
|
|
|
|
// $slideshow.css({
|
|
|
|
// "width": $globalW, "height": Math.floor($globalW/720*240)
|
|
|
|
// });
|
|
|
|
// $(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
|
|
|
// $('.slideshow').cycle({
|
|
|
|
// fx:'scrollLeft',
|
|
|
|
// timeout: 6000,
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
$(window).bind("orientationchange", function(){
|
|
|
|
var oc_timer;
|
|
|
|
clearTimeout(oc_timer);
|
|
|
|
oc_timer = setTimeout(function () {
|
|
|
|
$(".slidebanner").removeAttr("style");
|
|
|
|
$(".slidebanner").find("div").removeAttr("style");
|
|
|
|
$(".slideImg").removeAttr("style");
|
|
|
|
// $(".newlist").removeAttr("style");
|
|
|
|
// $(".newlist").find(".clear").removeAttr("style");
|
|
|
|
// $(".newitem").removeAttr("style");
|
|
|
|
// $(".newlist").find(".clear").nextAll("div").remove();
|
|
|
|
var $globalW = $(window).width(),
|
|
|
|
$slideshow = $(".slideshow"),
|
|
|
|
$windowH = $(window).height();
|
|
|
|
$slideshow.css({
|
|
|
|
"width": $globalW, "height": Math.floor($globalW/720*240)
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
|
|
|
$('.slideshow').cycle({
|
2013-01-11 10:34:20 +00:00
|
|
|
fx: $effect,
|
|
|
|
timeout: $timeout
|
2012-12-19 19:21:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$(".newlist").css({
|
|
|
|
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
|
|
|
})
|
|
|
|
|
|
|
|
$("#map_canvas").css({
|
|
|
|
'height' : $windowH,
|
|
|
|
})
|
|
|
|
// $('.newlist').swipePlanes();
|
|
|
|
}, 500);
|
|
|
|
});
|